CMakeLists.txt 3.33 KB
Newer Older
frtabu's avatar
frtabu committed
1
2
3
4
5
6
7
8
9
10
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()


oai's avatar
oai committed
11

frtabu's avatar
frtabu committed
12
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
oai's avatar
oai committed
13
set(APPROOT ${OPENAIR_DIR}/common/utils/telnetsrv )
frtabu's avatar
frtabu committed
14
15
16
set(OPENAIR_BUILD_DIR $ENV{OPENAIR_DIR}/cmake_targets)
set(OPENAIR1_DIR $ENV{OPENAIR1_DIR})
set(OPENAIR2_DIR $ENV{OPENAIR2_DIR})
17
set(OPENAIR3_DIR $ENV{OPENAIR3_DIR})
frtabu's avatar
frtabu committed
18
19
20
21
22
23
24
25
26
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})

Mongazon's avatar
Mongazon committed
27
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 -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
frtabu's avatar
frtabu committed
28
29
30
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 
31
32
33
34
35
36
37
                    ${OPENAIR_COMMONUTILS_DIR}/msc ${OPENAIR_COMMONUTILS_DIR}/itti ${OPENAIR_COMMONUTILS_DIR}/hashtable ${OPENAIR_COMMONUTILS_DIR} ${OPENAIR_ASN1INC}
		    ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0  ${OPENAIR_COMMONUTILS_DIR}/msc ${OPENAIR_COMMONUTILS_DIR}/itti ${OPENAIR_COMMONUTILS_DIR}/hashtable ${OPENAIR_COMMONUTILS_DIR} ${OPENAIR_ASN1INC}
		    ${OPENAIR2_DIR}/LAYER2/RLC  ${OPENAIR2_DIR}/UTIL/LISTS   ${OPENAIR2_DIR}/UTIL/MEM  ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0 
		    ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0 ${OPENAIR2_DIR}/RRC/LITE ${OPENAIR_TARGET_DIR}/COMMON  ${OPENAIR_TARGET_DIR}/ARCH/COMMON
		    ${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK ${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG/ ${OPENAIR3_DIR}/NAS/COMMON/IES/ ${OPENAIR3_DIR}/NAS/COMMON/UTIL 
		    ${OPENAIR3_DIR}/NAS/COMMON/ESM/MSG/  ${OPENAIR3_DIR}/GTPV1-U  ${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared ${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include
		    ${OPENAIR3_DIR}/UTILS ${OPENAIR_NFAPIINC})
frtabu's avatar
frtabu committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

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")