1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# gnuradio 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunGNURADIO_VERSION = 3.8.2.0 8*4882a593SmuzhiyunGNURADIO_SITE = https://github.com/gnuradio/gnuradio/releases/download/v$(GNURADIO_VERSION) 9*4882a593SmuzhiyunGNURADIO_LICENSE = GPL-3.0+ 10*4882a593SmuzhiyunGNURADIO_LICENSE_FILES = COPYING 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunGNURADIO_SUPPORTS_IN_SOURCE_BUILD = NO 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun# needed to determine site-packages path 15*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PYTHON),y) 16*4882a593SmuzhiyunGNURADIO_PYVER = $(PYTHON_VERSION_MAJOR) 17*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_PYTHON3),y) 18*4882a593SmuzhiyunGNURADIO_PYVER = $(PYTHON3_VERSION_MAJOR) 19*4882a593Smuzhiyunendif 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun# host-python-mako and host-python-six are needed for volk to compile 22*4882a593SmuzhiyunGNURADIO_DEPENDENCIES = \ 23*4882a593Smuzhiyun $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \ 24*4882a593Smuzhiyun host-python-mako \ 25*4882a593Smuzhiyun host-python-six \ 26*4882a593Smuzhiyun host-swig \ 27*4882a593Smuzhiyun boost \ 28*4882a593Smuzhiyun log4cpp \ 29*4882a593Smuzhiyun gmp 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunGNURADIO_CONF_OPTS = \ 32*4882a593Smuzhiyun -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python \ 33*4882a593Smuzhiyun -DENABLE_DEFAULT=OFF \ 34*4882a593Smuzhiyun -DENABLE_VOLK=ON \ 35*4882a593Smuzhiyun -DENABLE_GNURADIO_RUNTIME=ON \ 36*4882a593Smuzhiyun -DENABLE_TESTING=OFF \ 37*4882a593Smuzhiyun -DXMLTO_EXECUTABLE=NOTFOUND 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun# For third-party blocks, the gnuradio libraries are mandatory at 40*4882a593Smuzhiyun# compile time. 41*4882a593SmuzhiyunGNURADIO_INSTALL_STAGING = YES 42*4882a593Smuzhiyun 43*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 44*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic 45*4882a593Smuzhiyunendif 46*4882a593Smuzhiyun 47*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ORC),y) 48*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += orc 49*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_ORC=ON 50*4882a593Smuzhiyunelse 51*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_ORC=OFF 52*4882a593Smuzhiyunendif 53*4882a593Smuzhiyun 54*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_ANALOG),y) 55*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_ANALOG=ON 56*4882a593Smuzhiyunelse 57*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_ANALOG=OFF 58*4882a593Smuzhiyunendif 59*4882a593Smuzhiyun 60*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_AUDIO),y) 61*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ALSA_LIB),y) 62*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += alsa-lib 63*4882a593Smuzhiyunendif 64*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PORTAUDIO),y) 65*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += portaudio 66*4882a593Smuzhiyunendif 67*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_AUDIO=ON 68*4882a593Smuzhiyunelse 69*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_AUDIO=OFF 70*4882a593Smuzhiyunendif 71*4882a593Smuzhiyun 72*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_BLOCKS),y) 73*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=ON 74*4882a593Smuzhiyunelse 75*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=OFF 76*4882a593Smuzhiyunendif 77*4882a593Smuzhiyun 78*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_CHANNELS),y) 79*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_CHANNELS=ON 80*4882a593Smuzhiyunelse 81*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_CHANNELS=OFF 82*4882a593Smuzhiyunendif 83*4882a593Smuzhiyun 84*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_CTRLPORT),y) 85*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_CTRLPORT=ON 86*4882a593Smuzhiyunelse 87*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_CTRLPORT=OFF 88*4882a593Smuzhiyunendif 89*4882a593Smuzhiyun 90*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_DIGITAL),y) 91*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_DIGITAL=ON 92*4882a593Smuzhiyunelse 93*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_DIGITAL=OFF 94*4882a593Smuzhiyunendif 95*4882a593Smuzhiyun 96*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_DTV),y) 97*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_DTV=ON 98*4882a593Smuzhiyunelse 99*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_DTV=OFF 100*4882a593Smuzhiyunendif 101*4882a593Smuzhiyun 102*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_FEC),y) 103*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += gsl 104*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FEC=ON 105*4882a593Smuzhiyunelse 106*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FEC=OFF 107*4882a593Smuzhiyunendif 108*4882a593Smuzhiyun 109*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_FFT),y) 110*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += fftw-single 111*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FFT=ON 112*4882a593Smuzhiyunelse 113*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FFT=OFF 114*4882a593Smuzhiyunendif 115*4882a593Smuzhiyun 116*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_FILTER),y) 117*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=ON 118*4882a593Smuzhiyunelse 119*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF 120*4882a593Smuzhiyunendif 121*4882a593Smuzhiyun 122*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) 123*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += python3 124*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON 125*4882a593Smuzhiyun# mandatory to install python modules in site-packages and to use 126*4882a593Smuzhiyun# correct path for python libraries 127*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DGR_PYTHON_RELATIVE=ON \ 128*4882a593Smuzhiyun -DGR_PYTHON_DIR=lib/python$(GNURADIO_PYVER)/site-packages 129*4882a593Smuzhiyunelse 130*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF 131*4882a593Smuzhiyunendif 132*4882a593Smuzhiyun 133*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_QTGUI),y) 134*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += qt5base python-pyqt5 qwt 135*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_QTGUI=ON 136*4882a593Smuzhiyunelse 137*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_QTGUI=OFF 138*4882a593Smuzhiyunendif 139*4882a593Smuzhiyun 140*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_TRELLIS),y) 141*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_TRELLIS=ON 142*4882a593Smuzhiyunelse 143*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_TRELLIS=OFF 144*4882a593Smuzhiyunendif 145*4882a593Smuzhiyun 146*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_UHD),y) 147*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += uhd 148*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_UHD=ON 149*4882a593Smuzhiyunelse 150*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_UHD=OFF 151*4882a593Smuzhiyunendif 152*4882a593Smuzhiyun 153*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_UTILS),y) 154*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_UTILS=ON 155*4882a593Smuzhiyunelse 156*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_UTILS=OFF 157*4882a593Smuzhiyunendif 158*4882a593Smuzhiyun 159*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_ZEROMQ),y) 160*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += cppzmq 161*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) 162*4882a593SmuzhiyunGNURADIO_DEPENDENCIES += python-pyzmq 163*4882a593Smuzhiyunendif 164*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_ZEROMQ=ON 165*4882a593Smuzhiyunelse 166*4882a593SmuzhiyunGNURADIO_CONF_OPTS += -DENABLE_GR_ZEROMQ=OFF 167*4882a593Smuzhiyunendif 168*4882a593Smuzhiyun 169*4882a593Smuzhiyun$(eval $(cmake-package)) 170