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