OLD | NEW |
---|---|
1 # Copyright (c) 2013 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 # GNU Makefile based on shared rules provided by the Native Client SDK. | 5 # GNU Makefile based on shared rules provided by the Native Client SDK. |
6 # See README.Makefiles for more details. | 6 # See README.Makefiles for more details. |
7 [[]] | 7 [[]] |
8 [[def ExpandDict(key, value_in, pre_list=[], post_list=[]):]] | 8 [[def ExpandDict(key, value_in, pre_list=[], post_list=[]):]] |
9 [[ value = value_in or [] ]] | 9 [[ value = value_in or [] ]] |
10 [[ pre = pre_list or [] ]] | 10 [[ pre = pre_list or [] ]] |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 [[ ExpandDict(cflags, flags)]] | 65 [[ ExpandDict(cflags, flags)]] |
66 [[ for define in target.get('DEFINES', []):]] | 66 [[ for define in target.get('DEFINES', []):]] |
67 {{cflags}} += -D{{define}} | 67 {{cflags}} += -D{{define}} |
68 [[ ]] | 68 [[ ]] |
69 [[ if 'CFLAGS_GCC' in target:]] | 69 [[ if 'CFLAGS_GCC' in target:]] |
70 ifneq ($(TOOLCHAIN),pnacl) | 70 ifneq ($(TOOLCHAIN),pnacl) |
71 {{cflags}} += {{' '.join(target['CFLAGS_GCC'])}} | 71 {{cflags}} += {{' '.join(target['CFLAGS_GCC'])}} |
72 endif | 72 endif |
73 [[ ]] | 73 [[ ]] |
74 {{sources}} = {{source_list}} | 74 {{sources}} = {{source_list}} |
75 [[]] | |
Sam Clegg
2015/02/19 21:24:20
Is this needed?
binji
2015/02/20 17:33:48
Yes, otherwise the following lines are included in
| |
75 | 76 |
76 # Build rules generated by macros from common.mk: | 77 # Build rules generated by macros from common.mk: |
77 | 78 |
78 [[if targets[0].get('DEPS'):]] | 79 [[if targets[0].get('DEPS'):]] |
79 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) | 80 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) |
80 [[if len(targets) > 1:]] | 81 [[if len(targets) > 1:]] |
81 [[ for target in targets:]] | 82 [[ for target in targets:]] |
82 [[ name = target['NAME'] ]] | 83 [[ name = target['NAME'] ]] |
83 $(foreach src,$({{name}}_SOURCES),$(eval $(call COMPILE_RULE,$(src),$({{name}}_C FLAGS)))) | 84 $(foreach src,$({{name}}_SOURCES),$(eval $(call COMPILE_RULE,$(src),$({{name}}_C FLAGS)))) |
84 [[else:]] | 85 [[else:]] |
(...skipping 15 matching lines...) Expand all Loading... | |
100 # On NaCl, only produce a stripped binary for Release configs (not Debug). | 101 # On NaCl, only produce a stripped binary for Release configs (not Debug). |
101 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG)))) | 102 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG)))) |
102 $(eval $(call LINK_RULE,{{name}}_unstripped,$({{sources}}),$(LIBS),$(DEPS))) | 103 $(eval $(call LINK_RULE,{{name}}_unstripped,$({{sources}}),$(LIBS),$(DEPS))) |
103 $(eval $(call STRIP_RULE,{{name}},{{name}}_unstripped)) | 104 $(eval $(call STRIP_RULE,{{name}},{{name}}_unstripped)) |
104 else | 105 else |
105 $(eval $(call LINK_RULE,{{name}},$({{sources}}),$(LIBS),$(DEPS))) | 106 $(eval $(call LINK_RULE,{{name}},$({{sources}}),$(LIBS),$(DEPS))) |
106 endif | 107 endif |
107 [[]] | 108 [[]] |
108 | 109 |
109 $(eval $(call NMF_RULE,$(TARGET),)){{post}} | 110 $(eval $(call NMF_RULE,$(TARGET),)){{post}} |
OLD | NEW |