Use 4 jobs to build nanox
[fltk_mvc_template.git] / _template / packages / nanox / Makefile
index 42c1a2a..cfb0d64 100644 (file)
@@ -5,8 +5,8 @@
 # Description: Universal Makefile for Unix based Operating Systems
 ############################################################################
 WORKDIR = $(shell pwd)
+ANDROID_TARGET_VER=23
 
-# compiler flags
 
 all: unpack android_arm
 
@@ -24,22 +24,22 @@ linux:
        sed -i -e 's/LDFLAGS=.*/LDFLAGS=-m32/g' ./Makefile.rules; \
        make -j4
        mkdir -p $(WORKDIR)/../../lib/linux32
-       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../include/nanox
        cp -rf $(WORKDIR)/microwindows-master/src/lib/*.a $(WORKDIR)/../../lib/linux32
-       cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../include/nanox
        cp -rf $(WORKDIR)/microwindows-master/src/nx11/X11-local/* $(WORKDIR)/../../include
 
 android_arm:
        cp $(WORKDIR)/config_android_arm $(WORKDIR)/microwindows-master/src/config
        export PATH=/usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:${PATH}; \
        cd $(WORKDIR)/microwindows-master/src/; \
-       sed -i -e 's/CFLAGS=.*/CFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\/ -I..\/..\/..\/..\/..\/include/g' ./Makefile.rules; \
-       sed -i -e 's/LDFLAGS=.*/LDFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-23\/arch-arm\//g' ./Makefile.rules; \
+       sed -i -e 's/CFLAGS=.*/CFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-$(ANDROID_TARGET_VER)\/arch-arm\/ -I..\/..\/..\/..\/..\/include  -DHAVE_SELECT=0/g' ./Makefile.rules; \
+       sed -i -e 's/LDFLAGS=.*/LDFLAGS=--sysroot=\/usr\/lib\/android-ndk\/platforms\/android-$(ANDROID_TARGET_VER)\/arch-arm\//g' ./Makefile.rules; \
        make -j4
        mkdir -p $(WORKDIR)/../../lib/android_arm
-       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../include/nanox
        cp -rf $(WORKDIR)/microwindows-master/src/lib/*.a $(WORKDIR)/../../lib/android_arm
-       cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../include/nanox
        cp -rf $(WORKDIR)/microwindows-master/src/nx11/X11-local/* $(WORKDIR)/../../include
 
 clean: