forked from adblockplus/libadblockplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (57 loc) · 1.79 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
ARCH := x64
ANDROID_PARAMETERS = OS=android
ifneq ($(ANDROID_ARCH),)
ifeq ($(ANDROID_ARCH),arm)
ANDROID_PARAMETERS += target_arch=arm android_target_arch=arm
ANDROID_PARAMETERS += arm_neon=0 armv7=0 arm_fpu=off vfp3=off
ANDROID_PARAMETERS += arm_float_abi=default
ANDROID_ABI = armeabi-v7a
else ifeq ($(ANDROID_ARCH),ia32)
ANDROID_PARAMETERS += target_arch=x86 android_target_arch=x86
ANDROID_ABI = x86
else
$(error "Unsupported Android architecture: $(ANDROID_ARCH))
endif
ANDROID_DEST_DIR = android_$(ANDROID_ARCH).release
endif
TEST_EXECUTABLE = build/out/Debug/tests
.PHONY: all test clean docs v8_android_multi android_multi android_x86 \
android_arm
all:
third_party/gyp/gyp --depth=. -f make -I common.gypi --generator-output=build -Dtarget_arch=$(ARCH) libadblockplus.gyp
$(MAKE) -C build
test: all
ifdef FILTER
$(TEST_EXECUTABLE) --gtest_filter=$(FILTER)
else
$(TEST_EXECUTABLE)
endif
docs:
doxygen
clean:
$(RM) -r build docs
android_x86:
ANDROID_ARCH="ia32" $(MAKE) android_multi
android_arm:
ANDROID_ARCH="arm" $(MAKE) android_multi
ifneq ($(ANDROID_ARCH),)
v8_android_multi:
mkdir -p third_party/v8/build/gyp
cp -f third_party/v8_gyp_launcher third_party/v8/build/gyp/gyp
DEFINES="${ANDROID_PARAMETERS}" \
OUTDIR=../../build \
$(MAKE) -C third_party/v8 $(ANDROID_DEST_DIR)
android_multi: v8_android_multi
GYP_DEFINES="${ANDROID_PARAMETERS} ANDROID_ARCH=$(ANDROID_ARCH)" \
third_party/gyp/gyp --depth=. -f make-android -I common.gypi --generator-output=build -Gandroid_ndk_version=r9 libadblockplus.gyp
$(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \
BUILDTYPE=Release \
APP_ABI=$(ANDROID_ABI) \
APP_PLATFORM=android-9 \
APP_STL=c++_static \
APP_BUILD_SCRIPT=Makefile \
NDK_TOOLCHAIN_VERSION=clang3.4 \
NDK_PROJECT_PATH=. \
NDK_OUT=. \
NDK_APP_DST_DIR=$(ANDROID_DEST_DIR)
endif