Commit 7ebdaf35 authored by Robert Schmidt's avatar Robert Schmidt

Remove cmake ENB_MODE option

ENB_MODE is a cmake option to swap the order of include directories.
This has historical reasons; before OAI used cmake, it was very
sensitive to the order of includes. Nowadays, the order does not matter.
Remove this option, and fix the compilation issues that arise while
doing so.
parent 11f4bd9c
......@@ -636,11 +636,6 @@ add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION w
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE" ON)
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE" ON)
########################
# Include order
##########################
add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" ON)
##########################
# SCHEDULING/REAL-TIME/PERF options
##########################
......@@ -701,19 +696,11 @@ include_directories("${OPENAIR_BIN_DIR}")
# Legacy exact order
include_directories("${OPENAIR_DIR}/executables")
if(ENB_MODE)
include_directories("${OPENAIR2_DIR}/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
include_directories("${OPENAIR3_DIR}/COMMON")
include_directories("${OPENAIR3_DIR}/UTILS")
else()
include_directories("${OPENAIR3_DIR}/COMMON")
include_directories("${OPENAIR3_DIR}/UTILS")
include_directories("${OPENAIR2_DIR}/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
endif()
include_directories("${OPENAIR2_DIR}/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR2_DIR}/UTIL/LOG")
include_directories("${OPENAIR3_DIR}/COMMON")
include_directories("${OPENAIR3_DIR}/UTILS")
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
......
......@@ -103,7 +103,6 @@ set (FIRMWARE_VERSION "No svn information")
add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
add_boolean_option(LINUX True "????")
add_boolean_option(ENB_MODE True "????") # to avoid backtrace
##########################
# NAS LAYER OPTIONS
......
......@@ -15,7 +15,6 @@
/* VCD specific defines and includes
* If the codebase changes, it may need to be updated
*/
#define ENB_MODE
#define ENABLE_USE_CPU_EXECUTION_TIME
#include "../LOG/vcd_signal_dumper.c"
......
......@@ -340,6 +340,8 @@
#include "F1AP_Cells-To-Be-Broadcast-Item.h"
#include "F1AP_QCI.h"
#include "f1ap_default_values.h"
#include "conversions.h"
#include "platform_types.h"
#include "common/utils/LOG/log.h"
......@@ -359,22 +361,13 @@
#include "assertions.h"
#if defined(ENB_MODE)
#include "common/utils/LOG/log.h"
#include "f1ap_default_values.h"
#define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args)
#define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args)
#define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args)
#else
//# include "mme_default_values.h"
#define F1AP_ERROR(x, args...) do { fprintf(stdout, "[F1AP][E]"x, ##args); } while(0)
#define F1AP_WARN(x, args...) do { fprintf(stdout, "[F1AP][W]"x, ##args); } while(0)
#define F1AP_TRAF(x, args...) do { fprintf(stdout, "[F1AP][T]"x, ##args); } while(0)
#define F1AP_INFO(x, args...) do { fprintf(stdout, "[F1AP][I]"x, ##args); } while(0)
#define F1AP_DEBUG(x, args...) do { fprintf(stdout, "[F1AP][D]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#include "f1ap_default_values.h"
#define F1AP_ERROR(x, args...) LOG_E(F1AP, x, ##args)
#define F1AP_WARN(x, args...) LOG_W(F1AP, x, ##args)
#define F1AP_TRAF(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_INFO(x, args...) LOG_I(F1AP, x, ##args)
#define F1AP_DEBUG(x, args...) LOG_I(F1AP, x, ##args)
//Forward declaration
#define F1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
......
......@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h"
#include "m2ap_default_values.h"
#include "m2ap_ids.h" //looks X2AP specific for HO
#include "m2ap_timers.h"
......
......@@ -52,19 +52,12 @@
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# include "m2ap_default_values.h"
# define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args)
# define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args)
# define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args)
# define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args)
#else
# define M2AP_INFO(x, args...) do { fprintf(stdout, "[M2AP][I]"x, ##args); } while(0)
# define M2AP_ERROR(x, args...) do { fprintf(stdout, "[M2AP][E]"x, ##args); } while(0)
# define M2AP_WARN(x, args...) do { fprintf(stdout, "[M2AP][W]"x, ##args); } while(0)
# define M2AP_DEBUG(x, args...) do { fprintf(stdout, "[M2AP][D]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#include "m2ap_default_values.h"
#define M2AP_INFO(x, args...) LOG_I(M2AP, x, ##args)
#define M2AP_ERROR(x, args...) LOG_E(M2AP, x, ##args)
#define M2AP_WARN(x, args...) LOG_W(M2AP, x, ##args)
#define M2AP_DEBUG(x, args...) LOG_D(M2AP, x, ##args)
#define M2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\
......
......@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h"
#include "m2ap_default_values.h"
#include "m2ap_ids.h" //looks X2AP specific for HO
#include "m2ap_timers.h"
......
......@@ -49,18 +49,11 @@
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
# define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
# define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args)
# define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
#else
# define X2AP_INFO(x, args...) do { fprintf(stdout, "[X2AP][I]"x, ##args); } while(0)
# define X2AP_ERROR(x, args...) do { fprintf(stdout, "[X2AP][E]"x, ##args); } while(0)
# define X2AP_WARN(x, args...) do { fprintf(stdout, "[X2AP][W]"x, ##args); } while(0)
# define X2AP_DEBUG(x, args...) do { fprintf(stdout, "[X2AP][D]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#define X2AP_INFO(x, args...) LOG_I(X2AP, x, ##args)
#define X2AP_ERROR(x, args...) LOG_E(X2AP, x, ##args)
#define X2AP_WARN(x, args...) LOG_W(X2AP, x, ##args)
#define X2AP_DEBUG(x, args...) LOG_D(X2AP, x, ##args)
#define X2AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\
......
......@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h"
#include "m3ap_default_values.h"
#include "m3ap_ids.h" //looks X2AP specific for HO
#include "m3ap_timers.h"
......
......@@ -33,6 +33,7 @@
#include "sctp_eNB_defs.h"
#include "m3ap_default_values.h"
#include "m3ap_ids.h" //looks X2AP specific for HO
#include "m3ap_timers.h"
......
......@@ -50,19 +50,12 @@
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# include "m3ap_default_values.h"
# define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args)
# define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args)
# define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args)
# define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args)
#else
# define M3AP_INFO(x, args...) do { fprintf(stdout, "[M3AP][I]"x, ##args); } while(0)
# define M3AP_ERROR(x, args...) do { fprintf(stdout, "[M3AP][E]"x, ##args); } while(0)
# define M3AP_WARN(x, args...) do { fprintf(stdout, "[M3AP][W]"x, ##args); } while(0)
# define M3AP_DEBUG(x, args...) do { fprintf(stdout, "[M3AP][D]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#include "m3ap_default_values.h"
#define M3AP_INFO(x, args...) LOG_I(M3AP, x, ##args)
#define M3AP_ERROR(x, args...) LOG_E(M3AP, x, ##args)
#define M3AP_WARN(x, args...) LOG_W(M3AP, x, ##args)
#define M3AP_DEBUG(x, args...) LOG_D(M3AP, x, ##args)
#define M3AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do {\
......
......@@ -96,7 +96,6 @@
extern int asn_debug;
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# include "ngap_gNB_default_values.h"
# define NGAP_ERROR(x, args...) LOG_E(NGAP, x, ##args)
......@@ -104,14 +103,6 @@ extern int asn1_xer_print;
# define NGAP_TRAF(x, args...) LOG_I(NGAP, x, ##args)
# define NGAP_INFO(x, args...) LOG_I(NGAP, x, ##args)
# define NGAP_DEBUG(x, args...) LOG_I(NGAP, x, ##args)
#else
# include "amf_default_values.h"
# define NGAP_ERROR(x, args...) do { fprintf(stdout, "[NGAP][E]"x, ##args); } while(0)
# define NGAP_WARN(x, args...) do { fprintf(stdout, "[NGAP][W]"x, ##args); } while(0)
# define NGAP_TRAF(x, args...) do { fprintf(stdout, "[NGAP][T]"x, ##args); } while(0)
# define NGAP_INFO(x, args...) do { fprintf(stdout, "[NGAP][I]"x, ##args); } while(0)
# define NGAP_DEBUG(x, args...) do { fprintf(stdout, "[NGAP][D]"x, ##args); } while(0)
#endif
#define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do { \
......
......@@ -52,21 +52,13 @@
extern int asn1_xer_print;
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# include "s1ap_eNB_default_values.h"
# define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args)
# define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args)
# define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args)
# define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
#else
# define S1AP_ERROR(x, args...) do { fprintf(stdout, "[S1AP][E]"x, ##args); } while(0)
# define S1AP_WARN(x, args...) do { fprintf(stdout, "[S1AP][W]"x, ##args); } while(0)
# define S1AP_TRAF(x, args...) do { fprintf(stdout, "[S1AP][T]"x, ##args); } while(0)
# define S1AP_INFO(x, args...) do { fprintf(stdout, "[S1AP][I]"x, ##args); } while(0)
# define S1AP_DEBUG(x, args...) do { fprintf(stdout, "[S1AP][D]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#include "s1ap_eNB_default_values.h"
#define S1AP_ERROR(x, args...) LOG_E(S1AP, x, ##args)
#define S1AP_WARN(x, args...) LOG_W(S1AP, x, ##args)
#define S1AP_TRAF(x, args...) LOG_I(S1AP, x, ##args)
#define S1AP_INFO(x, args...) LOG_I(S1AP, x, ##args)
#define S1AP_DEBUG(x, args...) LOG_I(S1AP, x, ##args)
#define S1AP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
......
......@@ -34,16 +34,10 @@
#include <stdint.h>
#include <sys/socket.h>
#if defined(ENB_MODE)
# include "common/utils/LOG/log.h"
# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
# define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args)
# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
#else
# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0)
# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0)
# define SCTP_WARN(x, args...) do { fprintf(stdout, "[SCTP][W]"x, ##args); } while(0)
#endif
#include "common/utils/LOG/log.h"
#define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args)
#define SCTP_DEBUG(x, args...) LOG_D(SCTP, x, ##args)
#define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args)
int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams,
uint16_t max_attempts, uint16_t init_timeout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment