vlc/src/Makefile.am

602 lines
15 KiB
Makefile
Raw Normal View History

###############################################################################
# Automake targets and declarations
###############################################################################
AUTOMAKE_OPTIONS = subdir-objects
NULL =
2011-07-07 15:55:57 +02:00
EXTRA_DIST = \
2008-03-27 17:09:56 +01:00
vlc-plugin.pc.in \
2010-08-21 18:20:45 +02:00
libvlccore.sym \
2011-08-30 22:40:14 +02:00
revision.txt
2011-08-30 22:40:14 +02:00
BUILT_SOURCES = $(nodist_pluginsinclude_HEADERS)
2008-02-08 17:13:58 +01:00
CLEANFILES = $(BUILT_SOURCES)
SUFFIXES = .pc.in .pc .rc.in .rc
###############################################################################
# Headers
###############################################################################
2008-05-01 22:00:05 +02:00
pluginsincludedir = $(pkgincludedir)/plugins
2008-05-01 22:00:05 +02:00
pluginsinclude_HEADERS = \
2008-05-26 20:01:00 +02:00
../include/vlc_access.h \
../include/vlc_actions.h \
2014-02-10 13:58:17 +01:00
../include/vlc_addons.h \
../include/vlc_aout.h \
../include/vlc_aout_volume.h \
2008-05-01 22:00:05 +02:00
../include/vlc_arrays.h \
../include/vlc_atomic.h \
../include/vlc_avcodec.h \
2008-05-26 20:01:00 +02:00
../include/vlc_bits.h \
../include/vlc_block.h \
../include/vlc_block_helper.h \
../include/vlc_boxes.h \
2008-05-26 20:01:00 +02:00
../include/vlc_charset.h \
../include/vlc_codec.h \
2008-05-01 22:00:05 +02:00
../include/vlc_common.h \
../include/vlc_config.h \
2008-05-26 20:01:00 +02:00
../include/vlc_config_cat.h \
2008-05-01 22:00:05 +02:00
../include/vlc_configuration.h \
../include/vlc_cpu.h \
../include/vlc_dialog.h \
../include/vlc_demux.h \
2008-05-26 20:01:00 +02:00
../include/vlc_epg.h \
../include/vlc_es.h \
2008-05-26 20:01:00 +02:00
../include/vlc_es_out.h \
../include/vlc_events.h \
../include/vlc_filter.h \
../include/vlc_fourcc.h \
../include/vlc_fs.h \
2008-05-26 20:01:00 +02:00
../include/vlc_gcrypt.h \
../include/vlc_opengl.h \
../include/vlc_http.h \
2008-05-26 20:01:00 +02:00
../include/vlc_httpd.h \
../include/vlc_image.h \
../include/vlc_inhibit.h \
../include/vlc_input.h \
../include/vlc_input_item.h \
2015-03-02 21:44:36 +01:00
../include/vlc_interface.h \
2015-11-23 14:47:10 +01:00
../include/vlc_keystore.h \
2008-05-26 20:01:00 +02:00
../include/vlc_md5.h \
2008-05-01 22:00:05 +02:00
../include/vlc_messages.h \
2008-05-26 20:01:00 +02:00
../include/vlc_meta.h \
2014-05-13 16:36:31 +02:00
../include/vlc_meta_fetcher.h \
../include/vlc_media_library.h \
../include/vlc_memstream.h \
../include/vlc_mime.h \
2008-05-01 22:00:05 +02:00
../include/vlc_modules.h \
../include/vlc_mouse.h \
2008-05-01 22:00:05 +02:00
../include/vlc_mtime.h \
2011-11-03 19:47:58 +01:00
../include/vlc_network.h \
2008-05-01 22:00:05 +02:00
../include/vlc_objects.h \
../include/vlc_picture.h \
../include/vlc_picture_fifo.h \
../include/vlc_picture_pool.h \
../include/vlc_playlist.h \
2008-05-08 17:55:18 +02:00
../include/vlc_plugin.h \
../include/vlc_probe.h \
../include/vlc_rand.h \
../include/vlc_services_discovery.h \
../include/vlc_fingerprinter.h \
input: add per-thread sleep interruption framework For the sake of simplicity and for historical reasons, access and demux modules perform I/O in blocking mode. If no data is available (or more generally no I/O events), the blocking I/O calls will sleep and hold the whole input thread. This can lead to long time-outs or even complete deadlocks, e.g. notably in case of network error. Originally, a volatile flag (b_die) was checked at frequent interval to ascertain whether to abort. This violated the threaded memory model, and was incompatible with race-to-idle power management. In 2007, the VLC object thread signaling functions were introduced (vlc_object_wait, vlc_object_signal, ...) in an attempt to solve this. They proved inflexible and were not compatible with poll/select-style I/O events multiplexing. Those functions were ultimately removed a little over a year later. In the mean time, the "wait pipe" had been introduced. It was focused on network/socket data reception. While it continues to be used, it suffers several limitations: - it affects other threads using the same VLC object, and indistinctly disrupts all I/O after the "kill", - it incorrectly assumes that the same VLC object is used everywhere (leading to race conditions and live loops), - the convenience wrappers around the wait pipe can only wait on one single I/O event direction on a single file descriptor at a time, - it is currently tied to the VLC input thread. Also at about the same time, thread cancellation was reintroduced. Thread cancellation has proven helpful for simple thread main loops. But it ranges from impractical to unusable when sleeping deep within layers of code, such as in access and stream modules. Generally the problem of interrupting I/O is an intractable halting problem. And in practice a given reading operations inside a demuxer cannot be interrupted without breaking the state machine of the demuxer - in many or most cases. This changes set is only an attempt to complement thread cancellation, This does overcome most limitations of the existing "wait pipe" system and of former VLC object signals: - It is triggered by a function call specifying a target context. The context is tied to the thread that needs to be woken up from sleep. This works quite well because the problem essentially relates to the call flow of the sleeping thread. On the trigger side, this is similar to thread cancellation. - It leaves some flexibility w.r.t. choice of sleeping primitives. This initial change uses semaphores. Low-level file I/O will be introduced later. - The wake-up mechanism is edge-triggered and can be fired multiple times. Thus it does not irreversibly prevent all I/O and sleeping operations once fired. It only interrupts the ongoing or next sleep. In principles non-fatal interruptions could be handled that way, for instance input thread seek (rather than forceful stop) although that is not part of the changes set. - It is not tied to any specific event. The initial use case is stopping the input thread and checking vlc_object_alive() but it can be used for other purposes.
2015-06-30 22:52:51 +02:00
../include/vlc_interrupt.h \
../include/vlc_renderer_discovery.h \
../include/vlc_sout.h \
../include/vlc_spu.h \
2008-05-26 20:01:00 +02:00
../include/vlc_stream.h \
../include/vlc_stream_extractor.h \
2008-05-26 20:01:00 +02:00
../include/vlc_strings.h \
../include/vlc_subpicture.h \
../include/vlc_text_style.h \
2008-05-01 22:00:05 +02:00
../include/vlc_threads.h \
../include/vlc_timestamp_helper.h \
2011-11-03 19:47:58 +01:00
../include/vlc_tls.h \
2008-05-26 20:01:00 +02:00
../include/vlc_url.h \
../include/vlc_variables.h \
../include/vlc_viewpoint.h \
../include/vlc_vlm.h \
../include/vlc_video_splitter.h \
../include/vlc_vout.h \
../include/vlc_vout_display.h \
../include/vlc_vout_osd.h \
../include/vlc_vout_window.h \
2008-05-26 20:01:00 +02:00
../include/vlc_xml.h \
../include/vlc_xlib.h \
2008-05-01 22:00:05 +02:00
$(NULL)
nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
2008-05-01 22:00:05 +02:00
noinst_HEADERS = \
../include/vlc_codecs.h \
2010-01-25 18:39:07 +01:00
../include/vlc_extensions.h \
2008-01-27 18:05:30 +01:00
../include/vlc_fixups.h \
../include/vlc_intf_strings.h \
../include/vlc_iso_lang.h \
2008-01-24 18:34:52 +01:00
../include/vlc_pgpkey.h \
../include/vlc_update.h \
../include/vlc_vod.h \
../include/vlc_vout_wrapper.h \
$(NULL)
../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
2010-01-31 12:00:59 +01:00
$(AM_V_at)rm -f -- "$@.tmp"
$(AM_V_at)mkdir -p -- ../include
$(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
echo "static const char psz_license[] =" && \
sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
echo ";" && \
echo "static const char psz_thanks[] =" && \
2009-07-24 17:24:08 +02:00
sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
2010-01-31 12:00:59 +01:00
"$(top_srcdir)/THANKS" && \
echo ";" && \
echo "static const char psz_authors[] =" && \
2010-07-25 21:37:25 +02:00
sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
2010-01-31 12:00:59 +01:00
"$(top_srcdir)/AUTHORS" && \
echo ";") >> "$@.tmp"
$(AM_V_at)mv -f -- "$@.tmp" "$@"
###############################################################################
# pkg-config integration
###############################################################################
pkgconfigdir = $(libdir)/pkgconfig
2011-08-30 22:40:14 +02:00
pkgconfig_DATA = vlc-plugin.pc
CLEANFILES += $(pkgconfig_DATA)
.pc.in.pc: $(top_builddir)/config.status
2010-01-31 11:58:12 +01:00
$(AM_V_GEN)cd "$(top_builddir)" && \
$(SHELL) ./config.status --file="src/$@"
##############################################################################
# Windows resource files
##############################################################################
if HAVE_WIN32
noinst_DATA = libvlc_win32_rc.rc
endif
EXTRA_DIST += libvlc_win32_rc.rc.in
.rc.in.rc: $(top_builddir)/config.status
cd "$(top_builddir)" && \
$(SHELL) ./config.status --file="src/$@"
###############################################################################
# Building libvlc
###############################################################################
2011-08-30 22:40:14 +02:00
lib_LTLIBRARIES = libvlccore.la
AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
2013-12-07 00:57:11 +01:00
-DMODULE_STRING=\"core\" \
2018-03-05 22:10:08 +01:00
-DSYSDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DLOCALEDIR=\"$(localedir)\" \
-DPKGDATADIR=\"$(pkgdatadir)\" \
-DPKGLIBDIR=\"$(pkglibdir)\" \
-DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
2011-08-30 22:40:14 +02:00
AM_CFLAGS = $(CFLAGS_libvlccore)
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
endif
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
AM_CFLAGS += $(DBUS_CFLAGS)
endif
2011-08-30 22:40:14 +02:00
libvlccore_la_SOURCES = \
libvlc.c \
libvlc.h \
libvlc-module.c \
2008-10-22 19:24:07 +02:00
missing.c \
2011-08-17 20:59:56 +02:00
revision.c \
version.c \
config/configuration.h \
config/core.c \
config/chain.c \
config/file.c \
config/help.c \
config/intf.c \
config/cmdline.c \
config/getopt.c \
config/vlc_getopt.h \
extras/libc.c \
modules/modules.h \
modules/modules.c \
modules/bank.c \
modules/cache.c \
modules/entry.c \
modules/textdomain.c \
interface/dialog.c \
interface/interface.c \
playlist/playlist_internal.h \
playlist/art.c \
2009-01-07 18:44:07 +01:00
playlist/art.h \
playlist/aout.c \
playlist/thread.c \
playlist/control.c \
playlist/engine.c \
playlist/fetcher.c \
2009-01-07 18:44:07 +01:00
playlist/fetcher.h \
playlist/sort.c \
playlist/loadsave.c \
playlist/preparser.c \
2009-01-07 18:44:07 +01:00
playlist/preparser.h \
playlist/tree.c \
playlist/item.c \
playlist/search.c \
playlist/services_discovery.c \
playlist/renderer.c \
input/item.c \
input/access.c \
clock/clock_internal.c \
clock/clock.c \
input/control.c \
input/decoder.c \
input/demux.c \
input/demux_chained.c \
input/es_out.c \
input/es_out_timeshift.c \
input/event.c \
input/input.c \
2010-02-24 23:03:20 +01:00
input/info.h \
input/meta.c \
clock/clock.h \
clock/clock_internal.h \
2008-10-13 19:52:33 +02:00
input/decoder.h \
2008-10-13 19:57:51 +02:00
input/demux.h \
2008-10-13 19:52:33 +02:00
input/es_out.h \
input/es_out_timeshift.h \
input/event.h \
input/item.h \
input/mrl_helpers.h \
2008-10-13 20:20:54 +02:00
input/stream.h \
input/input_internal.h \
input/input_interface.h \
2007-03-11 20:40:05 +01:00
input/vlm_internal.h \
input/vlm_event.h \
2009-03-01 09:40:11 +01:00
input/resource.h \
input/resource.c \
input/services_discovery.c \
2011-11-29 21:08:07 +01:00
input/stats.c \
input/stream.c \
input/stream_fifo.c \
input/stream_extractor.c \
input/stream_filter.c \
2008-10-13 20:20:54 +02:00
input/stream_memory.c \
input/subtitles.c \
input/var.c \
audio_output/aout_internal.h \
audio_output/common.c \
audio_output/dec.c \
audio_output/filters.c \
audio_output/output.c \
audio_output/volume.c \
2010-04-25 09:29:33 +02:00
video_output/chrono.h \
video_output/control.c \
video_output/control.h \
video_output/display.c \
video_output/display.h \
video_output/event.h \
video_output/inhibit.c \
video_output/inhibit.h \
video_output/interlacing.c \
video_output/interlacing.h \
video_output/snapshot.c \
video_output/snapshot.h \
video_output/statistic.h \
video_output/video_output.c \
video_output/video_text.c \
video_output/video_epg.c \
video_output/video_widgets.c \
video_output/vout_subpictures.c \
2017-05-30 17:42:19 +02:00
video_output/vout_spuregion_helper.h \
video_output/window.c \
video_output/window.h \
video_output/opengl.c \
video_output/vout_intf.c \
2008-09-28 08:59:04 +02:00
video_output/vout_internal.h \
video_output/vout_wrapper.c \
network/getaddrinfo.c \
network/http_auth.c \
network/httpd.c \
network/io.c \
network/tcp.c \
network/udp.c \
2008-06-06 17:14:56 +02:00
network/rootbind.c \
network/stream.c \
network/tls.c \
text/charset.c \
text/memstream.c \
text/strings.c \
text/unicode.c \
text/url.c \
text/filesystem.c \
text/iso_lang.c \
text/iso-639_def.h \
misc/actions.c \
misc/background_worker.c \
misc/background_worker.h \
misc/md5.c \
misc/probe.c \
2007-09-01 17:32:45 +02:00
misc/rand.c \
misc/mtime.c \
misc/block.c \
misc/fifo.c \
misc/fourcc.c \
misc/fourcc_list.h \
misc/es_format.c \
misc/picture.c \
2015-06-25 22:30:37 +02:00
misc/picture.h \
misc/picture_fifo.c \
misc/picture_pool.c \
input: add per-thread sleep interruption framework For the sake of simplicity and for historical reasons, access and demux modules perform I/O in blocking mode. If no data is available (or more generally no I/O events), the blocking I/O calls will sleep and hold the whole input thread. This can lead to long time-outs or even complete deadlocks, e.g. notably in case of network error. Originally, a volatile flag (b_die) was checked at frequent interval to ascertain whether to abort. This violated the threaded memory model, and was incompatible with race-to-idle power management. In 2007, the VLC object thread signaling functions were introduced (vlc_object_wait, vlc_object_signal, ...) in an attempt to solve this. They proved inflexible and were not compatible with poll/select-style I/O events multiplexing. Those functions were ultimately removed a little over a year later. In the mean time, the "wait pipe" had been introduced. It was focused on network/socket data reception. While it continues to be used, it suffers several limitations: - it affects other threads using the same VLC object, and indistinctly disrupts all I/O after the "kill", - it incorrectly assumes that the same VLC object is used everywhere (leading to race conditions and live loops), - the convenience wrappers around the wait pipe can only wait on one single I/O event direction on a single file descriptor at a time, - it is currently tied to the VLC input thread. Also at about the same time, thread cancellation was reintroduced. Thread cancellation has proven helpful for simple thread main loops. But it ranges from impractical to unusable when sleeping deep within layers of code, such as in access and stream modules. Generally the problem of interrupting I/O is an intractable halting problem. And in practice a given reading operations inside a demuxer cannot be interrupted without breaking the state machine of the demuxer - in many or most cases. This changes set is only an attempt to complement thread cancellation, This does overcome most limitations of the existing "wait pipe" system and of former VLC object signals: - It is triggered by a function call specifying a target context. The context is tied to the thread that needs to be woken up from sleep. This works quite well because the problem essentially relates to the call flow of the sleeping thread. On the trigger side, this is similar to thread cancellation. - It leaves some flexibility w.r.t. choice of sleeping primitives. This initial change uses semaphores. Low-level file I/O will be introduced later. - The wake-up mechanism is edge-triggered and can be fired multiple times. Thus it does not irreversibly prevent all I/O and sleeping operations once fired. It only interrupts the ongoing or next sleep. In principles non-fatal interruptions could be handled that way, for instance input thread seek (rather than forceful stop) although that is not part of the changes set. - It is not tied to any specific event. The initial use case is stopping the input thread and checking vlc_object_alive() but it can be used for other purposes.
2015-06-30 22:52:51 +02:00
misc/interrupt.h \
misc/interrupt.c \
2015-11-23 14:47:10 +01:00
misc/keystore.c \
misc/renderer_discovery.c \
misc/threads.c \
misc/cpu.c \
misc/epg.c \
misc/exit.c \
misc/events.c \
misc/image.c \
misc/messages.c \
misc/mime.c \
misc/objects.c \
misc/objres.c \
misc/variables.h \
misc/variables.c \
misc/error.c \
misc/xml.c \
2014-02-07 23:06:20 +01:00
misc/addons.c \
2009-06-04 23:44:30 +02:00
misc/filter.c \
misc/filter_chain.c \
misc/httpcookies.c \
misc/fingerprinter.c \
misc/text_style.c \
misc/subpicture.c \
misc/subpicture.h
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
../compat/libcompat.la \
$(LTLIBINTL) $(LTLIBICONV) \
$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
2016-09-20 17:58:24 +02:00
if HAVE_WIN32
libvlccore_la_SOURCES += \
win32/dirs.c \
win32/error.c \
win32/filesystem.c \
win32/netconf.c \
win32/plugin.c \
2016-09-20 17:58:24 +02:00
win32/rand.c \
win32/specific.c \
2016-09-20 17:58:24 +02:00
win32/thread.c \
win32/winsock.c
if HAVE_WINSTORE
libvlccore_la_SOURCES += posix/timer.c
else
libvlccore_la_SOURCES += win32/timer.c
endif
else
if HAVE_OS2
libvlccore_la_SOURCES += \
os2/dirs.c \
darwin/error.c \
os2/filesystem.c \
2016-09-20 17:58:24 +02:00
os2/getaddrinfo.c \
os2/netconf.c \
os2/plugin.c \
os2/specific.c \
2016-09-20 17:58:24 +02:00
os2/rand.c \
os2/thread.c
else
if HAVE_NACL
libvlccore_la_SOURCES += \
android/error.c \
posix/dirs.c \
posix/filesystem.c \
posix/netconf.c \
posix/rand.c \
posix/specific.c \
posix/timer.c
else
2016-09-20 17:58:24 +02:00
libvlccore_la_SOURCES += \
posix/filesystem.c \
posix/plugin.c \
posix/rand.c \
posix/timer.c
if HAVE_ANDROID
libvlccore_la_SOURCES += \
android/error.c \
android/specific.c \
2016-11-02 10:40:58 +01:00
android/thread.c \
linux/cpu.c \
linux/dirs.c \
linux/thread.c
2016-09-20 17:58:24 +02:00
else
if HAVE_DARWIN
libvlccore_la_SOURCES += \
darwin/dirs.c \
darwin/error.c \
darwin/netconf.c \
darwin/specific.c \
darwin/thread.c
else
libvlccore_la_SOURCES += \
posix/dirs.c \
posix/error.c \
posix/netconf.c \
posix/specific.c \
2016-09-20 17:58:24 +02:00
posix/thread.c
if HAVE_LINUX
libvlccore_la_SOURCES += \
linux/cpu.c \
linux/dirs.c \
linux/filesystem.c \
2016-09-20 17:58:24 +02:00
linux/thread.c
endif
if HAVE_LIBANL
libvlccore_la_SOURCES += \
linux/getaddrinfo.c
libvlccore_la_LIBADD += -lanl
else
libvlccore_la_SOURCES += \
posix/getaddrinfo.c
endif
endif
endif
endif
endif
endif
if ENABLE_SOUT
libvlccore_la_SOURCES += \
stream_output/sap.c stream_output/sdp.c \
stream_output/stream_output.c stream_output/stream_output.h
if ENABLE_VLM
libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
endif
endif
if UPDATE_CHECK
libvlccore_la_SOURCES += \
misc/update.h misc/update.c \
misc/update_crypto.c
AM_CPPFLAGS += -DUPDATE_CHECK
AM_CFLAGS += $(GCRYPT_CFLAGS)
libvlccore_la_LIBADD += $(GCRYPT_LIBS)
endif
libvlccore_la_LDFLAGS = \
$(LDFLAGS_libvlccore) \
-no-undefined \
-export-symbols $(srcdir)/libvlccore.sym \
2017-11-18 13:26:31 +01:00
-version-info 9:0:0
libvlccore_la_DEPENDENCIES = libvlccore.sym
if HAVE_WIN32
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT) -avoid-version -Wc,-static $(LIBCOM)
endif
if HAVE_OS2
libvlccore_la_LDFLAGS += -avoid-version
endif
if HAVE_DBUS
libvlccore_la_LIBADD += $(DBUS_LIBS)
endif
if HAVE_DARWIN
libvlccore_la_LDFLAGS += -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
endif
libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc $(top_srcdir)/extras/package/win32/libvlc.dll.manifest
$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
# FourCC tables
BUILT_SOURCES += fourcc_tables.h
EXTRA_DIST += misc/fourcc_gen.c
MOSTLYCLEANFILES = fourcc_gen$(BUILDEXEEXT)
fourcc_gen$(BUILDEXEEXT): misc/fourcc_gen.c misc/fourcc_list.h ../include/vlc_fourcc.h
$(AM_V_at)rm -f -- $@
$(AM_V_CC)$(BUILDCC) -I$(srcdir) -o $@ $<
fourcc_tables.h: fourcc_gen$(BUILDEXEEXT)
$(AM_V_at)rm -f -- $@.tmp
$(AM_V_GEN)$(builddir)/fourcc_gen$(BUILDEXEEXT) > $@.tmp
$(AM_V_at)mv -f -- $@.tmp $@
# Unit/regression tests
#
check_PROGRAMS = \
test_block \
test_dictionary \
test_i18n_atof \
test_interrupt \
test_md5 \
2014-10-27 21:30:55 +01:00
test_picture_pool \
2017-07-23 11:13:46 +02:00
test_sort \
test_timer \
test_url \
test_utf8 \
test_xmlent \
2016-12-06 15:55:21 +01:00
test_headers \
test_mrl_helpers
TESTS = $(check_PROGRAMS) check_symbols
test_block_SOURCES = test/block_test.c
test_block_LDADD = $(LDADD) $(LIBS_libvlccore)
test_block_DEPENDENCIES =
test_dictionary_SOURCES = test/dictionary.c
test_i18n_atof_SOURCES = test/i18n_atof.c
test_interrupt_SOURCES = test/interrupt.c
test_interrupt_LDADD = $(LDADD) $(LIBS_libvlccore) $(LIBPTHREAD)
test_md5_SOURCES = test/md5.c
2014-10-27 21:30:55 +01:00
test_picture_pool_SOURCES = test/picture_pool.c
2017-07-23 11:13:46 +02:00
test_sort_SOURCES = test/sort.c
test_timer_SOURCES = test/timer.c
test_url_SOURCES = test/url.c
test_utf8_SOURCES = test/utf8.c
test_xmlent_SOURCES = test/xmlent.c
test_headers_SOURCES = test/headers.c
2016-12-06 15:55:21 +01:00
test_mrl_helpers_SOURCES = test/mrl_helpers.c
AM_LDFLAGS = -no-install
LDADD = libvlccore.la \
../compat/libcompat.la
2009-02-23 18:11:03 +01:00
###############################################################################
# GIT revision
###############################################################################
BUILT_SOURCES += stamp-revision
MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
2009-02-23 18:11:03 +01:00
2011-08-17 20:59:56 +02:00
$(srcdir)/revision.c: $(srcdir)/revision.txt
$(AM_V_at)rm -f -- $@
$(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
> $@
2009-02-23 18:11:03 +01:00
2011-08-17 20:59:56 +02:00
$(srcdir)/revision.txt:
2010-01-31 11:56:20 +01:00
$(AM_V_at)$(MAKE) stamp-revision
2011-08-17 20:59:56 +02:00
$(AM_V_GEN)touch $@
2009-02-23 18:11:03 +01:00
stamp-revision:
2010-01-31 11:56:20 +01:00
$(AM_V_at)rm -f -- revision.tmp
2011-08-17 20:59:56 +02:00
$(AM_V_GEN)if ! git \
--git-dir="$(top_srcdir)/.git/" describe \
--tags --long --match '?.*.*' --always; then \
cat $(srcdir)/revision.txt ; \
fi > revision.tmp
$(AM_V_at)if diff revision.tmp $(srcdir)/revision.txt >/dev/null 2>&1; then \
2009-08-30 09:51:35 +02:00
rm -f -- revision.tmp; \
else \
2011-08-17 20:59:56 +02:00
mv -f -- revision.tmp $(srcdir)/revision.txt; \
fi
#2>&1
2009-02-23 18:11:03 +01:00
2006-03-08 12:32:34 +01:00
###############################################################################
# Unit/regression test
###############################################################################
2008-01-24 18:53:34 +01:00
dist_check_SCRIPTS = check_headers check_symbols
2008-01-24 18:53:34 +01:00
check-local:
2008-05-01 22:00:46 +02:00
for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
2008-01-24 18:53:34 +01:00
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
$(SHELL) $(srcdir)/check_headers $(pluginsinclude_HEADERS)
2008-01-24 18:53:34 +01:00
FORCE:
@echo "Generated source cannot be phony. Go away." >&2
@exit 1
.PHONY: FORCE