mirror of https://github.com/pvnis/srsRAN_4G.git
Enabled mac_test (link with openlte library). Added license to srsapps
parent
c828da3e58
commit
881a90d62c
@ -0,0 +1,52 @@
|
||||
# - Try to find openLTE's liblte
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_OPENLTE QUIET srslte)
|
||||
set(OPENLTE_DEFINITIONS ${PC_OPENLTE_CFLAGS_OTHER})
|
||||
|
||||
FIND_PATH(
|
||||
OPENLTE_LIBLTE_DIRS
|
||||
NAMES liblte_common.h typedefs.h
|
||||
HINTS ${PC_OPENLTE_SRCDIR}/liblte/hdr
|
||||
${PC_OPENLTE_INCLUDEDIR}
|
||||
${PC_OPENLTE_INCLUDE_DIRS}
|
||||
$ENV{OPENLTE_DIR}/liblte/hdr
|
||||
PATHS /usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_PATH(
|
||||
OPENLTE_COMMON_DIRS
|
||||
NAMES typedefs.h
|
||||
HINTS ${PC_OPENLTE_SRCDIR}/cmn_hdr
|
||||
${PC_OPENLTE_INCLUDEDIR}
|
||||
${PC_OPENLTE_INCLUDE_DIRS}
|
||||
$ENV{OPENLTE_DIR}/liblte/hdr
|
||||
PATHS /usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
OPENLTE_LIBRARIES
|
||||
NAMES lte
|
||||
HINTS ${PC_OPENLTE_BUILDDIR}/liblte
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
$ENV{OPENLTE_DIR}/lib
|
||||
PATHS /usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
)
|
||||
|
||||
IF(OPENLTE_LIBLTE_DIRS AND OPENLTE_COMMON_DIRS)
|
||||
SET(OPENLTE_INCLUDE_DIRS ${OPENLTE_LIBLTE_DIRS} ${OPENLTE_COMMON_DIRS})
|
||||
ENDIF(OPENLTE_LIBLTE_DIRS AND OPENLTE_COMMON_DIRS)
|
||||
|
||||
message(STATUS "OPENLTE LIBRARIES " ${OPENLTE_LIBRARIES})
|
||||
message(STATUS "OPENLTE INCLUDE DIRS " ${OPENLTE_INCLUDE_DIRS})
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENLTE DEFAULT_MSG OPENLTE_LIBRARIES OPENLTE_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(OPENLTE_LIBRARIES OPENLTE_INCLUDE_DIRS)
|
||||
|
@ -0,0 +1,64 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2015 The srsLTE Developers. See the
|
||||
* COPYRIGHT file at the top-level directory of this distribution.
|
||||
*
|
||||
* \section LICENSE
|
||||
*
|
||||
* This file is part of the srsLTE library.
|
||||
*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
// Generic helper definitions for shared library support
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define SRSAPPS_IMPORT __declspec(dllimport)
|
||||
#define SRSAPPS_EXPORT __declspec(dllexport)
|
||||
#define SRSAPPS_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define SRSAPPS_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define SRSAPPS_EXPORT __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
#define SRSAPPS_IMPORT
|
||||
#define SRSAPPS_EXPORT
|
||||
#define SRSAPPS_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Define SRSAPPS_API
|
||||
// is used for the public API symbols.
|
||||
#ifdef SRSAPPS_DLL_EXPORTS // defined if we are building the SRSAPPS DLL (instead of using it)
|
||||
#define SRSAPPS_EXPORT
|
||||
#else
|
||||
#define SRSAPPS_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
// Common error codes
|
||||
#define SRSAPPS_SUCCESS 0
|
||||
#define SRSAPPS_ERROR -1
|
||||
#define SRSAPPS_ERROR_INVALID_INPUTS -2
|
||||
|
||||
// cf_t definition
|
||||
typedef _Complex float cf_t;
|
||||
|
||||
#endif // CONFIG_H
|
@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright 2013-2015 The srsLTE Developers. See the
|
||||
# COPYRIGHT file at the top-level directory of this distribution.
|
||||
#
|
||||
# This file is part of the srsLTE library.
|
||||
#
|
||||
# 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/.
|
||||
#
|
||||
|
||||
FIND_PACKAGE(openLTE)
|
||||
|
||||
IF(UHD_FOUND AND OPENLTE_FOUND)
|
||||
INCLUDE_DIRECTORIES(${OPENLTE_INCLUDE_DIRS})
|
||||
ADD_EXECUTABLE(mac_test mac_test.cc)
|
||||
TARGET_LINK_LIBRARIES(mac_test srsapps_ue_mac srsapps_ue_phy srsapps_common srsapps_radio srslte ${OPENLTE_LIBRARIES})
|
||||
ENDIF(UHD_FOUND AND OPENLTE_FOUND)
|
Loading…
Reference in New Issue