]> git.sesse.net Git - vlc/blobdiff - Makefile.am
Added missing familiar-playlistb16x16.xpm
[vlc] / Makefile.am
index 0f4fda9ddb1a671790184005250ccd41c87ce07a..c67e693738794b946befab510b0780786a8b7a68 100644 (file)
@@ -7,14 +7,13 @@ NULL =
 # SUBDIRS stores the directories where a "make" is required when building
 # something. DIST_SUBDIRS stores the directories where nothing is built but
 # which have makefiles with distribution information.
-SUBDIRS = intl modules . share po m4
+SUBDIRS = intl modules . mozilla share po m4
 DIST_SUBDIRS = $(SUBDIRS) src debian doc ipkg lib autotools
 
 EXTRA_DIST = \
        HACKING \
        INSTALL.win32 \
        MAINTAINERS \
-       Modules.am \
        README.MacOSX.rtf \
        bootstrap \
        install-win32 \
@@ -23,7 +22,7 @@ EXTRA_DIST = \
        vlc-config.in.in \
        vlc.ebuild \
        vlc.spec \
-       vlc.spec.redhat \
+       vlc.spec.mdk \
        $(NULL)
 
 BUILT_SOURCES =
@@ -36,9 +35,6 @@ ACLOCAL_AMFLAGS = -I m4
 # because old versions of automake don't support them in configure.ac.
 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
 
-# Don't forget to build plugins
-all: plugins
-
 ###############################################################################
 # Headers
 ###############################################################################
@@ -70,7 +66,6 @@ HEADERS_include = \
        include/configuration.h \
        include/darwin_specific.h \
        include/codecs.h \
-       include/error.h \
        include/encoder.h \
        include/input_ext-dec.h \
        include/input_ext-intf.h \
@@ -93,6 +88,7 @@ HEADERS_include = \
        include/vlc_common.h \
        include/vlc_config.h \
        include/vlc_cpu.h \
+       include/vlc_error.h \
        include/vlc_interface.h \
        include/vlc_messages.h \
        include/vlc_objects.h \
@@ -110,13 +106,13 @@ HEADERS_include_built = \
        $(NULL)
 
 include/vlc_symbols.h: Makefile $(HEADERS_include)
-       $(srcdir)/toolbox --update-includes
+       srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
 
 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
-       $(srcdir)/toolbox --update-includes
+       srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
 
 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
-       $(srcdir)/toolbox --update-includes
+       srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
 
 # These dependencies are mandatory
 $(SOURCES): include/vlc_symbols.h
@@ -127,7 +123,7 @@ $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_in
 ###############################################################################
 
 intl/libintl.a: FORCE
-       cd $(top_builddir)/intl && $(MAKE)
+       cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
 
 if BUILD_INTL
 LIB_intl = intl/libintl.a
@@ -212,7 +208,7 @@ EXTRA_DIST += \
 
 dist-hook:
        mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
-       cd $(distdir) && $(srcdir)/toolbox --update-vc
+       cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
 
 ###############################################################################
 # Building libvlc
@@ -350,14 +346,14 @@ vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
 
 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
 # old automake-1.5 bug (automake/279).
-DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl) builtins
-
-vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
-       @rm -f $(srcdir)/vlc$(EXEEXT)
-       case `$(VLC_CONFIG) --linkage vlc builtin` in \
-         c++) $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
-         objc) $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
-         c|*) $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
+DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
+
+vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
+       @rm -f $(top_builddir)/vlc$(EXEEXT)
+       @case `$(VLC_CONFIG) --linkage vlc builtin` in \
+         c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
+         objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
+         c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
        esac
 
 if HAVE_BEOS
@@ -374,11 +370,19 @@ endif
 # Install the modules and the symlinks
 install-exec-local:
        for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
-         $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`" ; \
+         echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
+         $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
+       fi ; done
+       for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
+         echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
+         $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
        fi ; done
-       for i in "" `$(VLC_CONFIG) --target builtin` `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
+if BUILD_MOZILLA
+       for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
+         echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
          $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
        fi ; done
+endif
        for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
          rm -f "$(DESTDIR)$(bindir)/$$i" && \
          ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
@@ -388,7 +392,7 @@ if HAVE_DARWIN
 # Create the MacOS X app
 vlc_app_DATA = VLC.app
 vlc_appdir = $(bindir)
-VLC.app: vlc plugins
+VLC.app: vlc
        rm -Rf VLC.app
        cd $(srcdir)/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
        cp -r $(srcdir)/extras/MacOSX/build/vlc.bundle $(srcdir)/VLC.app
@@ -400,8 +404,11 @@ VLC.app: vlc plugins
            "$(srcdir)/VLC.app/Contents/MacOS/modules" ; \
          fi ; done
        $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share
-       $(INSTALL) -m 644 $(srcdir)/share/*.psf $(srcdir)/share/*.rle \
-         $(srcdir)/VLC.app/Contents/MacOS/share
+       $(INSTALL) -m 644 $(srcdir)/share/*.rle $(srcdir)/VLC.app/Contents/MacOS/share
+       $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share/http
+       $(INSTALL) -m 644 $(srcdir)/share/http/*.html $(srcdir)/VLC.app/Contents/MacOS/share/http
+       $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share/http/admin
+       $(INSTALL) -m 644 $(srcdir)/share/http/admin/*.html $(srcdir)/VLC.app/Contents/MacOS/share/http/admin
        $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/locale
        for i in $(ALL_LINGUAS); do \
          mkdir -p $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
@@ -419,20 +426,26 @@ DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
 noinst_share_vlc_win32_rcdir = $(libdir)
 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
-       $(WINDRES) --include-dir $(srcdir)/share -i $< -o $@
+       $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir)/share -i $< -o $@
 endif
 
 ###############################################################################
-# Building modules
+# Building specific source packages
 ###############################################################################
-plugins: FORCE
-       $(MAKE) `$(VLC_CONFIG) --target plugin` FORCE
 
-builtins: FORCE
-       $(MAKE) `$(VLC_CONFIG) --target builtin` FORCE
+dist-woody: distdir
+       $(remove_distdir_woody)
+       mv $(distdir) $(PACKAGE)-woody-$(VERSION)
+       $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
+       $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
+         | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
+       $(remove_distdir_woody)
 
-builtins_pic: FORCE
-       $(MAKE) `$(VLC_CONFIG) --target builtin pic` FORCE
+remove_distdir_woody = \
+  { test ! -d $(PACKAGE)-woody-$(VERSION) \
+    || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
+           -exec chmod u+w {} ';' \
+         && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
 
 ###############################################################################
 # Building architecture-specific binary packages
@@ -452,10 +465,8 @@ package-win32:
 # Create installation script
        cp "$(srcdir)/install-win32" "$(srcdir)/tmp/nsi"
 # Copy relevant files
-       cp "$(srcdir)/vlc$(EXEEXT)" "$(srcdir)/tmp/"
+       cp "$(top_builddir)/vlc$(EXEEXT)" "$(srcdir)/tmp/"
        $(STRIP) "$(srcdir)/tmp/vlc$(EXEEXT)"
-       cp "$(srcdir)/INSTALL.win32" "$(srcdir)/tmp/INSTALL.txt"
-       unix2dos "$(srcdir)/tmp/INSTALL.txt"
        for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
          do cp "$(srcdir)/$$file" "$(srcdir)/tmp/$${file}.txt" ; \
          unix2dos "$(srcdir)/tmp/$${file}.txt" ; done
@@ -469,9 +480,6 @@ package-win32:
        for i in "" $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
          do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
 
-       mkdir -p "$(srcdir)/tmp/share"
-       cp $(srcdir)/share/*.rle $(srcdir)/tmp/share/ ;
-
        mkdir $(srcdir)/tmp/locale
        for i in $(ALL_LINGUAS); do \
          mkdir -p "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES" ; \
@@ -487,6 +495,11 @@ package-win32:
          cp $$i $(srcdir)/tmp/skins/ || true ; \
        done
 
+       mkdir -p "$(srcdir)/tmp/http/admin"
+       cp $(srcdir)/share/http/*.html $(srcdir)/tmp/http/ ;
+       cp $(srcdir)/share/http/admin/*.html $(srcdir)/tmp/http/admin/ ;
+       cp $(srcdir)/share/http/admin/.access $(srcdir)/tmp/http/admin/ ;
+
 # Create package 
        wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} $(srcdir)/tmp/nsi
 # Clean up
@@ -556,92 +569,20 @@ package-macosx:
        rm -Rf $(srcdir)/tmp
 
 ###############################################################################
-# Building the Mozilla plugin
-###############################################################################
-
-noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
-
-MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
-
-EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl
-
-BUILT_SOURCES += $(BUILT_SOURCES_mozilla)
-
-SOURCES_mozilla = \
-       mozilla/vlcshell.cpp \
-       mozilla/vlcplugin.cpp \
-       mozilla/vlcplugin.h \
-       mozilla/vlcpeer.cpp \
-       mozilla/vlcpeer.h \
-       mozilla/support/classinfo.h \
-       $(SOURCES_mozilla_win32) \
-       $(SOURCES_mozilla_macosx) \
-       $(SOURCES_mozilla_unix) \
-       $(NULL)
-
-# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
-# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
-# under Win32 and npunix.c under Unix.
-if HAVE_WIN32
-LIBRARIES_mozilla = mozilla/npvlc$(LIBEXT)
-SOURCES_mozilla_win32 = mozilla/support/npwin.cpp
-CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
-else
-if HAVE_DARWIN
-# We don't define LIBRARIES_mozilla because we'll be using project builder
-SOURCES_mozilla_macosx = mozilla/support/npmac.cpp
-else
-LIBRARIES_mozilla = mozilla/libvlcplugin$(LIBEXT)
-SOURCES_mozilla_unix = mozilla/support/npunix.c
-endif
-endif
-
-if BUILD_MOZILLA
-if UNTRUE
-noinst_LIBRARIES_mozilla = mozilla/libplugin.a
-endif
-
-mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
-mozilla_libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
-                             $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
-                               $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(DATA_npvlc_rc) builtins_pic
-
-BUILT_SOURCES_mozilla = mozilla/vlcintf.h
-$(SOURCES_mozilla): mozilla/vlcintf.h
-
-mozilla_plugin_DATA = $(LIBRARIES_mozilla)
-mozilla_plugindir = $(libdir)/mozilla/plugins
-$(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \
-                      $(mozilla_libplugin_a_DEPENDENCIES)
-       $(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
-         lib/libvlc_pic.a -shared \
-         `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
-
-mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
-mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
-mozilla/vlcintf.xpt: Makefile mozilla/vlcintf.idl
-       $(XPIDL) -I/usr/share/idl/mozilla -m typelib \
-         -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-mozilla/vlcintf.h: Makefile mozilla/vlcintf.idl
-       $(XPIDL) -I/usr/share/idl/mozilla -m header \
-         -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-if HAVE_WIN32
-DATA_npvlc_rc = $(noinst_mozilla_npvlc_rc_DATA)
-noinst_mozilla_npvlc_rc_DATA = mozilla/npvlc_rc.$(OBJEXT)
-noinst_mozilla_npvlc_rcdir = $(libdir)
-mozilla/npvlc_rc.$(OBJEXT): mozilla/npvlc_rc.rc
-       $(WINDRES) --include-dir $(srcdir)/mozilla -i $< -o $@
-endif
-endif
-
-###############################################################################
-# Modules
+# Stamp rules
 ###############################################################################
-include Modules.am
+clean: clean-stamp
+clean-stamp:
+       rm -f stamp-builtin
+
+stamp-builtin: FORCE
+       @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
+         if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
+           rm -f $@; \
+           break; \
+         fi; \
+       done
+       @if test ! -f $@; then printf "" > $@; fi
 
 ###############################################################################
 # Force rule