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

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

Issue 73083005: [NaCl SDK] Enable linux host build for nacl_io and nacl_io_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « native_client_sdk/src/tools/common.mk ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 $(call SRC_TO_DEP,$(1)) 41 -include $(call SRC_TO_DEP,$(1))
42 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st amp 42 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st amp
43 » $(call LOG,CC ,$$@,$(HOST_CC) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $ (LINUX_CFLAGS)) 43 » $(call LOG,CC ,$$@,$(HOST_CC) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(LINU X_CFLAGS) $(2))
44 @$(FIXDEPS) $(call SRC_TO_DEP_PRE_FIXUP,$(1)) 44 @$(FIXDEPS) $(call SRC_TO_DEP_PRE_FIXUP,$(1))
45 endef 45 endef
46 46
47 define CXX_COMPILER_RULE 47 define CXX_COMPILER_RULE
48 -include $(call SRC_TO_DEP,$(1)) 48 -include $(call SRC_TO_DEP,$(1))
49 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st amp 49 $(call SRC_TO_OBJ,$(1)): $(1) $(TOP_MAKE) | $(dir $(call SRC_TO_OBJ,$(1)))dir.st amp
50 » $(call LOG,CXX ,$$@,$(HOST_CXX) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(2) $(LINUX_CFLAGS)) 50 » $(call LOG,CXX ,$$@,$(HOST_CXX) -o $$@ -c $$< -fPIC $(POSIX_FLAGS) $(LIN UX_CFLAGS) $(2))
51 @$(FIXDEPS) $(call SRC_TO_DEP_PRE_FIXUP,$(1)) 51 @$(FIXDEPS) $(call SRC_TO_DEP_PRE_FIXUP,$(1))
52 endef 52 endef
53 53
54 # 54 #
55 # Compile Macro 55 # Compile Macro
56 # 56 #
57 # $1 = Source Name 57 # $1 = Source Name
58 # $2 = POSIX Compile Flags 58 # $2 = POSIX Compile Flags
59 # $3 = VC Flags (unused) 59 # $3 = VC Flags (unused)
60 # 60 #
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 # 101 #
102 # Link Macro 102 # Link Macro
103 # 103 #
104 # $1 = Target Name 104 # $1 = Target Name
105 # $2 = List of inputs 105 # $2 = List of inputs
106 # $3 = List of libs 106 # $3 = List of libs
107 # $4 = List of deps 107 # $4 = List of deps
108 # $5 = List of lib dirs 108 # $5 = List of lib dirs
109 # $6 = Other Linker Args 109 # $6 = Other Linker Args
110 # 110 #
111 ifdef STANDALONE
112 define LINKER_RULE
113 all: $(1)
114 $(1): $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
115 $(call LOG,LINK,$$@,$(HOST_LINK) -o $(1) $(2) $(NACL_LDFLAGS) $(foreach path,$(5),-L$(path)/$(OSNAME)_host)/$(CONFIG) $(foreach lib,$(3),-l$(lib)) $(6))
116 endef
117 else
111 define LINKER_RULE 118 define LINKER_RULE
112 all: $(1) 119 all: $(1)
113 $(1): $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp) 120 $(1): $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
114 $(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)) 121 $(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))
115 endef 122 endef
123 endif
116 124
117 125
118 # 126 #
119 # Link Macro 127 # Link Macro
120 # 128 #
121 # $1 = Target Name 129 # $1 = Target Name
122 # $2 = List of Sources 130 # $2 = List of Sources
123 # $3 = List of LIBS 131 # $3 = List of LIBS
124 # $4 = List of DEPS 132 # $4 = List of DEPS
125 # $5 = POSIX Linker Switches 133 # $5 = POSIX Linker Switches
(...skipping 12 matching lines...) Expand all
138 # We cannot strip the symbol names. 146 # We cannot strip the symbol names.
139 # 147 #
140 # $1 = Target Name 148 # $1 = Target Name
141 # $2 = Input Name 149 # $2 = Input Name
142 # 150 #
143 define STRIP_RULE 151 define STRIP_RULE
144 all: $(OUTDIR)/$(1)$(HOST_EXT) 152 all: $(OUTDIR)/$(1)$(HOST_EXT)
145 $(OUTDIR)/$(1)$(HOST_EXT): $(OUTDIR)/$(2)$(HOST_EXT) 153 $(OUTDIR)/$(1)$(HOST_EXT): $(OUTDIR)/$(2)$(HOST_EXT)
146 $(call LOG,STRIP,$$@,$(HOST_STRIP) --strip-debug -o $$@ $$^) 154 $(call LOG,STRIP,$$@,$(HOST_STRIP) --strip-debug -o $$@ $$^)
147 endef 155 endef
156
157
158 #
159 # Run standalone builds (command line builds outside of chrome)
160 #
161 ifdef STANDALONE
162 run: all
163 $(OUTDIR)/$(TARGET)$(HOST_EXT) $(EXE_ARGS)
164 endif
OLDNEW
« no previous file with comments | « native_client_sdk/src/tools/common.mk ('k') | native_client_sdk/src/tools/nacl_gcc.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698