Buld fltk for ARM linux.
authorDaniel G <giri@nwrk.biz>
Wed, 30 Jan 2019 00:21:20 +0000 (01:21 +0100)
committerDaniel G <giri@nwrk.biz>
Wed, 30 Jan 2019 00:21:20 +0000 (01:21 +0100)
_template/packages/fltk1.3/Makefile

index b40a6b0..9b597dd 100644 (file)
@@ -9,12 +9,12 @@ 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:
        tar xvzf fltk-1.3.4-1-source.tar.gz
-       cd $(WORKDIR)/fltk-1.3.4-1
+       mkdir -p $(WORKDIR)/../../include/X11
        cp /usr/include/X11/Xmd.h ../../include/X11/
        cp /usr/include/X11/cursorfont.h ../../include/X11/
 
@@ -27,10 +27,10 @@ windows:
        mkdir -p $(WORKDIR)/../../include
        mkdir -p $(WORKDIR)/../../lib/mingw32
        cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/* $(WORKDIR)/../../lib/mingw32
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/*.a $(WORKDIR)/../../lib/mingw32
 
-.PHONY: linux
-linux:
+.PHONY: linux32
+linux32:
        cd $(WORKDIR)/fltk-1.3.4-1; \
        make clean; \
        ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --enable-static --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
@@ -39,9 +39,20 @@ linux:
        mkdir -p $(WORKDIR)/../../lib/linux32
        mkdir -p $(WORKDIR)/../../tools
        cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
-       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/* $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/*.a $(WORKDIR)/../../lib/linux32
        cp -rf $(WORKDIR)/fltk-1.3.4-1/fluid/fluid $(WORKDIR)/../../tools
 
+.PHONY: linux_arm
+linux_arm:
+       cd $(WORKDIR)/fltk-1.3.4-1; \
+       make clean; \
+       ./configure CFLAGS="" CXXFLAGS="" LDFLAGS="-static-libgcc -static-libstdc++" --host=arm-linux-gnueabihf  --enable-static --enable-localjpeg --enable-localzlib --enable-localpng --disable-xcursor --disable-xinerama --disable-xft --disable-xdbe --disable-xrender --disable-xfixes; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux_arm
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/FL $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/fltk-1.3.4-1/lib/*.a $(WORKDIR)/../../lib/linux_arm
+
 .PHONY: linux_nanox
 linux_nanox:
        cd $(WORKDIR)/fltk-1.3.4-1; \