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

Side by Side Diff: native_client_sdk/src/tools/host_gcc.mk

Issue 12209097: [NaCl SDK] make example Makefiles quiet by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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 22 matching lines...) Expand all
33 33
34 # 34 #
35 # Individual Macros 35 # Individual Macros
36 # 36 #
37 # $1 = Source Name 37 # $1 = Source Name
38 # $2 = Compile Flags 38 # $2 = Compile Flags
39 # 39 #
40 define C_COMPILER_RULE 40 define C_COMPILER_RULE
41 -include $(OUTDIR)/$(basename $(1)).d 41 -include $(OUTDIR)/$(basename $(1)).d
42 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp 42 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp
43 » $(HOST_CC) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $(LINUX_FLAGS) 43 » $(call LOG,CC,$$@,$(HOST_CC) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $(L INUX_FLAGS))
44 endef 44 endef
45 45
46 define CXX_COMPILER_RULE 46 define CXX_COMPILER_RULE
47 -include $(OUTDIR)/$(basename $(1)).d 47 -include $(OUTDIR)/$(basename $(1)).d
48 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) |$(dir $(OUTDIR)/$(basename $(1) ))dir.stamp 48 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) |$(dir $(OUTDIR)/$(basename $(1) ))dir.stamp
49 » $(HOST_CXX) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $(LINUX_FLAGS) 49 » $(call LOG,CXX,$$@,$(HOST_CXX) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $ (LINUX_FLAGS))
50 endef 50 endef
51 51
52 52
53 # $1 = Source Name 53 # $1 = Source Name
54 # $2 = POSIX Compile Flags 54 # $2 = POSIX Compile Flags
55 # $3 = VC Flags (unused) 55 # $3 = VC Flags (unused)
56 # 56 #
57 define COMPILE_RULE 57 define COMPILE_RULE
58 ifeq ('.c','$(suffix $(1))') 58 ifeq ('.c','$(suffix $(1))')
59 $(call C_COMPILER_RULE,$(1),$(2) $(foreach inc,$(INC_PATHS),-I$(inc))) 59 $(call C_COMPILER_RULE,$(1),$(2) $(foreach inc,$(INC_PATHS),-I$(inc)))
(...skipping 22 matching lines...) Expand all
82 # $2 = List of Sources 82 # $2 = List of Sources
83 # 83 #
84 # 84 #
85 define LIB_RULE 85 define LIB_RULE
86 $(STAMPDIR)/$(1).stamp : $(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a 86 $(STAMPDIR)/$(1).stamp : $(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a
87 @echo "TOUCHED $$@" > $(STAMPDIR)/$(1).stamp 87 @echo "TOUCHED $$@" > $(STAMPDIR)/$(1).stamp
88 88
89 all:$(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a 89 all:$(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a
90 $(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a : $(foreach src,$(2),$(O UTDIR)/$(basename $(src)).o) 90 $(NACL_SDK_ROOT)/lib/$(OSNAME)_host/$(CONFIG)/lib$(1).a : $(foreach src,$(2),$(O UTDIR)/$(basename $(src)).o)
91 $(MKDIR) -p $$(dir $$@) 91 $(MKDIR) -p $$(dir $$@)
92 » $(HOST_LIB) $$@ $$^ 92 » $(call LOG,LIB,$$@,$(HOST_LIB) $$@ $$^)
93 endef 93 endef
94 94
95 95
96 # 96 #
97 # Link Macro 97 # Link Macro
98 # 98 #
99 # $1 = Target Name 99 # $1 = Target Name
100 # $2 = List of inputs 100 # $2 = List of inputs
101 # $3 = List of libs 101 # $3 = List of libs
102 # $4 = List of deps 102 # $4 = List of deps
103 # $5 = List of lib dirs 103 # $5 = List of lib dirs
104 # $6 = Other Linker Args 104 # $6 = Other Linker Args
105 # 105 #
106 define LINKER_RULE 106 define LINKER_RULE
107 all: $(1) 107 all: $(1)
108 $(1) : $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp) 108 $(1) : $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
109 » $(HOST_LINK) -shared -o $(1) $(2) $(foreach path,$(5),-L$(path)/$(OSNAME )_host)/$(CONFIG) $(foreach lib,$(3),-l$(lib)) $(6) 109 » $(call LOG,LINK,$$@,$(HOST_LINK) -shared -o $(1) $(2) $(NACL_LDFLAGS) $( foreach path,$(5),-L$(path)/$(OSNAME)_host)/$(CONFIG) $(foreach lib,$(3),-l$(lib )) $(6))
110 endef 110 endef
111 111
112 112
113 # 113 #
114 # Link Macro 114 # Link Macro
115 # 115 #
116 # $1 = Target Name 116 # $1 = Target Name
117 # $2 = List of Sources 117 # $2 = List of Sources
118 # $3 = List of LIBS 118 # $3 = List of LIBS
119 # $4 = List of DEPS 119 # $4 = List of DEPS
120 # $5 = POSIX Linker Switches 120 # $5 = POSIX Linker Switches
121 # $6 = VC Linker Switches 121 # $6 = VC Linker Switches
122 # 122 #
123 define LINK_RULE 123 define LINK_RULE
124 $(call LINKER_RULE,$(OUTDIR)/$(1)$(HOST_EXT),$(foreach src,$(2),$(OUTDIR)/$(base name $(src)).o),$(filter-out pthread,$(3)),$(4),$(LIB_PATHS),$(5)) 124 $(call LINKER_RULE,$(OUTDIR)/$(1)$(HOST_EXT),$(foreach src,$(2),$(OUTDIR)/$(base name $(src)).o),$(filter-out pthread,$(3)),$(4),$(LIB_PATHS),$(5))
125 endef 125 endef
126 126
127 127
128 # 128 all : $(LIB_LIST) $(DEPS_LIST)
129 # NMF Manifiest generation
130 #
131 # Use the python script create_nmf to scan the binaries for dependencies using
132 # objdump. Pass in the (-L) paths to the default library toolchains so that we
133 # can find those libraries and have it automatically copy the files (-s) to
134 # the target directory for us.
135 #
136 # $1 = Target Name (the basename of the nmf
137 # $2 = Additional create_nmf.py arguments
138 #
139 NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py
140
141 define NMF_RULE
142 NMF_LIST+=$(OUTDIR)/$(1).nmf
143 $(OUTDIR)/$(1).nmf : $(OUTDIR)/$(1)$(HOST_EXT)
144 » @echo "Host Toolchain" > $$@
145 endef
146
147 all : $(LIB_LIST) $(DEPS_LIST) $(NMF_LIST)
148
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698