forked from 3rdpartyrepos/p7zip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.android_arm
49 lines (40 loc) · 1.44 KB
/
makefile.android_arm
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
#
# makefile for ANDROID (generic ARM)
#
# export NDK=<ndk_home>
# tested with android-ndk-r8c-linux-x86
#
ANDROID_NDK_HOME=$(NDK)
ANDROID_NDK_BIN=$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin
# -fpic -Os
# -fstack-protector
ANDROID_FLAGS=\
-MMD -MP -MF \
-fpic -ffunction-sections -funwind-tables -fstack-protector \
-D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ \
-march=armv5te -mtune=xscale -msoft-float -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 \
-I$(ANDROID_NDK_HOME)/sources/cxx-stl/system/include \
-I$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/include \
-DANDROID -DANDROID_NDK -DNDEBUG \
ANDROID_LINK= \
-Wl,--gc-sections -Wl,-z,nocopyreloc \
--sysroot=$(NDK)/platforms/android-3/arch-arm \
-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
-L$(NDK)/platforms/android-3/arch-arm/usr/lib -lstdc++ \
$(NDK)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libsupc++.a \
-lc -lm
OPTFLAGS=-O3 -s
ALLFLAGS=${OPTFLAGS} -pipe \
-DNDEBUG -D_REENTRANT -DENV_UNIX \
$(ANDROID_FLAGS) \
$(LOCAL_FLAGS)
CXX=$(ANDROID_NDK_BIN)/arm-linux-androideabi-g++ -fexceptions -frtti
CC=$(ANDROID_NDK_BIN)/arm-linux-androideabi-gcc
CC_EXE= -fPIE
LINK_EXE=-fPIE -pie # -fPIE -pie : only for executable
CC_SHARED= -fpic
LINK_SHARED=-fpic -shared
LOCAL_LIBS=$(ANDROID_LINK)
LOCAL_LIBS_DLL=$(LOCAL_LIBS) # -ldl
OBJ_CRC32=$(OBJ_CRC32_C)
OBJ_AES=