]> git.sesse.net Git - vlc/blobdiff - Makefile.am
* Makefile.am: fixed 'make package-beos'
[vlc] / Makefile.am
index e784d0d2d02e70caa52e6f24a5bf9d7a14f9dcd3..0abbc846fa73a1273c8691b0b1f5ed851935f5fd 100644 (file)
@@ -2,16 +2,28 @@
 # Automake targets and declarations
 ###############################################################################
 
+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 = po intl m4 share
-DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib
+DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib autotools
+
+EXTRA_DIST = \
+       HACKING \
+       INSTALL.win32 \
+       MAINTAINERS \
+       Modules.am \
+       README.MacOSX.rtf \
+       bootstrap \
+       configure.ac.in \
+       install-win32 \
+       src/extras/COPYING \
+       toolbox \
+       vlc.spec \
+       $(NULL)
 
-EXTRA_DIST = BUGS FAQ HACKING MAINTAINERS STATUS src/extras/COPYING \
-             INSTALL.win32 README.MacOSX.rtf vlc.spec install-win32 \
-             Modules.am macosx-dmg \
-             configure.ac.in mkinstalldirs bootstrap
 MOSTLYCLEANFILES =
 BUILT_SOURCES =
 SUFFIXES = 
@@ -31,7 +43,7 @@ ACLOCAL_AMFLAGS = -I m4
 
 # XXX: these flags could be set in configure.ac.in, but we set them here
 # because old versions of automake don't support them in configure.ac.
-AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
+AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
 
 ###############################################################################
 # Compilation flags for debug mode, profiling, and others
@@ -116,6 +128,9 @@ CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
 endif
 endif
 endif
+else
+# !OPTIM
+CFLAGS_optim = @CFLAGS_NOOPTIM@
 endif
 
 CPPFLAGS_default += $(CPPFLAGS_release) \
@@ -159,12 +174,14 @@ HEADERS_include = \
        include/darwin_specific.h \
        include/codecs.h \
        include/error.h \
+       include/encoder.h \
        include/input_ext-dec.h \
        include/input_ext-intf.h \
        include/input_ext-plugins.h \
        include/interface.h \
        include/intf_eject.h \
        include/iso_lang.h \
+       include/httpd.h \
        include/main.h \
        include/mmx.h \
        include/modules.h \
@@ -186,7 +203,9 @@ HEADERS_include = \
        include/vlc_playlist.h \
        include/vlc_threads.h \
        include/vlc_threads_funcs.h \
+       include/vout_synchro.h \
        include/win32_specific.h \
+       include/osd.h \
        $(NULL)
 
 HEADERS_include_built = \
@@ -194,39 +213,13 @@ HEADERS_include_built = \
        $(NULL)
 
 include/vlc_symbols.h: Makefile $(HEADERS_include)
-       rm -f $@.in
-       echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> $@.in
-       echo 'struct module_symbols_t {' >> $@.in
-       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    \1 (* \2_inner) \3;/' >> $@.in
-       echo '};' >> $@.in
-       echo '#ifdef __PLUGIN__' >> $@.in
-       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/#   define \2 p_symbols->\2_inner/' >> $@.in
-       echo '#endif /* __PLUGIN__ */' >> $@.in
-       mv -f $@.in $@
+       ./toolbox --update-includes $(BUILTINS)
 
 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
-       rm -f $@.tmp && cp $@.in $@.tmp
-       sed -e 's#.*\$[I][d]:.*# * Automatically generated from '$@'.in by bootstrap#' < $@.in > $@.tmp
-       echo '#define STORE_SYMBOLS( p_symbols ) \' >> $@.tmp
-       cat $(HEADERS_include) | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    (p_symbols)->\2_inner = \2; \\/' >> $@.tmp
-       echo '' >> $@.tmp
-       mv -f $@.tmp $@
+       ./toolbox --update-includes $(BUILTINS)
 
 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
-       rm -f $@.tmp && cp $@.in $@.tmp
-if HAVE_BUILTINS
-       for i in $(BUILTINS) ; do echo "int vlc_entry__"`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"( module_t* );" >>$@.tmp; done
-       echo "" >> $@.tmp
-endif
-       echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@.tmp
-       echo "    do \\" >> $@.tmp
-       echo "    { \\" >> $@.tmp
-if HAVE_BUILTINS
-       for i in $(BUILTINS) ; do echo "        ALLOCATE_BUILTIN("`echo $$i | sed -e 'y@/@_@' -e 's@\..*@@'`"); \\" >> $@.tmp ; done
-endif
-       echo "    } while( 0 );" >> $@.tmp
-       echo "" >> $@.tmp
-       mv -f $@.tmp $@
+       ./toolbox --update-includes $(BUILTINS)
 
 # These dependencies are mandatory
 $(SOURCES): include/vlc_symbols.h
@@ -252,6 +245,7 @@ EXTRA_DIST += \
        extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
        extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
        extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
+       extras/MacOSX/Resources/English.lproj/vlc.scriptTerminology \
        extras/MacOSX/Resources/divx.icns \
        extras/MacOSX/Resources/generic.icns \
        extras/MacOSX/Resources/mpeg.icns \
@@ -259,89 +253,52 @@ EXTRA_DIST += \
        extras/MacOSX/Resources/mpeg2.icns \
        extras/MacOSX/Resources/mpeg4.icns \
        extras/MacOSX/Resources/vlc.icns \
+       extras/MacOSX/Resources/back.png \
+       extras/MacOSX/Resources/begin.png \
+       extras/MacOSX/Resources/end.png \
+       extras/MacOSX/Resources/forw.png \
+       extras/MacOSX/Resources/list.png \
        extras/MacOSX/Resources/pause.png \
        extras/MacOSX/Resources/play.png \
+       extras/MacOSX/Resources/prefs.png \
+       extras/MacOSX/Resources/slow.png \
        extras/MacOSX/Resources/stop.png \
-       extras/MacOSX/Resources/stepf.png \
-       extras/MacOSX/Resources/stepr.png \
+       extras/MacOSX/Resources/vlc_hg.png \
+       extras/MacOSX/Resources/about_bg.png \
+       extras/MacOSX/Resources/vlc.scriptSuite \
+       extras/MacOSX/Resources/README \
        extras/MacOSX/vlc.pbproj/project.pbxproj \
+       extras/MacOSX/macosx-dmg \
        $(NULL)
 
 ###############################################################################
-# MS Visual Studio project
+# MS Visual Studio and eMbedded Visual Studio projects
 ###############################################################################
 
 EXTRA_DIST += \
-       msvc/vlc.dsp \
        msvc/vlc.dsw \
+       msvc/libvlc.dsp.in \
+       msvc/plugins.dsp.in \
        msvc/vlc.dsp.in \
-       msvc/vlc.dsp.out \
-       msvc/config.h \
+       msvc/config.h.in \
        msvc/modules_builtin_msvc.h \
+       evc/vlc.vcw \
+       evc/libvlc.vcp.in \
+       evc/vlc.vcp.in \
+       evc/plugins.vcp.in \
+       evc/vlc.c \
+       evc/config.h.in \
+       evc/modules_builtin_evc.h \
        $(NULL)
 
-#
-# rule to rebuild vlc.dsp - not for the faint of heart
-#
-update-vlc.dsp: FORCE
-#      Top of the project file
-       cat msvc/vlc.dsp.in >| msvc/vlc.dsp
-#      The source files
-       echo '# Begin Group "Source Files"\r' >> msvc/vlc.dsp
-       echo '# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r' >> msvc/vlc.dsp
-       echo '# Begin Group "vlc"\r' >> msvc/vlc.dsp
-       for file in $(vlc_SOURCES) ; do \
-               echo '# Begin Source File\r' >> msvc/vlc.dsp ; \
-               echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&"\r%' >> msvc/vlc.dsp ; \
-               echo '# End Source File\r' >> msvc/vlc.dsp ; \
-       done ; \
-       echo '# End Group\r' >> msvc/vlc.dsp
-       echo '# Begin Group "libvlc"\r' >> msvc/vlc.dsp
-       for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep -v "/.*/"` ; do \
-               echo '# Begin Source File\r' >> msvc/vlc.dsp ; \
-               echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&"\r%' >> msvc/vlc.dsp ; \
-               echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r' >> msvc/vlc.dsp ; \
-               echo '# End Source File\r' >> msvc/vlc.dsp ; \
-       done ; \
-       for subdir in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq` ; do \
-               echo '# Begin Group "'$$subdir'"\r' >> msvc/vlc.dsp ; \
-               for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/$$subdir/"` ; do \
-                       echo '# Begin Source File\r' >> msvc/vlc.dsp ; \
-                       echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&"\r%' >> msvc/vlc.dsp ; \
-                       echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\"\r' >> msvc/vlc.dsp ; \
-                       echo '!IF "$$(CFG)" == "vlc - Win32 Release"\r' >> msvc/vlc.dsp ; \
-                       echo '# PROP Intermediate_Dir "Release\'$$subdir'"\r' >> msvc/vlc.dsp ; \
-                       echo '# PROP Output_Dir "Release\'$$subdir'"\r' >> msvc/vlc.dsp ; \
-                       echo '!ELSEIF "$$(CFG)" == "vlc - Win32 Debug"\r' >> msvc/vlc.dsp ; \
-                       echo '# PROP Intermediate_Dir "Debug\'$$subdir'"\r' >> msvc/vlc.dsp ; \
-                       echo '# PROP Output_Dir "Debug\'$$subdir'"\r' >> msvc/vlc.dsp ; \
-                       echo '!ENDIF\r' >> msvc/vlc.dsp ; \
-                       echo '# End Source File\r' >> msvc/vlc.dsp ; \
-               done ; \
-               echo '# End Group\r' >> msvc/vlc.dsp ; \
-       done
-       echo '# End Group\r' >> msvc/vlc.dsp
-       echo '# End Group\r' >> msvc/vlc.dsp
-#      The modules
-       echo 'no modules yet'
-#      The headers
-       echo '# Begin Group "Header Files"\r' >> msvc/vlc.dsp
-       echo '# PROP Default_Filter "h;hpp;hxx;hm;inl"\r' >> msvc/vlc.dsp
-       for file in $(HEADERS_include) $(HEADERS_include_built) ; do \
-               echo '# Begin Source File\r' >> msvc/vlc.dsp ; \
-               echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&"\r%' >> msvc/vlc.dsp ; \
-               echo '# End Source File\r' >> msvc/vlc.dsp ; \
-       done
-       echo '# Begin Group "vlc"\r' >> msvc/vlc.dsp
-       for file in $(dist_pkginclude_HEADERS) ; do \
-               echo '# Begin Source File\r' >> msvc/vlc.dsp ; \
-               echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&"\r%' >> msvc/vlc.dsp ; \
-               echo '# End Source File\r' >> msvc/vlc.dsp ; \
-       done
-       echo '# End Group\r' >> msvc/vlc.dsp
-       echo '# End Group\r' >> msvc/vlc.dsp
-#      Bottom of the project file - handles resource files too
-       cat msvc/vlc.dsp.out >> msvc/vlc.dsp
+show-libvlc-sources: FORCE
+       @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt)
+
+show-libvlc-headers: FORCE
+       @echo X: $(HEADERS_include) $(HEADERS_include_built)
+
+show-libvlc-pkg-headers: FORCE
+       @echo X: $(dist_pkginclude_HEADERS)
 
 ###############################################################################
 # Building libvlc
@@ -354,70 +311,64 @@ lib_LIBRARIES += lib/libvlc.a $(LIBRARIES_libvlc_pic)
 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
 lib_libvlc_a_CFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CFLAGS_default) @CFLAGS_vlc@
 lib_libvlc_a_CXXFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CXXFLAGS_default)
+lib_libvlc_a_OBJCFLAGS = $(CPPFLAGS_default) -D__VLC__ $(OBJCFLAGS_default)
 
 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
 lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
 lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
+lib_libvlc_pic_a_OBJCFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(OBJCFLAGS_pic)
 
 if HAVE_BEOS
-SOURCES_libvlc_beos = $(OPT_SOURCES_libvlc_beos)
+OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
 endif
 if HAVE_DARWIN
-SOURCES_libvlc_darwin = $(OPT_SOURCES_libvlc_darwin)
+OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
 endif
 if HAVE_WIN32
-SOURCES_libvlc_win32 = $(OPT_SOURCES_libvlc_win32)
+OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
 endif
 if BUILD_DIRENT
-SOURCES_libvlc_dirent = $(OPT_SOURCES_libvlc_dirent)
+OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
 endif
 if BUILD_GETOPT
-SOURCES_libvlc_getopt = $(OPT_SOURCES_libvlc_getopt)
-endif
-if BUILD_STRNDUP
-SOURCES_libvlc_strndup = $(OPT_SOURCES_libvlc_strndup)
+OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
 endif
 if BUILD_MOZILLA
 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
 endif
 
 EXTRA_DIST += \
-       $(OPT_SOURCES_libvlc_beos) \
-       $(OPT_SOURCES_libvlc_darwin) \
-       $(OPT_SOURCES_libvlc_win32) \
-       $(OPT_SOURCES_libvlc_dirent) \
-       $(OPT_SOURCES_libvlc_getopt) \
-       $(OPT_SOURCES_libvlc_strndup) \
+       $(SOURCES_libvlc_beos) \
+       $(SOURCES_libvlc_darwin) \
+       $(SOURCES_libvlc_win32) \
+       $(SOURCES_libvlc_dirent) \
+       $(SOURCES_libvlc_getopt) \
        $(NULL)
 
-OPT_SOURCES_libvlc_beos = \
+SOURCES_libvlc_beos = \
        src/misc/beos_specific.cpp \
        $(NULL)
 
-OPT_SOURCES_libvlc_darwin = \
-       src/misc/darwin_specific.c \
+SOURCES_libvlc_darwin = \
+       src/misc/darwin_specific.m \
        $(NULL)
 
-OPT_SOURCES_libvlc_win32 = \
+SOURCES_libvlc_win32 = \
        src/misc/win32_specific.c \
        $(NULL)
 
-OPT_SOURCES_libvlc_dirent = \
+SOURCES_libvlc_dirent = \
        src/extras/dirent.c \
        src/extras/dirent.h \
        $(NULL)
 
-OPT_SOURCES_libvlc_getopt = \
+SOURCES_libvlc_getopt = \
        src/extras/getopt.c \
        src/extras/getopt.h \
        src/extras/getopt1.c \
        $(NULL)
 
-OPT_SOURCES_libvlc_strndup = \
-       src/extras/strndup.c
-       $(NULL)
-
-SOURCES_libvlc = \
+SOURCES_libvlc_common = \
        src/libvlc.c \
        src/libvlc.h \
        src/interface/interface.c \
@@ -437,6 +388,7 @@ SOURCES_libvlc = \
        src/video_output/video_text.c \
        src/video_output/video_text.h \
        src/video_output/vout_subpictures.c \
+       src/video_output/vout_synchro.c \
        src/audio_output/common.c \
        src/audio_output/dec.c \
        src/audio_output/filters.c \
@@ -452,17 +404,21 @@ SOURCES_libvlc = \
        src/misc/configuration.c \
        src/misc/netutils.c \
        src/misc/iso_lang.c \
-       src/misc/iso-639.def \
+       src/misc/iso-639_def.h \
        src/misc/messages.c \
        src/misc/objects.c \
        src/misc/variables.c \
        src/misc/error.c \
-       $(SOURCES_libvlc_beos) \
-       $(SOURCES_libvlc_darwin) \
-       $(SOURCES_libvlc_win32) \
-       $(SOURCES_libvlc_dirent) \
-       $(SOURCES_libvlc_getopt) \
-       $(SOURCES_libvlc_strndup) \
+       src/extras/libc.c \
+       $(NULL)
+
+SOURCES_libvlc = \
+       $(SOURCES_libvlc_common) \
+       $(OPT_SOURCES_libvlc_beos) \
+       $(OPT_SOURCES_libvlc_darwin) \
+       $(OPT_SOURCES_libvlc_win32) \
+       $(OPT_SOURCES_libvlc_dirent) \
+       $(OPT_SOURCES_libvlc_getopt) \
        $(NULL)
 
 ###############################################################################
@@ -487,9 +443,15 @@ DEPENDENCIES_vlc = lib/libvlc.a $(L_builtin) $(DATA_win32_rc) $(LIB_intl)
 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
        @rm -f vlc$(EXEEXT)
        $(LINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS)
+
 if HAVE_BEOS
        xres -o $@ ./share/vlc_beos.rsrc
        mimeset -f $@
+       rm -Rf locale ; mkdir locale
+       for i in $(ALL_LINGUAS); do \
+               mkdir -p locale/$${i}/LC_MESSAGES ; \
+               cp po/$${i}.gmo locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+       done
 endif
 
 # Install the symlinks
@@ -501,20 +463,30 @@ install-exec-local:
 
 if HAVE_DARWIN
 # Create the MacOS X app
-vlc_app_DATA = vlc.app
+vlc_app_DATA = VLC.app
 vlc_appdir = $(bindir)
-vlc.app: vlc $(PLUGIN_FILES)
-       rm -Rf vlc.app
-       cd extras/MacOSX ; pbxbuild | grep -v '^[ \t]' | grep -v "^$$"
-       cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
-       $(INSTALL) -d vlc.app/Contents/MacOS
-       $(INSTALL) vlc vlc.app/Contents/MacOS/
-       $(INSTALL) -d vlc.app/Contents/MacOS/modules
+VLC.app: vlc $(PLUGIN_FILES)
+       rm -Rf VLC.app
+       cd extras/MacOSX ; pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
+       cp -r extras/MacOSX/build/vlc.bundle ./VLC.app
+       $(INSTALL) -d VLC.app/Contents/MacOS
+       $(INSTALL) vlc VLC.app/Contents/MacOS/VLC
+       $(INSTALL) -d VLC.app/Contents/MacOS/modules
        for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
-               $(INSTALL) $$i vlc.app/Contents/MacOS/modules/ ; \
+               $(INSTALL) $$i VLC.app/Contents/MacOS/modules/ ; \
        fi ; done
-       $(INSTALL) -d vlc.app/Contents/MacOS/share
-       $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
+       $(INSTALL) -d VLC.app/Contents/MacOS/share
+       $(INSTALL) -m 644 share/*.psf share/*.rle VLC.app/Contents/MacOS/share
+       $(INSTALL) -d VLC.app/Contents/MacOS/locale
+       for i in $(ALL_LINGUAS); do \
+               mkdir -p VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
+               cp po/$${i}.gmo VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+               mkdir -p VLC.app/Contents/Resources/$${i}.lproj ; \
+               ln -sf ../English.lproj/InfoPlist.strings VLC.app/Contents/Resources/$${i}.lproj ; \
+               ln -sf ../English.lproj/MainMenu.nib VLC.app/Contents/Resources/$${i}.lproj ; \
+               ln -sf ../English.lproj/vlc.scriptTerminology VLC.app/Contents/Resources/$${i}.lproj ; \
+       done
+       echo -n "APPLVLC#" >| VLC.app/Contents/PkgInfo
 endif
 
 if HAVE_WIN32
@@ -522,9 +494,124 @@ 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) -i $< -o $@
+       $(WINDRES) --include-dir share -i $< -o $@
 endif
 
+###############################################################################
+# Building architecture-specific binary packages
+###############################################################################
+
+# XXX: this rule is probably only useful to you if you have exactly
+# the same setup as me. Contact sam@zoy.org if you need to use it.
+#
+# Check that tmp isn't in the way
+package-win32:
+       @if test -e tmp; then \
+               echo "Error: please remove ./tmp, it is in the way"; false; \
+       else \
+               echo "OK."; mkdir tmp; \
+       fi
+# Create installation script
+       cp install-win32 tmp/nsi
+# Copy relevant files
+       cp vlc.exe tmp/ 
+       $(STRIP) tmp/vlc.exe
+       cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
+       for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
+                       do cp $$file tmp/$${file}.txt ; \
+                       unix2dos tmp/$${file}.txt ; done
+
+       mkdir tmp/plugins
+       for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
+               $(INSTALL) $$i tmp/plugins/ ; \
+       fi ; done
+
+       for i in dummy tmp/plugins/*$(LIBEXT) ; \
+               do if test $$i != tmp/plugins/libwin32_plugin$(LIBEXT) \
+               -a $$i != dummy ; then $(STRIP) $$i ; fi ; done
+
+       mkdir tmp/share
+       cp share/*.rle tmp/share/ ;
+
+       mkdir tmp/locale
+       for i in $(ALL_LINGUAS); do \
+               mkdir -p tmp/locale/$${i}/LC_MESSAGES ; \
+               cp po/$${i}.gmo tmp/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+       done
+
+       mkdir -p tmp/skins/default
+       for i in share/skins/default/*.*; do \
+               cp $$i tmp/skins/default/ || true ; \
+       done
+       for i in doc/skins/*.txt; do \
+               cp $$i tmp/skins/ || true ; \
+       done
+
+       cd doc/faq ; $(MAKE) html ; cd ../.. ;
+       cp doc/faq/index.html tmp/FAQ.htm ;
+
+# Create package 
+       wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} tmp/nsi
+# Clean up
+       rm -Rf tmp
+
+package-beos:
+# Check that tmp isn't in the way
+       @if test -e tmp; then \
+               echo "Error: please remove ./tmp, it is in the way"; false; \
+       else \
+               echo "OK."; mkdir tmp; \
+       fi
+
+# Copy relevant files
+       mkdir -p 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 modules -name "lib*_plugin.so" | wc -l` -gt 0 ]; then \
+               mkdir -p tmp/vlc/plugins; \
+               find modules -name "lib*_plugin.so" | xargs -i{} cp {} tmp/vlc/plugins/; \
+       fi
+       for i in $(ALL_LINGUAS); do \
+               mkdir -p tmp/vlc/locale/$${i}/LC_MESSAGES ; \
+               cp po/$${i}.gmo tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
+       done
+       mkdir -p tmp/vlc/share
+       cp share/*.rle tmp/vlc/share/
+
+# Create package with debug symbols
+       mimeset -f tmp/vlc/* tmp/vlc/*/*
+       mv tmp/vlc tmp/vlc-${VERSION}
+       (cd tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
+       mv tmp/vlc-${VERSION}-BeOS.zip .
+
+# Create package without debug symbols
+       strip tmp/vlc-${VERSION}/vlc tmp/vlc-${VERSION}/plugins/lib*_plugin.so
+       xres -o tmp/vlc-${VERSION}/vlc share/vlc_beos.rsrc
+       mimeset -f tmp/vlc-${VERSION}/* tmp/vlc-${VERSION}/*/*
+       (cd tmp ; zip -9 -r vlc-${VERSION}-BeOS-stripped.zip vlc-${VERSION} )
+       mv tmp/vlc-${VERSION}-BeOS-stripped.zip .
+
+# Clean up
+       rm -Rf tmp
+
+package-macosx:
+# Check that tmp isn't in the way
+       @if test -e tmp; then \
+               echo "Error: please remove ./tmp, it is in the way"; false; \
+       else \
+               echo "OK."; mkdir tmp; \
+       fi
+
+# Copy relevant files 
+       cp -R VLC.app tmp/
+       cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
+
+# Create disk image 
+       ./extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" tmp/* 
+
+# Clean up
+       rm -Rf tmp
+
 ###############################################################################
 # Building the Mozilla plugin
 ###############################################################################
@@ -543,8 +630,9 @@ SOURCES_mozilla = \
        mozilla/vlcplugin.h \
        mozilla/vlcpeer.cpp \
        mozilla/vlcpeer.h \
-       mozilla/classinfo.h \
+       mozilla/support/classinfo.h \
        $(SOURCES_mozilla_win32) \
+       $(SOURCES_mozilla_macosx) \
        $(SOURCES_mozilla_unix) \
        $(NULL)
 
@@ -553,11 +641,16 @@ SOURCES_mozilla = \
 # under Win32 and npunix.c under Unix.
 if HAVE_WIN32
 LIBRARIES_mozilla = mozilla/npvlc$(LIBEXT)
-SOURCES_mozilla_win32 = mozilla/npwin.cpp
+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/npunix.c
+SOURCES_mozilla_unix = mozilla/support/npunix.c
+endif
 endif
 
 if BUILD_MOZILLA
@@ -565,7 +658,7 @@ if UNTRUE
 noinst_LIBRARIES_mozilla = mozilla/libplugin.a
 endif
 
-mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla) $(BUILT_SOURCES_mozilla)
+mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
 mozilla_libplugin_a_CFLAGS = $(CPPFLAGS_pic) $(CFLAGS_pic) \
                              $(CPPFLAGS_mozilla) $(CFLAGS_mozilla) \
                              $(CPPFLAGS_mozilla_EXTRA)
@@ -601,7 +694,7 @@ 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) -i $< -o $@
+       $(WINDRES) --include-dir mozilla -i $< -o $@
 endif
 endif