diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2014-09-13 23:27:40 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2014-09-15 01:38:33 +0200 |
commit | 8cff11d815a3c054d4f254931f8a14efab71aa3d (patch) | |
tree | 2c93a69530d7c7ad78ea1b8c027df39a4e102f34 /Makefile | |
download | rtlsdr-flarm-android-8cff11d815a3c054d4f254931f8a14efab71aa3d.tar.gz rtlsdr-flarm-android-8cff11d815a3c054d4f254931f8a14efab71aa3d.zip |
rtlsdr-flarm buildscript for android
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a40f316 --- /dev/null +++ b/Makefile @@ -0,0 +1,105 @@ +SYSPREFIX=$(shell pwd)/toolchain +NDK=/home/yvesf/share/android-ndk-r10b + +export PATH := $(SYSPREFIX)/bin:$(PATH) +export PKG_CONFIG_PATH := $(SYSPREFIX)/lib/pkgconfig +export CFLAGS := -g +export CPPFLAGS := -g + +all: + echo "Call target 'compile'" + +distfiles/fftw-3.3.4.tar.gz: + wget http://www.fftw.org/fftw-3.3.4.tar.gz -O $@ +distfiles/libconfig-1.4.9.tar.gz: + wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz -O $@ +distfiles/jpegsrc.v8d.tar.gz: + wget http://ijg.org/files/jpegsrc.v8d.tar.gz -O $@ +distfiles/libusb-1.0.9.tar.bz2: + wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 -O $@ +distfiles/librtlsdr-0.5.3.tar.gz: + wget https://github.com/steve-m/librtlsdr/archive/v0.5.3.tar.gz -O $@ + +work: + mkdir work +work/fftw-3.3.4: distfiles/fftw-3.3.4.tar.gz work + tar xvzf $< -C work + touch $@ +work/fftw-3.3.4f: distfiles/fftw-3.3.4.tar.gz work + mkdir -p $@ + tar xvzf $< --strip-components=1 -C $@ + touch $@ +work/libconfig-1.4.9: distfiles/libconfig-1.4.9.tar.gz work + tar xvzf $< -C work + touch $@ +work/jpeg-8d: distfiles/jpegsrc.v8d.tar.gz work + tar xvzf $< -C work + touch $@ + patch -p0 < patches/jpeg-autoreconf.diff +work/libusb-1.0.9: distfiles/libusb-1.0.9.tar.bz2 work + tar xvjf $< -C work + patch -p0 < patches/libusb-timespec.diff + touch $@ +work/librtlsdr-0.5.3: distfiles/librtlsdr-0.5.3.tar.gz work + tar xvzf $< -C work + touch $@ + +toolchain: +#$(NDK)/build/tools/make-standalone-toolchain.sh --platform=android-14 --toolchain=arm-linux-android-androideabi-4.8 --system=linux-x86_64 --install-dir=toolchain + $(NDK)/build/tools/make-standalone-toolchain.sh --platform=android-19 --install-dir=toolchain + +compile: compile-libfftw3 +compile: compile-libfftw3f +compile: compile-libconfig +compile: compile-libjpeg +compile: compile-libusb +compile: compile-librtlsdr + +compile-libfftw3: $(SYSPREFIX)/lib/libfftw3.a +$(SYSPREFIX)/lib/libfftw3.a: work/fftw-3.3.4 toolchain + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi && \ + make -j4 && \ + make install + +compile-libfftw3f: $(SYSPREFIX)/lib/libfftw3f.a +$(SYSPREFIX)/lib/libfftw3f.a: work/fftw-3.3.4f toolchain + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi --enable-single && \ + make -j4 && \ + make install + +compile-libconfig: $(SYSPREFIX)/lib/libconfig.a +$(SYSPREFIX)/lib/libconfig.a: work/libconfig-1.4.9 toolchain + rm -rf $</aux-build + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi && \ + make -j4 && \ + make install + +compile-libjpeg: $(SYSPREFIX)/lib/libjpeg.a +$(SYSPREFIX)/lib/libjpeg.a: work/jpeg-8d toolchain + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi && \ + make -j4 && \ + make install + +compile-libusb: $(SYSPREFIX)/lib/libusb-1.0.a +$(SYSPREFIX)/lib/libusb-1.0.a: work/libusb-1.0.9 toolchain + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi && \ + make -j4 && \ + make install + + +compile-librtlsdr: $(SYSPREFIX)/lib/librtlsdr.a +$(SYSPREFIX)/lib/librtlsdr.a: work/librtlsdr-0.5.3 toolchain $(SYSPREFIX)/lib/libusb-1.0.a + cd $< && autoreconf -i + cd $< && ./configure --prefix=$(SYSPREFIX) --host=arm-linux-androideabi && \ + make -j4 AM_DEFAULT_VERBOSITY=1 && \ + make install + + +clean: + rm -r work + rm -r toolchain |