1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
8 EXTRA_DIST = extras/COPYING misc/modules_builtin.h.in
10 BUILT_SOURCES = $(DISTCLEANFILES) $(CLEANFILES)
11 DISTCLEANFILES = stamp-api
12 CLEANFILES = misc/modules_builtin.h misc/version.c
13 MOSTLYCLEANFILES = $(DATA_noinst_libvlc)
15 TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox
17 ###############################################################################
19 ###############################################################################
21 pkgincludedir = $(includedir)/vlc
23 dist_pkginclude_HEADERS = \
24 ../include/vlc/vlc.h \
25 ../include/vlc/libvlc.h \
26 ../include/vlc/aout.h \
27 ../include/vlc/vout.h \
28 ../include/vlc/sout.h \
29 ../include/vlc/decoder.h \
30 ../include/vlc/input.h \
31 ../include/vlc/intf.h \
32 ../include/vlc/mediacontrol.h \
33 ../include/vlc/mediacontrol_structures.h \
36 noinst_HEADERS = $(HEADERS_include)
37 noinst_DATA = $(DATA_noinst_libvlc)
40 ../include/aout_internal.h \
41 ../include/audio_output.h \
42 ../include/beos_specific.h \
43 ../include/charset.h \
45 ../include/configuration.h \
46 ../include/darwin_specific.h \
47 ../include/intf_eject.h \
48 ../include/iso_lang.h \
51 ../include/modules.h \
52 ../include/modules_inner.h \
54 ../include/network.h \
55 ../include/os_specific.h \
56 ../include/snapshot.h \
57 ../include/stream_output.h \
58 ../include/variables.h \
59 ../include/video_output.h \
60 ../include/vlc_access.h \
61 ../include/vlc_acl.h \
62 ../include/vlc_bits.h \
63 ../include/vlc_block.h \
64 ../include/vlc_block_helper.h \
65 ../include/vlc_codec.h \
66 ../include/vlc_common.h \
67 ../include/vlc_config.h \
68 ../include/vlc_cpu.h \
69 ../include/vlc_demux.h \
70 ../include/vlc_error.h \
72 ../include/vlc_es_out.h \
73 ../include/vlc_filter.h \
74 ../include/vlc_config_cat.h \
75 ../include/vlc_httpd.h \
76 ../include/vlc_tls.h \
77 ../include/vlc_md5.h \
78 ../include/vlc_image.h \
79 ../include/vlc_input.h \
80 ../include/vlc_interaction.h \
81 ../include/vlc_interface.h \
82 ../include/vlc_keys.h \
83 ../include/vlc_messages.h \
84 ../include/vlc_meta.h \
85 ../include/vlc_objects.h \
86 ../include/vlc_osd.h \
87 ../include/vlc_playlist.h \
88 ../include/vlc_spu.h \
89 ../include/vlc_stream.h \
90 ../include/vlc_symbols.h \
91 ../include/vlc_threads_funcs.h \
92 ../include/vlc_threads.h \
93 ../include/vlc_update.h \
94 ../include/vlc_video.h \
95 ../include/vlc_vlm.h \
96 ../include/vlc_vod.h \
97 ../include/vlc_xml.h \
98 ../include/vout_synchro.h \
99 ../include/win32_specific.h \
100 ../include/libvlc_internal.h \
101 ../include/mediacontrol_internal.h
104 misc/modules_builtin.h: Makefile misc/modules_builtin.h.in ../vlc-config
105 $(TOOLBOX) --update-includes
108 misc/modules.c: misc/modules_builtin.h
110 misc/version.c: FORCE
111 $(TOOLBOX) --update-version
113 ###############################################################################
114 # Building builtin modules
115 ###############################################################################
117 # As long as we use builtins with a shared libvlc, we must build them before
118 # we build libvlc. Maybe one day, libvlc will handle multiple modules per
119 # shared object, which will make builtins fairly redumdant. Until then, we
120 # need this workaround.
123 do_builtins = builtins
126 @if test "$(pic)" = "pic"; then ext="_pic.a"; else ext=".a"; fi ; \
127 for c in `$(VLC_CONFIG) --libs builtin`; do \
129 ../modules/*.a) echo $$c ;; \
132 sed -e 's/^\(.*\)\/\([^\/]*\)\.a$$/cd \1 \&\& $(MAKE) \2/g' | \
133 while read cmd; do echo $$cmd$$ext; eval "($$cmd$$ext)" || exit $$? ; done
138 ###############################################################################
140 ###############################################################################
142 LIBRARIES_nopic = libvlc.a
143 LIBRARIES_pic = libvlc_pic.a
145 lib_LIBRARIES = $(LIBRARIES_nopic)
148 lib_LIBRARIES = $(LIBRARIES_pic)
150 lib_LIBRARIES = $(LIBRARIES_nopic)
152 lib_LIBRARIES += $(LIBRARIES_pic)
157 libvlc_a_SOURCES = $(SOURCES_libvlc)
158 libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
159 libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
160 libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
162 libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
163 libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
164 libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
165 libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
168 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
171 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
174 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
177 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
180 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
183 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
186 # Build libvlc as a shared library
188 DATA_noinst_libvlc = libvlc$(LIBEXT)
190 OBJECTS_libvlc_so = $(libvlc_a_OBJECTS)
191 LDFLAGS_libvlc_so = -Wl,--out-implib,$(top_builddir)/src/libvlc.dll.a
193 OBJECTS_libvlc_so = $(libvlc_pic_a_OBJECTS)
197 libvlc$(LIBEXT): $(OBJECTS_libvlc_so) $(do_builtins)
198 @ldfl="`$(VLC_CONFIG) --libs plugin vlc builtin $(pic)` $(INCLUDED_LIBINTL)" ; \
199 case `$(VLC_CONFIG) --linkage vlc builtin` in \
200 c++) ld="$(CXXLINK)" ;; \
201 objc) ld="$(OBJCLINK)" ;; \
202 c|*) ld="$(LINK)" ;; \
204 echo $$ld $(OBJECTS_libvlc_so) $(LDFLAGS_libvlc_so) $$ldfl; \
205 $$ld $(OBJECTS_libvlc_so) $(LDFLAGS_libvlc_so) $$ldfl
206 # It sucks big time, but we have to do that to link vlc properly
207 # on non-PIC OSes, otherwise ld will favor builtins-less libvlc.a over
212 $(SOURCES_libvlc_beos) \
213 $(SOURCES_libvlc_darwin) \
214 $(SOURCES_libvlc_win32) \
215 $(SOURCES_libvlc_dirent) \
216 $(SOURCES_libvlc_getopt) \
219 SOURCES_libvlc_beos = \
220 misc/beos_specific.cpp \
223 SOURCES_libvlc_darwin = \
224 misc/darwin_specific.m \
227 SOURCES_libvlc_win32 = \
228 misc/win32_specific.c \
231 SOURCES_libvlc_dirent = \
235 SOURCES_libvlc_getopt = \
241 SOURCES_libvlc_common = \
244 interface/interface.c \
245 interface/intf_eject.c \
246 interface/interaction.c \
247 playlist/playlist.c \
249 playlist/loadsave.c \
252 playlist/item-ext.c \
253 playlist/services_discovery.c \
261 input/input_internal.h \
266 video_output/video_output.c \
267 video_output/vout_pictures.c \
268 video_output/vout_pictures.h \
269 video_output/video_text.c \
270 video_output/video_widgets.c \
271 video_output/vout_subpictures.c \
272 video_output/vout_synchro.c \
273 video_output/vout_intf.c \
274 audio_output/common.c \
276 audio_output/filters.c \
277 audio_output/ainput.c \
278 audio_output/mixer.c \
279 audio_output/output.c \
280 audio_output/intf.c \
281 stream_output/stream_output.c \
282 stream_output/announce.c \
283 stream_output/sap.c \
289 network/getaddrinfo.c \
305 misc/configuration.c \
319 control/libvlc_core.c \
320 control/libvlc_playlist.c \
321 control/libvlc_vlm.c \
322 control/libvlc_input.c \
323 control/libvlc_video.c \
324 control/mediacontrol_core.c \
325 control/mediacontrol_util.c \
326 control/mediacontrol_audio_video.c \
329 # These should be distributed, but not compiled
330 EXTRA_DIST += control/mediacontrol_init.c control/mediacontrol_plugin.c
333 $(SOURCES_libvlc_common) \
334 $(OPT_SOURCES_libvlc_beos) \
335 $(OPT_SOURCES_libvlc_darwin) \
336 $(OPT_SOURCES_libvlc_win32) \
337 $(OPT_SOURCES_libvlc_dirent) \
338 $(OPT_SOURCES_libvlc_getopt) \
341 # Install the symlinks and shared libvlc
343 test -z "$(DATA_noinst_libvlc)" || $(INSTALL_PROGRAM) "$(DATA_noinst_libvlc)" "$(DESTDIR)$(libdir)"
345 # the opposite of install-{data,exec}-local
347 test -z "$(DATA_noinst_libvlc)" || rm -f "$(DESTDIR)$(libdir)/$(DATA_noinst_libvlc)"
349 ###############################################################################
351 ###############################################################################
352 stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl
353 ( cd $(srcdir) && cat $(HEADERS_include) ) | \
354 top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
357 ###############################################################################
359 ###############################################################################