| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 28 NACL_SDK_ROOT?=$(abspath $(CURDIR)/../..) | 28 NACL_SDK_ROOT?=$(abspath $(CURDIR)/../..) |
| 29 include $(NACL_SDK_ROOT)/tools/common.mk | 29 include $(NACL_SDK_ROOT)/tools/common.mk |
| 30 | 30 |
| 31 | 31 |
| 32 # | 32 # |
| 33 # Target Name | 33 # Target Name |
| 34 # | 34 # |
| 35 # 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 |
| 36 # the mapping between architecture and actual NEXE. | 36 # the mapping between architecture and actual NEXE. |
| 37 # | 37 # |
| 38 TARGET=hello_world_interactive | 38 TARGET=trace_events |
| 39 | 39 |
| 40 # | 40 # |
| 41 # List of sources to compile | 41 # List of sources to compile |
| 42 # | 42 # |
| 43 SOURCES=hello_world.cc helper_functions.cc | 43 SOURCES=trace_events.cc |
| 44 | 44 |
| 45 | 45 |
| 46 # | 46 # |
| 47 # List of libraries to link against. Unlike some tools, the GCC and LLVM | 47 # List of libraries to link against. Unlike some tools, the GCC and LLVM |
| 48 # based tools require libraries to be specified in the correct order. The | 48 # based tools require libraries to be specified in the correct order. The |
| 49 # order should be symbol reference followed by symbol definition, with direct | 49 # order should be symbol reference followed by symbol definition, with direct |
| 50 # sources to the link (object files) are left most. In this case: | 50 # sources to the link (object files) are left most. In this case: |
| 51 # hello_world -> ppapi_main -> ppapi_cpp -> ppapi -> pthread -> libc | 51 # trace_events -> ppapi_main -> ppapi_cpp -> ppapi -> pthread -> libc |
| 52 # Notice that libc is implied and come last through standard compiler/link | 52 # Notice that libc is implied and come last through standard compiler/link |
| 53 # switches. | 53 # switches. |
| 54 # | 54 # |
| 55 # We break this list down into two parts, the set we need to rebuild (DEPS) | 55 # We break this list down into two parts, the set we need to rebuild (DEPS) |
| 56 # and the set we do not. | 56 # and the set we do not. |
| 57 # | 57 # |
| 58 DEPS=ppapi_cpp | 58 DEPS=ppapi_cpp |
| 59 LIBS=$(DEPS) ppapi pthread | 59 LIBS=$(DEPS) ppapi pthread |
| 60 | 60 |
| 61 | 61 |
| 62 # | 62 # |
| 63 # Use the library dependency macro for each dependency | 63 # Use the library dependency macro for each dependency |
| 64 # | 64 # |
| 65 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) | 65 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) |
| 66 | 66 |
| 67 # | 67 # |
| 68 # Use the compile macro for each source. | 68 # Use the compile macro for each source. |
| 69 # | 69 # |
| 70 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) | 70 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) |
| 71 | 71 |
| 72 # | 72 # |
| 73 # Use the link macro for this target on the list of sources. | 73 # Use the link macro for this target on the list of sources. |
| 74 # | 74 # |
| 75 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) | 75 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) |
| 76 | 76 |
| 77 # | 77 # |
| 78 # Specify the NMF to be created with no additional arugments. | 78 # Specify the NMF to be created with no additional arugments. |
| 79 # | 79 # |
| 80 $(eval $(call NMF_RULE,$(TARGET),)) | 80 $(eval $(call NMF_RULE,$(TARGET),)) |
| OLD | NEW |