Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: native_client_sdk/src/build_tools/library.mk

Issue 23919004: [NaCl SDK] Create a resources/ directory and move files to it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move httpd.cmd too Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4 [[def ExpandDict(key, value_in, pre_list=[], post_list=[]):]]
5 [[ value = value_in or [] ]]
6 [[ pre = pre_list or [] ]]
7 [[ post = post_list or [] ]]
8 [[ if type(value) is not dict:]]
9 [[ out = pre]]
10 [[ out.extend(value)]]
11 [[ out.extend(post)]]
12 [[ if out:]]
13 {{key}} = {{' '.join(out)}}
14 [[ ]]
15 [[ return]]
16 [[ ]]
17 [[ for subkey in value:]]
18 [[ out = pre]]
19 [[ out.extend(value[subkey])]]
20 [[ out.extend(post)]]
21 {{key}}_{{subkey}} = {{' '.join(out)}}
22 [[ ]]
23 {{key}} = $({{key}}_$(TOOLCHAIN))
24 [[]]
25
26 [[target = targets[0] ]]
27 # GNU Makefile based on shared rules provided by the Native Client SDK.
28 # See README.Makefiles for more details.
29
30 VALID_TOOLCHAINS := {{' '.join(tools)}}
31 NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../..)
32 [[if 'INCLUDES' in target:]]
33 EXTRA_INC_PATHS={{' '.join(target['INCLUDES'])}}
34 [[]]
35
36 include $(NACL_SDK_ROOT)/tools/common.mk
37
38 TARGET = {{target['NAME']}}
39 [[flags = target.get('CFLAGS', [])]]
40 [[flags.extend(target.get('CXXFLAGS', []))]]
41 [[ExpandDict('CFLAGS', flags)]]
42 [[if 'CFLAGS_GCC' in target:]]
43 ifneq ($(TOOLCHAIN),pnacl)
44 CFLAGS += {{' '.join(target['CFLAGS_GCC'])}}
45 endif
46 [[]]
47
48 SOURCES = \
49 [[for source in sorted(target['SOURCES']):]]
50 {{source}} \
51 [[]]
52
53 all: install
54
55 # Build rules generated by macros from common.mk:
56 #
57 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
58 $(eval $(call LIB_RULE,$(TARGET),$(SOURCES)))
59
60 [[if target['TYPE'] != 'static-lib':]]
61 ifeq ($(TOOLCHAIN),glibc)
62 $(eval $(call SO_RULE,$(TARGET),$(SOURCES)))
63 endif
64 [[]]
65 {{post}}
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/generate_make.py ('k') | native_client_sdk/src/build_tools/template.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698