| 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 17 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_nacl_mounts | 38 TARGET=hello_nacl_io |
| 39 | 39 |
| 40 # | 40 # |
| 41 # List of sources to compile | 41 # List of sources to compile |
| 42 # | 42 # |
| 43 SOURCES=handlers.c hello_nacl_mounts.c queue.c | 43 SOURCES=handlers.c hello_nacl_io.c queue.c |
| 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 # hello_world -> 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. This example does not havea any additional library | 56 # and the set we do not. This example does not havea any additional library |
| 57 # dependencies. | 57 # dependencies. |
| 58 # | 58 # |
| 59 DEPS=nacl_mounts | 59 DEPS=nacl_io |
| 60 LIBS=$(DEPS) ppapi pthread | 60 LIBS=$(DEPS) ppapi pthread |
| 61 | 61 |
| 62 | 62 |
| 63 # | 63 # |
| 64 # Use the library dependency macro for each dependency | 64 # Use the library dependency macro for each dependency |
| 65 # | 65 # |
| 66 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) | 66 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) |
| 67 | 67 |
| 68 # | 68 # |
| 69 # Use the compile macro for each source. | 69 # Use the compile macro for each source. |
| 70 # | 70 # |
| 71 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) | 71 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src)))) |
| 72 | 72 |
| 73 # | 73 # |
| 74 # 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. |
| 75 # | 75 # |
| 76 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) | 76 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) |
| 77 | 77 |
| 78 # | 78 # |
| 79 # Specify the NMF to be created with no additional arugments. | 79 # Specify the NMF to be created with no additional arugments. |
| 80 # | 80 # |
| 81 $(eval $(call NMF_RULE,$(TARGET),)) | 81 $(eval $(call NMF_RULE,$(TARGET),)) |
| OLD | NEW |