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

Side by Side Diff: source/libvpx/libs.mk

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « source/libvpx/examples/vpx_temporal_svc_encoder.c ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 LIBVPX_OBJS=$(call objs,$(CODEC_SRCS)) 221 LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
222 OBJS-yes += $(LIBVPX_OBJS) 222 OBJS-yes += $(LIBVPX_OBJS)
223 LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a 223 LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
224 $(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS) 224 $(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
225 225
226 SO_VERSION_MAJOR := 2 226 SO_VERSION_MAJOR := 2
227 SO_VERSION_MINOR := 0 227 SO_VERSION_MINOR := 0
228 SO_VERSION_PATCH := 0 228 SO_VERSION_PATCH := 0
229 ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS)) 229 ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
230 LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib 230 LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib
231 SHARED_LIB_SUF := .dylib
231 EXPORT_FILE := libvpx.syms 232 EXPORT_FILE := libvpx.syms
232 LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ 233 LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
233 libvpx.dylib ) 234 libvpx.dylib )
234 else 235 else
236 ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
237 LIBVPX_SO := libvpx$(SO_VERSION_MAJOR).dll
238 SHARED_LIB_SUF := _dll.a
239 EXPORT_FILE := libvpx.def
240 LIBVPX_SO_SYMLINKS :=
241 LIBVPX_SO_IMPLIB := libvpx_dll.a
242 else
235 LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(S O_VERSION_PATCH) 243 LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(S O_VERSION_PATCH)
244 SHARED_LIB_SUF := .so
236 EXPORT_FILE := libvpx.ver 245 EXPORT_FILE := libvpx.ver
237 LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \ 246 LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
238 libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \ 247 libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \
239 libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR)) 248 libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
240 endif 249 endif
250 endif
241 251
242 LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\ 252 LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
243 $(notdir $(LIBVPX_SO_SYMLINKS)) 253 $(notdir $(LIBVPX_SO_SYMLINKS)) \
254 $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMP LIB))
244 $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE) 255 $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
245 $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm 256 $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
246 $(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR) 257 $(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
247 $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE) 258 $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
248 259
249 libvpx.ver: $(call enabled,CODEC_EXPORTS) 260 libvpx.ver: $(call enabled,CODEC_EXPORTS)
250 @echo " [CREATE] $@" 261 @echo " [CREATE] $@"
251 $(qexec)echo "{ global:" > $@ 262 $(qexec)echo "{ global:" > $@
252 $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done 263 $(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done
253 $(qexec)echo "local: *; };" >> $@ 264 $(qexec)echo "local: *; };" >> $@
254 CLEAN-OBJS += libvpx.ver 265 CLEAN-OBJS += libvpx.ver
255 266
256 libvpx.syms: $(call enabled,CODEC_EXPORTS) 267 libvpx.syms: $(call enabled,CODEC_EXPORTS)
257 @echo " [CREATE] $@" 268 @echo " [CREATE] $@"
258 $(qexec)awk '{print "_"$$2}' $^ >$@ 269 $(qexec)awk '{print "_"$$2}' $^ >$@
259 CLEAN-OBJS += libvpx.syms 270 CLEAN-OBJS += libvpx.syms
260 271
272 libvpx.def: $(call enabled,CODEC_EXPORTS)
273 @echo " [CREATE] $@"
274 $(qexec)echo LIBRARY $(LIBVPX_SO:.dll=) INITINSTANCE TERMINSTANCE > $@
275 $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@
276 $(qexec)echo "EXPORTS" >> $@
277 $(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@
278 CLEAN-OBJS += libvpx.def
279
280 libvpx_dll.a: $(LIBVPX_SO)
281 @echo " [IMPLIB] $@"
282 $(qexec)emximp -o $@ $<
283 CLEAN-OBJS += libvpx_dll.a
284
261 define libvpx_symlink_template 285 define libvpx_symlink_template
262 $(1): $(2) 286 $(1): $(2)
263 @echo " [LN] $(2) $$@" 287 @echo " [LN] $(2) $$@"
264 $(qexec)mkdir -p $$(dir $$@) 288 $(qexec)mkdir -p $$(dir $$@)
265 $(qexec)ln -sf $(2) $$@ 289 $(qexec)ln -sf $(2) $$@
266 endef 290 endef
267 291
268 $(eval $(call libvpx_symlink_template,\ 292 $(eval $(call libvpx_symlink_template,\
269 $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\ 293 $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\
270 $(BUILD_PFX)$(LIBVPX_SO))) 294 $(BUILD_PFX)$(LIBVPX_SO)))
271 $(eval $(call libvpx_symlink_template,\ 295 $(eval $(call libvpx_symlink_template,\
272 $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\ 296 $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
273 $(LIBVPX_SO))) 297 $(LIBVPX_SO)))
274 298
275 299
276 INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS) 300 INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
277 INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO) 301 INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
302 INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBVPX_SO_IMPLIB),$(LIBSUBDIR)/$(LIBVPX_ SO_IMPLIB))
278 303
279 304
280 LIBS-yes += vpx.pc 305 LIBS-yes += vpx.pc
281 vpx.pc: config.mk libs.mk 306 vpx.pc: config.mk libs.mk
282 @echo " [CREATE] $@" 307 @echo " [CREATE] $@"
283 $(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@ 308 $(qexec)echo '# pkg-config file from libvpx $(VERSION_STRING)' > $@
284 $(qexec)echo 'prefix=$(PREFIX)' >> $@ 309 $(qexec)echo 'prefix=$(PREFIX)' >> $@
285 $(qexec)echo 'exec_prefix=$${prefix}' >> $@ 310 $(qexec)echo 'exec_prefix=$${prefix}' >> $@
286 $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ 311 $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@
287 $(qexec)echo 'includedir=$${prefix}/include' >> $@ 312 $(qexec)echo 'includedir=$${prefix}/include' >> $@
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 OBJS-yes += $(GTEST_OBJS) 472 OBJS-yes += $(GTEST_OBJS)
448 LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a 473 LIBS-yes += $(BUILD_PFX)libgtest.a $(BUILD_PFX)libgtest_g.a
449 $(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS) 474 $(BUILD_PFX)libgtest_g.a: $(GTEST_OBJS)
450 475
451 LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS))) 476 LIBVPX_TEST_OBJS=$(sort $(call objs,$(LIBVPX_TEST_SRCS)))
452 $(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES) 477 $(LIBVPX_TEST_OBJS) $(LIBVPX_TEST_OBJS:.o=.d): CXXFLAGS += $(GTEST_INCLUDES)
453 OBJS-yes += $(LIBVPX_TEST_OBJS) 478 OBJS-yes += $(LIBVPX_TEST_OBJS)
454 BINS-yes += $(LIBVPX_TEST_BIN) 479 BINS-yes += $(LIBVPX_TEST_BIN)
455 480
456 CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) 481 CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
457 CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.so,.a) 482 CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
458 TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a 483 TEST_LIBS := lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a
459 $(LIBVPX_TEST_BIN): $(TEST_LIBS) 484 $(LIBVPX_TEST_BIN): $(TEST_LIBS)
460 $(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \ 485 $(eval $(call linkerxx_template,$(LIBVPX_TEST_BIN), \
461 $(LIBVPX_TEST_OBJS) \ 486 $(LIBVPX_TEST_OBJS) \
462 -L. -lvpx -lgtest $(extralibs) -lm)) 487 -L. -lvpx -lgtest $(extralibs) -lm))
463 488
464 TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS))) 489 TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
465 ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) 490 ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),)
466 $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $ (GTEST_INCLUDES) 491 $(TEST_INTRA_PRED_SPEED_OBJS) $(TEST_INTRA_PRED_SPEED_OBJS:.o=.d): CXXFLAGS += $ (GTEST_INCLUDES)
467 OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS) 492 OBJS-yes += $(TEST_INTRA_PRED_SPEED_OBJS)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release 584 EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
560 endif 585 endif
561 exampletest: examples testdata 586 exampletest: examples testdata
562 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \ 587 $(qexec)$(SRC_PATH_BARE)/test/examples.sh \
563 --test-data-path $(LIBVPX_TEST_DATA_PATH) \ 588 --test-data-path $(LIBVPX_TEST_DATA_PATH) \
564 --bin-path $(EXAMPLES_BIN_PATH) 589 --bin-path $(EXAMPLES_BIN_PATH)
565 else 590 else
566 exampletest: 591 exampletest:
567 @echo Unit tests must be enabled to make the exampletest target. 592 @echo Unit tests must be enabled to make the exampletest target.
568 endif 593 endif
OLDNEW
« no previous file with comments | « source/libvpx/examples/vpx_temporal_svc_encoder.c ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698