| 1 | diff -u -r ../p7zip_15.14.1/makefile.android_arm ./makefile.android_arm |
| 2 | --- ../p7zip_15.14.1/makefile.android_arm 2016-03-10 15:33:59.000000000 -0500 |
| 3 | +++ ./makefile.android_arm 2016-05-03 23:15:52.868840453 -0400 |
| 4 | @@ -1,41 +1,29 @@ |
| 5 | # |
| 6 | -# makefile for ANDROID (generic ARM) |
| 7 | +# makefile for ANDROID with Termux |
| 8 | # |
| 9 | # export NDK=<ndk_home> |
| 10 | # tested with android-ndk-r8c-linux-x86 |
| 11 | # |
| 12 | |
| 13 | -ANDROID_NDK_HOME=$(NDK) |
| 14 | -ANDROID_NDK_BIN=$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin |
| 15 | - |
| 16 | -# -fpic -Os |
| 17 | -# -fstack-protector |
| 18 | ANDROID_FLAGS=\ |
| 19 | -MMD -MP -MF \ |
| 20 | -fpic -ffunction-sections -funwind-tables -fstack-protector \ |
| 21 | - -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ \ |
| 22 | - -march=armv5te -mtune=xscale -msoft-float -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 \ |
| 23 | - -I$(ANDROID_NDK_HOME)/sources/cxx-stl/system/include \ |
| 24 | - -I$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/include \ |
| 25 | + -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 \ |
| 26 | -DANDROID -DANDROID_NDK -DNDEBUG \ |
| 27 | |
| 28 | ANDROID_LINK= \ |
| 29 | -Wl,--gc-sections -Wl,-z,nocopyreloc \ |
| 30 | - --sysroot=$(NDK)/platforms/android-3/arch-arm \ |
| 31 | -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \ |
| 32 | - -L$(NDK)/platforms/android-3/arch-arm/usr/lib -lstdc++ \ |
| 33 | - $(NDK)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libsupc++.a \ |
| 34 | -lc -lm |
| 35 | |
| 36 | -OPTFLAGS=-O3 -s |
| 37 | +OPTFLAGS=-Os -s |
| 38 | |
| 39 | ALLFLAGS=${OPTFLAGS} -pipe \ |
| 40 | -DNDEBUG -D_REENTRANT -DENV_UNIX \ |
| 41 | $(ANDROID_FLAGS) \ |
| 42 | $(LOCAL_FLAGS) |
| 43 | |
| 44 | -CXX=$(ANDROID_NDK_BIN)/arm-linux-androideabi-g++ -fexceptions -frtti |
| 45 | -CC=$(ANDROID_NDK_BIN)/arm-linux-androideabi-gcc |
| 46 | +CXX+= -fexceptions -frtti |
| 47 | CC_EXE= -fPIE |
| 48 | LINK_EXE=-fPIE -pie # -fPIE -pie : only for executable |
| 49 | CC_SHARED= -fpic |