05ee85bb0e
I put almost 3 hours on this! It ships with a lot of makefiles for various platforms, notably one for android_arm. I patched it a bit because Termux already gives many of the goodies. Probably it could be simplified. Most of the time went on tinkering with flags and waiting for the Docker container to reload the new files...there must be a better way! p7zip doesn't seem to honor $prefix, instead it uses $DEST_HOME.
71 lines
2.0 KiB
Diff
71 lines
2.0 KiB
Diff
diff -u -r orig/makefile.android_arm p7zip_15.09/makefile.android_arm
|
|
--- orig/makefile.android_arm 2015-09-13 15:15:17.000000000 -0300
|
|
+++ p7zip_15.09/makefile.android_arm 2015-12-21 13:50:55.895794056 -0300
|
|
@@ -1,12 +1,7 @@
|
|
#
|
|
-# makefile for ANDROID (generic ARM)
|
|
+# makefile for Android with Termux
|
|
#
|
|
|
|
-ANDROID_NDK_HOME=$(HOME)/ANDROID/android-ndk-r5c
|
|
-ANDROID_NDK_BIN=$(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
|
|
-
|
|
-# -fpic -Os
|
|
-# -fstack-protector
|
|
ANDROID_FLAGS=\
|
|
-ffunction-sections \
|
|
-funwind-tables \
|
|
@@ -16,27 +11,18 @@
|
|
-D__ARM_ARCH_5TE__ \
|
|
-DANDROID \
|
|
-DANDROID_NDK \
|
|
+ -D_UNICODE \
|
|
+ -DUNICODE \
|
|
-Wno-psabi \
|
|
- -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 \
|
|
- -Wa,--noexecstack
|
|
+ -Wa,--noexecstack
|
|
|
|
ANDROID_LINK=-v \
|
|
-Wl,--gc-sections -Wl,-z,nocopyreloc \
|
|
- --sysroot=$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm \
|
|
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libc.so \
|
|
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libstdc++.so \
|
|
- $(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib/libm.so \
|
|
-Wl,--no-undefined -Wl,-z,noexecstack \
|
|
- -L$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib \
|
|
- -lstdc++ -Wl,-rpath-link=$(ANDROID_NDK_HOME)/platforms/android-3/arch-arm/usr/lib \
|
|
- -lsupc++
|
|
+ -lstdc++ -lsupc++
|
|
|
|
OPTFLAGS=-O3 -s
|
|
|
|
@@ -45,14 +31,14 @@
|
|
$(ANDROID_FLAGS) \
|
|
$(LOCAL_FLAGS)
|
|
|
|
-CXX=$(ANDROID_NDK_BIN)/arm-linux-androideabi-g++ -fexceptions -frtti
|
|
-CC=$(ANDROID_NDK_BIN)/arm-linux-androideabi-gcc
|
|
-CC_SHARED= -fpic
|
|
-LINK_SHARED=-fpic -shared
|
|
+CXX=arm-linux-androideabi-g++ -fexceptions -frtti
|
|
+CC=arm-linux-androideabi-gcc
|
|
+
|
|
+CC_SHARED=-fPIC
|
|
+LINK_SHARED=-fPIC -shared
|
|
|
|
LOCAL_LIBS=$(ANDROID_LINK)
|
|
-LOCAL_LIBS_DLL=$(LOCAL_LIBS) # -ldl
|
|
+LOCAL_LIBS_DLL=$(LOCAL_LIBS)
|
|
|
|
OBJ_CRC32=$(OBJ_CRC32_C)
|
|
OBJ_AES=
|
|
-
|