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