]> git.sesse.net Git - vlc/blob - src/Makefile.am
Move mediacontrol to bindings
[vlc] / src / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 AUTOMAKE_OPTIONS = subdir-objects
6 SUBDIRS = . test
7
8 NULL =
9 EXTRA_DIST = extras/COPYING \
10         misc/beos_specific.cpp \
11         libvlc.pc.in \
12         vlc-plugin.pc.in \
13         libvlc.sym \
14         libvlccore.sym
15
16 BUILT_SOURCES = ../include/vlc_about.h
17 CLEANFILES = $(BUILT_SOURCES)
18
19 SUFFIXES = .pc.in .pc .rc.in .rc
20
21 ###############################################################################
22 # Headers
23 ###############################################################################
24
25 pluginsincludedir = $(pkgincludedir)/plugins
26
27 pkginclude_HEADERS = \
28         ../include/vlc/vlc.h \
29         ../include/vlc/deprecated.h \
30         ../include/vlc/libvlc.h \
31         ../include/vlc/libvlc_events.h \
32         ../include/vlc/libvlc_media.h \
33         ../include/vlc/libvlc_media_discoverer.h \
34         ../include/vlc/libvlc_media_library.h \
35         ../include/vlc/libvlc_media_list.h \
36         ../include/vlc/libvlc_media_list_player.h \
37         ../include/vlc/libvlc_media_player.h \
38         ../include/vlc/libvlc_structures.h \
39         ../include/vlc/libvlc_vlm.h \
40         $(NULL)
41
42 pluginsinclude_HEADERS = \
43         ../include/vlc_access.h \
44         ../include/vlc_acl.h \
45         ../include/vlc_aout.h \
46         ../include/vlc_aout_mixer.h \
47         ../include/vlc_arrays.h \
48         ../include/vlc_art_finder.h \
49         ../include/vlc_avcodec.h \
50         ../include/vlc_bits.h \
51         ../include/vlc_block.h \
52         ../include/vlc_block_helper.h \
53         ../include/vlc_charset.h \
54         ../include/vlc_codec.h \
55         ../include/vlc_common.h \
56         ../include/vlc_config.h \
57         ../include/vlc_config_cat.h \
58         ../include/vlc_configuration.h \
59         ../include/vlc_cpu.h \
60         ../include/vlc_dialog.h \
61         ../include/vlc_demux.h \
62         ../include/vlc_epg.h \
63         ../include/vlc_es.h \
64         ../include/vlc_es_out.h \
65         ../include/vlc_events.h \
66         ../include/vlc_filter.h \
67         ../include/vlc_fourcc.h \
68         ../include/vlc_gcrypt.h \
69         ../include/vlc_http.h \
70         ../include/vlc_httpd.h \
71         ../include/vlc_image.h \
72         ../include/vlc_inhibit.h \
73         ../include/vlc_input.h \
74         ../include/vlc_input_item.h \
75         ../include/vlc_main.h \
76         ../include/vlc_md5.h \
77         ../include/vlc_messages.h \
78         ../include/vlc_meta.h \
79         ../include/vlc_modules.h \
80         ../include/vlc_mouse.h \
81         ../include/vlc_mtime.h \
82         ../include/vlc_objects.h \
83         ../include/vlc_picture.h \
84         ../include/vlc_picture_fifo.h \
85         ../include/vlc_picture_pool.h \
86         ../include/vlc_playlist.h \
87         ../include/vlc_plugin.h \
88         ../include/vlc_probe.h \
89         ../include/vlc_rand.h \
90         ../include/vlc_services_discovery.h \
91         ../include/vlc_sql.h \
92         ../include/vlc_sout.h \
93         ../include/vlc_stream.h \
94         ../include/vlc_strings.h \
95         ../include/vlc_subpicture.h \
96         ../include/vlc_threads.h \
97         ../include/vlc_url.h \
98         ../include/vlc_variables.h \
99         ../include/vlc_vlm.h \
100         ../include/vlc_video_splitter.h \
101         ../include/vlc_vout.h \
102         ../include/vlc_vout_display.h \
103         ../include/vlc_vout_opengl.h \
104         ../include/vlc_vout_window.h \
105         ../include/vlc_xml.h \
106         $(NULL)
107
108 noinst_HEADERS = \
109         ../include/vlc_codec_synchro.h \
110         ../include/vlc_codecs.h \
111         ../include/vlc_extensions.h \
112         ../include/vlc_fixups.h \
113         ../include/vlc_interface.h \
114         ../include/vlc_intf_strings.h \
115         ../include/vlc_iso_lang.h \
116         ../include/vlc_keys.h \
117         ../include/vlc_memory.h \
118         ../include/vlc_network.h \
119         ../include/vlc_osd.h \
120         ../include/vlc_pgpkey.h \
121         ../include/vlc_tls.h \
122         ../include/vlc_update.h \
123         ../include/vlc_vod.h \
124         ../include/vlc_vout_wrapper.h \
125         $(NULL)
126
127 ../include/vlc_about.h: Makefile.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS
128         $(AM_V_at)rm -f -- "$@.tmp"
129         $(AM_V_at)mkdir -p -- ../include
130         $(AM_V_GEN)(echo "/* Automatically generated file - DO NOT EDIT */" && \
131         echo "static const char psz_license[] =" && \
132         sed 's/"/\\"/g;s/^.*$$/\"&\\n\"/' "$(top_srcdir)/COPYING" && \
133         echo ";" && \
134         echo "static const char psz_thanks[] =" && \
135         sed '/\$$Id:/d;s/"/\\"/g;s/<.*.> //;s/^.*$$/\"&\\n\"/' \
136                 "$(top_srcdir)/THANKS" && \
137         echo ";" && \
138         echo "static const char psz_authors[] =" && \
139         sed -n '/^N: /{;s///;s/"/\\"/g;s/^.*$$/\"&\\n\"/;p;}' \
140                 "$(top_srcdir)/AUTHORS" && \
141         echo ";") >> "$@.tmp"
142         $(AM_V_at)mv -f -- "$@.tmp" "$@"
143
144 ###############################################################################
145 # pkg-config integration
146 ###############################################################################
147
148 pkgconfigdir = $(libdir)/pkgconfig
149 pkgconfig_DATA = libvlc.pc vlc-plugin.pc
150 CLEANFILES += $(pkgconfig_DATA)
151
152 .pc.in.pc: $(top_builddir)/config.status
153         $(AM_V_GEN)cd "$(top_builddir)" && \
154         $(SHELL) ./config.status --file="src/$@"
155
156 ##############################################################################
157 # Windows resource files
158 ##############################################################################
159
160 if HAVE_WIN32
161 noinst_DATA = libvlc_win32_rc.rc
162 endif
163 EXTRA_DIST += libvlc_win32_rc.rc.in
164
165 .rc.in.rc: $(top_builddir)/config.status
166         cd "$(top_builddir)" && \
167         $(SHELL) ./config.status --file="src/$@"
168
169 ###############################################################################
170 # Building libvlc
171 ###############################################################################
172
173 nice:
174         $(top_builddir)/compile
175
176 lib_LTLIBRARIES = libvlccore.la libvlc.la
177
178 AM_LDFLAGS = -no-undefined
179 if HAVE_WIN32
180 AM_LDFLAGS += -avoid-version
181 endif
182 if HAVE_WINCE
183 AM_LDFLAGS += -avoid-version
184 endif
185
186 libvlccore_la_SOURCES = $(SOURCES_libvlc)
187 nodist_libvlccore_la_SOURCES = revision.c
188 libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
189         -DMODULE_STRING=\"main\" \
190         -DLOCALEDIR=\"$(localedir)\" \
191         -DSYSCONFDIR=\"$(sysconfdir)\" \
192         -DDATA_PATH=\"$(vlcdatadir)\" \
193         -DLIBDIR=\"$(libdir)\" \
194         -DPLUGIN_PATH=\"$(vlclibdir)\"
195 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
196         -no-undefined \
197         -export-symbols $(srcdir)/libvlccore.sym \
198         -version-info 4:0:0
199 libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlccore` $(AM_LIBADD) \
200         $(LTLIBINTL) ../compat/libcompat.la
201 libvlccore_la_DEPENDENCIES = libvlccore.sym
202 if HAVE_WIN32
203 libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
204 libvlccore_la_LDFLAGS += -Wl,libvlc_win32_rc.$(OBJEXT)
205 endif
206
207 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
208         $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
209
210 libvlc_la_SOURCES = $(SOURCES_libvlc_control)
211 nodist_libvlc_la_SOURCES = revision.c
212 libvlc_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` \
213         libvlccore.la ../compat/libcompat.la
214 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
215 libvlc_la_LDFLAGS = $(AM_LDFLAGS) `$(VLC_CONFIG) --ldflags libvlc` \
216         -version-info 5:0:0 \
217         -export-symbols $(srcdir)/libvlc.sym
218 libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
219 if HAVE_WIN32
220 libvlc_la_DEPENDENCIES += $(DATA_win32_rc_lib)
221 libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc_lib)
222 endif
223
224
225 EXTRA_libvlccore_la_SOURCES = \
226         $(SOURCES_libvlc_beos) \
227         $(SOURCES_libvlc_darwin) \
228         $(SOURCES_libvlc_linux) \
229         $(SOURCES_libvlc_win32) \
230         $(SOURCES_libvlc_other) \
231         $(SOURCES_libvlc_dirent) \
232         $(SOURCES_libvlc_getopt) \
233         $(SOURCES_libvlc_httpd) \
234         $(SOURCES_libvlc_sout) \
235         $(SOURCES_libvlc_vlm) \
236         $(NULL)
237 if HAVE_BEOS
238 libvlccore_la_SOURCES += $(SOURCES_libvlc_beos)
239 else
240 if HAVE_DARWIN
241 libvlccore_la_SOURCES += $(SOURCES_libvlc_darwin)
242 else
243 if HAVE_LINUX
244 libvlccore_la_SOURCES += $(SOURCES_libvlc_linux)
245 else
246 if HAVE_WIN32
247 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
248 else
249 if HAVE_WINCE
250 libvlccore_la_SOURCES += $(SOURCES_libvlc_win32)
251 else
252 libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
253 endif
254 endif
255 endif
256 endif
257 endif
258 if BUILD_DIRENT
259 libvlccore_la_SOURCES += $(SOURCES_libvlc_dirent)
260 endif
261 if BUILD_GETOPT
262 libvlccore_la_SOURCES += $(SOURCES_libvlc_getopt)
263 endif
264 if BUILD_HTTPD
265 libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
266 endif
267 if ENABLE_SOUT
268 libvlccore_la_SOURCES += $(SOURCES_libvlc_sout)
269 if ENABLE_VLM
270 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
271 endif
272 endif
273
274 SOURCES_libvlc_beos = \
275         misc/pthread.c \
276         $(NULL)
277
278 SOURCES_libvlc_darwin = \
279         config/dirs_macos.c \
280         misc/pthread.c \
281         misc/darwin_specific.c \
282         $(NULL)
283
284 SOURCES_libvlc_linux = \
285         config/dirs_xdg.c \
286         misc/pthread.c \
287         misc/linux_specific.c \
288         $(NULL)
289
290 SOURCES_libvlc_win32 = \
291         win32/dirs.c \
292         win32/specific.c \
293         win32/thread.c \
294         win32/winsock.c \
295         $(NULL)
296
297 SOURCES_libvlc_other = \
298         config/dirs_xdg.c \
299         misc/pthread.c \
300         misc/not_specific.c
301
302 SOURCES_libvlc_dirent = \
303         extras/dirent.c \
304         $(NULL)
305
306 SOURCES_libvlc_getopt = \
307         extras/getopt.c \
308         extras/getopt.h \
309         extras/getopt1.c \
310         $(NULL)
311
312 SOURCES_libvlc_common = \
313         libvlc.c \
314         libvlc.h \
315         libvlc-module.c \
316         missing.c \
317         version.c \
318         interface/dialog.c \
319         interface/interface.c \
320         interface/intf_eject.c \
321         playlist/playlist_internal.h \
322         playlist/art.c \
323         playlist/art.h \
324         playlist/thread.c \
325         playlist/control.c \
326         playlist/engine.c \
327         playlist/fetcher.c \
328         playlist/fetcher.h \
329         playlist/sort.c \
330         playlist/loadsave.c \
331         playlist/preparser.c \
332         playlist/preparser.h \
333         playlist/tree.c \
334         playlist/item.c \
335         playlist/search.c \
336         playlist/services_discovery.c \
337         input/item.c \
338         input/access.c \
339         input/clock.c \
340         input/control.c \
341         input/decoder.c \
342         input/decoder_synchro.c \
343         input/demux.c \
344         input/es_out.c \
345         input/es_out_timeshift.c \
346         input/event.c \
347         input/input.c \
348         input/meta.c \
349         input/access.h \
350         input/clock.h \
351         input/decoder.h \
352         input/demux.h \
353         input/es_out.h \
354         input/es_out_timeshift.h \
355         input/event.h \
356         input/item.h \
357         input/stream.h \
358         input/input_internal.h \
359         input/input_interface.h \
360         input/vlm_internal.h \
361         input/vlm_event.h \
362         input/resource.h \
363         input/resource.c \
364         input/stream.c \
365         input/stream_demux.c \
366         input/stream_filter.c \
367         input/stream_memory.c \
368         input/subtitles.c \
369         input/var.c \
370         video_output/display.c \
371         video_output/display.h \
372         video_output/event.h \
373         video_output/inhibit.c \
374         video_output/inhibit.h \
375         video_output/snapshot.c \
376         video_output/snapshot.h \
377         video_output/statistic.h \
378         video_output/video_output.c \
379         video_output/vout_pictures.c \
380         video_output/vout_pictures.h \
381         video_output/video_text.c \
382         video_output/video_widgets.c \
383         video_output/vout_subpictures.c \
384         video_output/window.c \
385         video_output/vout_intf.c \
386         video_output/vout_internal.h \
387         video_output/vout_control.h \
388         audio_output/aout_internal.h \
389         audio_output/common.c \
390         audio_output/dec.c \
391         audio_output/filters.c \
392         audio_output/input.c \
393         audio_output/mixer.c \
394         audio_output/output.c \
395         audio_output/intf.c \
396         osd/osd.c \
397         osd/osd_text.c \
398         osd/osd_widgets.c \
399         network/acl.c \
400         network/getaddrinfo.c \
401         network/io.c \
402         network/tcp.c \
403         network/udp.c \
404         network/rootbind.c \
405         network/tls.c \
406         network/poll.c \
407         text/charset.c \
408         text/strings.c \
409         text/unicode.c \
410         text/filesystem.c \
411         text/iso_lang.c \
412         text/iso-639_def.h \
413         misc/md5.c \
414         misc/probe.c \
415         misc/rand.c \
416         misc/mtime.c \
417         misc/block.c \
418         misc/fourcc.c \
419         misc/es_format.c \
420         misc/picture_fifo.c \
421         misc/picture_pool.c \
422         modules/modules.h \
423         modules/modules.c \
424         modules/cache.c \
425         modules/entry.c \
426         modules/os.c \
427         modules/textdomain.c \
428         misc/threads.c \
429         misc/stats.c \
430         misc/cpu.c \
431         misc/action.c \
432         misc/epg.c \
433         config/configuration.h \
434         config/core.c \
435         config/chain.c \
436         config/file.c \
437         config/intf.c \
438         config/keys.c \
439         config/cmdline.c \
440         config/dirs.c \
441         misc/events.c \
442         misc/image.c \
443         misc/messages.c \
444         misc/objects.c \
445         misc/variables.h \
446         misc/variables.c \
447         misc/error.c \
448         misc/update.h \
449         misc/update.c \
450         misc/update_crypto.c \
451         misc/xml.c \
452         extras/libc.c \
453         extras/tdestroy.c \
454         misc/filter.c \
455         misc/filter_chain.c \
456         misc/http_auth.c \
457         misc/sql.c \
458         $(NULL)
459
460 SOURCES_libvlc_httpd = \
461         network/httpd.c \
462         $(NULL)
463
464 SOURCES_libvlc_sout = \
465         stream_output/stream_output.c \
466         stream_output/stream_output.h \
467         stream_output/announce.c \
468         stream_output/sap.c \
469         stream_output/sdp.c \
470         $(NULL)
471
472 SOURCES_libvlc_vlm = \
473         input/vlm.c \
474         input/vlm_event.c \
475         input/vlmshell.c \
476         $(NULL)
477
478 SOURCES_libvlc = \
479         $(SOURCES_libvlc_common) \
480         $(OPT_SOURCES_libvlc_beos) \
481         $(OPT_SOURCES_libvlc_darwin) \
482         $(OPT_SOURCES_libvlc_win32) \
483         $(OPT_SOURCES_libvlc_dirent) \
484         $(OPT_SOURCES_libvlc_getopt) \
485         $(NULL)
486
487 SOURCES_libvlc_control = \
488         control/libvlc_internal.h \
489         control/event_internal.h \
490         control/media_internal.h \
491         control/media_list_internal.h \
492         control/media_player_internal.h \
493         control/core.c \
494         control/error.c \
495         control/log.c \
496         control/playlist.c \
497         control/vlm.c \
498         control/video.c \
499         control/audio.c \
500         control/event.c \
501         control/event_async.c \
502         control/media.c \
503         control/media_player.c \
504         control/media_list.c \
505         control/media_list_path.h \
506         control/media_list_player.c \
507         control/media_library.c \
508         control/media_discoverer.c
509
510 ###############################################################################
511 # GIT revision
512 ###############################################################################
513
514 BUILT_SOURCES += stamp-revision
515 CLEANFILES += revision.txt revision.c
516
517 revision.c: revision.txt
518         $(AM_V_at)rm -f -- revision.c
519         $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat revision.txt)\";" \
520                 > revision.c
521
522 revision.txt: Makefile.am
523         $(AM_V_at)$(MAKE) stamp-revision
524         $(AM_V_GEN)touch revision.txt
525
526 stamp-revision:
527         $(AM_V_at)rm -f -- revision.tmp
528         $(AM_V_GEN)(git --git-dir="$(top_srcdir)/.git/" describe --tags --long \
529                 --match '?.*.*' --always || echo exported) > revision.tmp
530         $(AM_V_at)if diff revision.tmp revision.txt >/dev/null 2>&1; then \
531                 rm -f -- revision.tmp; \
532         else \
533                 mv -f -- revision.tmp revision.txt; \
534         fi 2>&1
535
536 ###############################################################################
537 # Unit/regression test
538 ###############################################################################
539
540 dist_check_SCRIPTS = check_symbols check_headers
541 TESTS = check_symbols
542
543 check_DATA = libvlc-headers.sym libvlc-sorted.sym
544 CLEANFILES += $(check_DATA)
545
546 libvlc-sorted.sym: libvlccore.sym
547         rm -f libvlc-sorted.sym
548         sort -fdu < "$(srcdir)/libvlccore.sym" > libvlc-sorted.sym
549
550 libvlc-headers.sym:
551         rm -f libvlc-headers.sym
552         cat ${srcdir}/../include/vlc_*.h ${srcdir}/control/*.h | \
553         sed -n -e 's/^[ ]*VLC_EXPORT[ ]*([^,]*,\([^,]*\),.*/\1/p' | \
554         sed -e 's/[^a-zA-Z0-9_]*//' | \
555         sort -fdu > libvlc-headers.sym
556
557 .PHONY: libvlc-headers.sym
558
559 check-local:
560         for h in `echo $(pkginclude_HEADERS) | sed -e s,\.\./include/,,g`; \
561         do \
562                 echo grep - "#include <$$h>" $(srcdir)/test/headers.c ; \
563                 if ! grep -- "#include <$$h>" $(srcdir)/test/headers.c ; \
564                 then \
565                         echo "Header $$h not included in test/headers.c!"; \
566                         exit 1; \
567                 fi ; \
568         done
569         $(srcdir)/check_headers $(pkginclude_HEADERS)
570         $(srcdir)/check_headers $(pluginsinclude_HEADERS)
571
572 FORCE:
573         @echo "Generated source cannot be phony. Go away." >&2
574         @exit 1
575
576 .PHONY: FORCE