diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bbd96c1c..232445013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -372,9 +372,10 @@ if(RF_FOUND) else(RF_FOUND) message(STATUS "srsUE and srsENB builds disabled due to missing RF driver") endif(RF_FOUND) -if(ENABLE_SRSENB) + +if(ENABLE_SRSEPC) message(STATUS "Building with srsEPC") add_subdirectory(srsepc) else(ENABLE_SRSEPC) message(STATUS "srsEPC build disabled") -endif(ENABLE_SRSUE) +endif(ENABLE_SRSEPC) diff --git a/srsepc/hdr/CMakeLists.txt b/srsepc/hdr/CMakeLists.txt new file mode 100644 index 000000000..093086b96 --- /dev/null +++ b/srsepc/hdr/CMakeLists.txt @@ -0,0 +1,5 @@ +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in + ${PROJECT_BINARY_DIR}/version.h +) + diff --git a/srsepc/src/CMakeLists.txt b/srsepc/src/CMakeLists.txt new file mode 100644 index 000000000..28f94aa98 --- /dev/null +++ b/srsepc/src/CMakeLists.txt @@ -0,0 +1,42 @@ + +add_subdirectory(mme) + +# Link libstdc++ and libgcc +if(BUILD_STATIC) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc") +endif(BUILD_STATIC) + + +if (RPATH) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +endif (RPATH) + + +add_executable(srsepc main.cc ) +target_link_libraries(srsepc srsenb_upper + srslte_common + srslte_phy + srslte_upper + ${CMAKE_THREAD_LIBS_INIT} + ${Boost_LIBRARIES} + ${SEC_LIBRARIES} + ${LIBCONFIGPP_LIBRARIES} + ${SCTP_LIBRARIES}) + +if (RPATH) + set_target_properties(srsenb PROPERTIES INSTALL_RPATH ".") +endif (RPATH) + +install(TARGETS srsepc DESTINATION ${RUNTIME_DIR}) + +######################################################################## +# Option to run command after build (useful for remote builds) +######################################################################## +if (NOT ${BUILDENB_CMD} STREQUAL "") + message(STATUS "Added custom post-build-ENB command: ${BUILDENB_CMD}") + add_custom_command(TARGET srsenb POST_BUILD COMMAND ${BUILDENB_CMD}) +else(NOT ${BUILDENB_CMD} STREQUAL "") + message(STATUS "No post-build-ENB command defined") +endif (NOT ${BUILDENB_CMD} STREQUAL "") + +install(TARGETS srsepc DESTINATION ${RUNTIME_DIR}) diff --git a/srsepc/src/main.cc b/srsepc/src/main.cc new file mode 100644 index 000000000..89b0aca3c --- /dev/null +++ b/srsepc/src/main.cc @@ -0,0 +1,7 @@ +#include "mme.h" + +int +main (int argc,char * argv[] ) +{ + return 0; +} diff --git a/srsepc/src/mme/CMakeLists.txt b/srsepc/src/mme/CMakeLists.txt new file mode 100644 index 000000000..cd1958566 --- /dev/null +++ b/srsepc/src/mme/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright 2013-2017 Software Radio Systems Limited +# +# This file is part of srsLTE +# +# srsLTE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsLTE is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +file(GLOB SOURCES "*.cc") +add_library(srsepc_mme STATIC ${SOURCES}) +install(TARGETS srsepc_mme DESTINATION ${LIBRARY_DIR}) +