1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
7 # SUBDIRS stores the directories where a "make" is required when building
8 # something. DIST_SUBDIRS stores the directories where nothing is built but
9 # which have makefiles with distribution information.
10 SUBDIRS = intl modules . mozilla share po m4
11 DIST_SUBDIRS = $(SUBDIRS) src debian doc ipkg lib autotools
31 # Tell aclocal to use -I m4. Wonder if it really works.
32 ACLOCAL_AMFLAGS = -I m4
34 # XXX: these flags could be set in configure.ac, but we set them here
35 # because old versions of automake don't support them in configure.ac.
36 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
38 ###############################################################################
40 ###############################################################################
43 include/vlc_symbols.h \
44 src/misc/modules_builtin.h \
45 src/misc/modules_plugin.h \
48 pkgincludedir = $(includedir)/vlc
50 dist_pkginclude_HEADERS = \
55 include/vlc/decoder.h \
60 noinst_HEADERS = $(HEADERS_include) $(HEADERS_include_built)
63 include/aout_internal.h \
64 include/audio_output.h \
65 include/beos_specific.h \
66 include/configuration.h \
67 include/darwin_specific.h \
70 include/input_ext-dec.h \
71 include/input_ext-intf.h \
72 include/input_ext-plugins.h \
73 include/intf_eject.h \
79 include/modules_inner.h \
82 include/os_specific.h \
83 include/stream_control.h \
84 include/stream_output.h \
87 include/video_output.h \
88 include/vlc_common.h \
89 include/vlc_config.h \
92 include/vlc_interface.h \
93 include/vlc_messages.h \
94 include/vlc_objects.h \
95 include/vlc_playlist.h \
96 include/vlc_threads.h \
97 include/vlc_threads_funcs.h \
99 include/vout_synchro.h \
100 include/win32_specific.h \
104 HEADERS_include_built = \
105 include/vlc_symbols.h \
108 include/vlc_symbols.h: Makefile $(HEADERS_include)
109 srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
111 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
112 srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
114 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
115 srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
117 # These dependencies are mandatory
118 $(SOURCES): include/vlc_symbols.h
119 $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl)
121 ###############################################################################
122 # Optional libintl - FIXME, bad dependencies
123 ###############################################################################
125 intl/libintl.a: FORCE
126 cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
129 LIB_intl = intl/libintl.a
132 ###############################################################################
134 ###############################################################################
137 extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
138 extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
139 extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
140 extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
141 extras/MacOSX/Resources/English.lproj/vlc.scriptTerminology \
142 extras/MacOSX/Resources/a52.icns \
143 extras/MacOSX/Resources/aac.icns \
144 extras/MacOSX/Resources/asf.icns \
145 extras/MacOSX/Resources/asx.icns \
146 extras/MacOSX/Resources/avi.icns \
147 extras/MacOSX/Resources/bin.icns \
148 extras/MacOSX/Resources/cue.icns \
149 extras/MacOSX/Resources/dat.icns \
150 extras/MacOSX/Resources/divx.icns \
151 extras/MacOSX/Resources/dv.icns \
152 extras/MacOSX/Resources/generic.icns \
153 extras/MacOSX/Resources/m3u.icns \
154 extras/MacOSX/Resources/mov.icns \
155 extras/MacOSX/Resources/mp3.icns \
156 extras/MacOSX/Resources/mp4.icns \
157 extras/MacOSX/Resources/mpeg.icns \
158 extras/MacOSX/Resources/mpeg1.icns \
159 extras/MacOSX/Resources/mpeg2.icns \
160 extras/MacOSX/Resources/mpeg4.icns \
161 extras/MacOSX/Resources/mpg.icns \
162 extras/MacOSX/Resources/ogg.icns \
163 extras/MacOSX/Resources/ogm.icns \
164 extras/MacOSX/Resources/pls.icns \
165 extras/MacOSX/Resources/srt.icns \
166 extras/MacOSX/Resources/sub.icns \
167 extras/MacOSX/Resources/vlc.icns \
168 extras/MacOSX/Resources/vob.icns \
169 extras/MacOSX/Resources/wma.icns \
170 extras/MacOSX/Resources/wmv.icns \
171 extras/MacOSX/Resources/back.png \
172 extras/MacOSX/Resources/begin.png \
173 extras/MacOSX/Resources/end.png \
174 extras/MacOSX/Resources/forw.png \
175 extras/MacOSX/Resources/list.png \
176 extras/MacOSX/Resources/pause.png \
177 extras/MacOSX/Resources/play.png \
178 extras/MacOSX/Resources/prefs.png \
179 extras/MacOSX/Resources/slow.png \
180 extras/MacOSX/Resources/stop.png \
181 extras/MacOSX/Resources/vlc_hg.png \
182 extras/MacOSX/Resources/about_bg.png \
183 extras/MacOSX/Resources/vlc.scriptSuite \
184 extras/MacOSX/Resources/README \
185 extras/MacOSX/vlc.pbproj/project.pbxproj \
186 extras/MacOSX/macosx-dmg \
189 ###############################################################################
190 # MS Visual Studio and eMbedded Visual Studio projects
191 ###############################################################################
196 msvc/plugins.dsp.in \
199 msvc/modules_builtin_msvc.h \
206 evc/modules_builtin_evc.h \
210 mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
211 cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
213 ###############################################################################
215 ###############################################################################
217 bin_SCRIPTS = vlc-config
219 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
221 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
222 dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h
223 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
224 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
225 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
227 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
228 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
229 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
230 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
233 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
236 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
239 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
242 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
245 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
248 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
252 $(SOURCES_libvlc_beos) \
253 $(SOURCES_libvlc_darwin) \
254 $(SOURCES_libvlc_win32) \
255 $(SOURCES_libvlc_dirent) \
256 $(SOURCES_libvlc_getopt) \
259 SOURCES_libvlc_beos = \
260 src/misc/beos_specific.cpp \
263 SOURCES_libvlc_darwin = \
264 src/misc/darwin_specific.m \
267 SOURCES_libvlc_win32 = \
268 src/misc/win32_specific.c \
271 SOURCES_libvlc_dirent = \
272 src/extras/dirent.c \
273 src/extras/dirent.h \
276 SOURCES_libvlc_getopt = \
277 src/extras/getopt.c \
278 src/extras/getopt.h \
279 src/extras/getopt1.c \
282 SOURCES_libvlc_common = \
285 src/interface/interface.c \
286 src/interface/intf_eject.c \
287 src/playlist/playlist.c \
289 src/input/input_ext-plugins.c \
290 src/input/input_ext-dec.c \
291 src/input/input_ext-intf.c \
292 src/input/input_dec.c \
293 src/input/input_programs.c \
294 src/input/input_clock.c \
295 src/input/input_info.c \
296 src/video_output/video_output.c \
297 src/video_output/vout_pictures.c \
298 src/video_output/vout_pictures.h \
299 src/video_output/video_text.c \
300 src/video_output/video_text.h \
301 src/video_output/vout_subpictures.c \
302 src/video_output/vout_synchro.c \
303 src/audio_output/common.c \
304 src/audio_output/dec.c \
305 src/audio_output/filters.c \
306 src/audio_output/input.c \
307 src/audio_output/mixer.c \
308 src/audio_output/output.c \
309 src/audio_output/intf.c \
310 src/stream_output/stream_output.c \
311 src/stream_output/announce.c \
316 src/misc/configuration.c \
317 src/misc/iso_lang.c \
318 src/misc/iso-639_def.h \
319 src/misc/messages.c \
321 src/misc/variables.c \
327 $(SOURCES_libvlc_common) \
328 $(OPT_SOURCES_libvlc_beos) \
329 $(OPT_SOURCES_libvlc_darwin) \
330 $(OPT_SOURCES_libvlc_win32) \
331 $(OPT_SOURCES_libvlc_dirent) \
332 $(OPT_SOURCES_libvlc_getopt) \
335 ###############################################################################
337 ###############################################################################
341 vlc_SOURCES = src/vlc.c
343 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin`
344 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
345 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
347 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
348 # old automake-1.5 bug (automake/279).
349 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
351 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
352 @rm -f $(top_builddir)/vlc$(EXEEXT)
353 @case `$(VLC_CONFIG) --linkage vlc builtin` in \
354 c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
355 objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
356 c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
360 xres -o $@ $(srcdir)/share/vlc_beos.rsrc
362 rm -Rf $(srcdir)/locale ; mkdir -p "$(srcdir)/locale"
363 for i in $(ALL_LINGUAS); do \
364 mkdir -p "$(srcdir)/locale/$${i}/LC_MESSAGES" ; \
365 cp "$(srcdir)/po/$${i}.gmo" \
366 "$(srcdir)/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
370 # Install the modules and the symlinks
372 for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
373 echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
374 $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
376 for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
377 echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
378 $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
381 for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
382 echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
383 $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
386 for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
387 rm -f "$(DESTDIR)$(bindir)/$$i" && \
388 ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
392 # Create the MacOS X app
393 vlc_app_DATA = VLC.app
394 vlc_appdir = $(bindir)
397 cd $(srcdir)/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
398 cp -r $(srcdir)/extras/MacOSX/build/vlc.bundle $(srcdir)/VLC.app
399 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS
400 $(INSTALL) vlc $(srcdir)/VLC.app/Contents/MacOS/VLC
401 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/modules
402 for i in "" `$(VLC_CONFIG) --target plugin` ; do \
403 if test -n "$$i" ; then $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" \
404 "$(srcdir)/VLC.app/Contents/MacOS/modules" ; \
406 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share
407 $(INSTALL) -m 644 $(srcdir)/share/*.rle $(srcdir)/VLC.app/Contents/MacOS/share
408 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share/http
409 $(INSTALL) -m 644 $(srcdir)/share/http/*.html $(srcdir)/VLC.app/Contents/MacOS/share/http
410 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share/http/admin
411 $(INSTALL) -m 644 $(srcdir)/share/http/admin/*.html $(srcdir)/VLC.app/Contents/MacOS/share/http/admin
412 $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/locale
413 for i in $(ALL_LINGUAS); do \
414 mkdir -p $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
415 cp $(srcdir)/po/$${i}.gmo $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
416 mkdir -p $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
417 ln -sf ../English.lproj/InfoPlist.strings $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
418 ln -sf ../English.lproj/MainMenu.nib $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
419 ln -sf ../English.lproj/vlc.scriptTerminology $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
421 printf "APPLVLC#" >| $(srcdir)/VLC.app/Contents/PkgInfo
425 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
426 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
427 noinst_share_vlc_win32_rcdir = $(libdir)
428 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
429 $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir)/share -i $< -o $@
432 ###############################################################################
433 # Building specific source packages
434 ###############################################################################
437 $(remove_distdir_woody)
438 mv $(distdir) $(PACKAGE)-woody-$(VERSION)
439 $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
440 $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
441 | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
442 $(remove_distdir_woody)
444 remove_distdir_woody = \
445 { test ! -d $(PACKAGE)-woody-$(VERSION) \
446 || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
447 -exec chmod u+w {} ';' \
448 && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
450 ###############################################################################
451 # Building architecture-specific binary packages
452 ###############################################################################
454 # XXX: this rule is probably only useful to you if you have exactly
455 # the same setup as me. Contact sam@zoy.org if you need to use it.
457 # Check that tmp isn't in the way
459 @if test -e "$(srcdir)/tmp"; then \
460 echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
463 echo "OK."; mkdir -p "$(srcdir)/tmp"; \
465 # Create installation script
466 cp "$(srcdir)/install-win32" "$(srcdir)/tmp/nsi"
467 # Copy relevant files
468 cp "$(top_builddir)/vlc$(EXEEXT)" "$(srcdir)/tmp/"
469 $(STRIP) "$(srcdir)/tmp/vlc$(EXEEXT)"
470 for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
471 do cp "$(srcdir)/$$file" "$(srcdir)/tmp/$${file}.txt" ; \
472 unix2dos "$(srcdir)/tmp/$${file}.txt" ; done
474 mkdir -p "$(srcdir)/tmp/plugins"
475 for i in "" `$(VLC_CONFIG) --target plugin` ; do \
476 if test -n "$$i" ; then \
477 $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" "$(srcdir)/tmp/plugins/" ; \
480 for i in "" $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
481 do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
483 mkdir $(srcdir)/tmp/locale
484 for i in $(ALL_LINGUAS); do \
485 mkdir -p "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES" ; \
486 cp "$(srcdir)/po/$${i}.gmo" \
487 "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
490 mkdir -p $(srcdir)/tmp/skins/default
491 for i in $(srcdir)/share/skins/default/*.*; do \
492 cp $$i $(srcdir)/tmp/skins/default/ || true ; \
494 for i in $(srcdir)/doc/skins/*.txt; do \
495 cp $$i $(srcdir)/tmp/skins/ || true ; \
498 mkdir -p "$(srcdir)/tmp/http/admin"
499 cp $(srcdir)/share/http/*.html $(srcdir)/tmp/http/ ;
500 cp $(srcdir)/share/http/admin/*.html $(srcdir)/tmp/http/admin/ ;
501 cp $(srcdir)/share/http/admin/.access $(srcdir)/tmp/http/admin/ ;
504 wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} $(srcdir)/tmp/nsi
509 # Check that tmp isn't in the way
510 @if test -e $(srcdir)/tmp; then \
511 echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
514 echo "OK."; mkdir $(srcdir)/tmp; \
517 # Copy relevant files
518 mkdir -p $(srcdir)/tmp/vlc
520 cp vlc AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
521 # We cannot use ${PLUGIN_FILES}, it looks like it is too long for the BeOS shell...
522 if [ `find $(srcdir)/modules -name "lib*_plugin.so" | wc -l` -gt 0 ]; then \
523 mkdir -p $(srcdir)/tmp/vlc/plugins; \
524 find $(srcdir)/modules -name "lib*_plugin.so" | xargs -i{} cp {} $(srcdir)/tmp/vlc/plugins/; \
526 for i in $(ALL_LINGUAS); do \
527 mkdir -p $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES ; \
528 cp $(srcdir)/po/$${i}.gmo $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
530 mkdir -p $(srcdir)/tmp/vlc/share
531 cp $(srcdir)/share/*.rle $(srcdir)/tmp/vlc/share/
533 # Create package with debug symbols
534 mimeset -f $(srcdir)/tmp/vlc/* $(srcdir)/tmp/vlc/*/*
535 mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION}
536 (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
537 mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/
539 # Create package without debug symbols
540 strip $(srcdir)/tmp/vlc-${VERSION}/vlc
541 if [ -d $(srcdir)/tmp/vlc-${VERSION}/plugins ]; then \
542 strip $(srcdir)/tmp/vlc-${VERSION}/plugins/lib*_plugin.so; \
544 xres -o $(srcdir)/tmp/vlc-${VERSION}/vlc $(srcdir)/share/vlc_beos.rsrc
545 mimeset -f $(srcdir)/tmp/vlc-${VERSION}/* $(srcdir)/tmp/vlc-${VERSION}/*/*
546 (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
547 mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/
553 # Check that tmp isn't in the way
554 @if test -e "$(srcdir)/tmp"; then \
555 echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
558 echo "OK."; mkdir -p "$(srcdir)/tmp"; \
561 # Copy relevant files
562 cp -R "$(srcdir)/VLC.app" "$(srcdir)/tmp/"
563 cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
566 $(srcdir)/extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" $(srcdir)/tmp/*
571 ###############################################################################
573 ###############################################################################
579 @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
580 if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
585 @if test ! -f $@; then printf "" > $@; fi
587 ###############################################################################
589 ###############################################################################