]> git.sesse.net Git - vlc/blobdiff - src/Makefile.am
do not catch VLCException in sample
[vlc] / src / Makefile.am
index 671e4d6fa96f8be310d4e2568fcc7e2e1eedded9..8c10bea4f4ea2b138ed852c2a4ff9dea0530e271 100644 (file)
@@ -5,7 +5,7 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
 NULL =
-EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym
+EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym vlc-control.pc.in
 
 BUILT_SOURCES = modules/builtin.h misc/revision.c ../include/vlc_about.h
 CLEANFILES = $(BUILT_SOURCES)
@@ -52,6 +52,7 @@ HEADERS_include = \
        ../include/vlc_es_out.h \
        ../include/vlc_events.h \
        ../include/vlc_filter.h \
+       ../include/vlc_fixups.h \
        ../include/vlc_httpd.h \
        ../include/vlc_image.h \
        ../include/vlc_input.h \
@@ -66,9 +67,10 @@ HEADERS_include = \
        ../include/vlc_mtime.h \
        ../include/vlc_network.h \
        ../include/vlc_objects.h \
-       ../include/vlc_os_specific.h \
        ../include/vlc_osd.h \
+       ../include/vlc_pgpkey.h \
        ../include/vlc_playlist.h \
+       ../include/vlc_plugin.h \
        ../include/vlc_rand.h \
        ../include/vlc_services_discovery.h \
        ../include/vlc_sout.h \
@@ -126,6 +128,19 @@ modules/modules.c: modules/builtin.h
        grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | $(AWK) '{ print "\""$$0"\\n\"" }' >> "$@.tmp"
        echo ";" >> "$@.tmp"
        mv -f -- "$@.tmp" "$@"
+
+###############################################################################
+# pkg-config integration
+###############################################################################
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = vlc-control.pc
+CLEANFILES += $(pkgconfig_DATA)
+
+vlc-control.pc: vlc-control.pc.in $(top_builddir)/config.status
+       cd $(top_builddir) && \
+       $(SHELL) ./config.status --file=src/vlc-control.pc
+
 ###############################################################################
 # Building libvlc
 ###############################################################################
@@ -142,7 +157,8 @@ endif
 
 libvlc_la_SOURCES = $(SOURCES_libvlc)
 nodist_libvlc_la_SOURCES = misc/revision.c
-libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
+libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
+       -DDATA_PATH=\"$(pkgdatadir)\"
 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
 libvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
@@ -295,7 +311,9 @@ SOURCES_libvlc_common = \
        misc/block.c \
        modules/modules.h \
        modules/modules.c \
+       modules/cache.c \
        modules/entry.c \
+       modules/os.c \
        misc/threads.c \
        misc/stats.c \
        misc/cpu.c \
@@ -303,6 +321,7 @@ SOURCES_libvlc_common = \
        config/core.c \
        config/chain.c \
        config/file.c \
+       config/intf.c \
        config/cmdline.c \
        misc/events.c \
        misc/image.c \
@@ -339,6 +358,7 @@ SOURCES_libvlc_control = \
        control/event.c \
        control/flat_media_list_view.c \
        control/hierarchical_media_list_view.c \
+       control/hierarchical_node_media_list_view.c \
        control/media_descriptor.c \
        control/media_instance.c \
        control/media_list.c \
@@ -360,19 +380,66 @@ SOURCES_libvlc_control = \
 misc/revision.c:
        rm -f $@ $@.tmp
        echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
-       REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)" ; \
+       REVISION="$$(LANG=C git-show-ref -s HEAD 2>/dev/null | cut -b -10 || echo exported)"; \
        echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
        mv -f $@.tmp $@
 
+
+###############################################################################
+# Building vlc
+###############################################################################
+
+bin_PROGRAMS = vlc
+# 
+vlc_SOURCES = vlc.c
+vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
+
+vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
+vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
+vlc_LDADD = $(DATA_win32_rc) libvlc.la $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
+
+vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
+       @rm -f vlc$(EXEEXT)
+       @case `$(VLC_CONFIG) --linkage vlc builtin` in \
+         c++) cmd="$(CXXLINK)" ;; \
+         objc) cmd="$(OBJCLINK)" ;; \
+         c|*) cmd="$(LINK)" ;; \
+       esac ; \
+       cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
+       echo $$cmd ; \
+       eval $$cmd
+
+if HAVE_WIN32
+DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
+noinst_DATA = vlc_win32_rc.$(OBJEXT)
+
+vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
+       $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(top_srcdir)/share -i $< -o $@
+endif
+
 ###############################################################################
 # Unit/regression test
 ###############################################################################
-check_PROGRAMS = test_i18n_atof test_url test_utf8 test_control
-TESTS = $(check_PROGRAMS)
+check_PROGRAMS = \
+       test_dictionary \
+       test_i18n_atof \
+       test_url \
+       test_utf8 \
+       test_headers \
+       test_control \
+       $(NULL)
+
+dist_check_SCRIPTS = check_symbols
+TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
 
 CFLAGS_tests = `$(VLC_CONFIG) --cflags libvlc`
 
+test_dictionary_SOURCES = test/dictionary.c
+test_dictionary_LDADD = libvlc.la
+test_dictionary_CFLAGS = $(CFLAGS_tests)
+
 test_i18n_atof_SOURCES = test/i18n_atof.c text/charset.c
+test_i18n_atof_LDADD = libvlc.la
 test_i18n_atof_CFLAGS = $(CFLAGS_tests)
 
 test_url_SOURCES = test/url.c
@@ -383,10 +450,24 @@ test_utf8_SOURCES = test/utf8.c
 test_utf8_LDADD = libvlc.la
 test_utf8_CFLAGS = $(CFLAGS_tests)
 
+test_headers_SOURCES = test/headers.c
+test_headers_CFLAGS = $(CFLAGS_tests)
+
 test_control_SOURCES = control/testapi.c
 test_control_LDADD = libvlc-control.la
 test_control_CFLAGS = $(CFLAGS_tests)
 
+check-local:
+       for h in `echo $(dist_pkginclude_HEADERS) $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
+       do \
+               echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
+               if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
+               then \
+                       echo "Header $$h not included in test/headers.c!"; \
+                       exit 1; \
+               fi ; \
+       done
+
 FORCE:
        @echo "Generated source cannot be phony. Go away." >&2
        @exit 1