Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: Makefile

Issue 29645586: Issue 6207 - Add option to configure build output directory (Closed)
Patch Set: Created Dec. 20, 2017, 12:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 V8_DIR :=$(shell pwd -L)/third_party/v8/ 1 V8_DIR :=$(shell pwd -L)/third_party/v8/
2 HOST_ARCH :=$(shell python third_party/detect_v8_host_arch.py) 2 HOST_ARCH :=$(shell python third_party/detect_v8_host_arch.py)
3 3
4 GYP_PARAMETERS=host_arch=${HOST_ARCH} 4 GYP_PARAMETERS=host_arch=${HOST_ARCH}
5 5
6 ifndef HOST_OS 6 ifndef HOST_OS
7 raw_OS = $(shell uname -s) 7 raw_OS = $(shell uname -s)
8 ifeq (${raw_OS},Linux) 8 ifeq (${raw_OS},Linux)
9 HOST_OS=linux 9 HOST_OS=linux
10 else ifeq (${raw_OS},Darwin) 10 else ifeq (${raw_OS},Darwin)
11 HOST_OS=mac 11 HOST_OS=mac
12 endif 12 endif
13 endif 13 endif
14 14
15 ifndef BUILD_DIR
16 BUILD_DIR=$(shell pwd -L)/build
17 endif
18
15 ifneq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" "" 19 ifneq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" ""
16 BUILD_V8=do-nothing 20 BUILD_V8=do-nothing
17 ABP_GYP_PARAMETERS+= libv8_lib_dir=${LIBV8_LIB_DIR} libv8_include_dir=${LIBV8_IN CLUDE_DIR} 21 ABP_GYP_PARAMETERS+= libv8_lib_dir=${LIBV8_LIB_DIR} libv8_include_dir=${LIBV8_IN CLUDE_DIR}
18 else 22 else
19 BUILD_V8=build-v8 23 BUILD_V8=build-v8
20 endif 24 endif
21 25
22 ifneq ($(ANDROID_ARCH),) 26 ifneq ($(ANDROID_ARCH),)
23 ANDROID_PLATFORM_LEVEL=android-9 27 ANDROID_PLATFORM_LEVEL=android-9
24 GYP_PARAMETERS+= OS=android target_arch=${ANDROID_ARCH} 28 GYP_PARAMETERS+= OS=android target_arch=${ANDROID_ARCH}
(...skipping 17 matching lines...) Expand all
42 46
43 else # if ${ANDROID_ARCH} is empty 47 else # if ${ANDROID_ARCH} is empty
44 TARGET_ARCH=${HOST_ARCH} 48 TARGET_ARCH=${HOST_ARCH}
45 ifdef ARCH 49 ifdef ARCH
46 TARGET_ARCH=${ARCH} 50 TARGET_ARCH=${ARCH}
47 endif 51 endif
48 GYP_PARAMETERS+= OS=${HOST_OS} target_arch=${TARGET_ARCH} 52 GYP_PARAMETERS+= OS=${HOST_OS} target_arch=${TARGET_ARCH}
49 endif 53 endif
50 54
51 55
52 TEST_EXECUTABLE = build/out/Debug/tests 56 TEST_EXECUTABLE = ${BUILD_DIR}/out/Debug/tests
53 57
54 .PHONY: do-nothing all test clean docs build-v8 build-v8-android v8_android_mult i android_multi android_x86 \ 58 .PHONY: do-nothing all test clean docs build-v8 build-v8-android v8_android_mult i android_multi android_x86 \
55 android_arm ensure_dependencies 59 android_arm ensure_dependencies
56 60
57 .DEFAULT_GOAL:=all 61 .DEFAULT_GOAL:=all
58 62
59 do-nothing: 63 do-nothing:
60 64
61 ensure_dependencies: 65 ensure_dependencies:
62 python ensure_dependencies.py 66 python ensure_dependencies.py
63 67
64 build-v8: ensure_dependencies 68 build-v8: ensure_dependencies
65 » GYP_DEFINES="${GYP_PARAMETERS}" third_party/gyp/gyp --depth=. -f make -I build-v8.gypi --generator-output=build/v8 ${V8_DIR}src/v8.gyp 69 » GYP_DEFINES="${GYP_PARAMETERS}" third_party/gyp/gyp --depth=. -f make -I build-v8.gypi --generator-output=${BUILD_DIR}/v8 ${V8_DIR}src/v8.gyp
66 » make -C build/v8 v8_snapshot v8_libplatform v8_libsampler 70 » make -C ${BUILD_DIR}/v8 v8_snapshot v8_libplatform v8_libsampler
67 71
68 all: ${BUILD_V8} ensure_dependencies 72 all: ${BUILD_V8} ensure_dependencies
69 » GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" third_party/gyp/gy p --depth=. -f make -I libadblockplus.gypi --generator-output=build libadblockpl us.gyp 73 » GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" third_party/gyp/gy p --depth=. -f make -I libadblockplus.gypi --generator-output=${BUILD_DIR} libad blockplus.gyp
70 » $(MAKE) -C build 74 » $(MAKE) -C ${BUILD_DIR}
71 75
72 test: all 76 test: all
73 ifdef FILTER 77 ifdef FILTER
74 $(TEST_EXECUTABLE) --gtest_filter=$(FILTER) 78 $(TEST_EXECUTABLE) --gtest_filter=$(FILTER)
75 else 79 else
76 $(TEST_EXECUTABLE) 80 $(TEST_EXECUTABLE)
77 endif 81 endif
78 82
79 docs: 83 docs:
80 doxygen 84 doxygen
81 85
82 clean: 86 clean:
83 » $(RM) -r build docs 87 » $(RM) -r ${BUILD_DIR} docs
84 88
85 android_x86: 89 android_x86:
86 ANDROID_ARCH="ia32" $(MAKE) android_multi 90 ANDROID_ARCH="ia32" $(MAKE) android_multi
87 91
88 android_arm: 92 android_arm:
89 ANDROID_ARCH="arm" $(MAKE) android_multi 93 ANDROID_ARCH="arm" $(MAKE) android_multi
90 94
91 android_arm64: 95 android_arm64:
92 ANDROID_ARCH="arm64" $(MAKE) android_multi 96 ANDROID_ARCH="arm64" $(MAKE) android_multi
93 97
94 ifneq ($(ANDROID_ARCH),) 98 ifneq ($(ANDROID_ARCH),)
95 v8_android_multi: ensure_dependencies 99 v8_android_multi: ensure_dependencies
96 cd third_party/v8 && GYP_GENERATORS=make-android \ 100 cd third_party/v8 && GYP_GENERATORS=make-android \
97 GYP_DEFINES="${GYP_PARAMETERS} v8_target_arch=${ANDROID_ARCH}" \ 101 GYP_DEFINES="${GYP_PARAMETERS} v8_target_arch=${ANDROID_ARCH}" \
98 PYTHONPATH="${V8_DIR}tools/generate_shim_headers:${V8_DIR}gypfiles:${P YTHONPATH}" \ 102 PYTHONPATH="${V8_DIR}tools/generate_shim_headers:${V8_DIR}gypfiles:${P YTHONPATH}" \
99 python ../../make_gyp_wrapper.py \ 103 python ../../make_gyp_wrapper.py \
100 » --generator-output=../../build src/v8.gyp \ 104 » --generator-output=${BUILD_DIR} src/v8.gyp \
101 -Igypfiles/standalone.gypi \ 105 -Igypfiles/standalone.gypi \
102 --depth=. \ 106 --depth=. \
103 -S.android_${ANDROID_ARCH}.release \ 107 -S.android_${ANDROID_ARCH}.release \
104 -I../../android-v8-options.gypi 108 -I../../android-v8-options.gypi
105 cd third_party/v8 && make \ 109 cd third_party/v8 && make \
106 » -C ../../build \ 110 » -C ${BUILD_DIR} \
107 -f Makefile.android_${ANDROID_ARCH}.release \ 111 -f Makefile.android_${ANDROID_ARCH}.release \
108 v8_snapshot v8_libplatform v8_libsampler \ 112 v8_snapshot v8_libplatform v8_libsampler \
109 BUILDTYPE=Release \ 113 BUILDTYPE=Release \
110 » builddir=${V8_DIR}../../build/android_${ANDROID_ARCH}.release 114 » builddir=${BUILD_DIR}/android_${ANDROID_ARCH}.release
111 115
112 v8_android_multi_linux_${ANDROID_ARCH}: v8_android_multi 116 v8_android_multi_linux_${ANDROID_ARCH}: v8_android_multi
113 117
114 v8_android_multi_mac_ia32: v8_android_multi 118 v8_android_multi_mac_ia32: v8_android_multi
115 » find build/android_ia32.release/ -depth 1 -iname \*.a -exec ${ANDROID_ND K_ROOT}/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-ranlib {} \; 119 » find ${BUILD_DIR}/android_ia32.release/ -depth 1 -iname \*.a -exec ${AND ROID_NDK_ROOT}/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android- ranlib {} \;
116 120
117 v8_android_multi_mac_arm: v8_android_multi 121 v8_android_multi_mac_arm: v8_android_multi
118 » find build/android_arm.release/ -depth 1 -iname \*.a -exec ${ANDROID_NDK _ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux -androideabi-ranlib {} \; 122 » find ${BUILD_DIR}/android_arm.release/ -depth 1 -iname \*.a -exec ${ANDR OID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/ar m-linux-androideabi-ranlib {} \;
119 123
120 v8_android_multi_mac_arm64: v8_android_multi 124 v8_android_multi_mac_arm64: v8_android_multi
121 » find build/android_arm64.release/ -depth 1 -iname \*.a -exec ${ANDROID_N DK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64 -linux-android-ranlib {} \; 125 » find ${BUILD_DIR}/android_arm64.release/ -depth 1 -iname \*.a -exec ${AN DROID_NDK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/ aarch64-linux-android-ranlib {} \;
122 126
123 build-v8-android: v8_android_multi_${HOST_OS}_${ANDROID_ARCH} 127 build-v8-android: v8_android_multi_${HOST_OS}_${ANDROID_ARCH}
124 128
125 android_multi: ${BUILD_V8} ensure_dependencies 129 android_multi: ${BUILD_V8} ensure_dependencies
126 GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" \ 130 GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" \
127 » python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus. gypi --generator-output=build -Gandroid_ndk_version=r12b libadblockplus.gyp 131 » python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus. gypi --generator-output=${BUILD_DIR} -Gandroid_ndk_version=r12b libadblockplus.g yp
128 » $(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \ 132 » $(ANDROID_NDK_ROOT)/ndk-build -C ${BUILD_DIR} installed_modules \
129 BUILDTYPE=Release \ 133 BUILDTYPE=Release \
130 APP_ABI=$(ANDROID_ABI) \ 134 APP_ABI=$(ANDROID_ABI) \
131 APP_PLATFORM=${ANDROID_PLATFORM_LEVEL} \ 135 APP_PLATFORM=${ANDROID_PLATFORM_LEVEL} \
132 APP_PIE=true \ 136 APP_PIE=true \
133 APP_STL=c++_static \ 137 APP_STL=c++_static \
134 APP_BUILD_SCRIPT=Makefile \ 138 APP_BUILD_SCRIPT=Makefile \
135 NDK_PROJECT_PATH=. \ 139 NDK_PROJECT_PATH=. \
136 NDK_OUT=. \ 140 NDK_OUT=. \
137 NDK_APP_DST_DIR=$(ANDROID_DEST_DIR) 141 NDK_APP_DST_DIR=$(ANDROID_DEST_DIR)
138 endif 142 endif
139 143
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld