Generate and build NGAP ASN.1 during build time
This commit is contained in:
+10
-33
@@ -435,35 +435,10 @@ add_dependencies(s1ap rrc_flag)
|
|||||||
target_link_libraries(s1ap PUBLIC asn1_s1ap)
|
target_link_libraries(s1ap PUBLIC asn1_s1ap)
|
||||||
|
|
||||||
# NGAP
|
# 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)
|
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
|
|
||||||
set (ngap_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "NGAP_" "-fno-include-deps -findirect-choice" "${NGAP_C_DIR}")
|
|
||||||
|
|
||||||
compile_asn1("${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "${ngap_cmd}" ngap_flag)
|
|
||||||
|
|
||||||
file(GLOB NGAP_source ${NGAP_C_DIR}/*.c)
|
|
||||||
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}")
|
include_directories ("${NGAP_DIR}")
|
||||||
|
add_library(ngap
|
||||||
add_library(NGAP_GNB
|
|
||||||
${NGAP_DIR}/ngap_gNB.c
|
${NGAP_DIR}/ngap_gNB.c
|
||||||
${NGAP_DIR}/ngap_gNB_context_management_procedures.c
|
${NGAP_DIR}/ngap_gNB_context_management_procedures.c
|
||||||
${NGAP_DIR}/ngap_gNB_decoder.c
|
${NGAP_DIR}/ngap_gNB_decoder.c
|
||||||
@@ -477,7 +452,8 @@ add_library(NGAP_GNB
|
|||||||
${NGAP_DIR}/ngap_gNB_trace.c
|
${NGAP_DIR}/ngap_gNB_trace.c
|
||||||
${NGAP_DIR}/ngap_gNB_ue_context.c
|
${NGAP_DIR}/ngap_gNB_ue_context.c
|
||||||
)
|
)
|
||||||
add_dependencies(NGAP_GNB rrc_flag ngap_flag)
|
add_dependencies(ngap rrc_flag)
|
||||||
|
target_link_libraries(ngap PUBLIC asn1_ngap)
|
||||||
|
|
||||||
#M2AP
|
#M2AP
|
||||||
# Same limitation as described in RRC/S1AP: unknown generated file list
|
# Same limitation as described in RRC/S1AP: unknown generated file list
|
||||||
@@ -647,6 +623,7 @@ add_library(f1ap
|
|||||||
${F1AP_DIR}/f1ap_itti_messaging.c)
|
${F1AP_DIR}/f1ap_itti_messaging.c)
|
||||||
target_include_directories(f1ap PUBLIC F1AP_DIR)
|
target_include_directories(f1ap PUBLIC F1AP_DIR)
|
||||||
target_link_libraries(f1ap PUBLIC asn1_f1ap)
|
target_link_libraries(f1ap PUBLIC asn1_f1ap)
|
||||||
|
target_link_libraries(f1ap PRIVATE ngap)
|
||||||
|
|
||||||
|
|
||||||
# LPP
|
# LPP
|
||||||
@@ -1844,7 +1821,7 @@ add_library(L2_NR
|
|||||||
)
|
)
|
||||||
|
|
||||||
#add_dependencies(L2_NR rrc_flag nr_rrc_flag s1ap_flag)
|
#add_dependencies(L2_NR rrc_flag nr_rrc_flag s1ap_flag)
|
||||||
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap)
|
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap)
|
||||||
|
|
||||||
add_library(L2_LTE_NR
|
add_library(L2_LTE_NR
|
||||||
${L2_RRC_SRC}
|
${L2_RRC_SRC}
|
||||||
@@ -2562,7 +2539,7 @@ target_link_libraries (nr-softmodem
|
|||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA
|
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA
|
||||||
ITTI ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
ITTI ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||||
NGAP_LIB NGAP_GNB s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||||
x2ap f1ap M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB
|
x2ap f1ap M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB
|
||||||
-Wl,--end-group z dl)
|
-Wl,--end-group z dl)
|
||||||
|
|
||||||
@@ -2738,7 +2715,7 @@ add_executable(nr_dlsim
|
|||||||
${SHLIB_LOADER_SOURCES}
|
${SHLIB_LOADER_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries(nr_dlsim
|
target_link_libraries(nr_dlsim
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN NGAP_GNB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||||
@@ -2755,7 +2732,7 @@ add_executable(nr_prachsim
|
|||||||
${T_SOURCE}
|
${T_SOURCE}
|
||||||
${SHLIB_LOADER_SOURCES})
|
${SHLIB_LOADER_SOURCES})
|
||||||
target_link_libraries(nr_prachsim
|
target_link_libraries(nr_prachsim
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN NGAP_GNB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
|
||||||
|
|
||||||
add_executable(nr_ulschsim
|
add_executable(nr_ulschsim
|
||||||
@@ -2789,7 +2766,7 @@ add_dependencies( nr_ulsim ldpc_offload)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(nr_ulsim
|
target_link_libraries(nr_ulsim
|
||||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN NGAP_GNB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
|
||||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
|
||||||
)
|
)
|
||||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||||
@@ -2853,7 +2830,7 @@ if (${T_TRACER})
|
|||||||
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
|
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
|
||||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||||
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
|
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR ngap
|
||||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
||||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
|
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
|
||||||
if (TARGET ${i})
|
if (TARGET ${i})
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
add_subdirectory(S1AP)
|
add_subdirectory(S1AP)
|
||||||
|
add_subdirectory(NGAP)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(MESSAGES)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
|||||||
|
set(NGAP_VERSION 15 8 0)
|
||||||
|
make_version(NGAP_cc ${NGAP_VERSION})
|
||||||
|
#add_definitions(-DNGAP_VERSION=${NGAP_cc})
|
||||||
|
string(REPLACE ";" "." NGAP_RELEASE "${NGAP_VERSION}")
|
||||||
|
|
||||||
|
if(NGAP_RELEASE VERSION_EQUAL "15.8.0")
|
||||||
|
include(ASN1/ngap-15.8.0.cmake)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "unknown NGAP_RELEASE ${NGAP_RELEASE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${ngap_source} ${ngap_headers}
|
||||||
|
COMMAND ASN1C_PREFIX=NGAP_ asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -fno-include-deps -findirect-choice -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${NGAP_GRAMMAR}
|
||||||
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${NGAP_GRAMMAR}
|
||||||
|
COMMENT "Generating NGAP source files from ${CMAKE_CURRENT_SOURCE_DIR}/${NGAP_GRAMMAR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(asn1_ngap ${ngap_source})
|
||||||
|
target_include_directories(asn1_ngap PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
target_compile_options(asn1_ngap PRIVATE -DASN_DISABLE_OER_SUPPORT -w)
|
||||||
Reference in New Issue
Block a user