-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
74 lines (59 loc) · 2.22 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
include config.mk
PWD=$(shell pwd)
export PATH := $(PWD)/toolchain/$(ANDROID_PLATFORM)/bin:$(PATH)
.PHONY: all clean spotless host target update
all: update build/host/
toolchain/$(ANDROID_PLATFORM)/: toolchain/$(ANDROID_PLATFORM)/COPYING
toolchain/$(ANDROID_PLATFORM)/COPYING:
mkdir -p toolchain/$(ANDROID_PLATFORM) && \
$(NDK_PATH)/build/tools/make-standalone-toolchain.sh \
--platform=$(ANDROID_PLATFORM) \
--system=$(HOST_ARCH) \
--install-dir=toolchain/$(ANDROID_PLATFORM)
src/chicken-core/:
git clone https://github.com/chicken-mobile/chicken-core.git -b android src/chicken-core
src/chicken-core/chicken-boot: src/chicken-core/
cd src/chicken-core; \
rm -f chicken; \
$(MAKE) PLATFORM=linux confclean boot-chicken; \
touch *.scm
build/target/: src/chicken-core/ toolchain/$(ANDROID_PLATFORM)/ src/chicken-core/chicken-boot
$(MAKE) target
update: src/chicken-core/
cd src/chicken-core; git pull
target:
mkdir -p build/target
cd src/chicken-core; \
PATH=$$PWD/toolchain/$(ANDROID_PLATFORM)/bin:$$PATH $(MAKE) PLATFORM=android \
CHICKEN=./chicken-boot \
HOSTSYSTEM=arm-linux-androideabi \
TARGET_FEATURES="-no-feature x86 -no-feature x86-64 -feature arm -feature android" \
DEBUGBUILD=$(DEBUGBUILD) \
ARCH= \
PREFIX=/data/data/$(PACKAGE_NAME) \
DESTDIR=$(PWD)/build/target \
EGGDIR=/data/data/$(PACKAGE_NAME)/lib \
confclean clean all install
mkdir -p build/target/data/data/$(PACKAGE_NAME)/lib/chicken/7
mv build/target/data/data/$(PACKAGE_NAME)/lib/*.import.* build/target/data/data/$(PACKAGE_NAME)/lib/chicken/7/
build/host/: src/chicken-core/ build/target/
$(MAKE) host
host:
mkdir -p build/host
cd src/chicken-core; \
$(MAKE) PLATFORM=linux \
CHICKEN=./chicken-boot \
TARGETSYSTEM=arm-linux-androideabi \
TARGET_FEATURES="-no-feature x86 -no-feature x86-64 -feature arm -feature android" \
TARGET_C_COMPILER=$$PWD/../../toolchain/$(ANDROID_PLATFORM)/bin/arm-linux-androideabi-gcc \
DEBUGBUILD=$(DEBUGBUILD) \
PREFIX=$(PWD)/build/host \
TARGET_PREFIX=$(PWD)/build/target/data/data/$(PACKAGE_NAME) \
TARGET_RUN_PREFIX=/data/data/$(PACKAGE_NAME) \
PROGRAM_PREFIX=android- \
confclean clean all install
spotless: clean
rm -rf src
clean:
rm -rf toolchain
rm -rf build