OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # | 5 # |
6 # GNU Make based build file. For details on GNU Make see: | 6 # GNU Make based build file. For details on GNU Make see: |
7 # http://www.gnu.org/software/make/manual/make.html | 7 # http://www.gnu.org/software/make/manual/make.html |
8 # | 8 # |
9 # | 9 # |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 export CYGWIN | 62 export CYGWIN |
63 | 63 |
64 | 64 |
65 # | 65 # |
66 # Alias for standard POSIX file system commands | 66 # Alias for standard POSIX file system commands |
67 # | 67 # |
68 CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp | 68 CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp |
69 MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir | 69 MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir |
70 MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv | 70 MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv |
71 RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm | 71 RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm |
72 WHICH:=python $(NACL_SDK_ROOT)/tools/oshelpers.py which | |
72 | 73 |
73 | 74 |
74 # | 75 # |
75 # Compute path to requested NaCl Toolchain | 76 # Compute path to requested NaCl Toolchain |
76 # | 77 # |
77 OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) | 78 OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) |
78 TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain) | 79 TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain) |
79 | 80 |
80 | 81 |
81 | 82 |
(...skipping 18 matching lines...) Expand all Loading... | |
100 all_$(1): | 101 all_$(1): |
101 +$(MAKE) TOOLCHAIN=$(1) | 102 +$(MAKE) TOOLCHAIN=$(1) |
102 TOOLCHAIN_LIST+=all_$(1) | 103 TOOLCHAIN_LIST+=all_$(1) |
103 endef | 104 endef |
104 | 105 |
105 | 106 |
106 # | 107 # |
107 # The target for all versions | 108 # The target for all versions |
108 # | 109 # |
109 USABLE_TOOLCHAINS=$(filter $(OSNAME) newlib glibc pnacl,$(VALID_TOOLCHAINS)) | 110 USABLE_TOOLCHAINS=$(filter $(OSNAME) newlib glibc pnacl,$(VALID_TOOLCHAINS)) |
111 | |
112 ifeq (1,$(NO_HOST_BUILDS)) | |
113 USABLE_TOOLCHAINS:=$(filter-out $(OSNAME),$(USABLE_TOOLCHAINS)) | |
noelallen_use_chromium
2013/02/09 00:55:57
$(warning Skipping host builds)
| |
114 endif | |
115 | |
116 .PHONY: CHECK_FOR_CL_EXE | |
117 CHECK_FOR_CL_EXE: | |
118 ifneq (,$(findstring win,$(USABLE_TOOLCHAINS))) | |
119 ifeq (,$(findstring cl.exe,$(shell $(WHICH) cl.exe))) | |
120 $(warning To skip the host build use:) | |
121 $(warning "make all_versions NO_HOST_BUILDS=1") | |
122 $(error Unable to find cl.exe in PATH while building Windows host build) | |
123 endif | |
124 endif | |
noelallen_use_chromium
2013/02/09 00:55:57
Won't this generate an empty target warning/error
| |
125 | |
110 $(foreach tool,$(USABLE_TOOLCHAINS),$(eval $(call TOOLCHAIN_RULE,$(tool),$(dep)) )) | 126 $(foreach tool,$(USABLE_TOOLCHAINS),$(eval $(call TOOLCHAIN_RULE,$(tool),$(dep)) )) |
111 all_versions: $(TOOLCHAIN_LIST) | 127 |
128 .PHONY: all_versions | |
129 all_versions: CHECK_FOR_CL_EXE $(TOOLCHAIN_LIST) | |
112 | 130 |
113 # | 131 # |
114 # Target to remove temporary files | 132 # Target to remove temporary files |
115 # | 133 # |
116 .PHONY: clean | 134 .PHONY: clean |
117 clean: | 135 clean: |
118 $(RM) $(TARGET).nmf | 136 $(RM) $(TARGET).nmf |
119 $(RM) -fr $(TOOLCHAIN) | 137 $(RM) -fr $(TOOLCHAIN) |
120 | 138 |
121 | 139 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 | 274 |
257 SYSARCH=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --chrome) | 275 SYSARCH=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --chrome) |
258 GDB_ARGS+=-D $(TC_PATH)/$(OSNAME)_x86_$(TOOLCHAIN)/bin/$(SYSARCH)-nacl-gdb | 276 GDB_ARGS+=-D $(TC_PATH)/$(OSNAME)_x86_$(TOOLCHAIN)/bin/$(SYSARCH)-nacl-gdb |
259 GDB_ARGS+=-D $(CURDIR)/$(OUTDIR)/$(TARGET)_$(SYSARCH).nexe | 277 GDB_ARGS+=-D $(CURDIR)/$(OUTDIR)/$(TARGET)_$(SYSARCH).nexe |
260 | 278 |
261 DEBUG: CHECK_FOR_CHROME all | 279 DEBUG: CHECK_FOR_CHROME all |
262 $(RUN_PY) $(GDB_ARGS) \ | 280 $(RUN_PY) $(GDB_ARGS) \ |
263 -C $(CURDIR) -P $(PAGE) $(addprefix -E ,$(CHROME_ENV)) -- \ | 281 -C $(CURDIR) -P $(PAGE) $(addprefix -E ,$(CHROME_ENV)) -- \ |
264 $(CHROME_PATH) $(CHROME_ARGS) --enable-nacl-debug \ | 282 $(CHROME_PATH) $(CHROME_ARGS) --enable-nacl-debug \ |
265 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" | 283 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" |
OLD | NEW |