OLD | NEW |
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 # $4 = List of DEPS | 122 # $4 = List of DEPS |
123 # $5 = POSIX Linker Switches | 123 # $5 = POSIX Linker Switches |
124 # $6 = VC Linker Switches | 124 # $6 = VC Linker Switches |
125 # | 125 # |
126 define LINK_RULE | 126 define LINK_RULE |
127 $(call LINKER_RULE,$(OUTDIR)/$(1),$(foreach src,$(2),$(call SRC_TO_OBJ,$(src))),
$(filter-out pthread,$(3)),$(4),$(LIB_PATHS),$(5)) | 127 $(call LINKER_RULE,$(OUTDIR)/$(1),$(foreach src,$(2),$(call SRC_TO_OBJ,$(src))),
$(filter-out pthread,$(3)),$(4),$(LIB_PATHS),$(5)) |
128 endef | 128 endef |
129 | 129 |
130 | 130 |
131 # | 131 # |
| 132 # Macro to generate linker scripts |
| 133 # |
| 134 # $1 = Target Name |
| 135 # $2 = Linker Script |
| 136 # |
| 137 define LINKER_SCRIPT_RULE |
| 138 $(STAMPDIR)/$(1).stamp: $(LIBDIR)/$(TOOLCHAIN)/$(CONFIG)/lib$(1).a |
| 139 @echo " STAMP $$@" |
| 140 @echo "TOUCHED $$@" > $(STAMPDIR)/$(1).stamp |
| 141 |
| 142 install: $(LIBDIR)/$(TOOLCHAIN)/$(CONFIG)/lib$(1).a |
| 143 $(LIBDIR)/$(TOOLCHAIN)/$(CONFIG)/lib$(1).a: $(2) |
| 144 $(MKDIR) -p $$(dir $$@) |
| 145 $(call LOG,CP ,$$@,$(OSHELPERS) cp $$^ $$@) |
| 146 endef |
| 147 |
| 148 |
| 149 # |
132 # Strip Macro | 150 # Strip Macro |
133 # | 151 # |
134 # NOTE: pnacl-strip does not really do much for finalized pexes (in a | 152 # NOTE: pnacl-strip does not really do much for finalized pexes (in a |
135 # sense, they are already stripped), but set this rule up for uniformity. | 153 # sense, they are already stripped), but set this rule up for uniformity. |
136 # | 154 # |
137 # $1 = Target Name | 155 # $1 = Target Name |
138 # $2 = Input Name | 156 # $2 = Input Name |
139 # | 157 # |
140 define STRIP_RULE | 158 define STRIP_RULE |
141 all: $(OUTDIR)/$(1).pexe | 159 all: $(OUTDIR)/$(1).pexe |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) | 210 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) |
193 endif | 211 endif |
194 $(SEL_LDR_PATH) $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe --
$(EXE_ARGS) | 212 $(SEL_LDR_PATH) $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe --
$(EXE_ARGS) |
195 | 213 |
196 debug: $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe | 214 debug: $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe |
197 ifndef NACL_ARCH | 215 ifndef NACL_ARCH |
198 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) | 216 $(error Cannot run in sel_ldr unless $$NACL_ARCH is set) |
199 endif | 217 endif |
200 $(SEL_LDR_PATH) -d $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe
-- $(EXE_ARGS) | 218 $(SEL_LDR_PATH) -d $(SEL_LDR_ARGS) $(OUTDIR)/$(TARGET)_$(NACL_ARCH).nexe
-- $(EXE_ARGS) |
201 endif | 219 endif |
OLD | NEW |