]> git.sesse.net Git - vlc/blobdiff - debian/rules
* Updated the informal message to report the ip and port the http intf was
[vlc] / debian / rules
index 3a034bd03e8534d367237d8debb7b31013735da5..87073c0d83e71be95d798bbbf6a61cccfc6fe50f 100755 (executable)
@@ -48,6 +48,7 @@ CONFIG_FLAGS += \
 # These ones are currently shipped with VLC
 CONFIG_FLAGS += --enable-ffmpeg --with-ffmpeg-tree=extras/ffmpeg
 CONFIG_FLAGS += --enable-faad --with-faad-tree=extras/faad
+CONFIG_FLAGS += --enable-libmpeg2 --with-libmpeg2-tree=extras/mpeg2dec
 
 # Glide is only for x86
 ifeq ($(DEB_BUILD_ARCH),i386)
@@ -87,7 +88,7 @@ build-stamp:
                cd extras/ffmpeg \
                && ./configure \
                && cd libavcodec \
-               && make; \
+               && $(MAKE); \
        fi
 
        # Check that we have an faad tree in here (can be a symlink)
@@ -101,12 +102,58 @@ build-stamp:
                && touch `find . -name Makefile.in` \
                && ./configure --disable-shared \
                && cd libfaad \
-               && make; \
+               && $(MAKE); \
        fi
 
-       # Configure VLC and build it
+       # Check that we have an mpeg2dec tree in here (can be a symlink)
+       test -d extras/mpeg2dec
+       if test ! -d CVS; then \
+               cd extras/mpeg2dec \
+               && touch configure.in \
+               && touch aclocal.m4 \
+               && touch acinclude.m4 \
+               && touch configure \
+               && touch `find . -name config.h.in` \
+               && touch `find . -name Makefile.in` \
+               && ./configure --disable-shared \
+               && cd libmpeg2 \
+               && $(MAKE); \
+       fi
+
+       # Configure VLC
        ./configure --mandir=$${prefix}/share/man \
                --infodir=$${prefix}/share/info $(CONFIG_FLAGS)
+
+       # Build only VLC, with the non-PIC libs
+       $(MAKE) vlc
+
+ifneq ($(DEB_BUILD_ARCH),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
        $(MAKE)
 
        touch build-stamp
@@ -118,10 +165,16 @@ clean:
 
        # Check that we have an ffmpeg tree in here (can be a symlink)
        test -d extras/ffmpeg
-       -if test ! -d CVS; then cd extras/ffmpeg && make distclean; fi
+       -if test ! -d CVS; then cd extras/ffmpeg && $(MAKE) distclean; fi
        # Check that we have an faad tree in here (can be a symlink)
        test -d extras/faad
-       -if test ! -d CVS; then cd extras/faad && make distclean; fi
+       -if test ! -d CVS; then cd extras/faad && $(MAKE) distclean; fi
+       # Check that we have an mpeg2dec tree in here (can be a symlink)
+       test -d extras/mpeg2dec
+       -if test ! -d CVS; then cd extras/mpeg2dec && $(MAKE) distclean; fi
+
+       # Remove spurious autotools stuff
+       rm -f config.log confdefs.h
 
        -$(MAKE) distclean