forked from FreeMonad/paridroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: all apk paridroid libpari clean ndk-clean pari-clean uberclean
include ./Makefile.include
PARI_SRC=$(TOP)/pari
PARIDROID_SRC=$(TOP)/PariDroid
NDK_MODULES=$(PARIDROID_SRC)/jni
all: libpari paridroid apk
apk: paridroid
cp $(PARIDROID_SRC)/bin/PariDroid-debug.apk $(TOP)/PariDroid.apk
paridroid: $(NDK_MODULES)/paridroid/org_freemonad_paridroid_PariNative.h
cd $(NDK_MODULES) && $(NDK_PATH)/ndk-build V=1
cd $(PARIDROID_SRC) && ant debug
$(NDK_MODULES)/paridroid/org_freemonad_paridroid_PariNative.h: libpari
cd $(PARIDROID_SRC) && ant debug
cd $(PARIDROID_SRC)/bin/classes && javah -jni org.freemonad.paridroid.PariNative
mv $(PARIDROID_SRC)/bin/classes/org_freemonad_paridroid_PariNative.h $(NDK_MODULES)/paridroid/org_freemonad_paridroid_PariNative.h
libpari:
cd $(PARI_SRC)/Oandroid-arm && make
mkdir -p $(NDK_MODULES)/pari/lib
cp $(PARI_SRC)/Oandroid-arm/libpari.so $(NDK_MODULES)/pari/lib
mkdir -p $(NDK_MODULES)/pari/include
cp -r $(PARI_SRC)/Oandroid-arm/*.h $(NDK_MODULES)/pari/include
cp -r $(PARI_SRC)/src/headers/*.h $(NDK_MODULES)/pari/include
clean:
rm -f $(TOP)/PariDroid.apk
cd $(PARIDROID_SRC) && ant clean
ndk-clean:
cd $(NDK_MODULES) && $(NDK_PATH)/ndk-build clean V=1
pari-clean:
rm -f $(PARI_SRC)/pari.cfg
rm -rf $(PARI_SRC)/android
cd $(PARI_SRC)/Oandroid-arm && make clean
uberclean: clean ndk-clean pari-clean
rm -rf $(NDK_MODULES)/pari/lib/*.so
rm -rf $(NDK_MODULES)/pari/include/*.h