+ touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+ dh_testdir
+
+ # Build only VLC, with the non-PIC libs
+ $(MAKE) include/vlc_symbols.h
+ cd modules && AM_MAKEFLAGS='plugin=no pic=no' $(MAKE)
+ $(MAKE) vlc
+
+ifneq ($(shell dpkg-architecture -qDEB_BUILD_GNU_CPU),i386)
+ # Hackety hackety hack
+ if test ! -d CVS; then \
+ cd extras/ffmpeg/libavcodec \
+ && $(MAKE) clean \
+ && rm -f Makefile.pic \
+ && sed 's/^CFLAGS *=/&-fPIC -DPIC /' <Makefile >Makefile.pic \
+ && $(MAKE) -f Makefile.pic \
+ && rm -f Makefile.pic; \
+ fi
+
+ # HACKETY HACKETY HACK
+ if test ! -d CVS; then \
+ cd extras/faad/libfaad \
+ && $(MAKE) clean \
+ && $(MAKE) AM_CFLAGS=-fPIC; \
+ fi
+
+ # HACK ME PLENTY MORE!!!
+ if test ! -d CVS; then \
+ cd extras/mpeg2dec/libmpeg2 \
+ && $(MAKE) clean \
+ && $(MAKE) LIBMPEG2_CFLAGS=-fPIC; \
+ fi
+endif
+
+ # Build all the rest, with the PIC libs
+ AM_MAKEFLAGS='builtin=no' $(MAKE)