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 |
11 | 11 |
12 # ARM assembly files are written in RVCT-style. We use some make magic to | 12 # ARM assembly files are written in RVCT-style. We use some make magic to |
13 # filter those files to allow GCC compilation | 13 # filter those files to allow GCC compilation |
14 ifeq ($(ARCH_ARM),yes) | 14 ifeq ($(ARCH_ARM),yes) |
15 ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.s,.asm) | 15 ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.s,.asm) |
16 else | 16 else |
17 ASM:=.asm | 17 ASM:=.asm |
18 endif | 18 endif |
19 | 19 |
20 # | 20 # |
21 # Calculate platform- and compiler-specific offsets for hand coded assembly | |
22 # | |
23 ifeq ($(filter icc gcc,$(TGT_CC)), $(TGT_CC)) | |
24 OFFSET_PATTERN:='^[a-zA-Z0-9_]* EQU' | |
25 define asm_offsets_template | |
26 $$(BUILD_PFX)$(1): $$(BUILD_PFX)$(2).S | |
27 @echo " [CREATE] $$@" | |
28 $$(qexec)LC_ALL=C grep $$(OFFSET_PATTERN) $$< | tr -d '$$$$\#' $$(ADS2GA
S) > $$@ | |
29 $$(BUILD_PFX)$(2).S: $(2) | |
30 CLEAN-OBJS += $$(BUILD_PFX)$(1) $(2).S | |
31 endef | |
32 else | |
33 ifeq ($(filter rvct,$(TGT_CC)), $(TGT_CC)) | |
34 define asm_offsets_template | |
35 $$(BUILD_PFX)$(1): obj_int_extract | |
36 $$(BUILD_PFX)$(1): $$(BUILD_PFX)$(2).o | |
37 @echo " [CREATE] $$@" | |
38 $$(qexec)./obj_int_extract rvds $$< $$(ADS2GAS) > $$@ | |
39 OBJS-yes += $$(BUILD_PFX)$(2).o | |
40 CLEAN-OBJS += $$(BUILD_PFX)$(1) | |
41 $$(filter %$$(ASM).o,$$(OBJS-yes)): $$(BUILD_PFX)$(1) | |
42 endef | |
43 endif # rvct | |
44 endif # !gcc | |
45 | |
46 # | |
47 # Rule to generate runtime cpu detection files | 21 # Rule to generate runtime cpu detection files |
48 # | 22 # |
49 define rtcd_h_template | 23 define rtcd_h_template |
50 $$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2) | 24 $$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2) |
51 @echo " [CREATE] $$@" | 25 @echo " [CREATE] $$@" |
52 $$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \ | 26 $$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.pl --arch=$$(TGT_ISA) \ |
53 --sym=$(1) \ | 27 --sym=$(1) \ |
54 --config=$$(CONFIG_DIR)$$(target)$$(if $$(FAT_ARCHS),,-$$(TOOLCHAIN)).
mk \ | 28 --config=$$(CONFIG_DIR)$$(target)$$(if $$(FAT_ARCHS),,-$$(TOOLCHAIN)).
mk \ |
55 $$(RTCD_OPTIONS) $$^ > $$@ | 29 $$(RTCD_OPTIONS) $$^ > $$@ |
56 CLEAN-OBJS += $$(BUILD_PFX)$(1).h | 30 CLEAN-OBJS += $$(BUILD_PFX)$(1).h |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 # based build systems. | 179 # based build systems. |
206 libvpx_srcs.txt: | 180 libvpx_srcs.txt: |
207 @echo " [CREATE] $@" | 181 @echo " [CREATE] $@" |
208 @echo $(CODEC_SRCS) | xargs -n1 echo | sort -u > $@ | 182 @echo $(CODEC_SRCS) | xargs -n1 echo | sort -u > $@ |
209 CLEAN-OBJS += libvpx_srcs.txt | 183 CLEAN-OBJS += libvpx_srcs.txt |
210 | 184 |
211 | 185 |
212 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | 186 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
213 ifeq ($(CONFIG_MSVS),yes) | 187 ifeq ($(CONFIG_MSVS),yes) |
214 | 188 |
215 obj_int_extract.bat: $(SRC_PATH_BARE)/build/$(MSVS_ARCH_DIR)/obj_int_extract.bat | |
216 @cp $^ $@ | |
217 | |
218 obj_int_extract.$(VCPROJ_SFX): obj_int_extract.bat | |
219 obj_int_extract.$(VCPROJ_SFX): $(SRC_PATH_BARE)/build/make/obj_int_extract.c | |
220 @echo " [CREATE] $@" | |
221 $(qexec)$(GEN_VCPROJ) \ | |
222 --exe \ | |
223 --target=$(TOOLCHAIN) \ | |
224 --name=obj_int_extract \ | |
225 --ver=$(CONFIG_VS_VERSION) \ | |
226 --proj-guid=E1360C65-D375-4335-8057-7ED99CC3F9B2 \ | |
227 --src-path-bare="$(SRC_PATH_BARE)" \ | |
228 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ | |
229 --out=$@ $^ \ | |
230 -I. \ | |
231 -I"$(SRC_PATH_BARE)" \ | |
232 | |
233 PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.$(VCPROJ_SFX) | |
234 | |
235 vpx.def: $(call enabled,CODEC_EXPORTS) | 189 vpx.def: $(call enabled,CODEC_EXPORTS) |
236 @echo " [CREATE] $@" | 190 @echo " [CREATE] $@" |
237 $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ | 191 $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ |
238 --name=vpx\ | 192 --name=vpx\ |
239 --out=$@ $^ | 193 --out=$@ $^ |
240 CLEAN-OBJS += vpx.def | 194 CLEAN-OBJS += vpx.def |
241 | 195 |
242 # Assembly files that are included, but don't define symbols themselves. | 196 # Assembly files that are included, but don't define symbols themselves. |
243 # Filtered out to avoid Visual Studio build warnings. | 197 # Filtered out to avoid Visual Studio build warnings. |
244 ASM_INCLUDES := \ | 198 ASM_INCLUDES := \ |
245 third_party/x86inc/x86inc.asm \ | 199 third_party/x86inc/x86inc.asm \ |
246 vpx_config.asm \ | 200 vpx_config.asm \ |
247 vpx_ports/x86_abi_support.asm \ | 201 vpx_ports/x86_abi_support.asm \ |
248 | 202 |
249 vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def obj_int_extract.$(VCPROJ_SFX) | 203 vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def |
250 @echo " [CREATE] $@" | 204 @echo " [CREATE] $@" |
251 $(qexec)$(GEN_VCPROJ) \ | 205 $(qexec)$(GEN_VCPROJ) \ |
252 $(if $(CONFIG_SHARED),--dll,--lib) \ | 206 $(if $(CONFIG_SHARED),--dll,--lib) \ |
253 --target=$(TOOLCHAIN) \ | 207 --target=$(TOOLCHAIN) \ |
254 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ | 208 $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ |
255 --name=vpx \ | 209 --name=vpx \ |
256 --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ | 210 --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ |
257 --module-def=vpx.def \ | 211 --module-def=vpx.def \ |
258 --ver=$(CONFIG_VS_VERSION) \ | 212 --ver=$(CONFIG_VS_VERSION) \ |
259 --src-path-bare="$(SRC_PATH_BARE)" \ | 213 --src-path-bare="$(SRC_PATH_BARE)" \ |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) | 324 ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) |
371 $(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h | 325 $(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h |
372 @echo " [CREATE] $@" | 326 @echo " [CREATE] $@" |
373 @egrep "#define [A-Z0-9_]+ [01]" $< \ | 327 @egrep "#define [A-Z0-9_]+ [01]" $< \ |
374 | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ | 328 | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ |
375 @echo " END" $(ADS2GAS) >> $@ | 329 @echo " END" $(ADS2GAS) >> $@ |
376 CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm | 330 CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm |
377 endif | 331 endif |
378 | 332 |
379 # | 333 # |
380 # Add assembler dependencies for configuration and offsets | 334 # Add assembler dependencies for configuration. |
381 # | 335 # |
382 $(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm | 336 $(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm |
383 $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm | 337 $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm |
384 | 338 |
385 | 339 |
386 $(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vp
x_version.h) | 340 $(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vp
x_version.h) |
387 CLEAN-OBJS += $(BUILD_PFX)vpx_version.h | 341 CLEAN-OBJS += $(BUILD_PFX)vpx_version.h |
388 | 342 |
389 | 343 |
390 ## | 344 ## |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release | 534 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release |
581 endif | 535 endif |
582 exampletest: examples testdata | 536 exampletest: examples testdata |
583 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ | 537 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ |
584 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ | 538 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ |
585 --bin-path $(EXAMPLES_BIN_PATH) | 539 --bin-path $(EXAMPLES_BIN_PATH) |
586 else | 540 else |
587 exampletest: | 541 exampletest: |
588 @echo Unit tests must be enabled to make the exampletest target. | 542 @echo Unit tests must be enabled to make the exampletest target. |
589 endif | 543 endif |
OLD | NEW |