d8fae9dc7d7fed20db5ed3b7c893770f67d754c2
[fltk_mvc_template.git] / _template / packages / nanox / Makefile
1 ############################################################################
2 # Workfile: Makefile
3 # Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
4 # Date: 03.12.2018
5 # Description: Universal Makefile for Unix based Operating Systems
6 ############################################################################
7 WORKDIR = $(shell pwd)
8 ANDROID_TARGET_VER=23
9
10
11 all: unpack android_arm_allegro
12
13 unpack:
14         unzip -o microwindows-master.zip
15
16 linux:
17         cp $(WORKDIR)/config_linux $(WORKDIR)/microwindows-master/src/config
18         cd $(WORKDIR)/microwindows-master/src/; \
19         sed -i -e 's/CFLAGS=.*/CFLAGS=-m32/g' ./Makefile.rules; \
20         sed -i -e 's/LDFLAGS=.*/LDFLAGS=-m32/g' ./Makefile.rules; \
21         make -j6
22         mkdir -p $(WORKDIR)/../../lib/linux32
23         mkdir -p $(WORKDIR)/../../lib_include/linux32
24         cp -rf $(WORKDIR)/microwindows-master/src/lib/*.a $(WORKDIR)/../../lib/linux32
25         cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../lib_include/linux32
26         cp -rf $(WORKDIR)/microwindows-master/src/nx11/X11-local/* $(WORKDIR)/../../lib_include/linux32
27
28 android_arm_allegro:
29         cp $(WORKDIR)/config_android_arm_allegro $(WORKDIR)/microwindows-master/src/config
30         export PATH=/usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:${PATH}; \
31         cd $(WORKDIR)/microwindows-master/src/; \
32         make -j6
33         mkdir -p $(WORKDIR)/../../lib/android_arm
34         mkdir -p $(WORKDIR)/../../lib_include/android_arm
35         cp -rf $(WORKDIR)/microwindows-master/src/lib/*.a $(WORKDIR)/../../lib/android_arm
36         cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../lib_include/android_arm
37         cp -rf $(WORKDIR)/microwindows-master/src/nx11/X11-local/* $(WORKDIR)/../../lib_include/android_arm
38
39 android_arm_sdl:
40         cp $(WORKDIR)/config_android_arm_sdl $(WORKDIR)/microwindows-master/src/config
41         export PATH=/usr/lib/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:${PATH}; \
42         cd $(WORKDIR)/microwindows-master/src/; \
43         make -j6
44         mkdir -p $(WORKDIR)/../../lib/android_arm
45         mkdir -p $(WORKDIR)/../../lib_include/android_arm
46         cp -rf $(WORKDIR)/microwindows-master/src/lib/*.a $(WORKDIR)/../../lib/android_arm
47         cp -rf $(WORKDIR)/microwindows-master/src/include/*.h $(WORKDIR)/../../lib_include/android_arm
48         cp -rf $(WORKDIR)/microwindows-master/src/nx11/X11-local/* $(WORKDIR)/../../lib_include/android_arm
49
50 clean:
51         rm -rf $(WORKDIR)/microwindows-master