]> git.sesse.net Git - vlc/blobdiff - src/Makefile.am
- Fix obvious crash in TCP/RTP/AVP
[vlc] / src / Makefile.am
index e2bcc47390b36788c9a462608ef2e4f00ca1040e..547aba4704b5900bece57600c17c5503416b9a97 100644 (file)
@@ -1,4 +1,4 @@
-###############################################################################
+
 # Automake targets and declarations
 ###############################################################################
 
@@ -7,12 +7,11 @@ AUTOMAKE_OPTIONS = subdir-objects
 NULL =
 SUBDIRS =
 
-EXTRA_DIST = extras/COPYING misc/modules_builtin.h.in
+EXTRA_DIST = extras/COPYING misc/modules_builtin.h.in libvlc.sym
 
-BUILT_SOURCES = $(DISTCLEANFILES) $(CLEANFILES)
-DISTCLEANFILES = stamp-api libvlc.sym
+BUILT_SOURCES = $(CLEANFILES)
 CLEANFILES = misc/modules_builtin.h
-MOSTLYCLEANFILES = $(DATA_noinst_libvlc) stamp-builtins
+MOSTLYCLEANFILES = $(DATA_noinst_libvlc)
 
 TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox
 
@@ -96,34 +95,11 @@ misc/modules_builtin.h: misc/modules_builtin.h.in
 
 misc/modules.c: misc/modules_builtin.h
 
-###############################################################################
-# Building builtin modules
-###############################################################################
-#
-# As long as we use builtins with a shared libvlc, we must build them before
-# we build libvlc. Maybe one day, libvlc will handle multiple modules per
-# shared object, which will make builtins fairly redumdant. Until then, we
-# need this workaround.
-
-
-if BUILD_SHARED
-stamp-builtins: Makefile ../vlc-config ../config.status
-       @for c in `$(VLC_CONFIG) --libs builtin`; do \
-               case $$c in \
-                       ../modules/*.a) echo $$c ;; \
-               esac ; \
-       done | \
-       sed -e 's,^\(.*\)/\([^/]*\)\.a$$,cd \1 \&\& $(MAKE) \2,g' | \
-       while read cmd; do echo $$cmd.a; eval "($$cmd.a)" || exit $$? ; done
-       touch $@
-endif
-
 ###############################################################################
 # Building libvlc
 ###############################################################################
 
 libvlc_a_SOURCES = $(SOURCES_libvlc) $(SOURCES_libvlc_control)
-nodist_libvlc_a_SOURCES = misc/version.c
 libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags libvlc pic` -DUSE_BUILTINS
 libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc pic`
 libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc pic`
@@ -134,7 +110,7 @@ libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs libvlc` \
-       -no-undefined -export-symbols libvlc.sym -version-info 1:0:0
+       -no-undefined -export-symbols $(srcdir)/libvlc.sym -version-info 1:0:0
 libvlc_la_DEPENDENCIES = libvlc.sym
 
 libvlc_control_la_SOURCES = $(SOURCES_libvlc_control)
@@ -177,21 +153,19 @@ pic = pic
 endif
 
 if HAVE_WIN32
-if BUILD_SHARED
 DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a
-endif
 
-libvlc.dll.a: libvlc$(LIBEXT)
-       $(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS)
+libvlc.dll.a libvlc.def: libvlc$(LIBEXT)
+       $(DLLTOOL) -z libvlc.def -l libvlc.dll.a -D $< $(libvlc_a_OBJECTS)
 
-libvlc$(LIBEXT): $(OBJECTS_libvlc_so) stamp-builtins
-       @ldfl="`$(VLC_CONFIG) --libs plugin vlc builtin pic` $(INCLUDED_LIBINTL)" ; \
-       case `$(VLC_CONFIG) --linkage vlc builtin` in \
+libvlc$(LIBEXT): $(libvlc_a_OBJECTS)
+       @ldfl="`$(VLC_CONFIG) --libs plugin libvlc pic` $(INCLUDED_LIBINTL)" ; \
+       case `$(VLC_CONFIG) --linkage libvlc` in \
          c++)  ld="$(CXXLINK)" ;; \
          objc) ld="$(OBJCLINK)" ;; \
          c|*)  ld="$(LINK)" ;; \
        esac ; \
-       echo $$ld $(OBJECTS_libvlc_so) $(LDFLAGS_libvlc_so) $$ldfl; \
+       echo $$ld $(libvlc_a_OBJECTS) $$ldfl; \
        $$ld $(libvlc_a_OBJECTS) \
                $$ldfl
 # It sucks big time, but we have to do that to link vlc properly
@@ -215,7 +189,7 @@ SOURCES_libvlc_beos = \
        $(NULL)
 
 SOURCES_libvlc_darwin = \
-       misc/darwin_specific.m \
+       misc/darwin_specific.c \
        $(NULL)
 
 SOURCES_libvlc_win32 = \
@@ -286,6 +260,7 @@ SOURCES_libvlc_common = \
        stream_output/announce.c \
        stream_output/profiles.c \
        stream_output/sap.c \
+       stream_output/sdp.c \
        osd/osd.c \
        osd/osd_parser.c \
        osd/osd_text.c \
@@ -299,6 +274,7 @@ SOURCES_libvlc_common = \
        network/httpd.c \
        network/rootwrap.c \
        network/tls.c \
+       network/poll.c \
        text/charset.c \
        text/strings.c \
        text/unicode.c \
@@ -322,9 +298,8 @@ SOURCES_libvlc_common = \
        misc/variables.c \
        misc/error.c \
        misc/update.c \
-       misc/vlm.c \
+       input/vlm.c \
        misc/xml.c \
-       misc/dict.c \
        misc/devices.c \
        extras/libc.c \
        $(NULL)
@@ -353,8 +328,12 @@ SOURCES_libvlc_control = \
        control/mediacontrol_audio_video.c
 
 if !USE_LIBTOOL
-if !BUILD_SHARED
+if !HAVE_WIN32
+nodist_libvlc_a_SOURCES = misc/version.c
 CLEANFILES += misc/version.c
+
+misc/version.c: FORCE
+       $(TOOLBOX) --update-version
 endif
 
 # Install shared libvlc
@@ -366,29 +345,28 @@ uninstall-local:
        test -z "$(DATA_noinst_libvlc)" || rm -f "$(DESTDIR)$(libdir)/$(DATA_noinst_libvlc)"
 endif
 
-misc/version.c: FORCE
-       $(TOOLBOX) --update-version
-
 ###############################################################################
 # Stamp rules
 ###############################################################################
+
+if !USE_LIBTOOL
+if !HAVE_WIN32
 stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl
        ( cd $(srcdir) && cat $(HEADERS_include) ) | \
          top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
        touch stamp-api
 
-libvlc.sym: $(HEADERS_include)
-       rm -f libvlc.sym
-       (cd $(srcdir) && cat $(HEADERS_include) ) | \
-       sed -ne 's/^.*VLC_EXPORT\s*(\s*\w.*\S\s*,\s*\(\w*\)\s*,\s*(\s*\w.*\S\s*)\s*)[^)]*$$/\1/p' \
-               > libvlc.sym
+CLEANFILES += stamp-api
+endif
+endif
 
 ###############################################################################
 # Unit/regression test
 ###############################################################################
 if USE_LIBTOOL
-check_PROGRAMS = test_i18n_atof test_url
+check_PROGRAMS = test_i18n_atof test_url test_utf8
 TESTS = $(check_PROGRAMS)
+endif
 
 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
 
@@ -399,6 +377,9 @@ test_i18n_atof_CFLAGS = $(CFLAGS_tests)
 test_url_SOURCES = test/url.c
 test_url_LDADD = libvlc.la
 test_url_CFLAGS = $(CFLAGS_tests)
-endif
+
+test_utf8_SOURCES = test/utf8.c
+test_utf8_LDADD = libvlc.la
+test_utf8_CFLAGS = $(CFLAGS_tests)
 
 FORCE: