CMakeLists.txt 2.67 KB
Newer Older
1 2 3 4
cmake_minimum_required(VERSION 2.8)

project(NAS_SIM_TOOLS)

5 6 7 8
include(FindPkgConfig)
pkg_search_module(CONFIG libconfig REQUIRED)
include_directories(${CONFIG_INCLUDE_DIRS})
add_definitions(-std=gnu99)
9 10

ENABLE_LANGUAGE(C)
11 12

set(CMAKE_C_FLAGS
13
  "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -Werror -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -g")
14 15 16 17

set(OPENAIR_DIR     $ENV{OPENAIR_DIR})
set(OPENAIR3_DIR    $ENV{OPENAIR_DIR}/openair3)

18
set(CONF2UEDATA_LIB_SRC
19
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
20
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_data.c
21
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_usim.c
22
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_network.c
23
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_user_plmn.c
24
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_parser.c
25 26
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/fs.c
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/display.c
27 28 29 30 31
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c
32
    ${OPENAIR_DIR}/common/utils/utils.c
33
)
34 35 36

set(conf2uedata_HDR
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.h
37
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.h
38 39 40 41 42 43
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.h
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.h
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.h
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.h
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.h
44
    ${OPENAIR_DIR}/common/utils/utils.h
45
)
46

47
include_directories(
48 49
    ${OPENAIR_DIR}/common/utils
    ${OPENAIR_DIR}/openair3/NAS/UE
50
    ${OPENAIR_DIR}/openair3/NAS/COMMON
51
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USER
52 53 54 55 56
    ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM
    ${OPENAIR_DIR}/openair3/NAS/UE/EMM/
    ${OPENAIR_DIR}/openair3/NAS/UE/ESM/
    ${OPENAIR_DIR}/openair3/NAS/COMMON/IES/
    ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL
57 58
)

59 60 61 62 63 64 65 66
# conf2uedata binary

set(conf2uedata_SRC
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/conf2uedata.c
	${CONF2UEDATA_LIB_SRC}
)

add_executable(conf2uedata  ${conf2uedata_SRC} ${conf2uedata_HDR} )
67
target_link_libraries(conf2uedata ${CONFIG_LIBRARIES})
68 69 70 71 72 73 74 75 76 77 78

# usim binary

set(usim_SRC
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/usim.c
	${CONF2UEDATA_LIB_SRC}
)


add_executable(usim  ${usim_SRC} ${conf2uedata_HDR} )
target_link_libraries(usim ${CONFIG_LIBRARIES})
79 80 81 82 83 84 85 86 87 88 89

# nvram binary

set(nvram_SRC
    ${OPENAIR_DIR}/openair3/NAS/TOOLS/nvram.c
	${CONF2UEDATA_LIB_SRC}
)


add_executable(nvram  ${nvram_SRC} ${conf2uedata_HDR} )
target_link_libraries(nvram ${CONFIG_LIBRARIES})