]> git.sesse.net Git - vlc/blobdiff - Makefile.am
* INSTALL: added reference to online info on compiling on MacOSX and BeOS
[vlc] / Makefile.am
index 466581f56e82476289f12e26125c02e8b18a6faf..af628089acc7f9f9c3e7fab70640dce9738988c0 100644 (file)
@@ -6,15 +6,16 @@
 # 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 = BUGS 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
 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.
@@ -31,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
@@ -116,6 +117,9 @@ CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
 endif
 endif
 endif
+else
+# !OPTIM
+CFLAGS_optim = @CFLAGS_NOOPTIM@
 endif
 
 CPPFLAGS_default += $(CPPFLAGS_release) \
@@ -159,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 \
@@ -194,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
@@ -259,36 +239,41 @@ 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/stop.png \
-       extras/MacOSX/Resources/stepf.png \
-       extras/MacOSX/Resources/stepr.png \
+       extras/MacOSX/Resources/vlc_hg.png \
        extras/MacOSX/vlc.pbproj/project.pbxproj \
        $(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/vlc.vcp \
-       msvc/vlc.vcw \
-       msvc/vlc.vcp.in \
-       msvc/vlc.vcp.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)
 
-show-vlc-sources: FORCE
-       @echo X: $(vlc_SOURCES)
-
 show-libvlc-sources: FORCE
-       @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt) $(SOURCES_libvlc_libc)
+       @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)
@@ -307,10 +292,12 @@ 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
 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
@@ -327,9 +314,6 @@ endif
 if BUILD_GETOPT
 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
 endif
-if BUILD_LIBC
-OPT_SOURCES_libvlc_libc = $(SOURCES_libvlc_libc)
-endif
 if BUILD_MOZILLA
 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
 endif
@@ -340,7 +324,6 @@ EXTRA_DIST += \
        $(SOURCES_libvlc_win32) \
        $(SOURCES_libvlc_dirent) \
        $(SOURCES_libvlc_getopt) \
-       $(SOURCES_libvlc_libc) \
        $(NULL)
 
 SOURCES_libvlc_beos = \
@@ -348,7 +331,7 @@ SOURCES_libvlc_beos = \
        $(NULL)
 
 SOURCES_libvlc_darwin = \
-       src/misc/darwin_specific.c \
+       src/misc/darwin_specific.m \
        $(NULL)
 
 SOURCES_libvlc_win32 = \
@@ -366,10 +349,6 @@ SOURCES_libvlc_getopt = \
        src/extras/getopt1.c \
        $(NULL)
 
-SOURCES_libvlc_libc = \
-       src/extras/libc.c
-       $(NULL)
-
 SOURCES_libvlc_common = \
        src/libvlc.c \
        src/libvlc.h \
@@ -410,6 +389,7 @@ SOURCES_libvlc_common = \
        src/misc/objects.c \
        src/misc/variables.c \
        src/misc/error.c \
+       src/extras/libc.c \
        $(NULL)
 
 SOURCES_libvlc = \
@@ -419,7 +399,6 @@ SOURCES_libvlc = \
        $(OPT_SOURCES_libvlc_win32) \
        $(OPT_SOURCES_libvlc_dirent) \
        $(OPT_SOURCES_libvlc_getopt) \
-       $(OPT_SOURCES_libvlc_libc) \
        $(NULL)
 
 ###############################################################################
@@ -458,20 +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 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 $(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 ; \
+       done
+       echo -n "APPLVLC#" >| VLC.app/Contents/PkgInfo
 endif
 
 if HAVE_WIN32
@@ -482,6 +467,103 @@ share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
        $(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
+
+       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
+       
+# 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 
+       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 .
+# 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 
+       ./macosx-dmg 18 "vlc-${VERSION}" tmp/* 
+
+# Clean up
+       rm -Rf tmp
+
 ###############################################################################
 # Building the Mozilla plugin
 ###############################################################################
@@ -522,7 +604,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)