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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 include $(NACL_SDK_ROOT)/tools/common.mk | 45 include $(NACL_SDK_ROOT)/tools/common.mk |
46 | 46 |
47 [[if desc.get('SOCKET_PERMISSIONS'):]] | 47 [[if desc.get('SOCKET_PERMISSIONS'):]] |
48 CHROME_ARGS += --allow-nacl-socket-api=localhost | 48 CHROME_ARGS += --allow-nacl-socket-api=localhost |
49 [[]] | 49 [[]] |
50 | 50 |
51 [[ExpandDict('DEPS', targets[0].get('DEPS', []))]] | 51 [[ExpandDict('DEPS', targets[0].get('DEPS', []))]] |
52 [[ExpandDict('LIBS', targets[0].get('LIBS', []))]] | 52 [[ExpandDict('LIBS', targets[0].get('LIBS', []))]] |
53 | 53 |
54 [[for target in targets:]] | 54 [[for target in targets:]] |
55 [[ source_list = (s for s in sorted(target['SOURCES']) if not s.endswith('.h'))
]] | 55 [[ source_list = sorted(target['SOURCES'] + target.get('EXTRA_SOURCES', []))]] |
| 56 [[ source_list = (s for s in source_list if not s.endswith('.h'))]] |
56 [[ source_list = ' \\\n '.join(source_list)]] | 57 [[ source_list = ' \\\n '.join(source_list)]] |
57 [[ sources = target['NAME'] + '_SOURCES']] | 58 [[ sources = target['NAME'] + '_SOURCES']] |
58 [[ cflags = target['NAME'] + '_CFLAGS']] | 59 [[ cflags = target['NAME'] + '_CFLAGS']] |
59 [[ flags = target.get('CFLAGS', [])]] | 60 [[ flags = target.get('CFLAGS', [])]] |
60 [[ flags.extend(target.get('CXXFLAGS', []))]] | 61 [[ flags.extend(target.get('CXXFLAGS', []))]] |
61 [[ if len(targets) == 1:]] | 62 [[ if len(targets) == 1:]] |
62 [[ sources = 'SOURCES']] | 63 [[ sources = 'SOURCES']] |
63 [[ cflags = 'CFLAGS']] | 64 [[ cflags = 'CFLAGS']] |
64 [[ ]] | 65 [[ ]] |
65 [[ ExpandDict(cflags, flags)]] | 66 [[ ExpandDict(cflags, flags)]] |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 # On NaCl, only produce a stripped binary for Release configs (not Debug). | 102 # On NaCl, only produce a stripped binary for Release configs (not Debug). |
102 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG)))) | 103 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG)))) |
103 $(eval $(call LINK_RULE,{{name}}_unstripped,$({{sources}}),$(LIBS),$(DEPS))) | 104 $(eval $(call LINK_RULE,{{name}}_unstripped,$({{sources}}),$(LIBS),$(DEPS))) |
104 $(eval $(call STRIP_RULE,{{name}},{{name}}_unstripped)) | 105 $(eval $(call STRIP_RULE,{{name}},{{name}}_unstripped)) |
105 else | 106 else |
106 $(eval $(call LINK_RULE,{{name}},$({{sources}}),$(LIBS),$(DEPS))) | 107 $(eval $(call LINK_RULE,{{name}},$({{sources}}),$(LIBS),$(DEPS))) |
107 endif | 108 endif |
108 [[]] | 109 [[]] |
109 | 110 |
110 $(eval $(call NMF_RULE,$(TARGET),)){{post}} | 111 $(eval $(call NMF_RULE,$(TARGET),)){{post}} |
OLD | NEW |