source: Makefile @ 423cbe

Revision 423cbe, 2.5 KB checked in by Erik Ekman <erik@…>, 9 hours ago (diff)

Added android specific readme file, along with new make targets

Also updated changelog.

  • Property mode set to 100644
Line 
1prefix?=/usr/local
2sbindir=$(prefix)/sbin
3datadir=$(prefix)/share
4mandir=$(datadir)/man
5
6DESTDIR=
7
8INSTALL=install
9INSTALL_FLAGS=
10
11MKDIR=mkdir
12MKDIR_FLAGS=-p
13
14RM=rm
15RM_FLAGS=-f
16
17TARGETOS = `uname`
18
19all:
20        @(cd src; $(MAKE) TARGETOS=$(TARGETOS) all)
21
22cross-android:
23        @(cd src; $(MAKE) base64u.c base64u.h)
24        @(cd src; ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk)
25
26cross-android-dist:
27        @rm -rf iodine-latest-android*
28        @mkdir -p iodine-latest-android/armeabi iodine-latest-android/x86
29        @$(MAKE) cross-android TARGET_ARCH_ABI=armeabi
30        @cp src/libs/armeabi/* iodine-latest-android/armeabi
31        @$(MAKE) cross-android TARGET_ARCH_ABI=x86
32        @cp src/libs/x86/* iodine-latest-android/x86
33        @cp README README-android.txt CH* TO* iodine-latest-android
34        @echo "Create date: " > iodine-latest-android/VERSION
35        @date >> iodine-latest-android/VERSION
36        @echo "Git version: " >> iodine-latest-android/VERSION
37        @git rev-parse HEAD >> iodine-latest-android/VERSION
38        @zip -r iodine-latest-android.zip iodine-latest-android
39
40cross-mingw:
41        @(cd src; $(MAKE) TARGETOS=windows32 CC=i686-mingw32-gcc all)
42
43cross-mingw-dist: cross-mingw
44        @rm -rf iodine-latest-win32*
45        @mkdir -p iodine-latest-win32/bin
46        @for i in `ls bin`; do cp bin/$$i iodine-latest-win32/bin/$$i.exe; done
47        @cp /usr/i686-mingw32/usr/bin/zlib1.dll iodine-latest-win32/bin
48        @cp README README-win32.txt CH* TO* iodine-latest-win32
49        @echo "Create date: " > iodine-latest-win32/VERSION
50        @date >> iodine-latest-win32/VERSION
51        @echo "Git version: " >> iodine-latest-win32/VERSION
52        @git rev-parse HEAD >> iodine-latest-win32/VERSION
53        @zip -r iodine-latest-win32.zip iodine-latest-win32
54
55install: all
56        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(sbindir)
57        $(INSTALL) $(INSTALL_FLAGS) bin/iodine $(DESTDIR)$(sbindir)/iodine
58        chmod 755 $(DESTDIR)$(sbindir)/iodine
59        $(INSTALL) $(INSTALL_FLAGS) bin/iodined $(DESTDIR)$(sbindir)/iodined
60        chmod 755 $(DESTDIR)$(sbindir)/iodined
61        $(MKDIR) $(MKDIR_FLAGS) $(DESTDIR)$(mandir)/man8
62        $(INSTALL) $(INSTALL_FLAGS) man/iodine.8 $(DESTDIR)$(mandir)/man8/iodine.8
63        chmod 644 $(DESTDIR)$(mandir)/man8/iodine.8
64
65uninstall:
66        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodine
67        $(RM) $(RM_FLAGS) $(DESTDIR)$(sbindir)/iodined
68        $(RM) $(RM_FLAGS) $(DESTDIR)$(mandir)/man8/iodine.8
69       
70test: all
71        @echo "!! The check library is required for compiling and running the tests"
72        @echo "!! Get it at http://check.sf.net"
73        @(cd tests; $(MAKE) TARGETOS=$(TARGETOS) all)
74
75clean:
76        @echo "Cleaning..."
77        @(cd src; $(MAKE) clean)
78        @(cd tests; $(MAKE) clean)
79        @rm -rf bin iodine-latest-win32* iodine-latest-android*
80
Note: See TracBrowser for help on using the repository browser.