]> git.sesse.net Git - vlc/blob - Makefile.am
* Some fixes
[vlc] / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 NULL =
6
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 #  - intl should come before modules and . because all the code uses gettext
11 #  - modules should come before . because vlc needs the builtins
12 #  - . should come before mozilla because the plugin needs libvlc_pic.a
13 #  - po should come before . because VLC.app needs the pofiles
14 #  - loader should come before modules because some plugins need it
15 SUBDIRS = intl loader modules po . mozilla activex share m4 doc
16 DIST_SUBDIRS = $(SUBDIRS) src debian ipkg lib
17
18 EXTRA_DIST = \
19         HACKING \
20         INSTALL.win32 \
21         vlc.exe.manifest \
22         MAINTAINERS \
23         README.MacOSX.rtf \
24         bootstrap \
25         src/extras/COPYING \
26         toolbox \
27         vlc-api.pl \
28         vlc-config.in.in \
29         vlc.spec \
30         vlc.spec.mdk \
31         vlc.win32.nsi \
32         $(NULL)
33
34 BUILT_SOURCES =
35 SUFFIXES = 
36
37 # Tell aclocal to use -I m4. Wonder if it really works.
38 ACLOCAL_AMFLAGS = -I m4
39
40 # XXX: these flags could be set in configure.ac, but we set them here
41 # because old versions of automake don't support them in configure.ac.
42 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
43
44 ###############################################################################
45 # Headers
46 ###############################################################################
47
48 BUILT_SOURCES += \
49         stamp-api \
50         src/misc/modules_builtin.h \
51         $(NULL)
52
53 pkgincludedir = $(includedir)/vlc
54
55 dist_pkginclude_HEADERS = \
56         include/vlc/vlc.h \
57         include/vlc/aout.h \
58         include/vlc/vout.h \
59         include/vlc/sout.h \
60         include/vlc/decoder.h \
61         include/vlc/input.h \
62         include/vlc/intf.h \
63         include/vlc/control.h \
64         $(NULL)
65
66 noinst_HEADERS = $(HEADERS_include)
67
68 HEADERS_include = \
69         include/aout_internal.h \
70         include/audio_output.h \
71         include/beos_specific.h \
72         include/charset.h \
73         include/codecs.h \
74         include/configuration.h \
75         include/darwin_specific.h \
76         include/intf_eject.h \
77         include/iso_lang.h \
78         include/main.h \
79         include/mmx.h \
80         include/modules.h \
81         include/modules_inner.h \
82         include/mtime.h \
83         include/network.h \
84         include/osd.h \
85         include/os_specific.h \
86         include/snapshot.h \
87         include/stream_output.h \
88         include/variables.h \
89         include/video_output.h \
90         include/vlc_access.h \
91         include/vlc_bits.h \
92         include/vlc_block.h \
93         include/vlc_block_helper.h \
94         include/vlc_codec.h \
95         include/vlc_common.h \
96         include/vlc_config.h \
97         include/vlc_cpu.h \
98         include/vlc_demux.h \
99         include/vlc_error.h \
100         include/vlc_es.h \
101         include/vlc_es_out.h \
102         include/vlc_filter.h \
103         include/vlc_config_cat.h \
104         include/vlc_httpd.h \
105         include/vlc_tls.h \
106         include/vlc_md5.h \
107         include/vlc_image.h \
108         include/vlc_input.h \
109         include/vlc_interface.h \
110         include/vlc_keys.h \
111         include/vlc_messages.h \
112         include/vlc_meta.h \
113         include/vlc_objects.h \
114         include/vlc_playlist.h \
115         include/vlc_spu.h \
116         include/vlc_stream.h \
117         include/vlc_symbols.h \
118         include/vlc_threads_funcs.h \
119         include/vlc_threads.h \
120         include/vlc_video.h \
121         include/vlc_vlm.h \
122         include/vlc_vod.h \
123         include/vlc_xml.h \
124         include/vout_synchro.h \
125         include/win32_specific.h \
126         $(NULL)
127
128 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in vlc-config
129         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
130         touch $@
131
132 # These dependencies are mandatory
133 $(SOURCES_libvlc): src/misc/modules_builtin.h $(LIB_intl)
134
135 ###############################################################################
136 # Optional libintl - FIXME, bad dependencies
137 ###############################################################################
138
139 intl/libintl.a: FORCE
140         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
141
142 if BUILD_INTL
143 LIB_intl = intl/libintl.a
144 endif
145
146 ###############################################################################
147 # MacOS X project
148 ###############################################################################
149
150 EXTRA_DIST += \
151         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
152         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
153         extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
154         extras/MacOSX/Resources/English.lproj/About.nib/classes.nib \
155         extras/MacOSX/Resources/English.lproj/About.nib/info.nib \
156         extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib \
157         extras/MacOSX/Resources/English.lproj/Open.nib/classes.nib \
158         extras/MacOSX/Resources/English.lproj/Open.nib/info.nib \
159         extras/MacOSX/Resources/English.lproj/Open.nib/keyedobjects.nib \
160         extras/MacOSX/Resources/English.lproj/Preferences.nib/classes.nib \
161         extras/MacOSX/Resources/English.lproj/Preferences.nib/info.nib \
162         extras/MacOSX/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
163         extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib \
164         extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib \
165         extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
166         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
167         extras/MacOSX/Resources/a52.icns \
168         extras/MacOSX/Resources/aac.icns \
169         extras/MacOSX/Resources/asf.icns \
170         extras/MacOSX/Resources/asx.icns \
171         extras/MacOSX/Resources/avi.icns \
172         extras/MacOSX/Resources/bin.icns \
173         extras/MacOSX/Resources/cue.icns \
174         extras/MacOSX/Resources/dat.icns \
175         extras/MacOSX/Resources/divx.icns \
176         extras/MacOSX/Resources/dv.icns \
177         extras/MacOSX/Resources/generic.icns \
178         extras/MacOSX/Resources/m3u.icns \
179         extras/MacOSX/Resources/mov.icns \
180         extras/MacOSX/Resources/mp3.icns \
181         extras/MacOSX/Resources/mp4.icns \
182         extras/MacOSX/Resources/mpeg.icns \
183         extras/MacOSX/Resources/mpeg1.icns \
184         extras/MacOSX/Resources/mpeg2.icns \
185         extras/MacOSX/Resources/mpeg4.icns \
186         extras/MacOSX/Resources/mpg.icns \
187         extras/MacOSX/Resources/ogg.icns \
188         extras/MacOSX/Resources/ogm.icns \
189         extras/MacOSX/Resources/pls.icns \
190         extras/MacOSX/Resources/srt.icns \
191         extras/MacOSX/Resources/sub.icns \
192         extras/MacOSX/Resources/vlc.icns \
193         extras/MacOSX/Resources/vob.icns \
194         extras/MacOSX/Resources/wma.icns \
195         extras/MacOSX/Resources/wmv.icns \
196         extras/MacOSX/Resources/pause.png \
197         extras/MacOSX/Resources/pause_blue.png \
198         extras/MacOSX/Resources/play.png \
199         extras/MacOSX/Resources/play_blue.png \
200         extras/MacOSX/Resources/stop.png \
201         extras/MacOSX/Resources/stop_blue.png \
202         extras/MacOSX/Resources/display.png \
203         extras/MacOSX/Resources/display_slider.png \
204         extras/MacOSX/Resources/display_track.png \
205         extras/MacOSX/Resources/equalizerdrawer_active.png \
206         extras/MacOSX/Resources/equalizerdrawer_blue.png \
207         extras/MacOSX/Resources/fullscreen_active.png \
208         extras/MacOSX/Resources/fullscreen_blue.png \
209         extras/MacOSX/Resources/next_active.png \
210         extras/MacOSX/Resources/next_blue.png \
211         extras/MacOSX/Resources/playlistdrawer_active.png \
212         extras/MacOSX/Resources/playlistdrawer_blue.png \
213         extras/MacOSX/Resources/previous_active.png \
214         extras/MacOSX/Resources/previous_blue.png \
215         extras/MacOSX/Resources/skip_forward_active.png \
216         extras/MacOSX/Resources/skip_forward_blue.png \
217         extras/MacOSX/Resources/skip_previous_active.png \
218         extras/MacOSX/Resources/skip_previous_blue.png \
219         extras/MacOSX/Resources/volume_high.png \
220         extras/MacOSX/Resources/volume_low.png \
221         extras/MacOSX/Resources/volumeslider_blue.png \
222         extras/MacOSX/Resources/volumeslider_normal.png \
223         extras/MacOSX/Resources/volumetrack.png \
224         extras/MacOSX/Resources/about_bg.png \
225         extras/MacOSX/Resources/vlc.scriptSuite \
226         extras/MacOSX/Resources/vlc.scriptTerminology \
227         extras/MacOSX/Resources/README \
228         extras/MacOSX/vlc.pbproj/project.pbxproj \
229         extras/MacOSX/macosx-dmg \
230         $(NULL)
231
232 ###############################################################################
233 # MS Visual Studio and eMbedded Visual Studio projects
234 ###############################################################################
235
236 EXTRA_DIST += \
237         msvc/vlc.dsw \
238         msvc/libvlc.dsp.in \
239         msvc/plugins.dsp.in \
240         msvc/vlc.dsp.in \
241         msvc/config.h.in \
242         msvc/modules_builtin_msvc.h \
243         evc/vlc.vcw \
244         evc/libvlc.vcp.in \
245         evc/vlc.vcp.in \
246         evc/plugins.vcp.in \
247         evc/errno.h \
248         evc/config.h.in \
249         evc/modules_builtin_evc.h \
250         $(NULL)
251
252 dist-hook:
253         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
254         distdir=$(distdir) srcdir=$(srcdir) $(srcdir)/toolbox --dist-contrib
255
256 ###############################################################################
257 # Building libvlc
258 ###############################################################################
259
260 bin_SCRIPTS = vlc-config
261 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
262         cd $(top_builddir) && $(SHELL) ./config.status --file=$@
263         -cd $(top_builddir) && chmod 0755 $@
264
265 $(SOURCES): vlc-config
266
267 CLEANFILES = $(BUILT_SOURCES)
268
269 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
270
271 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
272 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
273 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
274 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
275
276 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
277 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
278 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
279 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
280
281 if HAVE_BEOS
282 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
283 endif
284 if HAVE_DARWIN
285 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
286 endif
287 if HAVE_WIN32
288 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
289 endif
290 if HAVE_WINCE
291 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
292 endif
293 if BUILD_DIRENT
294 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
295 endif
296 if BUILD_GETOPT
297 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
298 endif
299 if BUILD_MOZILLA
300 if !HAVE_WIN32
301 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
302 endif
303 endif
304
305 EXTRA_DIST += \
306         $(SOURCES_libvlc_beos) \
307         $(SOURCES_libvlc_darwin) \
308         $(SOURCES_libvlc_win32) \
309         $(SOURCES_libvlc_dirent) \
310         $(SOURCES_libvlc_getopt) \
311         $(NULL)
312
313 SOURCES_libvlc_beos = \
314         src/misc/beos_specific.cpp \
315         $(NULL)
316
317 SOURCES_libvlc_darwin = \
318         src/misc/darwin_specific.m \
319         $(NULL)
320
321 SOURCES_libvlc_win32 = \
322         src/misc/win32_specific.c \
323         $(NULL)
324
325 SOURCES_libvlc_dirent = \
326         src/extras/dirent.c \
327         $(NULL)
328
329 SOURCES_libvlc_getopt = \
330         src/extras/getopt.c \
331         src/extras/getopt.h \
332         src/extras/getopt1.c \
333         $(NULL)
334
335 SOURCES_libvlc_common = \
336         src/libvlc.c \
337         src/libvlc.h \
338         src/interface/interface.c \
339         src/interface/intf_eject.c \
340         src/playlist/playlist.c \
341         src/playlist/sort.c \
342         src/playlist/loadsave.c \
343         src/playlist/view.c \
344         src/playlist/item.c \
345         src/playlist/item-ext.c \
346         src/playlist/services_discovery.c \
347         src/input/access.c \
348         src/input/clock.c \
349         src/input/control.c \
350         src/input/decoder.c \
351         src/input/demux.c \
352         src/input/es_out.c \
353         src/input/input.c \
354         src/input/input_internal.h \
355         src/input/stream.c \
356         src/input/mem_stream.c \
357         src/input/subtitles.c \
358         src/input/var.c \
359         src/video_output/video_output.c \
360         src/video_output/vout_pictures.c \
361         src/video_output/vout_pictures.h \
362         src/video_output/video_text.c \
363         src/video_output/video_widgets.c \
364         src/video_output/vout_subpictures.c \
365         src/video_output/vout_synchro.c \
366         src/video_output/vout_intf.c \
367         src/audio_output/common.c \
368         src/audio_output/dec.c \
369         src/audio_output/filters.c \
370         src/audio_output/input.c \
371         src/audio_output/mixer.c \
372         src/audio_output/output.c \
373         src/audio_output/intf.c \
374         src/stream_output/stream_output.c \
375         src/stream_output/announce.c \
376         src/stream_output/sap.c \
377         src/misc/charset.c \
378         src/misc/httpd.c \
379         src/misc/tls.c \
380         src/misc/md5.c \
381         src/misc/mtime.c \
382         src/misc/block.c \
383         src/misc/modules.c \
384         src/misc/threads.c \
385         src/misc/cpu.c \
386         src/misc/configuration.c \
387         src/misc/image.c \
388         src/misc/iso_lang.c \
389         src/misc/iso-639_def.h \
390         src/misc/messages.c \
391         src/misc/objects.c \
392         src/misc/variables.c \
393         src/misc/error.c \
394         src/misc/net.c \
395         src/misc/getaddrinfo.c \
396         src/misc/vlm.c \
397         src/misc/xml.c \
398         src/extras/libc.c \
399         src/control/core.c \
400         src/control/util.c \
401         src/control/audio_video.c \
402         $(NULL)
403
404 SOURCES_libvlc = \
405         $(SOURCES_libvlc_common) \
406         $(OPT_SOURCES_libvlc_beos) \
407         $(OPT_SOURCES_libvlc_darwin) \
408         $(OPT_SOURCES_libvlc_win32) \
409         $(OPT_SOURCES_libvlc_dirent) \
410         $(OPT_SOURCES_libvlc_getopt) \
411         $(NULL)
412
413 ###############################################################################
414 # Building vlc
415 ###############################################################################
416
417 bin_PROGRAMS = vlc
418
419 vlc_SOURCES = src/vlc.c
420
421 # Work around a bug in the arm-wince-pe linker
422 if HAVE_WINCE
423 vlc_WORKAROUNDLDFLAGS = lib/libvlc.a
424 endif
425
426 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin` $(vlc_WORKAROUNDLDFLAGS)
427 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
428 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
429
430 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
431 # old automake-1.5 bug (automake/279).
432 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
433
434 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
435         @rm -f $(top_builddir)/vlc$(EXEEXT)
436         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
437           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
438           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
439           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
440         esac
441
442 if HAVE_BEOS
443 noinst_DATA = vlc-bundle
444 vlc-bundle: vlc
445         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
446         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
447         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
448         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
449           if test -n "$$i" ; then \
450             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
451             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
452           fi ; \
453         done
454         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
455           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
456           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
457             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
458           done ; \
459         fi
460         for i in $(ALL_LINGUAS); do \
461           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
462           cp "$(top_builddir)/po/$$i.gmo" \
463             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
464         done
465         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
466 endif
467
468 # Install the modules and the symlinks
469 install-exec-local:
470         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
471           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
472           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
473         fi ; done
474         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
475           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
476           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
477         fi ; done
478 if BUILD_MOZILLA
479         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
480           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
481           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
482         fi ; done
483 endif
484         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
485           rm -f "$(DESTDIR)$(bindir)/$$i" && \
486           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
487         fi ; done
488
489 # the opposite of install-{data,exec}-local
490 uninstall-local:
491         @for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
492           echo rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
493           rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
494         fi ; done
495         @for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
496           echo rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
497           rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
498         fi ; done
499 if BUILD_MOZILLA
500         @for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
501           echo rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
502           rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
503         fi ; done
504 endif
505         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
506           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
507         fi ; done
508
509 if HAVE_DARWIN
510 # Create the MacOS X app
511 vlc_app_DATA = VLC.app
512 vlc_appdir = $(bindir)
513 # VLC-release.app is the old VLC.app target
514 VLC-release.app: vlc
515         @if test -e "$(top_builddir)/tmp"; then \
516           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
517           false; \
518         else \
519           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
520         fi
521         rm -Rf $(top_builddir)/VLC-release.app
522         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
523         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
524           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
525         done
526         mkdir -p $(top_builddir)/tmp/modules/audio_output
527         cp $(srcdir)/modules/audio_output/coreaudio.c \
528            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
529         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
530         for i in \
531             about.h \
532             about.m \
533             applescript.h \
534             applescript.m \
535             controls.h \
536             controls.m \
537             equalizer.h \
538             equalizer.m \
539             intf.h \
540             intf.m \
541             macosx.m \
542             misc.h \
543             misc.m \
544             open.h \
545             open.m \
546             output.h \
547             output.m \
548             playlist.h \
549             playlist.m \
550             playlistinfo.h \
551             playlistinfo.m \
552             prefs_widgets.h \
553             prefs_widgets.m \
554             prefs.h \
555             prefs.m \
556             vout.h \
557             voutqt.m \
558             voutgl.m \
559             wizard.h \
560             wizard.m \
561             vout.m; do \
562           cp "$(srcdir)/modules/gui/macosx/$$i" \
563              $(top_builddir)/tmp/modules/gui/macosx; \
564         done
565         cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'
566         cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
567               $(top_builddir)/VLC-release.app
568         rm -Rf $(top_builddir)/tmp
569         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
570         $(INSTALL) $(top_builddir)/vlc \
571                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
572         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
573         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
574         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
575           if test -n "$$i" ; \
576             then $(INSTALL) "$$i$(LIBEXT)" \
577                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
578           fi ; done
579         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
580           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
581           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
582             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
583           done ; \
584         fi
585         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
586         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
587         for i in $(srcdir)/share/http/* ; do \
588           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
589         done ; \
590         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
591         for i in $(srcdir)/share/http/vlm/* ; do \
592           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
593         done ; \
594         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
595         for i in $(srcdir)/share/http/admin/* ; do \
596           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
597         done ; \
598         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
599         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
600         for i in $(ALL_LINGUAS); do \
601           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
602           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
603           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
604           ln -sf ../English.lproj/InfoPlist.strings \
605               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
606           ln -sf ../English.lproj/MainMenu.nib \
607               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
608           ln -sf ../English.lproj/vlc.scriptTerminology \
609               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
610         done
611         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
612
613 VLC.app: vlc
614         @if test -e "$(top_builddir)/tmp"; then \
615           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
616           false; \
617         else \
618           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
619         fi
620         rm -Rf $(top_builddir)/VLC.app
621         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
622         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
623           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
624         done
625         mkdir -p $(top_builddir)/tmp/modules/audio_output
626         cp $(srcdir)/modules/audio_output/coreaudio.c \
627            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
628         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
629         for i in \
630             about.h \
631             about.m \
632             applescript.h \
633             applescript.m \
634             controls.h \
635             controls.m \
636             equalizer.h \
637             equalizer.m \
638             intf.h \
639             intf.m \
640             macosx.m \
641             misc.h \
642             misc.m \
643             open.h \
644             open.m \
645             output.h \
646             output.m \
647             playlist.h \
648             playlist.m \
649             playlistinfo.h \
650             playlistinfo.m \
651             prefs_widgets.h \
652             prefs_widgets.m \
653             prefs.h \
654             prefs.m \
655             vout.h \
656             voutqt.m \
657             voutgl.m \
658             wizard.h \
659             wizard.m \
660             vout.m; do \
661           cp "$(srcdir)/modules/gui/macosx/$$i" \
662              $(top_builddir)/tmp/modules/gui/macosx; \
663         done
664         cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'
665         cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
666               $(top_builddir)/VLC.app
667         rm -Rf $(top_builddir)/tmp
668         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
669         $(INSTALL) $(top_builddir)/vlc \
670                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
671         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
672         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
673         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
674           if test -n "$$i" ; \
675             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
676                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
677           fi ; done
678         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
679           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
680           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
681             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
682           done ; \
683         fi
684         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
685         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
686         for i in $(ALL_LINGUAS); do \
687           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
688           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
689           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
690           ln -sf ../English.lproj/InfoPlist.strings \
691               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
692           ln -sf ../English.lproj/MainMenu.nib \
693               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
694         done
695         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
696 endif
697
698 if HAVE_WIN32
699 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
700 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
701 noinst_share_vlc_win32_rcdir = $(libdir)
702 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
703         $(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 $@
704 endif
705
706 ###############################################################################
707 # Building specific source packages
708 ###############################################################################
709
710 dist-woody: distdir
711         $(remove_distdir_woody)
712         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
713         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
714         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
715           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
716         $(remove_distdir_woody)
717
718 remove_distdir_woody = \
719   { test ! -d $(PACKAGE)-woody-$(VERSION) \
720     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
721            -exec chmod u+w {} ';' \
722          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
723
724 ###############################################################################
725 # Building architecture-specific binary packages
726 ###############################################################################
727
728 # XXX: this rule is probably only useful to you if you have exactly
729 # the same setup as me. Contact sam@zoy.org if you need to use it.
730 #
731 package-win32-base:
732 # Check that tmp isn't in the way
733         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
734           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
735           false; \
736         else \
737           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
738         fi
739
740 # Copy relevant files
741         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
742         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
743         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
744         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
745
746         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
747           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
748           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
749
750         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
751         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
752           if test -n "$$i" ; then \
753             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
754             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
755           fi ; done
756
757         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
758           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
759
760         mkdir $(top_builddir)/vlc-${VERSION}/locale
761         for i in $(ALL_LINGUAS); do \
762           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
763           cp "$(srcdir)/po/$${i}.gmo" \
764             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
765             || true ; \
766         done
767
768         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
769         for i in $(srcdir)/share/skins2/fonts/*.*; do \
770           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
771         done
772         for i in $(srcdir)/share/skins2/*.*; do \
773           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
774         done
775
776         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
777         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
778         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
779         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
780         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
781         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
782         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
783         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
784         cp $(srcdir)/share/http/admin/*.html \
785            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
786         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
787         cp $(srcdir)/share/http/admin/dboxfiles.html \
788            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
789         cp $(srcdir)/share/http/admin/.access \
790            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
791         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
792         cp $(srcdir)/share/http/vlm/*.html \
793            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
794         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
795
796         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
797
798         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
799 if BUILD_MOZILLA
800         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
801         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
802         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
803 endif
804
805         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
806 if BUILD_ACTIVEX
807         cp $(top_builddir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
808         cp $(top_builddir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
809         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
810
811         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
812         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
813 endif
814 # Rebase all those DLLs to speed up loading (need cygwin rebase)
815         if [ -x rebase ]; then \
816                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
817         fi
818
819 package-win32-base-exe:
820 # Create package
821         wine C:/Program\ Files/NSIS/makensis.exe \
822              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
823
824 package-win32-base-exe-cygwin:
825 # Create package
826         C:/Program\ Files/NSIS/makensis.exe \
827              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
828
829 package-win32-base-exe-linux:
830 # Create package
831         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
832
833 package-win32-base-zip:
834 # Create package 
835         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
836
837 package-win32-exe: package-win32-base package-win32-base-exe
838 # Clean up
839         rm -Rf $(top_builddir)/vlc-${VERSION}
840
841 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
842 # Clean up
843         rm -Rf $(top_builddir)/vlc-${VERSION}
844
845 package-win32-zip: package-win32-base package-win32-base-zip
846 # Clean up
847         rm -Rf $(top_builddir)/vlc-${VERSION}
848
849 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
850 # Clean up
851         rm -Rf $(top_builddir)/vlc-${VERSION}
852
853 package-beos:
854 # Check that tmp isn't in the way
855         @if test -e $(srcdir)/tmp; then \
856           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
857           false ; \
858         else \
859           echo "OK." ; mkdir $(srcdir)/tmp ; \
860         fi
861
862 # Copy relevant files
863         mkdir -p $(srcdir)/tmp/vlc ;
864         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
865           THANKS NEWS tmp/vlc/ ;
866
867 # Create debug package
868         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
869         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
870         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
871         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
872         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
873         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
874
875 # Create normal package
876         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
877         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
878           --strip-debug --strip-unneeded "{}" \; ;
879         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
880         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
881         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
882         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
883         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
884
885 # Clean up
886         rm -Rf $(srcdir)/tmp ;
887
888 package-macosx:
889 # Check that tmp isn't in the way
890         @if test -e "$(top_builddir)/tmp"; then \
891           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
892           false; \
893         else \
894           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
895         fi
896
897 # Copy relevant files 
898         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
899         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
900
901 # Create disk image 
902         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
903
904 # Clean up
905         rm -Rf $(top_builddir)/tmp
906
907 package-translations:
908         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
909           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
910           false; \
911         else \
912           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
913         fi
914 # Copy translations
915         for i in $(ALL_LINGUAS); do \
916           cp "$(srcdir)/po/$${i}.po" \
917             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
918             || true ; \
919         done
920         cp "$(srcdir)/doc/translations.txt" \
921           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
922
923         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
924         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
925         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
926         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
927         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
928         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
929         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
930         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
931
932         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
933           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
934
935 ###############################################################################
936 # Stamp rules
937 ###############################################################################
938 clean: clean-stamp clean-recursive
939 clean-stamp:
940         rm -f stamp-builtin stamp-api
941
942 stamp-builtin: FORCE
943         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
944           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
945             rm -f $@; \
946             break; \
947           fi; \
948         done
949         @if test ! -f $@; then printf "" > $@; fi
950
951 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in
952         cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl
953         touch stamp-api
954
955 ###############################################################################
956 # Force rule
957 ###############################################################################
958 FORCE: