CMakeLists.txt 2.52 KB
Newer Older
frtabu's avatar
frtabu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
IF(DEFINED ENV{OPENAIR_DIR})
  message("...using oai source files in $ENV{OPENAIR_DIR}")
ELSE()
  message("OPENAIR_DIR is not defined.  You must run \"source oaienv\" from the oai root dir")
  # exit early 
  return()
ENDIF()


set(APPROOT . )
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
set(OPENAIR_BUILD_DIR $ENV{OPENAIR_DIR}/cmake_targets)
set(OPENAIR1_DIR $ENV{OPENAIR1_DIR})
set(OPENAIR2_DIR $ENV{OPENAIR2_DIR})
set(OPENAIR_PHY_DIR $ENV{OPENAIR1_DIR}/PHY)
set(OPENAIR_TARGET_DIR $ENV{OPENAIR_DIR}/targets)
set(OPENAIR_COMMONUTILS_DIR $ENV{OPENAIR_DIR}/common/utils)
set(OPENAIR2_COMMON_DIR $ENV{OPENAIR_DIR}/openair2/COMMON)
set(OPENAIR_ASN1INC  ${OPENAIR_BUILD_DIR}/lte_build_oai/build/CMakeFiles/Rel14)
set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} )

set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS})

add_definitions (-DRel14  -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY  -DENABLE_USE_CPU_EXECUTION_TIME  -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1  -DEXMIMO_IOT -DJUMBO_FRAME  -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1  -DNAS_BUILT_IN_UE -DNAS_UE  -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK  -DOPENAIR1 -DOPENAIR2  -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM  -DPHY_CONTEXT -DPUCCH -DRel10=1  -DS1AP_VERSION=R10   -DTRACE_RLC_MUTEX -DUSER_MODE -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
add_compile_options( -fPIC -march=native -Ofast)

include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG 
                    ${OPENAIR_COMMONUTILS_DIR}/msc ${OPENAIR_COMMONUTILS_DIR}/itti ${OPENAIR_ASN1INC} ${OPENAIR_TARGET_DIR}/COMMON  ${OPENAIR_TARGET_DIR}/ARCH/COMMON
		    ${OPENAIR_NFAPIINC})

set(TELNETSRV_SOURCE
    ${APPROOT}/telnetsrv.c
    ${APPROOT}/telnetsrv_phycmd.c
    ${APPROOT}/telnetsrv_proccmd.c
    )

#set(TELNETSRV_ETHDEVCMD_SOURCE
#    ${APPROOT}/telnetsrv/telnetsrv_ethdevcmd.c
#    )



add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
#add_library(telnetsrv_ethdevcmd MODULE ${TELNETSRV_ETHDEVCMD_SOURCE} )


install(TARGETS telnetsrv DESTINATION bin)

if (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")
     install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/lte_build_oai/build)
endif (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")