| 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 |
| 11 | 11 |
| 12 # | 12 # |
| 13 # Default configuration | 13 # Default configuration |
| 14 # | 14 # |
| 15 # By default we will build a Debug configuration using the GCC newlib toolcahin | 15 # By default we will build a Debug configuration using the GCC newlib toolcahin |
| 16 # to override this, specify TOOLCHAIN=newlib|glibc or CONFIG=Debug|Release on | 16 # to override this, specify TOOLCHAIN=newlib|glibc or CONFIG=Debug|Release on |
| 17 # the make command-line or in this file prior to including common.mk | 17 # the make command-line or in this file prior to including common.mk. The |
| 18 # | 18 # toolchain we use by default will be the first valid one listed |
| 19 include common.mk | 19 VALID_TOOLCHAINS:=newlib glibc pnacl linux win |
| 20 | 20 |
| 21 | 21 |
| 22 # | 22 # |
| 23 # Get pepper directory for toolchain and includes. |
| 24 # |
| 25 # If NACL_SDK_ROOT is not set, then assume it can be found relative to |
| 26 # to this Makefile. |
| 27 # |
| 28 NACL_SDK_ROOT?=$(abspath $(CURDIR)/../..) |
| 29 include $(NACL_SDK_ROOT)/tools/common.mk |
| 30 |
| 31 |
| 32 # |
| 23 # Target Name | 33 # Target Name |
| 24 # | 34 # |
| 25 # The base name of the final NEXE, also the name of the NMF file containing | 35 # The base name of the final NEXE, also the name of the NMF file containing |
| 26 # the mapping between architecture and actual NEXE. | 36 # the mapping between architecture and actual NEXE. |
| 27 # | 37 # |
| 28 TARGET=hello_world_gles | 38 TARGET=hello_world_gles |
| 29 | 39 |
| 30 # | 40 # |
| 31 # List of sources to compile | 41 # List of sources to compile |
| 32 # | 42 # |
| (...skipping 23 matching lines...) Expand all Loading... |
| 56 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) | 66 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) |
| 57 | 67 |
| 58 # | 68 # |
| 59 # Use the compile macro for each source. | 69 # Use the compile macro for each source. |
| 60 # | 70 # |
| 61 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) | 71 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) |
| 62 | 72 |
| 63 # | 73 # |
| 64 # Use the link macro for this target on the list of sources. | 74 # Use the link macro for this target on the list of sources. |
| 65 # | 75 # |
| 66 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS))) | 76 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) |
| 67 | 77 |
| 68 # | 78 # |
| 69 # Specify the NMF to be created with no additional arugments. | 79 # Specify the NMF to be created with no additional arugments. |
| 70 # | 80 # |
| 71 $(eval $(call NMF_RULE,$(TARGET),)) | 81 $(eval $(call NMF_RULE,$(TARGET),)) |
| OLD | NEW |