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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 STAMPDIR ?= $(OUTDIR) | 202 STAMPDIR ?= $(OUTDIR) |
203 LIBDIR ?= $(NACL_SDK_ROOT)/lib | 203 LIBDIR ?= $(NACL_SDK_ROOT)/lib |
204 | 204 |
205 | 205 |
206 # | 206 # |
207 # Target to remove temporary files | 207 # Target to remove temporary files |
208 # | 208 # |
209 .PHONY: clean | 209 .PHONY: clean |
210 clean: | 210 clean: |
211 $(RM) -f $(TARGET).nmf | 211 $(RM) -f $(TARGET).nmf |
212 » $(RM) -fr $(OUTDIR) | 212 » $(RM) -rf $(OUTDIR) |
| 213 » $(RM) -rf user-data-dir |
213 | 214 |
214 | 215 |
215 # | 216 # |
216 # Rules for output directories. | 217 # Rules for output directories. |
217 # | 218 # |
218 # Output will be places in a directory name based on Toolchain and configuration | 219 # Output will be places in a directory name based on Toolchain and configuration |
219 # be default this will be "newlib/Debug". We use a python wrapped MKDIR to | 220 # be default this will be "newlib/Debug". We use a python wrapped MKDIR to |
220 # proivde a cross platform solution. The use of '|' checks for existance instead | 221 # proivde a cross platform solution. The use of '|' checks for existance instead |
221 # of timestamp, since the directory can update when files change. | 222 # of timestamp, since the directory can update when files change. |
222 # | 223 # |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 # | 390 # |
390 RUN_PY := python $(NACL_SDK_ROOT)/tools/run.py | 391 RUN_PY := python $(NACL_SDK_ROOT)/tools/run.py |
391 | 392 |
392 # Add this to launch Chrome with additional environment variables defined. | 393 # Add this to launch Chrome with additional environment variables defined. |
393 # Each element should be specified as KEY=VALUE, with whitespace separating | 394 # Each element should be specified as KEY=VALUE, with whitespace separating |
394 # key-value pairs. e.g. | 395 # key-value pairs. e.g. |
395 # CHROME_ENV=FOO=1 BAR=2 BAZ=3 | 396 # CHROME_ENV=FOO=1 BAR=2 BAZ=3 |
396 CHROME_ENV ?= | 397 CHROME_ENV ?= |
397 | 398 |
398 # Additional arguments to pass to Chrome. | 399 # Additional arguments to pass to Chrome. |
399 CHROME_ARGS += --enable-nacl --enable-pnacl --incognito --ppapi-out-of-process | 400 CHROME_ARGS += --enable-nacl --enable-pnacl --no-first-run |
| 401 CHROME_ARGS += --user-data-dir=$(CURDIR)/user-data-dir |
400 | 402 |
401 | 403 |
402 # Paths to Debug and Release versions of the Host Pepper plugins | 404 # Paths to Debug and Release versions of the Host Pepper plugins |
403 PPAPI_DEBUG = $(abspath $(OSNAME)/Debug/$(TARGET)$(HOST_EXT));application/x-ppap
i-debug | 405 PPAPI_DEBUG = $(abspath $(OSNAME)/Debug/$(TARGET)$(HOST_EXT));application/x-ppap
i-debug |
404 PPAPI_RELEASE = $(abspath $(OSNAME)/Release/$(TARGET)$(HOST_EXT));application/x-
ppapi-release | 406 PPAPI_RELEASE = $(abspath $(OSNAME)/Release/$(TARGET)$(HOST_EXT));application/x-
ppapi-release |
405 | 407 |
406 | 408 |
407 PAGE ?= index.html | 409 PAGE ?= index.html |
408 PAGE_TC_CONFIG = "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)" | 410 PAGE_TC_CONFIG = "$(PAGE)?tc=$(TOOLCHAIN)&config=$(CONFIG)" |
409 | 411 |
410 .PHONY: run | 412 .PHONY: run |
411 run: check_for_chrome all | 413 run: check_for_chrome all |
412 ifeq (,$(wildcard $(PAGE))) | 414 ifeq (,$(wildcard $(PAGE))) |
413 $(error No valid HTML page found at $(PAGE)) | 415 $(error No valid HTML page found at $(PAGE)) |
414 endif | 416 endif |
415 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ | 417 $(RUN_PY) -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ |
416 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ | 418 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ |
417 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" | 419 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" |
418 | 420 |
419 .PHONY: run_package | 421 .PHONY: run_package |
420 run_package: check_for_chrome all | 422 run_package: check_for_chrome all |
421 » $(CHROME_PATH) --load-and-launch-app=$(CURDIR) --enable-nacl --enable-pn
acl | 423 » $(CHROME_PATH) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS) |
422 | 424 |
423 | 425 |
424 SYSARCH = $(shell python $(NACL_SDK_ROOT)/tools/getos.py --nacl-arch) | 426 SYSARCH = $(shell python $(NACL_SDK_ROOT)/tools/getos.py --nacl-arch) |
425 GDB_ARGS += -D $(TC_PATH)/$(OSNAME)_x86_$(TOOLCHAIN)/bin/$(SYSARCH)-nacl-gdb | 427 GDB_ARGS += -D $(TC_PATH)/$(OSNAME)_x86_$(TOOLCHAIN)/bin/$(SYSARCH)-nacl-gdb |
426 GDB_ARGS += -D $(abspath $(OUTDIR))/$(TARGET)_$(SYSARCH).nexe | 428 GDB_ARGS += -D $(abspath $(OUTDIR))/$(TARGET)_$(SYSARCH).nexe |
427 | 429 |
428 .PHONY: debug | 430 .PHONY: debug |
429 debug: check_for_chrome all | 431 debug: check_for_chrome all |
430 $(RUN_PY) $(GDB_ARGS) \ | 432 $(RUN_PY) $(GDB_ARGS) \ |
431 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ | 433 -C $(CURDIR) -P $(PAGE_TC_CONFIG) \ |
432 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ | 434 $(addprefix -E ,$(CHROME_ENV)) -- $(CHROME_PATH) $(CHROME_ARGS) \ |
433 --enable-nacl-debug \ | 435 --enable-nacl-debug \ |
434 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" | 436 --register-pepper-plugins="$(PPAPI_DEBUG),$(PPAPI_RELEASE)" |
435 | 437 |
436 | 438 |
437 # uppercase aliases (for backward compatibility) | 439 # uppercase aliases (for backward compatibility) |
438 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN | 440 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN |
439 CHECK_FOR_CHROME: check_for_chrome | 441 CHECK_FOR_CHROME: check_for_chrome |
440 DEBUG: debug | 442 DEBUG: debug |
441 LAUNCH: run | 443 LAUNCH: run |
442 RUN: run | 444 RUN: run |
443 | 445 |
444 endif # TOOLCHAIN=all | 446 endif # TOOLCHAIN=all |
OLD | NEW |