]> git.sesse.net Git - vlc/blobdiff - Makefile.am
* Makefile.am: fixed 'make package-beos'
[vlc] / Makefile.am
index 70e9c9f91cb069fd8418313a8851f3eecdd1d199..0abbc846fa73a1273c8691b0b1f5ed851935f5fd 100644 (file)
@@ -2,20 +2,31 @@
 # 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 = HACKING MAINTAINERS 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 = 
-NULL =
 
 # List of programs, libraries and headers that need to be built and/or
 # distributed. Initialized to empty because we'll use += later.
@@ -192,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 = \
@@ -200,51 +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
-       if ! diff -q $@ $@.in; then \
-               mv -f $@.in $@ ; \
-       else \
-               rm -f $@.in ; \
-       fi
+       ./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
-       if ! diff -q $@ $@.tmp; then \
-               mv -f $@.tmp $@ ; \
-       else \
-               rm -f $@.tmp ; \
-       fi
+       ./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
-       if ! diff -q $@ $@.tmp; then \
-               mv -f $@.tmp $@ ; \
-       else \
-               rm -f $@.tmp ; \
-       fi
+       ./toolbox --update-includes $(BUILTINS)
 
 # These dependencies are mandatory
 $(SOURCES): include/vlc_symbols.h
@@ -270,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 \
@@ -285,9 +261,14 @@ EXTRA_DIST += \
        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/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)
 
 ###############################################################################
@@ -407,6 +388,7 @@ SOURCES_libvlc_common = \
        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 \
@@ -461,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
@@ -479,7 +467,7 @@ 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 "^$$"
+       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
@@ -490,9 +478,13 @@ VLC.app: vlc $(PLUGIN_FILES)
        $(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 $(CATALOGS); do \
-               mkdir -p VLC.app/Contents/MacOS/locale/$${i%.gmo}/LC_MESSAGES ; \
-               cp po/$$i VLC.app/Contents/MacOS/locale/$${i%.gmo}/LC_MESSAGES/vlc.mo || true ; \
+       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
@@ -535,8 +527,9 @@ package-win32:
        fi ; done
 
        for i in dummy tmp/plugins/*$(LIBEXT) ; \
-               do if test $$i != tmp/plugins/libwin32_plugin.$(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/ ;
 
@@ -546,6 +539,17 @@ package-win32:
                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
@@ -558,26 +562,35 @@ package-beos:
        else \
                echo "OK."; mkdir tmp; \
        fi
-       
-# Create dir
-       mkdir -p tmp/vlc/share
+
 # Copy relevant files
-       cp vlc tmp/vlc/
-       $(STRIP) tmp/vlc/vlc
-       xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
-       cp AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
-       for file in default8x16.psf default8x9.psf ; \
-               do cp share/$$file tmp/vlc/share/ ; done
-       mkdir tmp/vlc/plugins
-       for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
-               $(INSTALL) $$i tmp/vlc/plugins/ ; \
-       fi ; done
-       for i in dummy tmp/vlc/plugins/*$(LIBEXT) ; do if test $$i != dummy ; then $(STRIP) $$i ; fi ; done
-# Create package 
+       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 ; find vlc-${VERSION} | \
-       zip -9 -@ vlc-${VERSION}-BeOS-x86.zip )
-       mv tmp/vlc-${VERSION}-BeOS-x86.zip .
+       (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
 
@@ -594,7 +607,7 @@ package-macosx:
        cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
 
 # Create disk image 
-       ./macosx-dmg 18 "vlc-${VERSION}" tmp/* 
+       ./extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" tmp/* 
 
 # Clean up
        rm -Rf tmp
@@ -617,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)
 
@@ -627,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