Added linux arm target for freetype.
authorDaniel G <giri@nwrk.biz>
Tue, 29 Jan 2019 22:28:44 +0000 (23:28 +0100)
committerDaniel G <giri@nwrk.biz>
Tue, 29 Jan 2019 22:28:44 +0000 (23:28 +0100)
_template/packages/freetype2/Makefile
_template/packages/libsndfile/Makefile

index 0c5ee04..c4984a3 100644 (file)
@@ -9,7 +9,7 @@ WORKDIR = $(shell pwd)
 # Add android ndk toolchain
 export PATH := /usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:$(PATH)
 
-all: unpack windows linux android_arm
+all: unpack windows linux32 linux_arm android_arm
 
 .PHONY: unpack
 unpack:
@@ -27,8 +27,8 @@ windows:
        cp -rf $(WORKDIR)/freetype-2.9.1/include $(WORKDIR)/../../include
        cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/mingw32
 
-.PHONY: linux
-linux:
+.PHONY: linux32
+linux32:
        cd $(WORKDIR)/freetype-2.9.1; \
        make clean; \
        ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
@@ -38,6 +38,17 @@ linux:
        cp -rf $(WORKDIR)/freetype-2.9.1/include/* $(WORKDIR)/../../include
        cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/linux32
 
+.PHONY: linux_arm
+linux_arm:
+       cd $(WORKDIR)/freetype-2.9.1; \
+       make clean; \
+       ./configure CFLAGS="" CXXFLAGS="" LDFLAGS="-static-libgcc -static-libstdc++" --host=arm-linux-gnueabihf  --disable-shared --enable-static --without-png --without-zlib --without-harfbuzz; \
+       make -i -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux_arm
+       cp -rf $(WORKDIR)/freetype-2.9.1/include/* $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/freetype-2.9.1/objs/.libs/libfreetype.a $(WORKDIR)/../../lib/linux_arm
+
 .PHONY: android_arm
 android_arm:
        cd $(WORKDIR)/freetype-2.9.1; \
index 460fdb8..3ca7bdb 100644 (file)
@@ -6,7 +6,11 @@
 ############################################################################
 WORKDIR = $(shell pwd)
 
-all: unpack windows clean linux
+# Add android ndk toolchain
+ANDROID_NDK_HOME=/usr/lib/android-ndk
+export PATH := $(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:$(PATH)
+
+all: unpack windows linux32 linux_arm android_arm
 
 .PHONY: unpack
 unpack:
@@ -15,6 +19,7 @@ unpack:
 .PHONY: windows
 windows:
        cd $(WORKDIR)/libsndfile-1.0.28; \
+       make clean; \
        autoreconf -vfi; \
        ./configure CFLAGS="-m32 -mconsole" CXXFLAGS="-m32 -mconsole" LDFLAGS="-m32 -static-libgcc -static-libstdc++ -lpthread" --host=i686-w64-mingw32; \
        make -j4
@@ -24,9 +29,10 @@ windows:
        cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/mingw32
        cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/mingw32
 
-.PHONY: linux
-linux:
+.PHONY: linux32
+linux32:
        cd $(WORKDIR)/libsndfile-1.0.28; \
+       make clean; \
        autoreconf -vfi; \
        ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static -static-libgcc -static-libstdc++"; \
        make -j4
@@ -36,7 +42,32 @@ linux:
        cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/linux32
        cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/linux32
 
+.PHONY: linux_arm
+linux_arm:
+       cd $(WORKDIR)/libsndfile-1.0.28; \
+       make clean; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="" CXXFLAGS="" LDFLAGS="-static-libgcc -static-libstdc++" --host=arm-linux-gnueabihf; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux_arm
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/sndfile.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/linux_arm
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/linux_arm
+
+.PHONY: android_arm
+android_arm:
+       cd $(WORKDIR)/libsndfile-1.0.28; \
+       make clean; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="" CXXFLAGS="--sysroot=$(ANDROID_NDK_HOME)/platforms/android-23/arch-arm -I$(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++/libcxx/include" LDFLAGS="-static-libgcc -static-libstdc++" --host=arm-linux-androideabi; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/sndfile.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/android_arm
+
 .PHONY: clean
 clean:
-       cd $(WORKDIR)/libsndfile-1.0.28; \
-       make clean
+       rm -rf $(WORKDIR)/libsndfile-1.0.28