CMakeLists.txt 133 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

# 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})

Thomas Laurent's avatar
Thomas Laurent committed
48
49
#uhd 4.0 and iris installs by default in /usr/local
include_directories("/usr/local/include/")
Thomas Laurent's avatar
Thomas Laurent committed
50
51
52
53
54
55
56
#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/")
Thomas Laurent's avatar
Thomas Laurent committed
57

Thomas Laurent's avatar
Thomas Laurent committed
58
59
60
61
62
63
64
    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")

65
66
message("RU=${RU}")

Thomas Laurent's avatar
Thomas Laurent committed
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
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")
127
  
Thomas Laurent's avatar
Thomas Laurent committed
128
129
130
131
132
  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)
133
  
Thomas Laurent's avatar
Thomas Laurent committed
134
135
136
137
else()
  message("No Blas/Atlas libs found, some targets will fail")
endif()

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

Cedric Roux's avatar
Cedric Roux committed
146
147
set (NFAPI_DIR       ${OPENAIR_DIR}/nfapi/open-nFAPI)
set (NFAPI_USER_DIR  ${OPENAIR_DIR}/nfapi/oai_integration)
thomasl's avatar
thomasl committed
148
149
150
151
set (OPENAIR1_DIR    ${OPENAIR_DIR}/openair1)
set (OPENAIR2_DIR    ${OPENAIR_DIR}/openair2)
set (OPENAIR3_DIR    ${OPENAIR_DIR}/openair3)
set (OPENAIR_TARGETS ${OPENAIR_DIR}/targets)
152
set (OPENAIR3_DIR    ${OPENAIR_DIR}/openair3)
thomasl's avatar
thomasl committed
153
154
155
156
157
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
158
159
160
161
##############################################
# Base CUDA setting
##############################################
find_package(CUDA)
162
163
164
if (CUDA_FOUND)
    message ("cuda include ${CUDA_INCLUDE_DIRS}")
    message ("cuda library ${CUDA_LIBRARY_DIRS}")
WANG Tsu-Han's avatar
WANG Tsu-Han committed
165

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

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

171
172
173
174
175
176
177
178
179
180
    # 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
181
182


thomasl's avatar
thomasl committed
183
184
185
###########################################
# macros to define options as there is numerous options in oai
################################################
thomasl's avatar
thomasl committed
186
187
188
189
190
191
192
193
194
195
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
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
243
244
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)

245
246
247
248
249
250
251
252
253
254
255
256
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)
257

258
# this function should produce the same value as the macro MAKE_VERSION defined in the C code (file types.h)
259
260
261
262
263
264
265
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()
266
####################################################
thomasl's avatar
thomasl committed
267
268
# compilation flags
#############################################
269

270
#set(CMAKE_BUILD_TYPE "Debug")
thomasl's avatar
thomasl committed
271
272
273
if (CMAKE_BUILD_TYPE STREQUAL "")
   set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
274
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
275
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
276

277
278
Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
279
  set(C_FLAGS_PROCESSOR "-gdwarf-2 -mfloat-abi=hard -mfpu=neon -lgcc -lrt")
280
else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
281
282
283
284
  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")
285
286
287
      set(COMPILATION_AVX2 "True")
    else()
      set(COMPILATION_AVX2 "False")
288
289
290
291
292
293
294
295
296
    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")
297
  endif()
298
endif()
299
300
301

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

302
303
Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}")

304
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
305
  if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) )
306
    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\" ")
307
308
  endif()
endif()
309

thomasl's avatar
thomasl committed
310
#
311
# add autotools definitions that were maybe used!
312
add_definitions("-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")
313

314
set(commonOpts "-pipe -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic")
315
316

set(CMAKE_C_FLAGS
317
  "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu99 -funroll-loops")
318
set(CMAKE_CXX_FLAGS
319
  "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR}  ${commonOpts} -std=c++11")
320

321
# cuda compiler bug (limitation) on complex macro definition
322
if (CUDA_FOUND)
Thomas Laurent's avatar
Thomas Laurent committed
323
324
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCUDA_FLAG")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCUDA_FLAG")
325
endif()
326

327
if (SANITIZE_ADDRESS)
328
329
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-common")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-common")
330
331
endif ()

332
add_definitions("-DASN_DISABLE_OER_SUPPORT")
333
334

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

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

367
368
369
370
371
372
373
374
  # 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
375

thomasl's avatar
thomasl committed
376
377
# Below is a hard-coded info
set (FIRMWARE_VERSION "No svn information")
thomasl's avatar
thomasl committed
378
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
379
380
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\"")
381
#add_definitions("-DEMIT_ASN_DEBUG=1")
thomasl's avatar
thomasl committed
382
383
384
385


# Debug related options
#########################################
386
add_boolean_option(ASN_DEBUG           False "ASN1 coder/decoder Debug")
387
add_boolean_option(EMIT_ASN_DEBUG      False "ASN1 coder/decoder Debug")
388
389
390
391
392
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")
393
394
395
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
396
add_boolean_option(PRINT_STATS         False "This adds the possibility to see the status")
397
add_boolean_option(T_TRACER            True  "Activate the T tracer, a debugging/monitoring framework" )
398
add_boolean_option(UE_AUTOTEST_TRACE   False "Activate UE autotest specific logs")
Gabriel's avatar
Gabriel committed
399
400
add_boolean_option(UE_DEBUG_TRACE      False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE     False "Activate UE timing trace")
401
add_boolean_option(DEBUG_CONSOLE       False "disables stdout/stderr buffering")
thomasl's avatar
thomasl committed
402

Thomas Laurent's avatar
Thomas Laurent committed
403
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
404
405
406
407
add_library(ITTI
  ${OCP_ITTI}/intertask_interface.cpp
  ${OPENAIR_DIR}/common/utils/backtrace.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
408
add_dependencies(ITTI rrc_flag)
thomasl's avatar
thomasl committed
409

410
411
412
##################################################
# ASN.1 grammar C code generation & dependencies #
##################################################
thomasl's avatar
thomasl committed
413
414
415
416
# 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)
417
# New C code source file, cmake must be re-run (instead of re-running make only)
thomasl's avatar
thomasl committed
418
419
420
#############
set(asn1_generated_dir ${OPENAIR_BIN_DIR})

421
422
423
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
set(protobuf_generated_dir ${OPENAIR_BIN_DIR})

thomasl's avatar
thomasl committed
424
425
# RRC
######
426
427
428
429
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)

430
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
431
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
Thomas Laurent's avatar
Thomas Laurent committed
432
433

# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
TheoniJ's avatar
TheoniJ committed
434
if (${RU} STREQUAL 0)
435
  execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
TheoniJ's avatar
TheoniJ committed
436
437
438
                  RESULT_VARIABLE ret)
endif (${RU} STREQUAL 0)

Cedric Roux's avatar
Cedric Roux committed
439
if (NOT ${ret} STREQUAL 0)
440
  message(FATAL_ERROR "${ret}: error")
Cedric Roux's avatar
Cedric Roux committed
441
endif (NOT ${ret} STREQUAL 0)
thomasl's avatar
thomasl committed
442
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
Thomas Laurent's avatar
Thomas Laurent committed
443
444
add_custom_target (
  rrc_flag ALL
445
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "LTE_" " " "${RRC_FULL_DIR}" "${RRC_GRAMMAR}"
Thomas Laurent's avatar
Thomas Laurent committed
446
447
448
  DEPENDS ${RRC_GRAMMAR}
  )

449
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
Thomas Laurent's avatar
Thomas Laurent committed
450
add_library(RRC_LIB ${rrc_source}
451
452
    ${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
453
add_dependencies(RRC_LIB rrc_flag)
thomasl's avatar
thomasl committed
454
455
include_directories ("${RRC_FULL_DIR}")

456

457
#NR RRC
458
#######
459
460
461
set (NR_RRC_ASN1_VERSION "NR_Rel16" )
make_version(NR_RRC_VERSION 16 1 0)
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-16.1.0.asn1)
462
add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
463
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION})
464

Thomas Laurent's avatar
Thomas Laurent committed
465
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
466
467
468
  execute_process(
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
    RESULT_VARIABLE ret)
Thomas Laurent's avatar
Thomas Laurent committed
469
470
471
if (NOT ${ret} STREQUAL 0)
  message(FATAL_ERROR "${ret}: error")
endif ()
472
473
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
TheoniJ's avatar
TheoniJ committed
474

Thomas Laurent's avatar
Thomas Laurent committed
475
476
add_custom_target (
  nr_rrc_flag ALL
477
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "NR_" "-findirect-choice" "${NR_RRC_FULL_DIR}" "${NR_RRC_GRAMMAR}"
Thomas Laurent's avatar
Thomas Laurent committed
478
479
  DEPENDS ${NR_RRC_GRAMMAR}
  )
480

481
add_library(NR_RRC_LIB ${nr_rrc_h} ${nr_rrc_source}
Thomas Laurent's avatar
Thomas Laurent committed
482
483
484
485
    ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c
    )
add_dependencies(NR_RRC_LIB nr_rrc_flag)
include_directories ("${NR_RRC_FULL_DIR}")
486

thomasl's avatar
thomasl committed
487
488
489
490
# S1AP
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
##############
491
set (S1AP_RELEASE R15)
thomasl's avatar
thomasl committed
492

gauthier's avatar
gauthier committed
493
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
494
495
496
make_version(S1AP_VERSION 15 6 0)
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")

497
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
498
499
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
500

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

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

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

thomasl's avatar
thomasl committed
524
525
include_directories ("${S1AP_C_DIR}")
include_directories ("${S1AP_DIR}")
thomasl's avatar
thomasl committed
526

527
528
529
530
531
532
533
534
535
536
537
538
539
540
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
541
add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
thomasl's avatar
thomasl committed
542

543

zhenghuangkun's avatar
zhenghuangkun committed
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# NGAP
# Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time
##############
set (NGAP_RELEASE R15)

set(NGAP_DIR ${OPENAIR3_DIR}/NGAP)
make_version(NGAP_VERSION 15 8 0)
set(NGAP_ASN_FILES "ngap-15.8.0.asn1")

add_definitions(-DNGAP_VERSION=${NGAP_VERSION})
set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files)
set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE})

# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
559
execute_process(
560
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
561
  RESULT_VARIABLE ret)
zhenghuangkun's avatar
zhenghuangkun committed
562
563
564
565
566
567
568
if (NOT ${ret} STREQUAL 0)
  message(FATAL_ERROR "${ret}: error")
endif (NOT ${ret} STREQUAL 0)
file(GLOB NGAP_source ${NGAP_C_DIR}/*.c)

add_custom_target (
  ngap_flag ALL
569
  ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
570
  DEPENDS  "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}"
zhenghuangkun's avatar
zhenghuangkun committed
571
572
573
574
575
576
577
578
579
580
581
)

add_library(NGAP_LIB
  ${NGAP_source}
#  ${NGAP_DIR}/ngap_common.c
  )
add_dependencies(NGAP_LIB rrc_flag ngap_flag)

include_directories ("${NGAP_C_DIR}")
include_directories ("${NGAP_DIR}")

He Shanyun's avatar
He Shanyun committed
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
add_library(NGAP_GNB
  ${NGAP_DIR}/ngap_gNB.c
  ${NGAP_DIR}/ngap_gNB_context_management_procedures.c
  ${NGAP_DIR}/ngap_gNB_decoder.c
  ${NGAP_DIR}/ngap_gNB_encoder.c
  ${NGAP_DIR}/ngap_gNB_handlers.c
  ${NGAP_DIR}/ngap_gNB_itti_messaging.c
  ${NGAP_DIR}/ngap_gNB_management_procedures.c
  ${NGAP_DIR}/ngap_gNB_nas_procedures.c
  ${NGAP_DIR}/ngap_gNB_nnsf.c
  ${NGAP_DIR}/ngap_gNB_overload.c
  ${NGAP_DIR}/ngap_gNB_trace.c
  ${NGAP_DIR}/ngap_gNB_ue_context.c
  )
add_dependencies(NGAP_GNB rrc_flag ngap_flag)
zhenghuangkun's avatar
zhenghuangkun committed
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
#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
TheoniJ's avatar
TheoniJ committed
626
if (${RU} STREQUAL 0)
627
  execute_process(
628
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
629
    RESULT_VARIABLE ret)
TheoniJ's avatar
TheoniJ committed
630
631
632
633
  if (NOT ${ret} STREQUAL 0)
    message(FATAL_ERROR "${ret}: error")
  endif (NOT ${ret} STREQUAL 0)
endif (${RU} STREQUAL 0)
634
635
636
637
638

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

add_custom_target (
  m2_flag ALL
639
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "M2AP_" "-fno-include-deps -DEMIT_ASN_DEBUG=1" "${M2AP_C_DIR}" "${M2AP_ASN_DIR}/${M2AP_ASN_FILES}"
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
685
686
687
688
689
690
691
692
693
694
695
696
697
698
  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
TheoniJ's avatar
TheoniJ committed
699
if (${RU} STREQUAL 0)
700
  execute_process(
701
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
702
    RESULT_VARIABLE ret)
TheoniJ's avatar
TheoniJ committed
703
704
705
706
  if (NOT ${ret} STREQUAL 0)
    message(FATAL_ERROR "${ret}: error")
  endif (NOT ${ret} STREQUAL 0)
endif (${RU} STREQUAL 0)
707
708
709
710
711

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

add_custom_target (
  m3_flag ALL
712
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh  "M3AP_" -fno-include-deps "${M3AP_C_DIR}" "${M3AP_ASN_DIR}/${M3AP_ASN_FILES}"
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
  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)

742
743
744
745
#X2AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
746
set (X2AP_RELEASE R15)
747

748
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
749
750
751
make_version(X2AP_VERSION 15 6 0)
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)

752
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
753
754
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
755
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
TheoniJ's avatar
TheoniJ committed
756
if (${RU} STREQUAL 0)
757
758
759
  execute_process(
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
    RESULT_VARIABLE ret)
TheoniJ's avatar
TheoniJ committed
760
761
762
763
  if (NOT ${ret} STREQUAL 0)
    message(FATAL_ERROR "${ret}: error")
  endif (NOT ${ret} STREQUAL 0)
endif (${RU} STREQUAL 0)
764

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

Thomas Laurent's avatar
Thomas Laurent committed
767
768
add_custom_target (
  x2_flag ALL
769
  COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "X2AP_" -fno-include-deps "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}"
770
  DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
771
772
773
774
775
776
  )

add_library(X2AP_LIB
  ${X2AP_source}
  ${X2AP_DIR}/x2ap_common.c
  )
Thomas Laurent's avatar
Thomas Laurent committed
777
add_dependencies(X2AP_LIB rrc_flag x2_flag)
778
779
780
781

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

782
783
add_library(X2AP_ENB
  ${X2AP_DIR}/x2ap_eNB.c
784
785
  ${X2AP_DIR}/x2ap_eNB_decoder.c
  ${X2AP_DIR}/x2ap_eNB_encoder.c
786
  ${X2AP_DIR}/x2ap_eNB_handler.c
787
  ${X2AP_DIR}/x2ap_eNB_itti_messaging.c
788
  ${X2AP_DIR}/x2ap_eNB_management_procedures.c
789
  ${X2AP_DIR}/x2ap_eNB_generate_messages.c
790
  ${X2AP_DIR}/x2ap_ids.c
Cedric Roux's avatar
Cedric Roux committed
791
  ${X2AP_DIR}/x2ap_timers.c
792
 )
Thomas Laurent's avatar
Thomas Laurent committed
793
add_dependencies(X2AP_ENB X2AP_LIB rrc_flag x2_flag)
794

795

796
# F1AP
797
##############
Roberto Louro Magueta's avatar
Roberto Louro Magueta committed
798
set (F1AP_RELEASE R16)
Xue Song's avatar
Xue Song committed
799
add_list1_option(F1AP_RELEASE R16 "F1AP ASN.1 grammar version" R16)
800
set(F1AP_DIR ${OPENAIR2_DIR}/F1AP)
Xue Song's avatar
Xue Song committed
801
802
803
804
if (${F1AP_RELEASE} STREQUAL "R16")
  make_version(F1AP_VERSION 16 3 1)
  set (ASN1RELDIR R16.3.1)
endif(${F1AP_RELEASE} STREQUAL "R16")
805
add_definitions(-DF1AP_VERSION=${F1AP_VERSION})
806
807
set(F1AP_ASN_DIR ${F1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(F1AP_ASN_FILES
808
809
810
811
812
813
  ${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
814
815
  )

TheoniJ's avatar
TheoniJ committed
816
817
818
if (${RU} STREQUAL 0)
  set(F1AP_ASN_GENERATED_C_DIR ${asn1_generated_dir}/F1AP_${ASN1RELDIR})
  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}")
819
820
821
822
  execute_process(
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
    RESULT_VARIABLE ret
    )
823
  
TheoniJ's avatar
TheoniJ committed
824
825
826
  if (NOT ${ret} STREQUAL 0)
    message(FATAL_ERROR "asn1c: error")
  endif (NOT ${ret} STREQUAL 0)
827
  
828
829
830
831
832
833
834
835
836
837
  add_custom_target (
    f1_flag ALL
    COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "F1AP_" "-findirect-choice -fno-include-deps" ${F1AP_ASN_GENERATED_C_DIR} ${F1AP_ASN_FILES}
    DEPENDS ${F1AP_ASN_FILES}
    )
  file(GLOB F1AP_ASN_GENERATED_C_FILES ${F1AP_ASN_GENERATED_C_DIR}/*.c)
  add_library(F1AP_LIB
    ${F1AP_ASN_GENERATED_C_FILES}
    )
  add_dependencies (F1AP_LIB  f1_flag)
838
839
840
841
842
843
844
  
  include_directories ("${F1AP_ASN_GENERATED_C_DIR}")
  include_directories ("${F1AP_DIR}")
  
  file(GLOB F1AP_C_FILES ${F1AP_DIR}/*.c)
  add_library(F1AP ${F1AP_C_FILES} )
  
TheoniJ's avatar
TheoniJ committed
845
endif (${RU} STREQUAL 0)
846

thomasl's avatar
thomasl committed
847
848
# Hardware dependant options
###################################
849
add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4")
Xiwen JIANG's avatar
Xiwen JIANG committed
850
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
thomasl's avatar
thomasl committed
851

852
853
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")

854
add_list2_option(TRANSP_PRO "None" "Transport protocol type" "None" "ETHERNET")
855
856
#NOKIA config enhancement
set (CONFIG_ROOTDIR
857
858
  ${OPENAIR_DIR}/common/config
  )
859
set (CONFIG_SOURCES
860
861
862
863
  ${CONFIG_ROOTDIR}/config_load_configmodule.c
  ${CONFIG_ROOTDIR}/config_userapi.c
  ${CONFIG_ROOTDIR}/config_cmdline.c
  )
864
set (CONFIG_LIBCONFIG_SOURCES
865
866
  ${CONFIG_ROOTDIR}/libconfig/config_libconfig.c
  )
867
add_library(CONFIG_LIB ${CONFIG_SOURCES})
868
add_library(params_libconfig MODULE ${CONFIG_LIBCONFIG_SOURCES} )
869
target_link_libraries(params_libconfig config)
oai's avatar
oai committed
870
871
# shared library loader
set (SHLIB_LOADER_SOURCES
872
  ${OPENAIR_DIR}/common/utils/load_module_shlib.c
oai's avatar
oai committed
873
)
874
875
# include RF devices / transport protocols library modules
######################################################################
thomasl's avatar
thomasl committed
876

877
include_directories("${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/")
878
set(HWLIB_USRP_SOURCE
879
880
881
  ${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
  )
add_library(oai_usrpdevif MODULE ${HWLIB_USRP_SOURCE} )
882
target_link_libraries(oai_usrpdevif uhd)
thomasl's avatar
thomasl committed
883

884
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
885
set(HWLIB_BLADERF_SOURCE
886
887
888
  ${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
  )
add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} )
889
target_link_libraries(oai_bladerfdevif bladeRF)
890

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

893
set(HWLIB_LMSSDR_SOURCE
894
895
896
  ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
  )
add_library(oai_lmssdrdevif MODULE ${HWLIB_LMSSDR_SOURCE} )
897
898
target_include_directories(oai_lmssdrdevif PRIVATE /usr/local/include/lime)
target_link_libraries(oai_lmssdrdevif LimeSuite )
899

900
include_directories("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/")
901
set(TPLIB_ETHERNET_SOURCE
902
903
904
905
906
907
  ${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
908
909
910
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
set(option_HWIRISLIB_lib "-l SoapySDR")
set(HWLIB_IRIS_SOURCE
911
912
  ${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
  )
Clayton Shepard's avatar
Clayton Shepard committed
913
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
rdoost's avatar
rdoost committed
914
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.7/)
Clayton Shepard's avatar
Clayton Shepard committed
915
916
target_link_libraries(oai_irisdevif SoapySDR)

Cedric Roux's avatar
Cedric Roux committed
917
918
919
920
# TCP bridge libraries
######################################################################

# this one is for internal use at Eurecom and is not documented
Cedric Roux's avatar
Cedric Roux committed
921
922
923
set(HWLIB_TCP_BRIDGE_SOURCE
  ${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge.c
  )
Cedric Roux's avatar
Cedric Roux committed
924
add_library(tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} )
Cedric Roux's avatar
Cedric Roux committed
925

Cedric Roux's avatar
Cedric Roux committed
926
927
928
#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")
929

Cedric Roux's avatar
Cedric Roux committed
930
931
932
933
934
935
936
# 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")
937

938
939
940
# Benetel 4G library
######################################################################

hardy's avatar
hardy committed
941
942
943

include_directories ("/usr/include/dpdk")

944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
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)

977
##########################################################
978

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

laurent's avatar
laurent committed
981
Message("DEADLINE_SCHEDULER flag  is ${DEADLINE_SCHEDULER}")
Rohit Gupta's avatar
Rohit Gupta committed
982
Message("CPU_Affinity flag is ${CPU_AFFINITY}")
thomasl's avatar
thomasl committed
983
984
985
986

##############################################################
#    ???!!! TO BE DOCUMENTED OPTIONS !!!???
##############################################################
987

thomasl's avatar
thomasl committed
988
989
990
add_boolean_option(NO_RRM                  True  "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")

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

996
add_boolean_option(MESSAGE_CHART_GENERATOR False         "For generating sequence diagrams")
gauthier's avatar
gauthier committed
997
998
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")
999

Xu Bo's avatar
Xu Bo committed
1000
add_boolean_option(UE_EXPANSION             False         "enable UE_EXPANSION with max 256 UE")
1001
1002
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")
1003
add_boolean_option(UESIM_EXPANSION          False         "enable UESIM_EXPANSION with max 256 UE")
He Shanyun's avatar
He Shanyun committed
1004
add_boolean_option(ITTI_SIM                 False         "enable itti simulator")
Roberto Louro Magueta's avatar
Roberto Louro Magueta committed
1005

frtabu's avatar
frtabu committed
1006
########################
thomasl's avatar
thomasl committed
1007
1008
# Include order
##########################
gauthier's avatar
gauthier committed
1009
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" )
thomasl's avatar
thomasl committed
1010
1011
1012
1013

##########################
# SCHEDULING/REAL-TIME/PERF options
##########################
1014
1015
1016
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
1017
1018
1019
1020
1021
1022
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")

##########################
# PHY options
##########################
1023
add_boolean_option(DRIVER2013              True "only relevant for EXMIMO")
thomasl's avatar
thomasl committed
1024
add_boolean_option(EXMIMO_IOT              True "????")
thomasl's avatar
thomasl committed
1025
1026
add_boolean_option(LOCALIZATION            False "???")
add_integer_option(MAX_NUM_CCs             1     "????")
1027
add_boolean_option(PHYSIM                  False  "for L1 simulators (dlsim, ulsim, ...)")
thomasl's avatar
thomasl committed
1028
add_boolean_option(SMBV                    False "Rohde&Schwarz SMBV100A vector signal generator")
1029
1030
1031
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")
1032
add_boolean_option(MEX                     False "Enabling compilation with mex")
thomasl's avatar
thomasl committed
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053

##########################
# 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
1054
add_boolean_option(TRACE_RLC_MUTEX         True  "TRACE for RLC, possible problem in thread scheduling")
thomasl's avatar
thomasl committed
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
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
##########################
1078
1079
1080
1081
#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
1082
1083
1084
1085

##########################
# RRC LAYER OPTIONS
##########################
Cedric Roux's avatar
Cedric Roux committed
1086
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
1087
1088
1089
1090
1091


##########################
# S1AP LAYER OPTIONS
##########################
1092
# none
thomasl's avatar
thomasl committed
1093

1094
# add the binary tree to the search path for include files
thomasl's avatar
thomasl committed
1095
1096
1097
1098
#######################################################
# We will find ConfigOAI.h after generation in target directory
include_directories("${OPENAIR_BIN_DIR}")
# add directories to find all include files
1099
# the internal rule is to use generic names such as defs.h
thomasl's avatar
thomasl committed
1100
# but to make it uniq name as adding the relative path in the include directtive
1101
# example: #include "RRC/LTE/rrc_defs.h"
thomasl's avatar
thomasl committed
1102
1103
1104
1105
1106
#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
1107

Thomas Laurent's avatar
Thomas Laurent committed
1108
include_directories("${OPENAIR_DIR}/executables")
1109
1110
1111
1112
if(ENB_MODE)
  include_directories("${OPENAIR2_DIR}/COMMON")
  include_directories("${OPENAIR2_DIR}/UTIL")
  include_directories("${OPENAIR2_DIR}/UTIL/LOG")
gauthier's avatar
gauthier committed
1113
1114
  include_directories("${OPENAIR3_DIR}/COMMON")
  include_directories("${OPENAIR3_DIR}/UTILS")
1115
else()
gauthier's avatar
gauthier committed
1116
1117
  include_directories("${OPENAIR3_DIR}/COMMON")
  include_directories("${OPENAIR3_DIR}/UTILS")
1118
1119
1120
1121
  include_directories("${OPENAIR2_DIR}/COMMON")
  include_directories("${OPENAIR2_DIR}/UTIL")
  include_directories("${OPENAIR2_DIR}/UTIL/LOG")
endif()
1122
1123
1124
1125
1126
1127
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
1128
1129
include_directories("${OPENAIR1_DIR}")
include_directories("${OPENAIR2_DIR}")
1130
1131
include_directories("${OPENAIR3_DIR}/NAS/TOOLS")
include_directories("${OPENAIR2_DIR}/ENB_APP")
1132
include_directories("${OPENAIR2_DIR}/GNB_APP")
1133
include_directories("${OPENAIR2_DIR}/MCE_APP")
thomasl's avatar
thomasl committed
1134
1135
1136
1137
1138
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")
1139
1140
include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR2_DIR}/RRC/LTE")
thomasl's avatar
thomasl committed
1141
include_directories("${OPENAIR_DIR}/common/utils")
Thomas Laurent's avatar
Thomas Laurent committed
1142
include_directories("${OPENAIR_DIR}/common/utils/collection")
Thomas Laurent's avatar
Thomas Laurent committed
1143
include_directories("${OPENAIR_DIR}/common/utils/ocp_itti")
gauthier's avatar
gauthier committed
1144
1145
1146
1147
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")
1148
1149
1150
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
1151
1152
1153
1154
1155
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")
1156
include_directories("${OPENAIR2_DIR}/X2AP")
1157
include_directories("${OPENAIR2_DIR}/M2AP")
1158
include_directories("${OPENAIR2_DIR}/F1AP")
gauthier's avatar
gauthier committed
1159
1160
include_directories("${OPENAIR3_DIR}/UDP")
include_directories("${OPENAIR3_DIR}/GTPV1-U")
1161
1162
include_directories("${OPENAIR3_DIR}/M3AP")
include_directories("${OPENAIR3_DIR}/MME_APP")
thomasl's avatar
thomasl committed
1163
1164
include_directories("${OPENAIR_DIR}/targets/COMMON")
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
Robert Schmidt's avatar
Robert Schmidt committed
1165
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY")
1166
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
shahab's avatar
shahab committed
1167
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
1168
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
1169
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/S1AP")
thomasl's avatar
thomasl committed
1170
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
1171
1172
1173
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
include_directories("${OPENAIR2_DIR}/LAYER2/PROTO_AGENT")
thomasl's avatar
thomasl committed
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
include_directories("${OPENAIR2_DIR}/UTIL/MEM")