Added linux arm target for freetype.
[fltk_mvc_template.git] / _template / packages / freetype2 / 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; \