-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
119 lines (98 loc) · 3.14 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/usr/bin/make -f
ARCH := arm64
ARCH_ASFLAGS :=
ARCH_CFLAGS := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -s -Os -s -Wl,--allow-multiple-definition -save-temps -Os -static -fdata-sections -ffunction-sections -Wl,--gc-sections -fPIC -DPIC -Wl,-s -D_AROMA_NODEBUG -ffast-math -fomit-frame-pointer
USE_NEON := 0
# Version info
AROMA_NAME := Fresh Install Wizard
AROMA_VERSION := 13.2.1.1
AROMA_BUILD := $(shell date +%s)
AROMA_CN := Red-Eyes Black Dragon
CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
AS := $(CROSS_COMPILE)as
AR := $(CROSS_COMPILE)ar
SOURCES_zlib := \
libs/zlib/adler32.c \
libs/zlib/crc32.c \
libs/zlib/infback.c \
libs/zlib/inffast.c \
libs/zlib/inflate.c \
libs/zlib/inftrees.c \
libs/zlib/zutil.c
ifeq ($(USE_NEON),1)
SOURCES_zlib += libs/zlib/inflate_fast_copy_neon.s
endif
SOURCES_libpng := \
libs/png/png.c \
libs/png/pngerror.c \
libs/png/pnggccrd.c \
libs/png/pngget.c \
libs/png/pngmem.c \
libs/png/pngpread.c \
libs/png/pngread.c \
libs/png/pngrio.c \
libs/png/pngrtran.c \
libs/png/pngrutil.c \
libs/png/pngset.c \
libs/png/pngtrans.c \
libs/png/pngvcrd.c
ifeq ($(USE_NEON),1)
SOURCES_libpng += libs/png/png_read_filter_row_neon.s
endif
SOURCES_minutf8 := libs/minutf8/minutf8.c
SOURCES_minzip := \
libs/minzip/DirUtil.c \
libs/minzip/Hash.c \
libs/minzip/Inlines.c \
libs/minzip/SysUtil.c \
libs/minzip/Zip.c
SOURCES_freetype := \
libs/freetype/autofit/autofit.c \
libs/freetype/base/basepic.c \
libs/freetype/base/ftapi.c \
libs/freetype/base/ftbase.c \
libs/freetype/base/ftbbox.c \
libs/freetype/base/ftbitmap.c \
libs/freetype/base/ftglyph.c \
libs/freetype/base/ftinit.c \
libs/freetype/base/ftpic.c \
libs/freetype/base/ftstroke.c \
libs/freetype/base/ftsynth.c \
libs/freetype/base/ftsystem.c \
libs/freetype/cff/cff.c \
libs/freetype/pshinter/pshinter.c \
libs/freetype/psnames/psnames.c \
libs/freetype/raster/raster.c \
libs/freetype/sfnt/sfnt.c \
libs/freetype/smooth/smooth.c \
libs/freetype/truetype/truetype.c \
libs/freetype/base/ftlcdfil.c
SOURCES_aroma := \
$(wildcard src/edify/*.c) \
$(wildcard src/libs/*.c) \
$(wildcard src/controls/*.c) \
$(wildcard src/main/*.c)
SOURCES := $(SOURCES_zlib) $(SOURCES_libpng) $(SOURCES_minutf8) $(SOURCES_minzip) $(SOURCES_freetype) $(SOURCES_aroma)
OBJS := $(SOURCES:.c=.o)
OBJS := $(OBJS:.s=.o)
INCLUDES := -Iinclude -Isrc
AROMA_VERSION_CFLAGS := -DAROMA_NAME="\"$(AROMA_NAME)\"" -DAROMA_VERSION="\"$(AROMA_VERSION)\"" -DAROMA_BUILD="\"$(AROMA_BUILD)\"" -DAROMA_BUILD_CN="\"$(AROMA_CN)\"" $(INCLUDES)
CFLAGS := $(ARCH_CFLAGS) -O2 -static -DFT2_BUILD_LIBRARY=1 -fPIC -DPIC -fdata-sections -ffunction-sections -D_AROMA_NODEBUG $(AROMA_VERSION_CFLAGS)
ASFLAGS := $(ARCH_ASFLAGS)
LDLIBS := -lm -lpthread
LDFLAGS := --gc-sections --strip-all
all: zip
@echo " "
zip: bin
@mkdir -p out/tmp
@cp -a assets/META-INF out/tmp
@cp out/install_wizard-$(ARCH) out/tmp/META-INF/com/google/android/update-binary
@7z a out/install_wizard-$(ARCH).zip ./out/tmp/* >/dev/null
bin: $(OBJS)
mkdir -p out
$(CC) $(CFLAGS) -o out/install_wizard-$(ARCH) $(OBJS) $(LDLIBS)
clean:
@rm -rf out
@rm -f $(OBJS) $(OBJS:.o=.i) $(OBJS:.o=.s) $(OBJS:.o=.bc)
.PHONY: clean