]> git.sesse.net Git - vlc/blobdiff - Makefile.am
* INSTALL: added reference to online info on compiling on MacOSX and BeOS
[vlc] / Makefile.am
index 6fffb5a0f860cd601eea8507ca6ab2ac37ee9bca..af628089acc7f9f9c3e7fab70640dce9738988c0 100644 (file)
@@ -6,9 +6,9 @@
 # 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 = FAQ HACKING MAINTAINERS STATUS src/extras/COPYING \
+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
@@ -32,7 +32,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
@@ -117,6 +117,9 @@ CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
 endif
 endif
 endif
+else
+# !OPTIM
+CFLAGS_optim = @CFLAGS_NOOPTIM@
 endif
 
 CPPFLAGS_default += $(CPPFLAGS_release) \
@@ -160,12 +163,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 \
@@ -195,39 +200,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
@@ -458,26 +437,26 @@ 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
+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
+       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 share/*.rle vlc.app/Contents/MacOS/share
-       $(INSTALL) -d vlc.app/Contents/MacOS/locale
+       $(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 ; \
+               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 ; \
        done
-       echo -n "APPLVLC#" >| vlc.app/Contents/PkgInfo
+       echo -n "APPLVLC#" >| VLC.app/Contents/PkgInfo
 endif
 
 if HAVE_WIN32
@@ -508,19 +487,30 @@ package-win32:
        cp vlc.exe tmp/ 
        $(STRIP) tmp/vlc.exe
        cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
-       for file in AUTHORS COPYING ChangeLog README FAQ ; \
+       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
-# don't include these two
-#rm -f tmp/plugins/gtk.so tmp/plugins/sdl.so
-       for i in dummy tmp/plugins/*$(LIBEXT) ; do if test $$i != tmp/plugins/intfwin.so -a $$i != dummy ; then $(STRIP) $$i ; 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
-       for file in default8x16.psf default8x9.psf ; \
-               do cp share/$$file tmp/share/ ; done
+       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
+
+       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
@@ -540,7 +530,7 @@ package-beos:
        cp vlc tmp/vlc/
        $(STRIP) tmp/vlc/vlc
        xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
-       cp AUTHORS COPYING ChangeLog README FAQ tmp/vlc/
+       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
@@ -565,8 +555,8 @@ package-macosx:
        fi
 
 # Copy relevant files 
-       cp -R vlc.app tmp/
-       cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf FAQ tmp/
+       cp -R VLC.app tmp/
+       cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
 
 # Create disk image 
        ./macosx-dmg 18 "vlc-${VERSION}" tmp/*