CMakeLists.txt 126 KB
Newer Older
1 2 3 4 5
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements.  See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
Cedric Roux's avatar
Cedric Roux committed
6
# * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# *      http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# *      contact@openairinterface.org
# */

knopp's avatar
knopp committed
22
# Author: laurent THOMAS, Lionel GAUTHIER
thomasl's avatar
thomasl committed
23

24
cmake_minimum_required (VERSION 3.0)
thomasl's avatar
thomasl committed
25

Thomas Laurent's avatar
Thomas Laurent committed
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133

# System packages that are required
# We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/
# or cmake provide a generic interface to pkg-config that widely used
###################################
include(FindPkgConfig)

pkg_search_module(LIBXML2 libxml-2.0 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIRS})

pkg_search_module(LIBXSLT libxslt REQUIRED)
include_directories(${LIBXSLT_INCLUDE_DIRS})

pkg_search_module(OPENSSL openssl REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIRS})

pkg_search_module(CONFIG libconfig REQUIRED)
include_directories(${CONFIG_INCLUDE_DIRS})

pkg_search_module(CRYPTO libcrypto REQUIRED)
include_directories(${CRYPTO_INCLUDE_DIRS})

#use native cmake method as this package is not in pkg-config
if (${RF_BOARD} STREQUAL "OAI_USRP")
  find_package(Boost REQUIRED)
  include_directories(${LIBBOOST_INCLUDE_DIR})

elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
    include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
    include_directories("/usr/local/include/")
    set(HW_SOURCE ${HW_SOURCE}
            ${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
    LINK_DIRECTORIES("/usr/local/lib")
    set(option_HW_lib "-lSoapySDR -rdynamic -ldl")

endif (${RF_BOARD} STREQUAL "OAI_USRP")

pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND})
  message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
else()
  include_directories(${OPENPGM_INCLUDE_DIRS})
endif()

pkg_search_module(NETTLE nettle)
if(NOT ${NETTLE_FOUND})
  message( FATAL_ERROR "PACKAGE nettle not found: some targets will fail. Run build_oai -I again!")
else()
  include_directories(${NETTLE_INCLUDE_DIRS})
endif()

message ("NETTLE VERSION_INSTALLED  = ${NETTLE_VERSION}")

string(REGEX REPLACE "([0-9]+).*" "\\1" NETTLE_VERSION_MAJOR ${NETTLE_VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" NETTLE_VERSION_MINOR ${NETTLE_VERSION})
message ("NETTLE_VERSION_MAJOR = ${NETTLE_VERSION_MAJOR}")
message ("NETTLE_VERSION_MINOR = ${NETTLE_VERSION_MINOR}")

if ("${NETTLE_VERSION_MAJOR}" STREQUAL "" OR "${NETTLE_VERSION_MINOR}" STREQUAL "")
  message( FATAL_ERROR "The nettle version not detected properly. Try to run build_oai -I again" )
endif()

add_definitions("-DNETTLE_VERSION_MAJOR=${NETTLE_VERSION_MAJOR}")
add_definitions("-DNETTLE_VERSION_MINOR=${NETTLE_VERSION_MINOR}")

pkg_search_module(XPM xpm)
if(NOT ${XPM_FOUND})
  message("PACKAGE xpm not found: some targets will fail")
else()
  include_directories(${XPM_INCLUDE_DIRS})
endif()

# Atlas is required by some packages, but not found in pkg-config
# So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
  include_directories("/usr/include/atlas")
  LINK_DIRECTORIES("/usr/lib/lapack")
  LINK_DIRECTORIES("/usr/lib64")
  LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!

  if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
     list(APPEND ATLAS_LIBRARIES blas)

  else() # Case for Ubuntu
     list(APPEND ATLAS_LIBRARIES cblas)
  endif()

  if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
     list(APPEND ATLAS_LIBRARIES tatlas)
  else()
     list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
  endif()

  list(APPEND ATLAS_LIBRARIES lapack)

# for ubuntu 17.10, directories are different
elseif(EXISTS "/usr/include/x86_64-linux-gnu/cblas.h")

  include_directories("/usr/include/x86_64-linux-gnu")
  LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
  list(APPEND ATLAS_LIBRARIES cblas)
  list(APPEND ATLAS_LIBRARIES atlas)
  list(APPEND ATLAS_LIBRARIES lapack)

else()
  message("No Blas/Atlas libs found, some targets will fail")
endif()

134 135 136
#########################################################
# Base directories, compatible with legacy OAI building #
#########################################################
thomasl's avatar
thomasl committed
137
set (OPENAIR_DIR     $ENV{OPENAIR_DIR})
138 139 140 141
if("${OPENAIR_DIR}" STREQUAL "")
  string(REGEX REPLACE "/cmake_targets.*$" "" OPENAIR_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()

Cedric Roux's avatar
Cedric Roux committed
142 143
set (NFAPI_DIR       ${OPENAIR_DIR}/nfapi/open-nFAPI)
set (NFAPI_USER_DIR  ${OPENAIR_DIR}/nfapi/oai_integration)
thomasl's avatar
thomasl committed
144 145 146 147
set (OPENAIR1_DIR    ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR    ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR    ${OPENAIR_DIR}/openair3)
set (OPENAIR_TARGETS ${OPENAIR_DIR}/targets)
148
set (OPENAIR3_DIR    ${OPENAIR_DIR}/openair3)
thomasl's avatar
thomasl committed
149 150 151 152 153
set (OPENAIR_CMAKE   ${OPENAIR_DIR}/cmake_targets)
set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})

project (OpenAirInterface)

WANG Tsu-Han's avatar
WANG Tsu-Han committed
154 155 156 157 158 159


##############################################
# Base CUDA setting
##############################################
find_package(CUDA)
160 161 162
if (CUDA_FOUND)
    message ("cuda include ${CUDA_INCLUDE_DIRS}")
    message ("cuda library ${CUDA_LIBRARY_DIRS}")
WANG Tsu-Han's avatar
WANG Tsu-Han committed
163

164
    add_definitions("-L/usr/local/cuda/lib64")
WANG Tsu-Han's avatar
WANG Tsu-Han committed
165

166 167
    SET(CUDA_NVCC_FLAGS
      "${CUDA_NVCC_FLAGS};-arch=sm_60;")
WANG Tsu-Han's avatar
WANG Tsu-Han committed
168

169 170 171 172 173 174 175 176 177 178
    # Disable warnings for CUDA
    SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-lpthread;-w;-O3;--default-stream;per-thread;-I/usr/local/cuda/inc;-L/usr/local/cuda/lib -lcutil;-rdc=true;-lcudadevrt")
    SET(CUDA_VERBOSE_BUILD ON)
    SET(CUDA_HOST_COMPILER "/usr/bin/g++")

    SET(CUDA_SEPARABLE_COMPILATION ON)

else (CUDA_FOUND)
   message ("No CUDA tool installed")
endif ()
WANG Tsu-Han's avatar
WANG Tsu-Han committed
179 180


thomasl's avatar
thomasl committed
181 182 183
###########################################
# macros to define options as there is numerous options in oai
################################################
thomasl's avatar
thomasl committed
184 185 186 187 188 189 190 191 192 193
macro(add_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  add_definitions("-D${name}=${value}")
endmacro(add_option)

thomasl's avatar
thomasl committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
macro(add_boolean_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  set_property(CACHE ${name} PROPERTY TYPE BOOL)
  if (${value})
    add_definitions("-D${name}")
  endif (${value})
endmacro(add_boolean_option)

macro(add_integer_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  add_definitions("-D${name}=${value}")
endmacro(add_integer_option)

macro(add_list1_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  set_property(CACHE ${name} PROPERTY STRINGS ${ARGN})
  if(NOT "${value}" STREQUAL "False")
    add_definitions("-D${name}=${value}")
  endif()
endmacro(add_list1_option)

macro(add_list2_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  set_property(CACHE ${name} PROPERTY STRINGS ${ARGN})
  if(NOT "${value}" STREQUAL "False")
    add_definitions("-D${value}=1")
  endif()
endmacro(add_list2_option)

243 244 245 246 247 248 249 250 251 252 253 254
macro(add_list_string_option name val helpstr)
  if(DEFINED ${name})
    set(value ${${name}})
  else(DEFINED ${name})
    set(value ${val})
  endif()
  set(${name} ${value} CACHE STRING "${helpstr}")
  set_property(CACHE ${name} PROPERTY STRINGS ${ARGN})
  if(NOT "${value}" STREQUAL "False")
    add_definitions("-D${name}=\"${value}\"")
  endif()
endmacro(add_list_string_option)
255 256 257 258 259 260 261 262

function(make_version VERSION_VALUE)
  math(EXPR RESULT "0")
  foreach (ARG ${ARGN})
    math(EXPR RESULT "${RESULT} * 16 + ${ARG}")
  endforeach()
  set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE)
endfunction()
263
####################################################
thomasl's avatar
thomasl committed
264 265
# compilation flags
#############################################
266

267
#set(CMAKE_BUILD_TYPE "Debug")
thomasl's avatar
thomasl committed
268 269 270
if (CMAKE_BUILD_TYPE STREQUAL "")
   set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
271
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
272
add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." Debug Release RelWithDebInfo MinSizeRel)
thomasl's avatar
thomasl committed
273

274 275
Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
276
  set(C_FLAGS_PROCESSOR "-gdwarf-2 -mfloat-abi=hard -mfpu=neon -lgcc -lrt")
277
else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
278 279 280 281
  if(EXISTS  "/proc/cpuinfo")
    file(STRINGS "/proc/cpuinfo" CPUINFO REGEX flags LIMIT_COUNT 1)
    if (CPUINFO MATCHES "avx2")
      set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mavx2")
282 283 284
      set(COMPILATION_AVX2 "True")
    else()
      set(COMPILATION_AVX2 "False")
285 286 287 288 289 290 291 292 293
    endif()
    if (CPUINFO MATCHES "sse4_1")
      set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1")
    endif()
    if (CPUINFO MATCHES "ssse3")
      set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mssse3")
    endif()
  else()
    Message("/proc/cpuinfo does not exit. We will use manual CPU flags")
294
  endif()
295
endif()
296 297 298

set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}")

299 300
Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}")

301
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
302
  if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) )
303
    Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -mavx2\" ")
304 305
  endif()
endif()
306

thomasl's avatar
thomasl committed
307
#
308
set(CMAKE_C_FLAGS
Thomas Laurent's avatar
Thomas Laurent committed
309
  "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
310
# add autotools definitions that were maybe used!
311
if (CUDA_FOUND)
312 313 314 315 316 317 318 319 320 321
	set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
    set(CUDA_CMAKE_C_FLAGS
           "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D CUDA_FLAG"
    )
    set(CUDA_CMAKE_CXX_FLAGS
	"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG"
    )
	
	set(CMAKE_C_FLAGS
           "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER} -D CUDA_FLAG"
322 323
    )
    set(CMAKE_CXX_FLAGS
324
	"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER} -D CUDA_FLAG"
325 326 327 328 329 330 331
    )
else (CUDA_FOUND)
    set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
    set(CMAKE_C_FLAGS
           "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
    )
    set(CMAKE_CXX_FLAGS
332
	"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER}"
333 334
    )
endif ()
335

336
add_definitions("-DASN_DISABLE_OER_SUPPORT")
337 338

#########################
339
set(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
340
#########################
341 342
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
343
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0 -DMALLOC_CHECK_=3")
344
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
345
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS}  -O3")
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368

set(GIT_BRANCH        "UNKNOWN")
set(GIT_COMMIT_HASH   "UNKNOWN")
set(GIT_COMMIT_DATE   "UNKNOWN")

find_package(Git)
if(GIT_FOUND)
  message("git found: ${GIT_EXECUTABLE}")
  # Get the current working branch
  execute_process(
    COMMAND git rev-parse --abbrev-ref HEAD
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
    OUTPUT_VARIABLE GIT_BRANCH
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )

  # Get the latest abbreviated commit hash of the working branch
  execute_process(
    COMMAND git log -1 --format=%h
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
    OUTPUT_VARIABLE GIT_COMMIT_HASH
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )
369

370 371 372 373 374 375 376 377
  # Get the latest commit date of the working branch
  execute_process(
    COMMAND git log -1 --format=%cd
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
    OUTPUT_VARIABLE GIT_COMMIT_DATE
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )
endif()
thomasl's avatar
thomasl committed
378

thomasl's avatar
thomasl committed
379 380 381

# Below is a hard-coded info
set (FIRMWARE_VERSION "No svn information")
thomasl's avatar
thomasl committed
382
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
383 384
add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"")
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
385
#add_definitions("-DEMIT_ASN_DEBUG=1")
thomasl's avatar
thomasl committed
386 387 388 389


# Debug related options
#########################################
390
add_boolean_option(ASN_DEBUG           False "ASN1 coder/decoder Debug")
391
add_boolean_option(EMIT_ASN_DEBUG      False "ASN1 coder/decoder Debug")
392 393 394 395 396
add_boolean_option(MSG_PRINT           False "print debug messages")
add_boolean_option(DISABLE_XER_PRINT   False "print XER Format")
add_boolean_option(XER_PRINT           False "print XER Format")
add_boolean_option(RRC_MSG_PRINT       False "print RRC messages")
add_boolean_option(PDCP_MSG_PRINT      False "print PDCP messages to /tmp/pdcp.log")
397 398 399
add_boolean_option(DEBUG_PDCP_PAYLOAD  False "print PDCP PDU to stdout")  # if true, make sure that global and PDCP log levels are trace
add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(TRACE_RLC_PAYLOAD   False "print RLC PDU to stdout") # if true, make sure that global and PDCP log levels are trace
400 401 402
add_boolean_option(TEST_OMG            False "???")
add_boolean_option(DEBUG_OMG           False "???")
add_boolean_option(PRINT_STATS         False "This adds the possibility to see the status")
403
add_boolean_option(T_TRACER            True  "Activate the T tracer, a debugging/monitoring framework" )
404
add_boolean_option(UE_AUTOTEST_TRACE   False "Activate UE autotest specific logs")
Gabriel's avatar
Gabriel committed
405 406
add_boolean_option(UE_DEBUG_TRACE      False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE     False "Activate UE timing trace")
407
add_boolean_option(DEBUG_CONSOLE       False "makes debugging easier, disables stdout/stderr buffering")
thomasl's avatar
thomasl committed
408

Thomas Laurent's avatar
Thomas Laurent committed
409
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
410 411 412 413
add_library(ITTI
  ${OCP_ITTI}/intertask_interface.cpp
  ${OPENAIR_DIR}/common/utils/backtrace.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
414
add_dependencies(ITTI rrc_flag)
415
  set(ITTI_LIB ITTI)
gauthier's avatar
gauthier committed
416
  set(GTPU_need_ITTI ${OPENAIR3_DIR}/GTPV1-U/gtpv1u_eNB.c)
417

thomasl's avatar
thomasl committed
418

419 420 421
##################################################
# ASN.1 grammar C code generation & dependencies #
##################################################
thomasl's avatar
thomasl committed
422 423 424 425
# A difficulty: asn1c generates C code of a un-predictable list of files
# so, generate the c from asn1c once at cmake run time
# So, if someone modify the asn.1 source file in such as way that it will create
# (so creating new asn.1 objects instead of modifying the object attributes)
426
# New C code source file, cmake must be re-run (instead of re-running make only)
thomasl's avatar
thomasl committed
427 428 429
#############
set(asn1_generated_dir ${OPENAIR_BIN_DIR})

430 431 432
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
set(protobuf_generated_dir ${OPENAIR_BIN_DIR})

433

thomasl's avatar
thomasl committed
434 435
# RRC
######
436 437 438 439
set (RRC_ASN1_VERSION "Rel15")
make_version(LTE_RRC_VERSION 15 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)

440
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
441
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
Thomas Laurent's avatar
Thomas Laurent committed
442 443 444

# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_"
Cedric Roux's avatar
Cedric Roux committed
445
                RESULT_VARIABLE ret)
Cedric Roux's avatar
Cedric Roux committed
446
if (NOT ${ret} STREQUAL 0)
447
  message(FATAL_ERROR "${ret}: error")
Cedric Roux's avatar
Cedric Roux committed
448
endif (NOT ${ret} STREQUAL 0)
thomasl's avatar
thomasl committed
449
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
Thomas Laurent's avatar
Thomas Laurent committed
450 451 452 453 454 455
add_custom_target (
  rrc_flag ALL
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_"
  DEPENDS ${RRC_GRAMMAR}
  )

456
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
Thomas Laurent's avatar
Thomas Laurent committed
457
add_library(RRC_LIB ${rrc_source}
458 459
    ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c
    ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c)
Thomas Laurent's avatar
Thomas Laurent committed
460
add_dependencies(RRC_LIB rrc_flag)
thomasl's avatar
thomasl committed
461 462
include_directories ("${RRC_FULL_DIR}")

463

464
#NR RRC
465
#######
466 467 468
set (NR_RRC_ASN1_VERSION "NR_Rel15" )
make_version(NR_RRC_VERSION 15 6 0)
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
469
add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
470
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION})
471

Thomas Laurent's avatar
Thomas Laurent committed
472 473 474 475 476 477
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice"
                RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
  message(FATAL_ERROR "${ret}: error")
endif ()
478 479
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
Thomas Laurent's avatar
Thomas Laurent committed
480 481 482 483 484
add_custom_target (
  nr_rrc_flag ALL
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}" "NR_" "-findirect-choice"
  DEPENDS ${NR_RRC_GRAMMAR}
  )
485

Thomas Laurent's avatar
Thomas Laurent committed
486 487
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source} 
    ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c
488
    ${OPENAIR2_DIR}/RRC/NR/nr_ngap_gNB.c
Thomas Laurent's avatar
Thomas Laurent committed
489 490 491
    )
add_dependencies(NR_RRC_LIB nr_rrc_flag)
include_directories ("${NR_RRC_FULL_DIR}")
492

thomasl's avatar
thomasl committed
493 494 495 496
# S1AP
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
##############
497
set (S1AP_RELEASE R15)
thomasl's avatar
thomasl committed
498

gauthier's avatar
gauthier committed
499
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
500 501 502
make_version(S1AP_VERSION 15 6 0)
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")

503
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
504 505
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
Bing-Kai Hong's avatar
F1:  
Bing-Kai Hong committed
506

Thomas Laurent's avatar
Thomas Laurent committed
507 508
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps
Cedric Roux's avatar
Cedric Roux committed
509
                RESULT_VARIABLE ret)
510
if (NOT ${ret} STREQUAL 0)
511
  message(FATAL_ERROR "${ret}: error")
Cedric Roux's avatar
Cedric Roux committed
512
endif (NOT ${ret} STREQUAL 0)
thomasl's avatar
thomasl committed
513
file(GLOB S1AP_source ${S1AP_C_DIR}/*.c)
514

Thomas Laurent's avatar
Thomas Laurent committed
515 516 517
add_custom_target (
  s1ap_flag ALL
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps
Thomas Laurent's avatar
Thomas Laurent committed
518
  DEPENDS  "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" 
519
)
Thomas Laurent's avatar
Thomas Laurent committed
520

521
add_library(S1AP_LIB
522 523 524
  ${S1AP_source}
  ${S1AP_DIR}/s1ap_common.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
525
add_dependencies(S1AP_LIB rrc_flag s1ap_flag)
526

thomasl's avatar
thomasl committed
527 528
include_directories ("${S1AP_C_DIR}")
include_directories ("${S1AP_DIR}")
thomasl's avatar
thomasl committed
529

530 531 532 533 534 535 536 537 538 539 540 541 542 543
add_library(S1AP_ENB
  ${S1AP_DIR}/s1ap_eNB.c
  ${S1AP_DIR}/s1ap_eNB_context_management_procedures.c
  ${S1AP_DIR}/s1ap_eNB_decoder.c
  ${S1AP_DIR}/s1ap_eNB_encoder.c
  ${S1AP_DIR}/s1ap_eNB_handlers.c
  ${S1AP_DIR}/s1ap_eNB_itti_messaging.c
  ${S1AP_DIR}/s1ap_eNB_management_procedures.c
  ${S1AP_DIR}/s1ap_eNB_nas_procedures.c
  ${S1AP_DIR}/s1ap_eNB_nnsf.c
  ${S1AP_DIR}/s1ap_eNB_overload.c
  ${S1AP_DIR}/s1ap_eNB_trace.c
  ${S1AP_DIR}/s1ap_eNB_ue_context.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
544
add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
thomasl's avatar
thomasl committed
545

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684

#M2AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(M2AP_RELEASE R14 "M2AP ASN.1 grammar version" R14)

set(M2AP_DIR ${OPENAIR2_DIR}/M2AP)
if (${M2AP_RELEASE} STREQUAL "R8")
  make_version(M2AP_VERSION 8 9 0)
  set(M2AP_ASN_FILES m2ap-8.9.0.asn1)
elseif (${M2AP_RELEASE} STREQUAL "R11")
  make_version(M2AP_VERSION 11 9 0)
  set(M2AP_ASN_FILES m2ap-11.9.0.asn1)
elseif (${M2AP_RELEASE} STREQUAL "R12")
  make_version(M2AP_VERSION 12 9 0)
  set(M2AP_ASN_FILES m2ap-12.9.0.asn1)
elseif (${M2AP_RELEASE} STREQUAL "R14")
  make_version(M2AP_VERSION 14 0 0)
  set(M2AP_ASN_FILES m2ap-14.0.0.asn1)
elseif (${M2AP_RELEASE} STREQUAL "R15")
  make_version(M2AP_VERSION 15 1 0)
  set(M2AP_ASN_FILES m2ap-15.1.0.asn1)
endif(${M2AP_RELEASE} STREQUAL "R8")
add_definitions(-DM2AP_VERSION=${M2AP_VERSION})
set(M2AP_ASN_DIR ${M2AP_DIR}/MESSAGES/ASN1/${M2AP_RELEASE})
set(M2AP_C_DIR ${asn1_generated_dir}/M2AP_${M2AP_RELEASE})

# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"  "M2AP_" -fno-include-deps -DEMIT_ASN_DEBUG=1
                RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
  message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0)

file(GLOB M2AP_source ${M2AP_C_DIR}/*.c)

add_custom_target (
  m2_flag ALL
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"  "M2AP_" -fno-include-deps
  DEPENDS ${M2AP_ASN_DIR}/${M2AP_ASN_FILES}
  )

add_library(M2AP_LIB
  ${M2AP_source}
  ${M2AP_DIR}/m2ap_common.c
  )
add_dependencies(M2AP_LIB rrc_flag m2_flag)

include_directories ("${M2AP_C_DIR}")
include_directories ("${M2AP_DIR}")

add_library(M2AP_ENB
  ${M2AP_DIR}/m2ap_eNB.c
  ${M2AP_DIR}/m2ap_MCE.c
  ${M2AP_DIR}/m2ap_decoder.c
  ${M2AP_DIR}/m2ap_encoder.c
  ${M2AP_DIR}/m2ap_MCE_handler.c
  ${M2AP_DIR}/m2ap_eNB_handler.c
  ${M2AP_DIR}/m2ap_itti_messaging.c
  ${M2AP_DIR}/m2ap_eNB_management_procedures.c
  ${M2AP_DIR}/m2ap_eNB_generate_messages.c
  ${M2AP_DIR}/m2ap_MCE_management_procedures.c
  ${M2AP_DIR}/m2ap_MCE_generate_messages.c
  ${M2AP_DIR}/m2ap_ids.c
  ${M2AP_DIR}/m2ap_timers.c
  ${M2AP_DIR}/m2ap_MCE_interface_management.c
  ${M2AP_DIR}/m2ap_eNB_interface_management.c
 )
add_dependencies(M2AP_ENB rrc_flag m2_flag)

#M3AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(M3AP_RELEASE R14 "M3AP ASN.1 grammar version" R14)

set(M3AP_DIR ${OPENAIR3_DIR}/M3AP)
if (${M3AP_RELEASE} STREQUAL "R8")
  make_version(M3AP_VERSION 8 9 0)
  set(M3AP_ASN_FILES m3ap-8.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R11")
  make_version(M3AP_VERSION 11 9 0)
  set(M3AP_ASN_FILES m3ap-11.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R12")
  make_version(M3AP_VERSION 12 9 0)
  set(M3AP_ASN_FILES m3ap-12.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R14")
  make_version(M3AP_VERSION 14 0 0)
  set(M3AP_ASN_FILES m3ap-14.0.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R15")
  make_version(M3AP_VERSION 15 1 0)
  set(M3AP_ASN_FILES m3ap-15.1.0.asn1)
endif(${M3AP_RELEASE} STREQUAL "R8")
add_definitions(-DM3AP_VERSION=${M3AP_VERSION})
set(M3AP_ASN_DIR ${M3AP_DIR}/MESSAGES/ASN1/${M3AP_RELEASE})
set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE})

# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"  "M3AP_" -fno-include-deps
                RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
  message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0)

file(GLOB M3AP_source ${M3AP_C_DIR}/*.c)

add_custom_target (
  m3_flag ALL
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"  "M3AP_" -fno-include-deps
  DEPENDS ${M3AP_ASN_DIR}/${M3AP_ASN_FILES}
  )

add_library(M3AP_LIB
  ${M3AP_source}
  ${M3AP_DIR}/m3ap_common.c
  )
add_dependencies(M3AP_LIB rrc_flag m3_flag)

include_directories ("${M3AP_C_DIR}")
include_directories ("${M3AP_DIR}")

add_library(M3AP_ENB
  ${M3AP_DIR}/m3ap_decoder.c
  ${M3AP_DIR}/m3ap_encoder.c
  ${M3AP_DIR}/m3ap_MCE_handler.c
  ${M3AP_DIR}/m3ap_MME_handler.c
  ${M3AP_DIR}/m3ap_MME.c
  ${M3AP_DIR}/m3ap_MME_management_procedures.c
  ${M3AP_DIR}/m3ap_MME_interface_management.c
  ${M3AP_DIR}/m3ap_MCE.c
  ${M3AP_DIR}/m3ap_MCE_management_procedures.c
  ${M3AP_DIR}/m3ap_MCE_interface_management.c
  ${M3AP_DIR}/m3ap_itti_messaging.c
  ${M3AP_DIR}/m3ap_ids.c
  ${M3AP_DIR}/m3ap_timers.c
  )
add_dependencies(M3AP_ENB rrc_flag m3_flag)

685 686 687 688
#X2AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
689
set (X2AP_RELEASE R15)
690

691
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
692 693 694
make_version(X2AP_VERSION 15 6 0)
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)

695
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
696 697
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
Thomas Laurent's avatar
Thomas Laurent committed
698 699
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"  "X2AP_" -fno-include-deps
Cedric Roux's avatar
Cedric Roux committed
700
                RESULT_VARIABLE ret)
701
if (NOT ${ret} STREQUAL 0)
702
  message(FATAL_ERROR "${ret}: error")
Cedric Roux's avatar
Cedric Roux committed
703
endif (NOT ${ret} STREQUAL 0)
704

Thomas Laurent's avatar
Thomas Laurent committed
705
file(GLOB X2AP_source ${X2AP_C_DIR}/*.c)
706

Thomas Laurent's avatar
Thomas Laurent committed
707 708 709
add_custom_target (
  x2_flag ALL
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"  "X2AP_" -fno-include-deps
710
  DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
711 712 713 714 715 716
  )

add_library(X2AP_LIB
  ${X2AP_source}
  ${X2AP_DIR}/x2ap_common.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
717
add_dependencies(X2AP_LIB rrc_flag x2_flag)
718 719 720 721

include_directories ("${X2AP_C_DIR}")
include_directories ("${X2AP_DIR}")

722 723
add_library(X2AP_ENB
  ${X2AP_DIR}/x2ap_eNB.c
724 725
  ${X2AP_DIR}/x2ap_eNB_decoder.c
  ${X2AP_DIR}/x2ap_eNB_encoder.c
726
  ${X2AP_DIR}/x2ap_eNB_handler.c
727
  ${X2AP_DIR}/x2ap_eNB_itti_messaging.c
728
  ${X2AP_DIR}/x2ap_eNB_management_procedures.c
729
  ${X2AP_DIR}/x2ap_eNB_generate_messages.c
730
  ${X2AP_DIR}/x2ap_ids.c
Cedric Roux's avatar
Cedric Roux committed
731
  ${X2AP_DIR}/x2ap_timers.c
732
 )
Thomas Laurent's avatar
Thomas Laurent committed
733
add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag)
734

735

736
# F1AP
737
##############
738
add_list1_option(F1AP_RELEASE R15 "F1AP ASN.1 grammar version" R15)
739
set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
740
if (${F1AP_RELEASE} STREQUAL "R15")
741 742
  make_version(F1AP_VERSION 15 2 1)
  set (ASN1RELDIR R15.2.1)
743 744
endif(${F1AP_RELEASE} STREQUAL "R15")
add_definitions(-DF1AP_VERSION=${F1AP_VERSION})
745 746
set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(F1AP_ASN_FILES
747 748 749 750 751 752
  ${F1AP_ASN_DIR}/F1AP-CommonDataTypes.asn
  ${F1AP_ASN_DIR}/F1AP-Constants.asn
  ${F1AP_ASN_DIR}/F1AP-PDU-Descriptions.asn
  ${F1AP_ASN_DIR}/F1AP-PDU-Contents.asn
  ${F1AP_ASN_DIR}/F1AP-IEs.asn
  ${F1AP_ASN_DIR}/F1AP-Containers.asn
753 754
  )

755
set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
756
message("calling ASN1C_PREFIX=F1AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}")
757
execute_process(COMMAND mkdir -p ${F1AP_ASN_GENERATED_C_DIR}
758
   COMMAND env "ASN1C_PREFIX=F1AP_" asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps -D ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
Bing-Kai Hong's avatar
F1:  
Bing-Kai Hong committed
759 760 761 762
                RESULT_VARIABLE ret
                OUTPUT_QUIET
                ERROR_QUIET)

763
if (NOT ${ret} STREQUAL 0)
764
  message(FATAL_ERROR "asn1c: error")
765 766
endif (NOT ${ret} STREQUAL 0)

767
file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
768
add_library(F1AP_LIB
769 770
  ${F1AP_ASN_GENERATED_C_FILES}
)
771

772
include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
773 774
include_directories ("${F1AP_DIR}")

775
file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
776
add_library(F1AP
777 778
  ${F1AP_C_FILES}
)
779

780

thomasl's avatar
thomasl committed
781 782
# Hardware dependant options
###################################
thomasl's avatar
thomasl committed
783
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
Xiwen JIANG's avatar
Xiwen JIANG committed
784
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
thomasl's avatar
thomasl committed
785

786 787
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")

788

789

790
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
791 792 793 794 795 796 797 798
#NOKIA config enhancement
set (CONFIG_ROOTDIR
    ${OPENAIR_DIR}/common/config
   )
set (CONFIG_SOURCES
    ${CONFIG_ROOTDIR}/config_load_configmodule.c
    ${CONFIG_ROOTDIR}/config_userapi.c
    ${CONFIG_ROOTDIR}/config_cmdline.c
799
   )
800 801
set (CONFIG_LIBCONFIG_SOURCES
    ${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
802 803
    )
add_library(CONFIG_LIB ${CONFIG_SOURCES})
804
add_library(params_libconfig MODULE ${CONFIG_LIBCONFIG_SOURCES} )
805
target_link_libraries(params_libconfig config)
oai's avatar
oai committed
806 807 808 809
# shared library loader
set (SHLIB_LOADER_SOURCES
    ${OPENAIR_DIR}/common/utils/load_module_shlib.c
)
810 811
# include RF devices / transport protocols library modules
######################################################################
thomasl's avatar
thomasl committed
812

813
include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/")
814
set(HWLIB_USRP_SOURCE
815 816 817
  ${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
  )
add_library(oai_usrpdevif MODULE ${HWLIB_USRP_SOURCE} )
818
target_link_libraries(oai_usrpdevif uhd)
thomasl's avatar
thomasl committed
819

820
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
821
set(HWLIB_BLADERF_SOURCE
822 823 824
  ${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
  )
add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} )
825
target_link_libraries(oai_bladerfdevif bladeRF)
826

827
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/")
ignasj's avatar
LimeSDR  
ignasj committed
828

829
set(HWLIB_LMSSDR_SOURCE
830 831 832
  ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
  )
add_library(oai_lmssdrdevif MODULE ${HWLIB_LMSSDR_SOURCE} )
833 834
target_include_directories(oai_lmssdrdevif PRIVATE /usr/local/include/lime)
target_link_libraries(oai_lmssdrdevif LimeSuite )
835

836
include_directories("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/")
837
set(TPLIB_ETHERNET_SOURCE
838 839 840 841 842 843
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/eth_raw.c
  )
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )

Clayton Shepard's avatar
Clayton Shepard committed
844 845 846 847 848 849
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
set(option_HWIRISLIB_lib "-l SoapySDR")
set(HWLIB_IRIS_SOURCE
        ${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
        )
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
rdoost's avatar
rdoost committed
850
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.7/)
Clayton Shepard's avatar
Clayton Shepard committed
851 852
target_link_libraries(oai_irisdevif SoapySDR)

Cedric Roux's avatar
Cedric Roux committed
853 854 855 856
# TCP bridge libraries
######################################################################

# this one is for internal use at Eurecom and is not documented
Cedric Roux's avatar
Cedric Roux committed
857 858 859
set(HWLIB_TCP_BRIDGE_SOURCE
  ${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge.c
  )
Cedric Roux's avatar
Cedric Roux committed
860
add_library(tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} )
Cedric Roux's avatar
Cedric Roux committed
861

Cedric Roux's avatar
Cedric Roux committed
862 863 864
#get_target_property(tcp_bridge_cflags tcp_bridge COMPILE_FLAGS)
#set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "${tcp_bridge_cflags} -fvisibility=hidden")
set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
865

Cedric Roux's avatar
Cedric Roux committed
866 867 868 869 870 871 872
# this one is to connect OAI eNB and OAI UE in the basic simulator
# see targets/ARCH/tcp_bridge/README.tcp_bridge_oai for usage
set(HWLIB_TCP_BRIDGE_OAI_SOURCE
  ${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge_oai.c
  )
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
873

874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909
# Benetel 4G library
######################################################################

set(HWLIB_BENETEL_4G_SOURCE
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/benetel.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/shared_buffers.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/low.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/low_dpdk.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/4g/dpdk_driver.c
  )
add_library(benetel_4g MODULE ${HWLIB_BENETEL_4G_SOURCE} )

set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")

SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
TARGET_LINK_LIBRARIES(benetel_4g ${DPDK_LIBS})
TARGET_LINK_LIBRARIES(benetel_4g pthread dl rt m numa)

# Benetel 5G library
######################################################################

set(HWLIB_BENETEL_5G_SOURCE
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/benetel.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/shared_buffers.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/low.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/low_dpdk.c
  ${OPENAIR_TARGETS}/ARCH/ETHERNET/benetel/5g/dpdk_driver.c
  )
add_library(benetel_5g MODULE ${HWLIB_BENETEL_5G_SOURCE} )

set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native -I$ENV{RTE_SDK}/$ENV{RTE_TARGET}/include")

SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
TARGET_LINK_LIBRARIES(benetel_5g ${DPDK_LIBS})
TARGET_LINK_LIBRARIES(benetel_5g pthread dl rt m numa)

910
##########################################################
911

thomasl's avatar
thomasl committed
912 913
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")

laurent's avatar
laurent committed
914
Message("DEADLINE_SCHEDULER flag  is ${DEADLINE_SCHEDULER}")
Rohit Gupta's avatar
Rohit Gupta committed
915
Message("CPU_Affinity flag is ${CPU_AFFINITY}")
thomasl's avatar
thomasl committed
916 917 918 919

##############################################################
#    ???!!! TO BE DOCUMENTED OPTIONS !!!???
##############################################################
920

thomasl's avatar
thomasl committed
921 922 923
add_boolean_option(NO_RRM                  True  "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")

add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
924
add_boolean_option(DEADLINE_SCHEDULER False "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
Rohit Gupta's avatar
Rohit Gupta committed
925
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
926
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
thomasl's avatar
thomasl committed
927
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
928

929
add_boolean_option(MESSAGE_CHART_GENERATOR False         "For generating sequence diagrams")
gauthier's avatar
gauthier committed
930 931
add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams")
add_boolean_option(MESSAGE_CHART_GENERATOR_PHY     False "trace some PHY exchanges in sequence diagrams")
932

Xu Bo's avatar
Xu Bo committed
933
add_boolean_option(UE_EXPANSION             False         "enable UE_EXPANSION with max 256 UE")
934 935
add_boolean_option(PHY_TX_THREAD            False         "enable UE_EXPANSION with max 256 UE")
add_boolean_option(PRE_SCD_THREAD           False         "enable UE_EXPANSION with max 256 UE")
936

frtabu's avatar
frtabu committed
937
########################
thomasl's avatar
thomasl committed
938 939
# Include order
##########################
gauthier's avatar
gauthier committed
940
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
thomasl's avatar
thomasl committed
941 942 943 944

##########################
# SCHEDULING/REAL-TIME/PERF options
##########################
945 946 947
add_boolean_option(ENABLE_USE_CPU_EXECUTION_TIME False "Add data in vcd traces: disable it if perf issues")
add_boolean_option(ENABLE_VCD              False  "always true now, time measurements of proc calls and var displays")
add_boolean_option(ENABLE_VCD_FIFO         False  "time measurements of proc calls and var displays sent to FIFO (one more thread)")
thomasl's avatar
thomasl committed
948 949 950 951 952 953 954
add_boolean_option(LINUX                   False "used in weird memcpy() in pdcp.c ???")
add_boolean_option(LINUX_LIST              False "used only in lists.c: either use OAI implementation of lists or Linux one (should be True, but it is False")
add_boolean_option(OPENAIR_LTE             True "Seems legacy: keep it to true")

##########################
# PHY options
##########################
955
add_boolean_option(DRIVER2013              True "only relevant for EXMIMO")
thomasl's avatar
thomasl committed
956
add_boolean_option(EXMIMO_IOT              True "????")
thomasl's avatar
thomasl committed
957 958 959
add_boolean_option(LOCALIZATION            False "???")
add_integer_option(MAX_NUM_CCs             1     "????")
add_boolean_option(MU_RECEIVER             False "????")
960
add_boolean_option(PHYSIM                  False  "for L1 simulators (dlsim, ulsim, ...)")
thomasl's avatar
thomasl committed
961 962 963
add_boolean_option(PHY_CONTEXT             True "not clear: must remain False for dlsim")
add_boolean_option(PHY_EMUL                False "not clear: must remain False for dlsim")
add_boolean_option(SMBV                    False "Rohde&Schwarz SMBV100A vector signal generator")
964 965 966
add_boolean_option(DEBUG_PHY               False "Enable PHY layer debugging options")
add_boolean_option(DEBUG_PHY_PROC          False "Enable debugging of PHY layer procedures")
add_boolean_option(DEBUG_DLSCH             False "Enable debugging of DLSCH physical layer channel")
967
add_boolean_option(MEX                     False "Enabling compilation with mex")
thomasl's avatar
thomasl committed
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988

##########################
# NAS LAYER OPTIONS
##########################
add_boolean_option(ENABLE_NAS_UE_LOGGING   True  "????")
add_boolean_option(NAS_BUILT_IN_UE         True  "UE NAS layer present in this executable")
add_boolean_option(NAS_UE                  True  "NAS UE INSTANCE (<> NAS_MME)")


##########################
# ACCESS STRATUM LAYER2 OPTIONS
##########################
add_boolean_option(JUMBO_FRAME             True  "ENABLE LARGE SDU in ACCESS STRATUM (larger than common MTU)")

##########################
# RLC LAYER OPTIONS
##########################
add_boolean_option(OPENAIR2                True  "Access Stratum layer 2 built in executable")
add_boolean_option(TRACE_RLC_PAYLOAD       False "Fatal assert in this case")
add_boolean_option(RLC_STOP_ON_LOST_PDU    False "Fatal assert in this case")

knopp's avatar
mutexes  
knopp committed
989
add_boolean_option(TRACE_RLC_MUTEX         True  "TRACE for RLC, possible problem in thread scheduling")
thomasl's avatar
thomasl committed
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
add_boolean_option(TRACE_RLC_AM_BO         False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_FREE_SDU   False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_HOLE       False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_PDU        False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_RESEGMENT  False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_RX         False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_RX_DECODE  False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_TX         False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_TX_STATUS  False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_AM_STATUS_CREATION   False "TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG")

add_boolean_option(STOP_ON_IP_TRAFFIC_OVERLOAD      False "")
add_boolean_option(TRACE_RLC_UM_DAR        False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_UM_DISPLAY_ASCII_DATA  False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_UM_PDU        False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_UM_RX         False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_UM_SEGMENT    False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")
add_boolean_option(TRACE_RLC_UM_TX_STATUS  False "TRACE for RLC UM, TO BE CHANGED IN A MORE GENERAL FLAG")


##########################
# PDCP LAYER OPTIONS
##########################
1013 1014 1015 1016
#add_boolean_option(PDCP_USE_NETLINK            False "For eNB, PDCP communicate with a NETLINK socket if connected to network driver, else could use a RT-FIFO")
#add_boolean_option(PDCP_USE_NETLINK_QUEUES     False "When PDCP_USE_NETLINK is true, incoming IP packets are stored in queues")
#add_boolean_option(LINK_ENB_PDCP_TO_IP_DRIVER  False "For eNB, PDCP communicate with a IP driver")
#add_boolean_option(LINK_ENB_PDCP_TO_GTPV1U     True  "For eNB, PDCP communicate with GTP-U protocol (eNB<->S-GW)")
thomasl's avatar
thomasl committed
1017 1018 1019 1020

##########################
# RRC LAYER OPTIONS
##########################
Cedric Roux's avatar
Cedric Roux committed
1021
add_boolean_option(RRC_DEFAULT_RAB_IS_AM       True   "set the RLC mode to AM for the default bearer, otherwise it is UM.")
thomasl's avatar
thomasl committed
1022 1023 1024 1025 1026


##########################
# S1AP LAYER OPTIONS
##########################
1027
# none
thomasl's avatar
thomasl committed
1028

1029
# add the binary tree to the search path for include files
thomasl's avatar
thomasl committed
1030 1031 1032 1033
#######################################################
# We will find ConfigOAI.h after generation in target directory
include_directories("${OPENAIR_BIN_DIR}")
# add directories to find all include files
1034
# the internal rule is to use generic names such as defs.h
thomasl's avatar
thomasl committed
1035
# but to make it uniq name as adding the relative path in the include directtive
1036
# example: #include "RRC/LTE/rrc_defs.h"
thomasl's avatar
thomasl committed
1037 1038 1039 1040 1041
#find_path (include_dirs_all *.h ${OPENAIR_DIR})
#find_path (include_dirs_all *.h PATHS /usr/include NO_CMAKE_PATH)
#include_directories("${include_dirs_all}")

# Legacy exact order
Thomas Laurent's avatar
Thomas Laurent committed
1042

Thomas Laurent's avatar
Thomas Laurent committed
1043
include_directories("${OPENAIR_DIR}/executables")
1044 1045 1046 1047
if(ENB_MODE)
  include_directories("${OPENAIR2_DIR}/COMMON")
  include_directories("${OPENAIR2_DIR}/UTIL")
  include_directories("${OPENAIR2_DIR}/UTIL/LOG")
gauthier's avatar
gauthier committed
1048 1049
  include_directories("${OPENAIR3_DIR}/COMMON")
  include_directories("${OPENAIR3_DIR}/UTILS")
1050
else()
gauthier's avatar
gauthier committed
1051 1052
  include_directories("${OPENAIR3_DIR}/COMMON")
  include_directories("${OPENAIR3_DIR}/UTILS")
1053 1054 1055 1056
  include_directories("${OPENAIR2_DIR}/COMMON")
  include_directories("${OPENAIR2_DIR}/UTIL")
  include_directories("${OPENAIR2_DIR}/UTIL/LOG")
endif()
1057 1058 1059 1060 1061 1062
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
thomasl's avatar
thomasl committed
1063 1064
include_directories("${OPENAIR1_DIR}")
include_directories("${OPENAIR2_DIR}")
1065 1066
include_directories("${OPENAIR3_DIR}/NAS/TOOLS")
include_directories("${OPENAIR2_DIR}/ENB_APP")
1067
include_directories("${OPENAIR2_DIR}/GNB_APP")
1068
include_directories("${OPENAIR2_DIR}/MCE_APP")
thomasl's avatar
thomasl committed
1069 1070 1071 1072 1073
include_directories("${OPENAIR2_DIR}/LAYER2/RLC")
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0")
1074 1075
include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR2_DIR}/RRC/LTE")
thomasl's avatar
thomasl committed
1076
include_directories("${OPENAIR_DIR}/common/utils")
Thomas Laurent's avatar
Thomas Laurent committed
1077
include_directories("${OPENAIR_DIR}/common/utils/collection")
Thomas Laurent's avatar
Thomas Laurent committed
1078
include_directories("${OPENAIR_DIR}/common/utils/ocp_itti")
gauthier's avatar
gauthier committed
1079 1080 1081 1082
include_directories("${OPENAIR3_DIR}/NAS/COMMON")
include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK")
include_directories("${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG")
include_directories("${OPENAIR3_DIR}/NAS/COMMON/ESM/MSG")
1083 1084 1085
include_directories("${OPENAIR3_DIR}/NAS/UE/ESM")
include_directories("${OPENAIR3_DIR}/NAS/UE/EMM")
include_directories("${OPENAIR3_DIR}/NAS/UE/API/USER")
gauthier's avatar
gauthier committed
1086 1087 1088 1089 1090
include_directories("${OPENAIR3_DIR}/NAS/COMMON/IES")
include_directories("${OPENAIR3_DIR}/NAS/COMMON/UTIL")
include_directories("${OPENAIR3_DIR}/SECU")
include_directories("${OPENAIR3_DIR}/SCTP")
include_directories("${OPENAIR3_DIR}/S1AP")
1091
include_directories("${OPENAIR2_DIR}/X2AP")
1092
include_directories("${OPENAIR2_DIR}/M2AP")
1093
include_directories("${OPENAIR2_DIR}/F1AP")
gauthier's avatar
gauthier committed
1094 1095
include_directories("${OPENAIR3_DIR}/UDP")
include_directories("${OPENAIR3_DIR}/GTPV1-U")