-
Notifications
You must be signed in to change notification settings - Fork 3
/
grand-build.sh
executable file
·741 lines (715 loc) · 19.5 KB
/
grand-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
#!/bin/bash
#
# Copyright 2016 Free Software Foundation, Inc.
#
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This script 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
# Known dependencies:
# - cmake, git, make, xutils-dev, automake, autoconf, libtool, wget, perl, tar, sed
# Need to have installed Android Studio, Android SDK, and Android NDK
#
# Tested only on Ubuntu 15.10, 64-bit
if [ -z "$PREFIX" ];
then
echo "PREFIX not set; defaulting to /opt/grandroid"
PREFIX=/opt/grandroid
fi
if [ -z "$ANDROID_SDK" ];
then
echo "Please set ANDROID_SDK to point to the location of the Android SDK (e.g., /opt/android)"
exit
fi
if [ -z "$ANDROID_NDK" ];
then
echo "Please set ANDROID_NDK to point to the location of the Android NDK (e.g., /opt/ndk)"
exit
fi
if [ -z "$PARALLEL" ];
then
echo "Parellelism is unset; setting to 1"
PARALLEL=1
fi
set -e
echo "Asking for sudo permissions to create prefix directory ${PREFIX}"
sudo mkdir -p ${PREFIX}
sudo chown $USER:$USER -R ${PREFIX}
sudo -K # invalidates credentials for anyone paranoid
ANDROID_MIN_API_VERSION=21
ANDROID_STANDALONE_TOOLCHAIN=${PREFIX}/android-toolchain
PATH_ORIG=$PATH
PATH=$PATH:$ANDROID_STANDALONE_TOOLCHAIN/bin:$ANDROID_SDK/tools:$ANDROID_NDK
TOP_BUILD_DIR=`pwd`
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh --stl=gnustl --arch=arm --platform=android-${ANDROID_MIN_API_VERSION} --abis=armeabi-v7a --install-dir=${ANDROID_STANDALONE_TOOLCHAIN}
###########################################################
# BOOST DEPENDENCY
###########################################################
echo ""; echo ""; echo ""; echo ""
BOOST_VER=1.58.0
BOOST_DIR=boost_1_58_0
BOOST_URL="http://jaist.dl.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2"
if [ -e "${BOOST_DIR}.tar.bz2" ];
then
echo "Boost file already downloaded; skipping"
else
echo "Downloading Boost tarball"
wget ${BOOST_URL}
fi
if [ -d ${BOOST_DIR} ];
then
echo "Boost directory expanded; skipping"
else
echo "Expanding Boost tarball"
tar xjf ${BOOST_DIR}.tar.bz2
chmod +r -R ${BOOST_DIR}
fi
cd ${BOOST_DIR}
echo "import os ;
local ANDROID_STANDALONE_TOOLCHAIN = [ os.environ ANDROID_STANDALONE_TOOLCHAIN ] ;
using gcc : android :
${ANDROID_STANDALONE_TOOLCHAIN}/bin/arm-linux-androideabi-g++ :
<compileflags>--sysroot=${ANDROID_STANDALONE_TOOLCHAIN}/sysroot
<compileflags>-march=armv7-a
<compileflags>-mfloat-abi=softfp
<compileflags>-Os
<compileflags>-fno-strict-aliasing
<compileflags>-O2
<compileflags>-DNDEBUG
<compileflags>-g
<compileflags>-lstdc++
<compileflags>-I${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/4.8/
<compileflags>-I${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/4.8/arm-linux-androideabi/armv7-a
<compileflags>-D__GLIBC__
<compileflags>-D_GLIBCXX__PTHREADS
<compileflags>-D__arm__
<compileflags>-D_REENTRANT
<compileflags>-DBOOST_SP_USE_PTHREADS
<compileflags>-L${ANDROID_STANDALONE_TOOLCHAIN}/lib/gcc/arm-linux-androideabi/4.8/
<archiver>${ANDROID_STANDALONE_TOOLCHAIN}/bin/arm-linux-androideabi-ar
<ranlib>${ANDROID_STANDALONE_TOOLCHAIN}/bin/arm-linux-androideabi-ranlib
;" > tools/build/src/user-config.jam
echo "Boostrapping and Building"
./bootstrap.sh
./b2 \
--without-python --without-container --without-context \
--without-coroutine --without-graph --without-graph_parallel \
--without-iostreams --without-locale --without-log --without-math \
--without-mpi --without-signals --without-timer --without-wave \
link=static runtime-link=static threading=multi threadapi=pthread \
target-os=linux --stagedir=android --build-dir=android \
stage
echo "Installing"
./b2 \
--without-python --without-container --without-context \
--without-coroutine --without-graph --without-graph_parallel \
--without-iostreams --without-locale --without-log --without-math \
--without-mpi --without-signals --without-timer --without-wave \
link=static runtime-link=static threading=multi threadapi=pthread \
target-os=linux --stagedir=android --build-dir=android \
--prefix=$PREFIX install
cd ${TOP_BUILD_DIR}
############################################################
## FFTW DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#FFTW_VER=3.3.4
#FFTW_DIR=fftw-${FFTW_VER}
#FFTW_URL="http://www.fftw.org/${FFTW_DIR}.tar.gz"
#
#if [ -e "${FFTW_DIR}.tar.gz" ];
#then
# echo "FFTW file already downloaded; skipping"
#else
# echo "Downloading FFTW tarball"
# wget ${FFTW_URL}
#fi
#
#if [ -d ${FFTW_DIR} ];
#then
# echo "FFTW directory expanded; skipping"
#else
# echo "Expanding FFTW tarball"
# tar xzf ${FFTW_DIR}.tar.gz
# chmod +r -R ${FFTW_DIR}
#fi
#
#cd ${FFTW_DIR}
#
#mkdir -p build
#cd build
#
#export SYS_ROOT="$ANDROID_STANDALONE_TOOLCHAIN/sysroot"
#export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
#export LD="arm-linux-androideabi-ld"
#export AR="arm-linux-androideabi-ar"
#export RANLIB="arm-linux-androideabi-ranlib"
#export STRIP="arm-linux-androideabi-strip"
#
#echo ""; echo ""
#echo "Configuring FFTW"
#../configure --enable-single --enable-static --enable-threads \
# --enable-float --enable-neon \
# --host=armv7-eabi --build=x86_64-linux \
# --prefix=$PREFIX \
# LIBS="-lc -lgcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon" \
# CC="arm-linux-androideabi-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
#
#echo "\n\nBuilding and installing FFTW"
#make -s -j${PARALLEL}
#make -s install
#
#unset SYS_ROOT
#unset CC
#unset LD
#unset AR
#unset RANLIB
#unset STRIP
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## OpenSSL (libcrypto) DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
## Crete a new environment that will screw with the normal one
#PATH_OLD=$PATH
#
#PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin:$PATH_ORIG
#ANDROID_NDK_ROOT=$ANDROID_NDK
#
#echo $PATH
#
#OPENSSL_VER=1.0.2
#OPENSSL_VER_PATCH=a
#OPENSSL_DIR=openssl-${OPENSSL_VER}${OPENSSL_VER_PATCH}
#OPENSSL_URL="ftp://ftp.openssl.org/source/old/${OPENSSL_VER}/${OPENSSL_DIR}.tar.gz"
#
#if [ -e "${OPENSSL_DIR}.tar.gz" ];
#then
# echo "OpenSSL file already downloaded; skipping"
#else
# echo "Downloading OpenSSL tarball"
# wget ${OPENSSL_URL}
#fi
#
#if [ -d ${OPENSSL_DIR} ];
#then
# echo "OpenSSL directory expanded; skipping"
#else
# echo "Expanding OpenSSL tarball"
# tar xzf ${OPENSSL_DIR}.tar.gz
# chmod +r -R ${OPENSSL_DIR}
#fi
#
#cd ${OPENSSL_DIR}
#
#wget https://wiki.openssl.org/images/7/70/Setenv-android.sh
#chmod +x Setenv-android.sh
#. ./Setenv-android.sh
#perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
#./config --prefix=/usr shared no-ssl2 no-ssl3 no-comp no-hw no-engines --openssldir=$ANDROID_STANDALONE_TOOLCHAIN/sysroot/usr/ssl/$ANDROID_API
#
#echo ""; #echo ""
#echo "Making and installing OpenSSL"
#make depend
#make all
#
#echo ""; echo ""
#echo "Copying and linking OpenSSL files"
#cp -fv libcrypto.* $ANDROID_STANDALONE_TOOLCHAIN/sysroot/usr/lib
#cp -fv libssl.* $ANDROID_STANDALONE_TOOLCHAIN/sysroot/usr/lib/
#mkdir -p $ANDROID_STANDALONE_TOOLCHAIN/sysroot/usr/include
#cp -rLfv include/openssl $ANDROID_STANDALONE_TOOLCHAIN/sysroot/usr/include
#
## reset our path
#PATH=$PATH_OLD
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## APACHE THRIFT DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#THRIFT_VER=0.9.3
#THRIFT_DIR=thrift
#
#if [ -d ${THRIFT_DIR} ];
#then
# echo "Thrift directory exists; skipping"
#else
# echo "Git cloning Thrift"
# git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
#fi
#
#cd thrift
#git checkout ${THRIFT_VER}
#
#sed -e '/AC_FUNC_MALLOC/ s/^#*/#/' -i configure.ac
#sed -e '/AC_FUNC_REALLOC/ s/^#*/#/' -i configure.ac
#
#echo ""; echo ""
#echo "Configuring Thrift"
#export SYS_ROOT="$ANDROID_STANDALONE_TOOLCHAIN/sysroot/"
#export CC="arm-linux-androideabi-g++ --sysroot=$SYS_ROOT"
#export CXX="arm-linux-androideabi-g++ --sysroot=$SYS_ROOT"
#export LD="arm-linux-androideabi-ld"
#export AR="arm-linux-androideabi-ar"
#export RANLIB="arm-linux-androideabi-ranlib"
#export STRIP="arm-linux-androideabi-strip"
#./bootstrap.sh
#./configure --prefix=$PREFIX --disable-tests --disable-tutorial --with-cpp \
# --without-python --without-c_glib --without-php --without-csharp --without-java \
# --without-libevent --without-zlib \
# --with-boost=$PREFIX --host=arm-eabi --build=x86_64-linux \
# CPPFLAGS="-I$ANDROID_STANDALONE_TOOLCHAIN/include/c++/4.8/arm-linux-androideabi/armv7-a" \
# LDFLAGS="-L$ANDROID_STANDALONE_TOOLCHAIN/arm-linux-androideabi/lib/armv7-a -lgnustl_shared"
#
#echo ""; echo ""
#echo "Building and installing Thrift"
#make -s -j${PARALLEL}
#make -s install
#
#unset SYS_ROOT
#unset CC
#unset CXX
#unset LD
#unset AR
#unset RANLIB
#unset STRIP
#
#cd ${TOP_BUILD_DIR}
#
#
#
#
############################################################
## ZEROMQ DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#ZEROMQ_VER=3.2.4
#ZEROMQ_DIR=zeromq-${ZEROMQ_VER}
#ZEROMQ_URL="http://download.zeromq.org/${ZEROMQ_DIR}.tar.gz"
#
#if [ -e "${ZEROMQ_DIR}.tar.gz" ];
#then
# echo "ZEROMQ file already downloaded; skipping"
#else
# echo "Downloading ZEROMQ tarball"
# wget ${ZEROMQ_URL}
#fi
#
#if [ -d ${ZEROMQ_DIR} ];
#then
# echo "ZEROMQ directory expanded; skipping"
#else
# echo "Expanding ZEROMQ tarball"
# tar xzf ${ZEROMQ_DIR}.tar.gz
# chmod +r -R ${ZEROMQ_DIR}
#fi
#
#cd ${ZEROMQ_DIR}
#
#sed -e 's/libzmq_werror="yes"/libzmq_werror="no"/' -i configure
#
#echo ""; echo ""
#echo "Configuring ZMQ"
#./configure --enable-static --disable-shared --host=arm-linux-androideabi \
# --prefix=$PREFIX LDFLAGS="-L$OUTPUT_DIR/lib \
# -L$ANDROID_STANDALONE_TOOLCHAIN/arm-linux-androideabi/lib/armv7-a \
# -lgnustl_shared" CPPFLAGS="-fPIC -I$PREFIX/include \
# -I$ANDROID_STANDALONE_TOOLCHAIN/include/c++/4.8/arm-linux-androideabi/armv7-a" \
# LIBS="-lgcc" --with-libsodium=no
#
#echo ""; echo ""
#echo "Building and installing ZMQ"
#make -s -j${PARALLEL}
#make -s install
#
#echo ""; echo ""
#echo "Getting C++ Header for ZMQ"
#wget -O $PREFIX/include/zmq.hpp https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## DOWNLOAD GNURADIO
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#GNURADIO_DIR=gnuradio
#
#if [ -e "${GNURADIO_DIR}" ];
#then
# echo "GNURADIO file already cloned; skipping"
#else
# echo "Git cloning GNURADIO"
# git clone git://git.gnuradio.org/gnuradio.git
#fi
#
#cd gnuradio
#git checkout android
#TOOLCHAIN=`pwd`/cmake/Toolchains/AndroidToolchain.cmake
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## LIBUSB DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#LIBUSB_DIR=libusb
#LIBUSB_VER=v1.0.19-and5
#
#if [ -e "${LIBUSB_DIR}" ];
#then
# echo "LIBUSB file already cloned; skipping"
#else
# echo "Git cloning LIBUSB"
# git clone https://github.com/trondeau/${LIBUSB_DIR}
#fi
#
#cd ${LIBUSB_DIR}
#git checkout ${LIBUSB_VER}
#
#echo "Building libUSB via ndk-build"
#cd android/jni
#ndk-build
#
#echo "Copying libUSB files to $PREFIX"
#cp -Lfv ${TOP_BUILD_DIR}/${LIBUSB_DIR}/android/libs/armeabi-v7a/libusb1.0.so $PREFIX/lib
#cp -rLfv ${TOP_BUILD_DIR}/${LIBUSB_DIR}/libusb $PREFIX/include
#
#cd ${TOP_BUILD_DIR}
#
#
############################################################
## RTLSDR DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#RTLSDR_DIR=rtl-sdr
#RTLSDR_VER=android5
#
#if [ -e "${RTLSDR_DIR}" ];
#then
# echo "RTLSDR file already cloned; skipping"
#else
# echo "Git cloning RTLSDR"
# git clone https://github.com/trondeau/${RTLSDR_DIR}
#fi
#
#cd ${RTLSDR_DIR}
#git checkout ${RTLSDR_VER}
#
#echo ""; echo ""
#echo "Configuring RTL-SDR"
#mkdir -p build
#cd build
#
#set +e # expecting this call to cmake to fail
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DLIBUSB_INCLUDE_DIR=$PREFIX/include/libusb \
# -DLIBUSB_LIBRARIES=$PREFIX/lib/libusb1.0.so \
# ../
#
#set -e
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DLIBUSB_INCLUDE_DIR=$PREFIX/include/libusb \
# -DLIBUSB_LIBRARIES=$PREFIX/lib/libusb1.0.so \
# ../
#
#echo ""; echo ""
#echo "Building and installing RTL-SDR"
#make -s -j${PARALLEL}
#make -s install
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## UHD DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#UHD_DIR=uhd
#UHD_VER=android
#
#if [ -e "${UHD_DIR}" ];
#then
# echo "UHD file already cloned; skipping"
#else
# echo "Git cloning UHD"
# git clone https://github.com/trondeau/${UHD_DIR}
#fi
#
#cd ${UHD_DIR}/host
#git checkout ${UHD_VER}
#
#echo ""; echo ""
#echo "Configuring UHD"
#mkdir -p build
#cd build
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DBOOST_ROOT=$PREFIX \
# -DBoost_DIR=$PREFIX \
# -DLIBUSB_INCLUDE_DIRS=$PREFIX/include/libusb \
# -DLIBUSB_LIBRARIES=$PREFIX/lib/libusb1.0.so \
# -DPYTHON_EXECUTABLE=/usr/bin/python \
# -DENABLE_STATIC_LIBS=True -DENABLE_USRP1=False \
# -DENABLE_USRP2=False -DENABLE_B100=False \
# -DENABLE_X300=False -DENABLE_OCTOCLOCK=False \
# -DENABLE_TESTS=False -DENABLE_ORC=False \
# ../
#
#echo ""; echo ""
#echo "Building and installing UHD"
#make -s -j${PARALLEL}
#make -s install
#
#cd ${TOP_BUILD_DIR}
#
#
#
#
############################################################
## VOLK DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#VOLK_DIR=volk
#VOLK_VER=android
#
#if [ -e "${VOLK_DIR}" ];
#then
# echo "VOLK file already cloned; skipping"
#else
# echo "Git cloning VOLK"
# git clone https://github.com/trondeau/${VOLK_DIR}
#fi
#
#cd ${VOLK_DIR}
#git checkout ${VOLK_VER}
#
#echo ""; echo ""
#echo "Configuring VOLK"
#mkdir -p build
#cd build
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DPYTHON_EXECUTABLE=/usr/bin/python \
# -DENABLE_STATIC_LIBS=True \
# ../
#
#echo ""; echo ""
#echo "Building and installing VOLK"
#make -s -j${PARALLEL}
#make -s install
#
#cd ${TOP_BUILD_DIR}
#
#
#
#
############################################################
## BUILDING GNURADIO
############################################################
#
#cd ${GNURADIO_DIR}
#
#echo ""; echo ""
#echo ${PATH}
#echo "Configuring GNU Radio"
#mkdir -p build
#cd build
#cmake \
# -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DENABLE_INTERNAL_VOLK=Off \
# -DBOOST_ROOT=$PREFIX \
# -DFFTW3F_INCLUDE_DIRS=$PREFIX/include \
# -DFFTW3F_LIBRARIES=$PREFIX/lib/libfftw3f.a \
# -DFFTW3F_THREADS_LIBRARIES=$PREFIX/lib/libfftw3f_threads.a \
# -DENABLE_DEFAULT=False \
# -DENABLE_GR_LOG=False \
# -DENABLE_VOLK=True \
# -DENABLE_GNURADIO_RUNTIME=True \
# -DENABLE_GR_BLOCKS=True \
# -DENABLE_GR_FEC=False \
# -DENABLE_GR_FFT=True \
# -DENABLE_GR_FILTER=True \
# -DENABLE_GR_ANALOG=True \
# -DENABLE_GR_DIGITAL=True \
# -DENABLE_GR_CHANNELS=True \
# -DENABLE_GR_ZEROMQ=True \
# -DENABLE_GR_UHD=True \
# -DENABLE_STATIC_LIBS=True \
# -DENABLE_GR_CTRLPORT=True \
# ../
#
#echo ""; echo ""
#echo "Building and installing GNU Radio"
#make -j${PARALLEL}
#make install
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## GRAnd
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#GRAND_DIR=gr-grand
#GRAND_VER=master
#
#if [ -e "${GRAND_DIR}" ];
#then
# echo "gr-grand file already cloned; skipping"
#else
# echo "Git cloning gr-grand"
# git clone https://github.com/trondeau/${GRAND_DIR}
#fi
#
#cd ${GRAND_DIR}
#git checkout ${GRAND_VER}
#
#echo ""; echo ""
#echo "Configuring GRAND"
#mkdir -p build
#cd build
#PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DPYTHON_EXECUTABLE=/usr/bin/python \
# ../
#
#echo ""; echo ""
#echo "Building and installing gr-grand"
#make -s -j${PARALLEL}
#make -s install
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## GR-OSMOSDR DEPENDENCY
############################################################
#
#echo ""; echo ""; echo ""; echo ""
#
#OSMOSDR_DIR=gr-osmosdr
#OSMOSDR_VER=android5
#
#if [ -e "${OSMOSDR_DIR}" ];
#then
# echo "gr-osmosdr file already cloned; skipping"
#else
# echo "Git cloning gr-osmosdr"
# git clone https://github.com/trondeau/${OSMOSDR_DIR}
#fi
#
#cd ${OSMOSDR_DIR}
#git checkout ${OSMOSDR_VER}
#
#echo ""; echo ""
#echo "Configuring OSMOSDR"
#mkdir -p build
#cd build
#PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
#cmake -Wno-dev \
# -DCMAKE_INSTALL_PREFIX=$PREFIX \
# -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
# -DENABLE_UHD=True -DENABLE_FCD=False -DENABLE_RFSPACE=False \
# -DENABLE_BLADERF=False -DENABLE_HACKRF=False -DENABLE_OSMOSDR=False \
# -DENABLE_RTL_TCP=False -DENABLE_IQBALANCE=False \
# -DBOOST_ROOT=$PREFIX \
# ../
#
#echo ""; echo ""
#echo "Building and installing OSMOSDR"
#make -s -j${PARALLEL}
#make -s install
#
#cd ${TOP_BUILD_DIR}
#
#
#
############################################################
## BUILD MANIFEST FILE
############################################################
#
#cd ${TOP_BUILD_DIR}
#cd ${RTLSDR_DIR}
#RTLSDR_VER=`git rev-parse HEAD`
#
#cd ${TOP_BUILD_DIR}
#cd ${UHD_DIR}
#UHD_VER=`git rev-parse HEAD`
#
#cd ${TOP_BUILD_DIR}
#cd ${VOLK_DIR}
#VOLK_VER=`git rev-parse HEAD`
#
#cd ${TOP_BUILD_DIR}
#cd ${GNURADIO_DIR}
#GNURADIO_VER=`git rev-parse HEAD`
#
#cd ${TOP_BUILD_DIR}
#cd ${OSMOSDR_DIR}
#OSMOSDR_VER=`git rev-parse HEAD`
#
#echo "Boost: ${BOOST_VER}" > ${PREFIX}/MANIFEST.txt
#echo "FFTW: ${FFTW_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "OpenSSL: ${OPENSSL_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "Thrift: ${THRIFT_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "ZeroMQ: ${ZEROMQ_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "LibUSB: ${LIBUSB_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "RTL-SDR: ${RTLSDR_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "UHD: ${UHD_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "VOLK: ${VOLK_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "gr-omsosdr: ${OSMOSDR_VER}" >> ${PREFIX}/MANIFEST.txt
#echo "GNU Radio: ${GNURADIO_VER}" >> ${PREFIX}/MANIFEST.txt