1 # Makefile.am - Rules for the built-in libvpx sources
3 # Copyright (C) 2014 Intel Corporation
4 # Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public
8 # License as published by the Free Software Foundation; either
9 # version 2 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Library General Public License for more details.
16 # You should have received a copy of the GNU Library General Public
17 # License along with this library; if not, write to the
18 # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
22 if USE_LOCAL_CODEC_PARSERS_VP8
23 lib_LTLIBRARIES += libgstcodecparsers_vpx.la
26 gst_vpx_source_c = gstlibvpx.c
27 gst_vpx_source_h = gstlibvpx.h
29 vpx_upstream = upstream
30 vpx_srcdir = $(srcdir)/$(vpx_upstream)
31 vpx_builddir = $(builddir)/$(vpx_upstream)
32 vpx_versions = libgstcodecparsers_vpx.vers
42 -Wl,$(vpx_builddir)/libvpx.a \
43 -Wl,--no-whole-archive \
44 -Wl,--version-script,$(srcdir)/$(vpx_versions) \
49 libgstcodecparsers_vpx_la_SOURCES = $(gst_vpx_source_c)
50 libgstcodecparsers_vpx_la_CFLAGS = $(vpx_cflags)
51 libgstcodecparsers_vpx_la_DEPENDENCIES = vpx.build
52 libgstcodecparsers_vpx_la_LINK = $(LINK) $(vpx_libs)
53 EXTRA_libgstcodecparsers_vpx_la_DEPENDENCIES = $(srcdir)/$(vpx_versions)
63 clean-local: vpx.clean
64 maintainer-clean-local: vpx.maintainer.clean
66 vpx.build: vpx.configure.stamp
67 @$(MAKE) -C $(vpx_builddir)
70 @[ -d $(vpx_builddir) ] && \
71 $(MAKE) -C $(vpx_builddir) clean || :
72 rm -f vpx.build.stamp vpx.configure.stamp
74 vpx.maintainer.clean: vpx.clean
75 rm -rf $(vpx_builddir)
78 @[ -d $(vpx_builddir) ] || mkdir $(vpx_builddir); \
79 cd $(vpx_builddir) ; \
80 test "$(VPX_DEBUG)" = "yes" && \
81 CONFIGURE_FLAGS="$$CONFIGURE_FLAGS --enable-debug" ; \
82 $(abs_srcdir)/$(vpx_upstream)/configure $$CONFIGURE_FLAGS \
86 --$(VP8_DECODER)-vp8-decoder \
87 --$(VP8_ENCODER)-vp8-encoder \
88 --$(VP9_DECODER)-vp9-decoder \
89 --$(VP9_ENCODER)-vp9-encoder \
90 --enable-runtime-cpu-detect \
94 --disable-unit-tests && \
98 $(gst_vpx_source_c): vpx.build
100 CLEANFILES = vpx.build.stamp
102 # Files for packaging
103 include $(srcdir)/sources.frag
106 $(vpx_srcdir)/AUTHORS \
107 $(vpx_srcdir)/CHANGELOG \
108 $(vpx_srcdir)/LICENSE \
109 $(vpx_srcdir)/PATENTS \
110 $(vpx_srcdir)/build/make/Makefile \
111 $(vpx_srcdir)/build/make/ads2gas.pl \
112 $(vpx_srcdir)/build/make/ads2gas_apple.pl \
113 $(vpx_srcdir)/build/make/configure.sh \
114 $(vpx_srcdir)/build/make/gen_asm_deps.sh \
115 $(vpx_srcdir)/build/make/obj_int_extract.c \
116 $(vpx_srcdir)/build/make/rtcd.sh \
117 $(vpx_srcdir)/build/make/version.sh \
118 $(vpx_srcdir)/configure \
119 $(vpx_srcdir)/vp8/common/rtcd_defs.sh \
120 $(vpx_srcdir)/vp9/common/vp9_rtcd_defs.sh \
121 $(vpx_srcdir)/vpx_scale/vpx_scale_rtcd.sh \
122 $(vpx_source_mak:%.mk=$(vpx_srcdir)/%.mk) \
123 $(vpx_source_c:%.c=$(vpx_srcdir)/%.c) \
124 $(vpx_source_h:%.h=$(vpx_srcdir)/%.h) \
129 $(gst_vpx_source_h) \
134 # Avoid implicit rule that tries to compile .asm.o to .asm
136 for f in $(vpx_source_asm); do \
137 mkdir -p $(distdir)/$(vpx_upstream)/$$(dirname $$f); \
138 cp -fpR $(vpx_srcdir)/$$f $(distdir)/$(vpx_upstream)/$$f; \
141 # Extra clean files so that maintainer-clean removes *everything*
142 MAINTAINERCLEANFILES = Makefile.in vpx.configure.stamp