update makefile and add new patch
This commit is contained in:
parent
b52023a502
commit
10f1ade6e4
|
@ -0,0 +1,28 @@
|
|||
From 74ef555267f83e6e0e365112749dd8b743ee2b87 Mon Sep 17 00:00:00 2001
|
||||
From: n8fr8 <nathan@freitas.net>
|
||||
Date: Mon, 19 Sep 2016 16:04:04 -0400
|
||||
Subject: [PATCH 1/1] add limits.h to support MAX_SIZE on Android
|
||||
|
||||
---
|
||||
src/ext/trunnel/trunnel.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/ext/trunnel/trunnel.c b/src/ext/trunnel/trunnel.c
|
||||
index 0ed75aa..dbb9476 100644
|
||||
--- a/src/ext/trunnel/trunnel.c
|
||||
+++ b/src/ext/trunnel/trunnel.c
|
||||
@@ -13,6 +13,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "trunnel-impl.h"
|
||||
+ /* Get SIZE_MAX. */
|
||||
+#ifdef __BIONIC__
|
||||
+#include <limits.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
--
|
||||
1.9.1
|
||||
|
|
@ -27,6 +27,7 @@ NDK_PLATFORM_LEVEL ?= 16
|
|||
NDK_TOOLCHAIN_VERSION=4.8
|
||||
APP_ABI ?= armeabi
|
||||
NDK_ABI ?= $(APP_ABI)
|
||||
PIE_MODE ?= pie
|
||||
ifneq ($(filter arm%, $(APP_ABI)),)
|
||||
NDK_ABI := arm
|
||||
endif
|
||||
|
@ -72,6 +73,10 @@ STRIP := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-strip \
|
|||
|
||||
# PIEFLAGS for SDK 16/Android L must be set to -fPIE -pie, but can override for earlier targets
|
||||
PIEFLAGS ?= -fPIE -pie
|
||||
ifeq ($(PIEMODE),nopie)
|
||||
PIEFLAGS =
|
||||
endif
|
||||
|
||||
CFLAGS = -DANDROID $(TARGET_CFLAGS) $(PIEFLAGS)
|
||||
LDFLAGS = -llog $(TARGET_LDFLAGS) $(PIEFLAGS)
|
||||
|
||||
|
@ -225,7 +230,10 @@ tor/configure:
|
|||
./autogen.sh
|
||||
|
||||
tor/Makefile: tor/configure
|
||||
cp fix_android_0.2.6.4rc_build.patch tor
|
||||
cp 0001-add-limits.h-to-support-MAX_SIZE-on-Android.patch
|
||||
cd tor && \
|
||||
git apply 0001-add-limits.h-to-support-MAX_SIZE-on-Android.patch
|
||||
# cp fix_android_0.2.6.4rc_build.patch tor
|
||||
# cd tor && \
|
||||
# git apply fix_android_0.2.6.4rc_build.patch
|
||||
cp config.sub tor
|
||||
|
@ -297,26 +305,26 @@ pluto-clean:
|
|||
#this is related to a bug in compression of assets and resources > 1MB
|
||||
|
||||
assets: tor polipo iptables pluto
|
||||
install -d ../libs
|
||||
install -d ../assets/$(APP_ABI)
|
||||
install -d ../orbotservice/src/main/assets/$(APP_ABI)
|
||||
-$(STRIP) bin/polipo
|
||||
-zip ../assets/$(APP_ABI)/polipo.mp3 bin/polipo
|
||||
-zip ../orbotservice/src/main/assets/$(APP_ABI)/polipo.mp3 bin/polipo
|
||||
-$(STRIP) bin/tor
|
||||
-zip ../assets/$(APP_ABI)/tor.mp3 bin/tor
|
||||
-zip ../orbotservice/src/main/assets/$(APP_ABI)/tor.mp3 bin/tor
|
||||
-$(STRIP) bin/xtables
|
||||
-zip ../assets/$(APP_ABI)/xtables.mp3 bin/xtables
|
||||
-zip ../orbotservice/src/main/assets/$(APP_ABI)/xtables.mp3 bin/xtables
|
||||
-$(STRIP) bin/obfs4proxy
|
||||
-zip ../assets/$(APP_ABI)/obfs4proxy.mp3 bin/obfs4proxy
|
||||
-$(STRIP) ../libs/$(APP_ABI)/pdnsd
|
||||
-zip ../assets/$(APP_ABI)/pdnsd.mp3 ../libs/$(APP_ABI)/pdnsd
|
||||
-rm ../libs/$(APP_ABI)/pdnsd
|
||||
-zip ../orbotservice/src/main/assets/$(APP_ABI)/obfs4proxy.mp3 bin/obfs4proxy
|
||||
-$(STRIP) ../app/src/main/libs/$(APP_ABI)/pdnsd
|
||||
-zip ../orbotservice/src/main/assets/$(APP_ABI)/pdnsd.mp3 ../app/src/main/libs/$(APP_ABI)/pdnsd
|
||||
-rm ../app/src/main/libs/$(APP_ABI)/pdnsd
|
||||
|
||||
assets-clean:
|
||||
-rm ../assets/$(APP_ABI)/polipo.mp3
|
||||
-rm ../assets/$(APP_ABI)/tor.mp3
|
||||
-rm ../assets/$(APP_ABI)/xtables.mp3
|
||||
-rm ../assets/$(APP_ABI)/obfs4proxy.mp3
|
||||
-rm ../assets/$(APP_ABI)/pdnsd.mp3
|
||||
-rm ../orbotservice/src/main/assets/$(APP_ABI)/polipo.mp3
|
||||
-rm ../orbotservice/src/main/assets/$(APP_ABI)/tor.mp3
|
||||
-rm ../orbotservice/src/main/assets/$(APP_ABI)/xtables.mp3
|
||||
-rm ../orbotservice/src/main/assets/$(APP_ABI)/obfs4proxy.mp3
|
||||
-rm ../orbotservice/src/main/assets/$(APP_ABI)/pdnsd.mp3
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# cleanup, cleanup, put the toys away
|
||||
|
|
Loading…
Reference in New Issue