| OLD | NEW |
| 1 ## | 1 ## |
| 2 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 ## | 3 ## |
| 4 ## Use of this source code is governed by a BSD-style license | 4 ## Use of this source code is governed by a BSD-style license |
| 5 ## that can be found in the LICENSE file in the root of the source | 5 ## that can be found in the LICENSE file in the root of the source |
| 6 ## tree. An additional intellectual property rights grant can be found | 6 ## tree. An additional intellectual property rights grant can be found |
| 7 ## in the file PATENTS. All contributing project authors may | 7 ## in the file PATENTS. All contributing project authors may |
| 8 ## be found in the AUTHORS file in the root of the source tree. | 8 ## be found in the AUTHORS file in the root of the source tree. |
| 9 ## | 9 ## |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 rm -f $(CLEAN-OBJS) | 91 rm -f $(CLEAN-OBJS) |
| 92 | 92 |
| 93 .PHONY: dist | 93 .PHONY: dist |
| 94 dist: | 94 dist: |
| 95 .PHONY: install | 95 .PHONY: install |
| 96 install:: | 96 install:: |
| 97 | 97 |
| 98 $(BUILD_PFX)%.c.d: %.c | 98 $(BUILD_PFX)%.c.d: %.c |
| 99 $(if $(quiet),@echo " [DEP] $@") | 99 $(if $(quiet),@echo " [DEP] $@") |
| 100 $(qexec)mkdir -p $(dir $@) | 100 $(qexec)mkdir -p $(dir $@) |
| 101 » $(qexec)$(CC) $(CFLAGS) -M $< | $(fmt_deps) > $@ | 101 » $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@ |
| 102 | 102 |
| 103 $(BUILD_PFX)%.c.o: %.c | 103 $(BUILD_PFX)%.c.o: %.c |
| 104 $(if $(quiet),@echo " [CC] $@") | 104 $(if $(quiet),@echo " [CC] $@") |
| 105 » $(qexec)$(CC) $(CFLAGS) -c -o $@ $< | 105 » $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< |
| 106 | 106 |
| 107 $(BUILD_PFX)%.asm.d: %.asm | 107 $(BUILD_PFX)%.asm.d: %.asm |
| 108 $(if $(quiet),@echo " [DEP] $@") | 108 $(if $(quiet),@echo " [DEP] $@") |
| 109 $(qexec)mkdir -p $(dir $@) | 109 $(qexec)mkdir -p $(dir $@) |
| 110 $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ | 110 $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ |
| 111 --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ | 111 --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ |
| 112 | 112 |
| 113 $(BUILD_PFX)%.asm.o: %.asm | 113 $(BUILD_PFX)%.asm.o: %.asm |
| 114 $(if $(quiet),@echo " [AS] $@") | 114 $(if $(quiet),@echo " [AS] $@") |
| 115 $(qexec)$(AS) $(ASFLAGS) -o $@ $< | 115 $(qexec)$(AS) $(ASFLAGS) -o $@ $< |
| 116 | 116 |
| 117 $(BUILD_PFX)%.s.d: %.s | 117 $(BUILD_PFX)%.s.d: %.s |
| 118 $(if $(quiet),@echo " [DEP] $@") | 118 $(if $(quiet),@echo " [DEP] $@") |
| 119 $(qexec)mkdir -p $(dir $@) | 119 $(qexec)mkdir -p $(dir $@) |
| 120 $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ | 120 $(qexec)$(SRC_PATH_BARE)/build/make/gen_asm_deps.sh \ |
| 121 --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ | 121 --build-pfx=$(BUILD_PFX) --depfile=$@ $(ASFLAGS) $< > $@ |
| 122 | 122 |
| 123 $(BUILD_PFX)%.s.o: %.s | 123 $(BUILD_PFX)%.s.o: %.s |
| 124 $(if $(quiet),@echo " [AS] $@") | 124 $(if $(quiet),@echo " [AS] $@") |
| 125 $(qexec)$(AS) $(ASFLAGS) -o $@ $< | 125 $(qexec)$(AS) $(ASFLAGS) -o $@ $< |
| 126 | 126 |
| 127 .PRECIOUS: %.c.S |
| 128 %.c.S: CFLAGS += -DINLINE_ASM |
| 129 $(BUILD_PFX)%.c.S: %.c |
| 130 $(if $(quiet),@echo " [GEN] $@") |
| 131 $(qexec)$(CC) -S $(CFLAGS) -o $@ $< |
| 132 |
| 127 .PRECIOUS: %.asm.s | 133 .PRECIOUS: %.asm.s |
| 128 $(BUILD_PFX)%.asm.s: %.asm | 134 $(BUILD_PFX)%.asm.s: %.asm |
| 129 $(if $(quiet),@echo " [ASM CONVERSION] $@") | 135 $(if $(quiet),@echo " [ASM CONVERSION] $@") |
| 130 $(qexec)mkdir -p $(dir $@) | 136 $(qexec)mkdir -p $(dir $@) |
| 131 $(qexec)$(ASM_CONVERSION) <$< >$@ | 137 $(qexec)$(ASM_CONVERSION) <$< >$@ |
| 132 | 138 |
| 133 # If we're in debug mode, pretend we don't have GNU strip, to fall back to | 139 # If we're in debug mode, pretend we don't have GNU strip, to fall back to |
| 134 # the copy implementation | 140 # the copy implementation |
| 135 HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP)) | 141 HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP)) |
| 136 ifeq ($(HAVE_GNU_STRIP),yes) | 142 ifeq ($(HAVE_GNU_STRIP),yes) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 else | 187 else |
| 182 lib_file_name=lib$(1).a | 188 lib_file_name=lib$(1).a |
| 183 endif | 189 endif |
| 184 # | 190 # |
| 185 # Rule Templates | 191 # Rule Templates |
| 186 # | 192 # |
| 187 define linker_template | 193 define linker_template |
| 188 $(1): $(filter-out -%,$(2)) | 194 $(1): $(filter-out -%,$(2)) |
| 189 $(1): | 195 $(1): |
| 190 $(if $(quiet),@echo " [LD] $$@") | 196 $(if $(quiet),@echo " [LD] $$@") |
| 191 » $(qexec)$$(LD) $$(strip $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) | 197 » $(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3
) $$(extralibs)) |
| 192 endef | 198 endef |
| 193 # make-3.80 has a bug with expanding large input strings to the eval function, | 199 # make-3.80 has a bug with expanding large input strings to the eval function, |
| 194 # which was triggered in some cases by the following component of | 200 # which was triggered in some cases by the following component of |
| 195 # linker_template: | 201 # linker_template: |
| 196 # $(1): $$(call find_file, $(patsubst -l%,lib%.a,$(filter -l%,$(2))),\ | 202 # $(1): $$(call find_file, $(patsubst -l%,lib%.a,$(filter -l%,$(2))),\ |
| 197 # $$(patsubst -L%,%,$$(filter -L%,$$(LDFLAGS) $(2)))) | 203 # $$(patsubst -L%,%,$$(filter -L%,$$(LDFLAGS) $(2)))) |
| 198 # This may be useful to revisit in the future (it tries to locate libraries | 204 # This may be useful to revisit in the future (it tries to locate libraries |
| 199 # in a search path and add them as prerequisites | 205 # in a search path and add them as prerequisites |
| 200 | 206 |
| 201 define install_map_template | 207 define install_map_template |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 # system too. | 329 # system too. |
| 324 ifneq ($(call enabled,DIST-SRCS),) | 330 ifneq ($(call enabled,DIST-SRCS),) |
| 325 DIST-SRCS-yes += configure | 331 DIST-SRCS-yes += configure |
| 326 DIST-SRCS-yes += build/make/configure.sh | 332 DIST-SRCS-yes += build/make/configure.sh |
| 327 DIST-SRCS-yes += build/make/gen_asm_deps.sh | 333 DIST-SRCS-yes += build/make/gen_asm_deps.sh |
| 328 DIST-SRCS-yes += build/make/Makefile | 334 DIST-SRCS-yes += build/make/Makefile |
| 329 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh | 335 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh |
| 330 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_proj.sh | 336 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_proj.sh |
| 331 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh | 337 DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh |
| 332 DIST-SRCS-$(CONFIG_MSVS) += build/x86-msvs/yasm.rules | 338 DIST-SRCS-$(CONFIG_MSVS) += build/x86-msvs/yasm.rules |
| 339 DIST-SRCS-$(CONFIG_MSVS) += build/x86-msvs/obj_int_extract.bat |
| 333 DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh | 340 DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh |
| 334 # Include obj_int_extract if we use offsets from asm_*_offsets | 341 # Include obj_int_extract if we use offsets from asm_*_offsets |
| 335 DIST-SRCS-$(ARCH_ARM)$(ARCH_X86)$(ARCH_X86_64) += build/make/obj_int_extr
act.c | 342 DIST-SRCS-$(ARCH_ARM)$(ARCH_X86)$(ARCH_X86_64) += build/make/obj_int_extr
act.c |
| 336 DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl | 343 DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl |
| 337 DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk | 344 DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk |
| 338 endif | 345 endif |
| 339 INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS) | 346 INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS) |
| 340 ifeq ($(MAKECMDGOALS),dist) | 347 ifeq ($(MAKECMDGOALS),dist) |
| 341 INSTALL-SRCS += $(call cond_enabled,CONFIG_INSTALL_SRCS,DIST-SRCS) | 348 INSTALL-SRCS += $(call cond_enabled,CONFIG_INSTALL_SRCS,DIST-SRCS) |
| 342 endif | 349 endif |
| 343 .install-srcs: $(addprefix $(DIST_DIR)/src/,$(INSTALL-SRCS)) | 350 .install-srcs: $(addprefix $(DIST_DIR)/src/,$(INSTALL-SRCS)) |
| 344 @touch $@ | 351 @touch $@ |
| 345 | 352 |
| 346 clean:: | 353 clean:: |
| 347 rm -f .install-srcs | 354 rm -f .install-srcs |
| 348 | 355 |
| 349 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | 356 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
| 350 BUILD_TARGETS += .projects | 357 BUILD_TARGETS += .projects |
| 351 INSTALL_TARGETS += .install-projects | 358 INSTALL_TARGETS += .install-projects |
| 352 endif | 359 endif |
| 353 BUILD_TARGETS += .docs .libs .bins | 360 BUILD_TARGETS += .docs .libs .bins |
| 354 INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins | 361 INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins |
| 355 all-$(target): $(BUILD_TARGETS) | 362 all-$(target): $(BUILD_TARGETS) |
| 356 install:: $(INSTALL_TARGETS) | 363 install:: $(INSTALL_TARGETS) |
| 357 dist: $(INSTALL_TARGETS) | 364 dist: $(INSTALL_TARGETS) |
| OLD | NEW |