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

Side by Side Diff: native_client_sdk/src/tools/host_vc.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 27 matching lines...) Expand all
38 38
39 # 39 #
40 # Individual Macros 40 # Individual Macros
41 # 41 #
42 # $1 = Source Name 42 # $1 = Source Name
43 # $2 = Compile Flags 43 # $2 = Compile Flags
44 # 44 #
45 define C_COMPILER_RULE 45 define C_COMPILER_RULE
46 -include $(OUTDIR)/$(basename $(1)).d 46 -include $(OUTDIR)/$(basename $(1)).d
47 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp 47 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp
48 » $(HOST_CC) /Fo$$@ /c $$< $(WIN_OPT_FLAGS) $(2) $(WIN_FLAGS) 48 » $(call LOG,CC,$$@,$(HOST_CC) /Fo$$@ /c $$< $(WIN_OPT_FLAGS) $(2) $(WIN_F LAGS))
49 endef 49 endef
50 50
51 define CXX_COMPILER_RULE 51 define CXX_COMPILER_RULE
52 -include $(OUTDIR)/$(basename $(1)).d 52 -include $(OUTDIR)/$(basename $(1)).d
53 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp 53 $(OUTDIR)/$(basename $(1)).o : $(1) $(TOP_MAKE) | $(dir $(OUTDIR)/$(basename $(1 )))dir.stamp
54 » $(HOST_CXX) /Fo$$@ -c $$< $(WIN_OPT_FLAGS) $(2) $(WIN_FLAGS) 54 » $(call LOG,CXX,$$@,$(HOST_CXX) /Fo$$@ -c $$< $(WIN_OPT_FLAGS) $(2) $(WIN _FLAGS))
55 endef 55 endef
56 56
57 57
58 # $1 = Source Name 58 # $1 = Source Name
59 # $2 = POSIX Compile Flags (unused) 59 # $2 = POSIX Compile Flags (unused)
60 # $3 = VC Compile Flags 60 # $3 = VC Compile Flags
61 # 61 #
62 define COMPILE_RULE 62 define COMPILE_RULE
63 ifeq ('.c','$(suffix $(1))') 63 ifeq ('.c','$(suffix $(1))')
64 $(call C_COMPILER_RULE,$(1),$(3) $(foreach inc,$(INC_PATHS),/I$(inc))) 64 $(call C_COMPILER_RULE,$(1),$(3) $(foreach inc,$(INC_PATHS),/I$(inc)))
(...skipping 10 matching lines...) Expand all
75 # $2 = List of Sources 75 # $2 = List of Sources
76 # 76 #
77 # 77 #
78 define LIB_RULE 78 define LIB_RULE
79 $(STAMPDIR)/$(1).stamp : $(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$( 1).lib 79 $(STAMPDIR)/$(1).stamp : $(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$( 1).lib
80 @echo "TOUCHED $$@" > $(STAMPDIR)/$(1).stamp 80 @echo "TOUCHED $$@" > $(STAMPDIR)/$(1).stamp
81 81
82 all:$(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$(1).lib 82 all:$(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$(1).lib
83 $(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$(1).lib : $(foreach src,$( 2),$(OUTDIR)/$(basename $(src)).o) 83 $(NACL_SDK_ROOT)/lib/$(OSNAME)_x86_32_host/$(CONFIG)/$(1).lib : $(foreach src,$( 2),$(OUTDIR)/$(basename $(src)).o)
84 $(MKDIR) -p $$(dir $$@) 84 $(MKDIR) -p $$(dir $$@)
85 » $(HOST_LIB) /OUT:$$@ $$^ $(WIN_LDFLAGS) 85 » $(call LOG,LIB,$$@,$(HOST_LIB) /OUT:$$@ $$^ $(WIN_LDFLAGS))
86 endef 86 endef
87 87
88 88
89 # 89 #
90 # Link Macro 90 # Link Macro
91 # 91 #
92 # $1 = Target Name 92 # $1 = Target Name
93 # $2 = List of inputs 93 # $2 = List of inputs
94 # $3 = List of libs 94 # $3 = List of libs
95 # $4 = List of deps 95 # $4 = List of deps
96 # $5 = List of lib dirs 96 # $5 = List of lib dirs
97 # $6 = Other Linker Args 97 # $6 = Other Linker Args
98 # 98 #
99 define LINKER_RULE 99 define LINKER_RULE
100 all: $(1) 100 all: $(1)
101 $(1) : $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp) 101 $(1) : $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
102 » $(HOST_LINK) /DLL /OUT:$(1) /PDB:$(1).pdb $(2) /DEBUG $(foreach path,$(5 ),/LIBPATH:$(path)/$(OSNAME)_x86_32_host/$(CONFIG)) $(foreach lib,$(3),$(lib).li b) $(6) 102 » $(call LOG,LINK,$$@,$(HOST_LINK) /DLL /OUT:$(1) /PDB:$(1).pdb $(2) /DEBU G $(foreach path,$(5),/LIBPATH:$(path)/$(OSNAME)_x86_32_host/$(CONFIG)) $(foreac h lib,$(3),$(lib).lib) $(6))
103 endef 103 endef
104 104
105 105
106 # 106 #
107 # Link Macro 107 # Link Macro
108 # 108 #
109 # $1 = Target Name 109 # $1 = Target Name
110 # $2 = List of Sources 110 # $2 = List of Sources
111 # $3 = List of LIBS 111 # $3 = List of LIBS
112 # $4 = List of DEPS 112 # $4 = List of DEPS
113 # $5 = POSIX Linker Switches 113 # $5 = POSIX Linker Switches
114 # $6 = VC Linker Switches 114 # $6 = VC Linker Switches
115 # 115 #
116 define LINK_RULE 116 define LINK_RULE
117 $(call LINKER_RULE,$(OUTDIR)/$(1)$(HOST_EXT),$(foreach src,$(2),$(OUTDIR)/$(base name $(src)).o),$(3),$(4),$(LIB_PATHS),$(6)) 117 $(call LINKER_RULE,$(OUTDIR)/$(1)$(HOST_EXT),$(foreach src,$(2),$(OUTDIR)/$(base name $(src)).o),$(3),$(4),$(LIB_PATHS),$(6))
118 endef 118 endef
119 119
120 120 all : $(LIB_LIST) $(DEPS_LIST)
121 #
122 # NMF Manifiest generation
123 #
124 # Use the python script create_nmf to scan the binaries for dependencies using
125 # objdump. Pass in the (-L) paths to the default library toolchains so that we
126 # can find those libraries and have it automatically copy the files (-s) to
127 # the target directory for us.
128 #
129 # $1 = Target Name (the basename of the nmf
130 # $2 = Additional create_nmf.py arguments
131 #
132 NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py
133
134 define NMF_RULE
135 NMF_LIST+=$(OUTDIR)/$(1).nmf
136 $(OUTDIR)/$(1).nmf : $(OUTDIR)/$(1)$(HOST_EXT)
137 » @echo "Host Toolchain" > $$@
138 endef
139
140 all : $(LIB_LIST) $(DEPS_LIST) $(NMF_LIST)
141
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698