Left: | ||
Right: |
OLD | NEW |
---|---|
1 ARCH := x64 | 1 ARCH := x64 |
2 | 2 |
3 ANDROID_PARAMETERS = target_arch=arm OS=android | 3 ifneq ($(ANDROID_ARCH),) |
4 ANDROID_PARAMETERS += android_target_arch=arm | 4 ANDROID_PARAMETERS = OS=android |
Felix Dahlke
2015/11/10 11:50:46
No column aligning please :D Also, not having anyt
René Jeschke
2015/11/10 11:55:53
Done.
| |
5 ifeq ($(ANDROID_ARCH),arm) | |
6 ANDROID_PARAMETERS += target_arch=arm android_target_arch=arm | |
5 ANDROID_PARAMETERS += arm_neon=0 armv7=0 arm_fpu=off vfp3=off | 7 ANDROID_PARAMETERS += arm_neon=0 armv7=0 arm_fpu=off vfp3=off |
6 ANDROID_PARAMETERS += arm_float_abi=default | 8 ANDROID_PARAMETERS += arm_float_abi=default |
9 ANDROID_ABI = armeabi-v7a | |
10 else ifeq ($(ANDROID_ARCH),ia32) | |
11 ANDROID_PARAMETERS += target_arch=x86 android_target_arch=x86 | |
12 ANDROID_ABI = x86 | |
13 else | |
14 $(error "Unsupported Android architecture: $(ANDROID_ARCH)) | |
15 endif | |
16 ANDROID_DEST_DIR = android_$(ANDROID_ARCH).release | |
17 endif | |
7 | 18 |
8 TEST_EXECUTABLE = build/out/Debug/tests | 19 TEST_EXECUTABLE = build/out/Debug/tests |
9 | 20 |
10 .PHONY: all test clean v8_android android docs | 21 .PHONY: all test clean docs v8_android_multi android_multi android_x86 \ |
22 » android_arm | |
11 | 23 |
12 all: | 24 all: |
13 third_party/gyp/gyp --depth=. -f make -I common.gypi --generator-output= build -Dtarget_arch=$(ARCH) libadblockplus.gyp | 25 third_party/gyp/gyp --depth=. -f make -I common.gypi --generator-output= build -Dtarget_arch=$(ARCH) libadblockplus.gyp |
14 $(MAKE) -C build | 26 $(MAKE) -C build |
15 | 27 |
16 test: all | 28 test: all |
17 ifdef FILTER | 29 ifdef FILTER |
18 $(TEST_EXECUTABLE) --gtest_filter=$(FILTER) | 30 $(TEST_EXECUTABLE) --gtest_filter=$(FILTER) |
19 else | 31 else |
20 $(TEST_EXECUTABLE) | 32 $(TEST_EXECUTABLE) |
21 endif | 33 endif |
22 | 34 |
23 docs: | 35 docs: |
24 doxygen | 36 doxygen |
25 | 37 |
26 clean: | 38 clean: |
27 $(RM) -r build docs | 39 $(RM) -r build docs |
28 | 40 |
29 v8_android: | 41 android_x86: |
42 » ANDROID_ARCH="ia32" $(MAKE) android_multi | |
43 | |
44 android_arm: | |
45 » ANDROID_ARCH="arm" $(MAKE) android_multi | |
46 | |
47 ifneq ($(ANDROID_ARCH),) | |
48 v8_android_multi: | |
30 mkdir -p third_party/v8/build/gyp | 49 mkdir -p third_party/v8/build/gyp |
31 cp -f third_party/v8_gyp_launcher third_party/v8/build/gyp/gyp | 50 cp -f third_party/v8_gyp_launcher third_party/v8/build/gyp/gyp |
32 DEFINES="${ANDROID_PARAMETERS}" \ | 51 DEFINES="${ANDROID_PARAMETERS}" \ |
33 OUTDIR=../../build \ | 52 OUTDIR=../../build \ |
34 » $(MAKE) -C third_party/v8 android_arm.release | 53 » $(MAKE) -C third_party/v8 $(ANDROID_DEST_DIR) |
35 | 54 |
36 android: v8_android | 55 android_multi: v8_android_multi |
37 » GYP_DEFINES="${ANDROID_PARAMETERS}" \ | 56 » GYP_DEFINES="${ANDROID_PARAMETERS} ANDROID_ARCH=$(ANDROID_ARCH)" \ |
38 third_party/gyp/gyp --depth=. -f make-android -I common.gypi --generator -output=build -Gandroid_ndk_version=r9 libadblockplus.gyp | 57 third_party/gyp/gyp --depth=. -f make-android -I common.gypi --generator -output=build -Gandroid_ndk_version=r9 libadblockplus.gyp |
39 $(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \ | 58 $(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \ |
40 BUILDTYPE=Release \ | 59 BUILDTYPE=Release \ |
60 APP_ABI=$(ANDROID_ABI) \ | |
41 APP_PLATFORM=android-9 \ | 61 APP_PLATFORM=android-9 \ |
42 APP_STL=c++_static \ | 62 APP_STL=c++_static \ |
43 APP_BUILD_SCRIPT=Makefile \ | 63 APP_BUILD_SCRIPT=Makefile \ |
44 NDK_TOOLCHAIN_VERSION=clang3.4 \ | 64 NDK_TOOLCHAIN_VERSION=clang3.4 \ |
45 NDK_PROJECT_PATH=. \ | 65 NDK_PROJECT_PATH=. \ |
46 NDK_OUT=. \ | 66 NDK_OUT=. \ |
47 » NDK_APP_DST_DIR=android_arm.release | 67 » NDK_APP_DST_DIR=$(ANDROID_DEST_DIR) |
68 endif | |
69 | |
OLD | NEW |