laforge
/
openbts-osmo
Archived
1
0
Fork 0

uhd: add conditional build support

Transceiver can be built with UHD by specifiying the --with-uhd
option. Fractional sample rates are not supported by the USRP2
so Transceiver52M is not built.

Otherwise, the default GNU Radio USRP1 implementation is used.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
Thomas Tsou 2010-11-10 22:21:19 -05:00
parent 2735b806dd
commit fb852969db
4 changed files with 60 additions and 22 deletions

View File

@ -32,7 +32,6 @@ SUBDIRS = \
GSM \
SMS \
Transceiver \
Transceiver52M \
TRXManager \
Control \
RRLP \
@ -41,6 +40,10 @@ SUBDIRS = \
smqueue
# SQL
if !UHD
SUBDIRS += Transceiver52M
endif
EXTRA_DIST = \
LEGAL \
COPYING \

View File

@ -20,8 +20,12 @@
include $(top_srcdir)/Makefile.common
if UHD
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(UHD_CFLAGS)
else
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USRP_CFLAGS)
CXXFLAGS = -Wall -O3 -g -pthread
endif
AM_CXXFLAGS = -Wall -O3 -g -lpthread
rev2dir = $(datadir)/usrp/rev2
rev4dir = $(datadir)/usrp/rev4
@ -38,8 +42,7 @@ noinst_LTLIBRARIES = libtransceiver.la
libtransceiver_la_SOURCES = \
radioInterface.cpp \
sigProcLib.cpp \
Transceiver.cpp \
USRPDevice.cpp
Transceiver.cpp
noinst_PROGRAMS = \
USRPping \
@ -52,21 +55,29 @@ noinst_HEADERS = \
sendLPF_961.h \
sigProcLib.h \
Transceiver.h \
USRPDevice.h
USRPDevice.h \
Device.h
USRPping_SOURCES = USRPping.cpp
USRPping_LDADD = \
libtransceiver.la \
$(COMMON_LA) \
$(USRP_LIBS)
$(COMMON_LA)
transceiver_SOURCES = runTransceiver.cpp
transceiver_LDADD = \
libtransceiver.la \
$(GSM_LA) \
$(COMMON_LA) \
$(USRP_LIBS)
$(COMMON_LA)
if UHD
libtransceiver_la_SOURCES += UHDDevice.cpp
transceiver_LDADD += $(UHD_LIBS)
USRPping_LDADD += $(UHD_LIBS)
else
libtransceiver_la_SOURCES += USRPDevice.cpp
transceiver_LDADD += $(USRP_LIBS)
USRPping_LDADD += $(USRP_LIBS)
endif
MOSTLYCLEANFILES +=

7
public-trunk/bootstrap Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
aclocal
autoconf
autoheader
libtoolize --automake
automake --add-missing

View File

@ -54,18 +54,31 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_C_BIGENDIAN
# Defines USRP_CFLAGS, USRP_INCLUDEDIR, and USRP_LIBS
PKG_CHECK_MODULES(USRP, usrp > 3.1)
# Check whether we have libusrp >= 3.2
PKG_CHECK_EXISTS(usrp >= 3.2, libusrp_3_2=yes, libusrp_3_2=no)
if test "x$libusrp_3_2" = "xyes";then
AC_DEFINE(HAVE_LIBUSRP_3_2, 1, Define to 1 if you have libusrp >= 3.2)
fi
# Check whether we have libusrp >= 3.3
PKG_CHECK_EXISTS(usrp >= 3.3, libusrp_3_3=yes, libusrp_3_3=no)
if test "x$libusrp_3_3" = "xyes";then
AC_DEFINE(HAVE_LIBUSRP_3_3, 1, Define to 1 if you have libusrp >= 3.3)
fi
AC_ARG_WITH(uhd, [
AS_HELP_STRING([--with-uhd],
[enable USRP2 Transceiver (Transceiver52M will not be built)])
])
AS_IF([test "x$with_uhd" = "xyes"], [
PKG_CHECK_MODULES(UHD, uhd)
AC_DEFINE(USE_UHD, 1, Define to 1 if using UHD)
],
[test "x$with_uhd" != "xyes"], [
# Defines USRP_CFLAGS, USRP_INCLUDEDIR, and USRP_LIBS
PKG_CHECK_MODULES(USRP, usrp > 3.1)
# Check whether we have libusrp >= 3.2
PKG_CHECK_EXISTS(usrp >= 3.2, libusrp_3_2=yes, libusrp_3_2=no)
if test "x$libusrp_3_2" = "xyes";then
AC_DEFINE(HAVE_LIBUSRP_3_2, 1, Define to 1 if you have libusrp >= 3.2)
fi
# Check whether we have libusrp >= 3.3
PKG_CHECK_EXISTS(usrp >= 3.3, libusrp_3_3=yes, libusrp_3_3=no)
if test "x$libusrp_3_3" = "xyes";then
AC_DEFINE(HAVE_LIBUSRP_3_3, 1, Define to 1 if you have libusrp >= 3.3)
fi
])
AM_CONDITIONAL(UHD, [test "x$with_uhd" = "xyes"])
# Defines OSIP_CFLAGS, OSIP_INCLUDEDIR, and OSIP_LIBS
PKG_CHECK_MODULES(OSIP, libosip2)
@ -90,7 +103,6 @@ AC_CONFIG_FILES([\
GSM/Makefile \
SIP/Makefile \
SMS/Makefile \
Transceiver52M/Makefile \
Transceiver/Makefile \
TRXManager/Makefile \
CLI/Makefile \
@ -98,6 +110,11 @@ AC_CONFIG_FILES([\
RRLP/Makefile \
smqueue/Makefile \
])
AS_IF([test "x$with_uhd" != "xyes"], [
AC_CONFIG_FILES([Transceiver52M/Makefile])
])
# SQL/Makefile \
AC_OUTPUT