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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 .PHONY: install | 111 .PHONY: install |
112 install:: | 112 install:: |
113 .PHONY: test | 113 .PHONY: test |
114 test:: | 114 test:: |
115 .PHONY: testdata | 115 .PHONY: testdata |
116 testdata:: | 116 testdata:: |
117 .PHONY: utiltest | 117 .PHONY: utiltest |
118 utiltest: | 118 utiltest: |
119 | 119 |
120 # Add compiler flags for intrinsic files | 120 # Add compiler flags for intrinsic files |
| 121 ifeq ($(TOOLCHAIN), x86-os2-gcc) |
| 122 STACKREALIGN=-mstackrealign |
| 123 else |
| 124 STACKREALIGN= |
| 125 endif |
| 126 |
121 $(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx | 127 $(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx |
122 $(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx | 128 $(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx |
123 $(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 | 129 $(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 $(STACKREALIGN) |
124 $(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 | 130 $(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 $(STACKREALIGN) |
125 $(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 | 131 $(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 $(STACKREALIGN) |
126 $(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 | 132 $(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 $(STACKREALIGN) |
127 $(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 | 133 $(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 $(STACKREALIGN) |
128 $(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 | 134 $(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 $(STACKREALIGN) |
129 $(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 | 135 $(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 $(STACKREALIGN) |
130 $(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 | 136 $(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 $(STACKREALIGN) |
131 $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx | 137 $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN) |
132 $(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx | 138 $(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN) |
133 $(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 | 139 $(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN) |
134 $(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 | 140 $(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN) |
135 | 141 |
136 $(BUILD_PFX)%.c.d: %.c | 142 $(BUILD_PFX)%.c.d: %.c |
137 $(if $(quiet),@echo " [DEP] $@") | 143 $(if $(quiet),@echo " [DEP] $@") |
138 $(qexec)mkdir -p $(dir $@) | 144 $(qexec)mkdir -p $(dir $@) |
139 $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@ | 145 $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@ |
140 | 146 |
141 $(BUILD_PFX)%.c.o: %.c | 147 $(BUILD_PFX)%.c.o: %.c |
142 $(if $(quiet),@echo " [CC] $@") | 148 $(if $(quiet),@echo " [CC] $@") |
143 $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< | 149 $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< |
144 | 150 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 .PRECIOUS: %.asm.s | 195 .PRECIOUS: %.asm.s |
190 $(BUILD_PFX)%.asm.s: %.asm | 196 $(BUILD_PFX)%.asm.s: %.asm |
191 $(if $(quiet),@echo " [ASM CONVERSION] $@") | 197 $(if $(quiet),@echo " [ASM CONVERSION] $@") |
192 $(qexec)mkdir -p $(dir $@) | 198 $(qexec)mkdir -p $(dir $@) |
193 $(qexec)$(ASM_CONVERSION) <$< >$@ | 199 $(qexec)$(ASM_CONVERSION) <$< >$@ |
194 | 200 |
195 # If we're in debug mode, pretend we don't have GNU strip, to fall back to | 201 # If we're in debug mode, pretend we don't have GNU strip, to fall back to |
196 # the copy implementation | 202 # the copy implementation |
197 HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP)) | 203 HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP)) |
198 ifeq ($(HAVE_GNU_STRIP),yes) | 204 ifeq ($(HAVE_GNU_STRIP),yes) |
199 # Older binutils strip global sybols not needed for relocation processing | 205 # Older binutils strip global symbols not needed for relocation processing |
200 # when given --strip-unneeded. Use nm and awk to identify globals and | 206 # when given --strip-unneeded. Using nm and awk to identify globals and |
201 # keep them. | 207 # keep them caused command line length issues under mingw and segfaults in |
| 208 # test_libvpx were observed under OS/2: simply use --strip-debug. |
202 %.a: %_g.a | 209 %.a: %_g.a |
203 $(if $(quiet),@echo " [STRIP] $@ < $<") | 210 $(if $(quiet),@echo " [STRIP] $@ < $<") |
204 » $(qexec)$(STRIP) --strip-unneeded \ | 211 » $(qexec)$(STRIP) --strip-debug \ |
205 `$(NM) $< | grep ' [A-TV-Z] ' | awk '{print "-K"$$3'}`\ | |
206 -o $@ $< | 212 -o $@ $< |
207 else | 213 else |
208 %.a: %_g.a | 214 %.a: %_g.a |
209 $(if $(quiet),@echo " [CP] $@ < $<") | 215 $(if $(quiet),@echo " [CP] $@ < $<") |
210 $(qexec)cp $< $@ | 216 $(qexec)cp $< $@ |
211 endif | 217 endif |
212 | 218 |
213 # | 219 # |
214 # Rule to extract assembly constants from C sources | 220 # Rule to extract assembly constants from C sources |
215 # | 221 # |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) | 448 ifeq ($(CONFIG_EXTERNAL_BUILD),yes) |
443 BUILD_TARGETS += .projects | 449 BUILD_TARGETS += .projects |
444 INSTALL_TARGETS += .install-projects | 450 INSTALL_TARGETS += .install-projects |
445 endif | 451 endif |
446 BUILD_TARGETS += .docs .libs .bins | 452 BUILD_TARGETS += .docs .libs .bins |
447 INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins | 453 INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins |
448 all: $(BUILD_TARGETS) | 454 all: $(BUILD_TARGETS) |
449 install:: $(INSTALL_TARGETS) | 455 install:: $(INSTALL_TARGETS) |
450 dist: $(INSTALL_TARGETS) | 456 dist: $(INSTALL_TARGETS) |
451 test:: | 457 test:: |
OLD | NEW |