]> git.sesse.net Git - vlc/blobdiff - Makefile.am
* modules/gui/wxwindows/*: enable popup menu support in the "dialogs provider".
[vlc] / Makefile.am
index 81e1042037a75e44ba9e5b91631beae6cbc344d5..c2f4359ac3d76f6611ffde0297b223ceeffcf39c 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 . share po m4
-DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib autotools
+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)
-       cd $(srcdir) && $(srcdir)/toolbox --update-includes
+       srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
 
 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
-       cd $(srcdir) && $(srcdir)/toolbox --update-includes
+       srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
 
 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
-       cd $(srcdir) && $(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 $(srcdir)/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,36 +346,44 @@ 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
        xres -o $@ $(srcdir)/share/vlc_beos.rsrc
        mimeset -f $@
-       rm -Rf $(srcdir)/locale ; mkdir $(srcdir)/locale
+       rm -Rf $(srcdir)/locale ; mkdir -p "$(srcdir)/locale"
        for i in $(ALL_LINGUAS); do \
-               mkdir -p $(srcdir)/locale/$${i}/LC_MESSAGES ; \
-               cp $(srcdir)/po/$${i}.gmo \
-                       $(srcdir)/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+         mkdir -p "$(srcdir)/locale/$${i}/LC_MESSAGES" ; \
+         cp "$(srcdir)/po/$${i}.gmo" \
+           "$(srcdir)/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
        done
 endif
 
 # Install the modules and the symlinks
 install-exec-local:
-       for i in dummy `$(srcdir)/vlc-config --target plugin` ; do if test "x$$i" != "xdummy" ; then \
-         $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`/" ; \
+       for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
+         echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`" ; \
+         $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`" ; \
+       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 dummy `$(srcdir)/vlc-config --target builtin` `$(srcdir)/vlc-config --target builtin pic` ; do if test "x$$i" != "xdummy" ; then \
-         $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc/" ; \
+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
-       for i in dummy $(ALIASES) ; do if test "x$$i" != "xdummy" ; then \
+endif
+       for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
          rm -f "$(DESTDIR)$(bindir)/$$i" && \
          ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
        fi ; done
@@ -388,28 +392,28 @@ 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
        $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS
        $(INSTALL) vlc $(srcdir)/VLC.app/Contents/MacOS/VLC
        $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/modules
-       for i in dummy `$(srcdir)/vlc-config --target plugin` ; do \
-         if test "x$$i" != "xdummy" ; then $(INSTALL) $(srcdir)/$$i$(LIBEXT) \
-           $(srcdir)/VLC.app/Contents/MacOS/modules/ ; \
+       for i in "" `$(VLC_CONFIG) --target plugin` ; do \
+         if test -n "$$i" ; then $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" \
+           "$(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
+         $(srcdir)/VLC.app/Contents/MacOS/share
        $(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 ; \
-               cp $(srcdir)/po/$${i}.gmo $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
-               mkdir -p $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
-               ln -sf ../English.lproj/InfoPlist.strings $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
-               ln -sf ../English.lproj/MainMenu.nib $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
-               ln -sf ../English.lproj/vlc.scriptTerminology $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
+         mkdir -p $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
+         cp $(srcdir)/po/$${i}.gmo $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+         mkdir -p $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
+         ln -sf ../English.lproj/InfoPlist.strings $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
+         ln -sf ../English.lproj/MainMenu.nib $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
+         ln -sf ../English.lproj/vlc.scriptTerminology $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
        done
        printf "APPLVLC#" >| $(srcdir)/VLC.app/Contents/PkgInfo
 endif
@@ -419,20 +423,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
@@ -443,48 +453,48 @@ builtins_pic: FORCE
 #
 # Check that tmp isn't in the way
 package-win32:
-       @if test -e $(srcdir)/tmp; then \
-               echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
-               false; \
+       @if test -e "$(srcdir)/tmp"; then \
+         echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
+         false; \
        else \
-               echo "OK."; mkdir $(srcdir)/tmp; \
+         echo "OK."; mkdir -p "$(srcdir)/tmp"; \
        fi
 # Create installation script
-       cp $(srcdir)/install-win32 $(srcdir)/tmp/nsi
+       cp "$(srcdir)/install-win32" "$(srcdir)/tmp/nsi"
 # Copy relevant files
-       cp $(srcdir)/vlc$(EXEEXT) $(srcdir)/tmp/ 
-       $(STRIP) $(srcdir)/tmp/vlc$(EXEEXT)
-       cp $(srcdir)/INSTALL.win32 $(srcdir)/tmp/INSTALL.txt
-       unix2dos $(srcdir)/tmp/INSTALL.txt
+       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
+         do cp "$(srcdir)/$$file" "$(srcdir)/tmp/$${file}.txt" ; \
+         unix2dos "$(srcdir)/tmp/$${file}.txt" ; done
 
-       mkdir $(srcdir)/tmp/plugins
-       for i in dummy `$(srcdir)/vlc-config --target plugin` ; do \
-         if test "x$$i" != "xdummy" ; then \
-           $(INSTALL) $(srcdir)/$$i$(LIBEXT) $(srcdir)/tmp/plugins/ ; \
+       mkdir -p "$(srcdir)/tmp/plugins"
+       for i in "" `$(VLC_CONFIG) --target plugin` ; do \
+         if test -n "$$i" ; then \
+           $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" "$(srcdir)/tmp/plugins/" ; \
          fi ; done
 
-       for i in dummy $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
-               do if test $$i != dummy ; then $(STRIP) $$i ; fi ; done
+       for i in "" $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
+         do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
 
-       mkdir $(srcdir)/tmp/share
+       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 ; \
-               cp $(srcdir)/po/$${i}.gmo \
-                  $(srcdir)/tmp/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+         mkdir -p "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES" ; \
+         cp "$(srcdir)/po/$${i}.gmo" \
+           "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
        done
 
        mkdir -p $(srcdir)/tmp/skins/default
        for i in $(srcdir)/share/skins/default/*.*; do \
-               cp $$i $(srcdir)/tmp/skins/default/ || true ; \
+         cp $$i $(srcdir)/tmp/skins/default/ || true ; \
        done
        for i in $(srcdir)/doc/skins/*.txt; do \
-               cp $$i $(srcdir)/tmp/skins/ || true ; \
+         cp $$i $(srcdir)/tmp/skins/ || true ; \
        done
 
 # Create package 
@@ -495,24 +505,24 @@ package-win32:
 package-beos:
 # Check that tmp isn't in the way
        @if test -e $(srcdir)/tmp; then \
-               echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
-               false; \
+         echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
+         false; \
        else \
-               echo "OK."; mkdir $(srcdir)/tmp; \
+         echo "OK."; mkdir $(srcdir)/tmp; \
        fi
 
 # Copy relevant files
        mkdir -p $(srcdir)/tmp/vlc
        cd $(srcdir) && \
-               cp vlc AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
+         cp vlc AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
 # We cannot use ${PLUGIN_FILES}, it looks like it is too long for the BeOS shell...
        if [ `find $(srcdir)/modules -name "lib*_plugin.so" | wc -l` -gt 0 ]; then \
-               mkdir -p $(srcdir)/tmp/vlc/plugins; \
-               find $(srcdir)/modules -name "lib*_plugin.so" | xargs -i{} cp {} $(srcdir)/tmp/vlc/plugins/; \
+         mkdir -p $(srcdir)/tmp/vlc/plugins; \
+         find $(srcdir)/modules -name "lib*_plugin.so" | xargs -i{} cp {} $(srcdir)/tmp/vlc/plugins/; \
        fi
        for i in $(ALL_LINGUAS); do \
-               mkdir -p $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES ; \
-               cp $(srcdir)/po/$${i}.gmo $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+         mkdir -p $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES ; \
+         cp $(srcdir)/po/$${i}.gmo $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
        done
        mkdir -p $(srcdir)/tmp/vlc/share
        cp $(srcdir)/share/*.rle $(srcdir)/tmp/vlc/share/
@@ -526,7 +536,7 @@ package-beos:
 # Create package without debug symbols
        strip $(srcdir)/tmp/vlc-${VERSION}/vlc
        if [ -d $(srcdir)/tmp/vlc-${VERSION}/plugins ]; then \
-               strip $(srcdir)/tmp/vlc-${VERSION}/plugins/lib*_plugin.so; \
+         strip $(srcdir)/tmp/vlc-${VERSION}/plugins/lib*_plugin.so; \
        fi
        xres -o $(srcdir)/tmp/vlc-${VERSION}/vlc $(srcdir)/share/vlc_beos.rsrc
        mimeset -f $(srcdir)/tmp/vlc-${VERSION}/* $(srcdir)/tmp/vlc-${VERSION}/*/*
@@ -538,16 +548,16 @@ package-beos:
 
 package-macosx:
 # Check that tmp isn't in the way
-       @if test -e $(srcdir)/tmp; then \
-               echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
-               false; \
+       @if test -e "$(srcdir)/tmp"; then \
+         echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
+         false; \
        else \
-               echo "OK."; mkdir $(srcdir)/tmp; \
+         echo "OK."; mkdir -p "$(srcdir)/tmp"; \
        fi
 
 # Copy relevant files 
-       cp -R $(srcdir)/VLC.app $(srcdir)/tmp/
-       cd $(srcdir) && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
+       cp -R "$(srcdir)/VLC.app" "$(srcdir)/tmp/"
+       cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
 
 # Create disk image 
        $(srcdir)/extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" $(srcdir)/tmp/* 
@@ -556,92 +566,20 @@ package-macosx:
        rm -Rf $(srcdir)/tmp
 
 ###############################################################################
-# Building the Mozilla plugin
+# Stamp rules
 ###############################################################################
-
-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)
-mozilla_libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
-                               $(CPPFLAGS_mozilla_EXTRA)
-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 mozilla/vlcintf.idl
-
-mozilla/vlcintf.h: Makefile mozilla/vlcintf.idl
-       $(XPIDL) -I/usr/share/idl/mozilla -m header \
-               -o mozilla/vlcintf 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
-###############################################################################
-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