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 $