]> git.sesse.net Git - vlc/blob - Makefile.am
Merge branch 1.0-bugfix (early part) into master
[vlc] / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 # SUBDIRS stores the directories where a "make" is required when building
6 # something. DIST_SUBDIRS stores the directories where nothing is built but
7 # which have makefiles with distribution information.
8 #  - src (libvlc) is nedeed by modules, mozilla and bindings
9 #  - libs/* are needed by modules
10 BASE_SUBDIRS = po compat src bin modules share doc test
11 EXTRA_SUBDIRS = m4 extras/package/ipkg \
12         libs/loader libs/srtp libs/unzip \
13         projects/mozilla projects/activex
14 DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
15
16 SUBDIRS = po compat src
17 if LOADER
18 SUBDIRS += libs/loader
19 endif
20 if HAVE_LIBGCRYPT
21 SUBDIRS += libs/srtp
22 endif
23 if HAVE_ZLIB
24 if !HAVE_MINIZIP
25 SUBDIRS += libs/unzip
26 endif
27 endif
28 if BUILD_VLC
29 SUBDIRS += bin
30 endif
31 SUBDIRS += modules share doc test
32 if BUILD_MOZILLA
33 SUBDIRS += projects/mozilla
34 endif
35 if BUILD_ACTIVEX
36 SUBDIRS += projects/activex
37 endif
38
39 EXTRA_DIST = \
40         HACKING \
41         INSTALL.win32 \
42         INSTALL.wince \
43         extras/package/win32/vlc.exe.manifest \
44         extras/package/win32/libvlc.dll.manifest \
45         MAINTAINERS \
46         extras/package/macosx/README.MacOSX.rtf \
47         vlc-config.in.in \
48         extras/package/rpm/vlc.fedora.spec \
49         extras/package/rpm/vlc.altlinux.spec \
50         extras/package/win32/vlc.win32.nsi.in \
51         extras/package/win32/languages/declaration.nsh \
52         extras/package/win32/languages/english.nsh \
53         extras/package/win32/languages/french.nsh
54
55 dist_noinst_SCRIPTS = bootstrap toolbox
56 nodist_noinst_SCRIPTS = compile
57
58 BUILT_SOURCES_distclean = vlc-config extras/package/win32/vlc.win32.nsi
59 if HAVE_DARWIN
60 BUILT_SOURCES_clean = macosx-sdk
61 else
62 BUILT_SOURCES_clean =
63 endif
64
65 BUILT_SOURCES = $(BUILT_SOURCES_distclean) $(BUILT_SOURCES_clean)
66
67 SUFFIXES = 
68
69 DISTCHECK_CONFIGURE_FLAGS = \
70         --enable-fast-install \
71         --disable-dbus \
72         --disable-dvd --disable-mad --disable-libmpeg2 \
73         --disable-ffmpeg --disable-faad --disable-wxwidgets --disable-skins2 \
74         --disable-live555 \
75         --disable-fribidi --disable-glx
76
77 ACLOCAL_AMFLAGS = -I m4
78 AUTOMAKE_OPTIONS = \
79         1.9 \
80         -Wall \
81         check-news \
82         dist-bzip2 \
83         no-dist-gzip
84 #       std-options
85
86 ChangeLog: Makefile.am
87         rm -f -- "$@"
88         cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
89         ln -sf doc/ChangeLog-2009 "$@"
90
91 ###############################################################################
92 # MacOS X project
93 ###############################################################################
94
95 EXTRA_DIST += \
96         extras/package/macosx/Resources/English.lproj/MainMenu.nib/designable.nib \
97         extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib \
98         extras/package/macosx/Resources/English.lproj/MediaInfo.nib/classes.nib \
99         extras/package/macosx/Resources/English.lproj/MediaInfo.nib/info.nib \
100         extras/package/macosx/Resources/English.lproj/MediaInfo.nib/keyedobjects.nib \
101         extras/package/macosx/Resources/English.lproj/About.nib/classes.nib \
102         extras/package/macosx/Resources/English.lproj/About.nib/info.nib \
103         extras/package/macosx/Resources/English.lproj/About.nib/keyedobjects.nib \
104         extras/package/macosx/Resources/English.lproj/Open.nib/classes.nib \
105         extras/package/macosx/Resources/English.lproj/Open.nib/info.nib \
106         extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib \
107         extras/package/macosx/Resources/English.lproj/Preferences.nib/classes.nib \
108         extras/package/macosx/Resources/English.lproj/Preferences.nib/info.nib \
109         extras/package/macosx/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
110         extras/package/macosx/Resources/English.lproj/Wizard.nib/classes.nib \
111         extras/package/macosx/Resources/English.lproj/Wizard.nib/info.nib \
112         extras/package/macosx/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
113         extras/package/macosx/Resources/English.lproj/Bookmarks.nib/classes.nib \
114         extras/package/macosx/Resources/English.lproj/Bookmarks.nib/info.nib \
115         extras/package/macosx/Resources/English.lproj/Bookmarks.nib/keyedobjects.nib \
116         extras/package/macosx/Resources/English.lproj/Extended.nib/classes.nib \
117         extras/package/macosx/Resources/English.lproj/Extended.nib/info.nib \
118         extras/package/macosx/Resources/English.lproj/Extended.nib/keyedobjects.nib \
119         extras/package/macosx/Resources/English.lproj/Update.nib/classes.nib \
120         extras/package/macosx/Resources/English.lproj/Update.nib/info.nib \
121         extras/package/macosx/Resources/English.lproj/Update.nib/keyedobjects.nib \
122         extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/classes.nib \
123         extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/info.nib \
124         extras/package/macosx/Resources/English.lproj/CoreDialogs.nib/keyedobjects.nib \
125         extras/package/macosx/Resources/English.lproj/ErrorPanel.nib/classes.nib \
126         extras/package/macosx/Resources/English.lproj/ErrorPanel.nib/info.nib \
127         extras/package/macosx/Resources/English.lproj/ErrorPanel.nib/keyedobjects.nib \
128         extras/package/macosx/Resources/English.lproj/InfoPlist.strings.in \
129         extras/package/macosx/Resources/aiff.icns \
130         extras/package/macosx/Resources/audio.icns \
131         extras/package/macosx/Resources/avi.icns \
132         extras/package/macosx/Resources/flv.icns \
133         extras/package/macosx/Resources/generic.icns \
134         extras/package/macosx/Resources/m4a.icns \
135         extras/package/macosx/Resources/m4v.icns \
136         extras/package/macosx/Resources/mkv.icns \
137         extras/package/macosx/Resources/mov.icns \
138         extras/package/macosx/Resources/movie.icns \
139         extras/package/macosx/Resources/mp3.icns \
140         extras/package/macosx/Resources/mpeg.icns \
141         extras/package/macosx/Resources/ogg.icns \
142         extras/package/macosx/Resources/playlist.icns \
143         extras/package/macosx/Resources/rm.icns \
144         extras/package/macosx/Resources/subtitle.icns \
145         extras/package/macosx/Resources/vob.icns \
146         extras/package/macosx/Resources/wav.icns \
147         extras/package/macosx/Resources/vlc.icns \
148         extras/package/macosx/Resources/wma.icns \
149         extras/package/macosx/Resources/wmv.icns \
150         extras/package/macosx/Resources/pause.png \
151         extras/package/macosx/Resources/pause_blue.png \
152         extras/package/macosx/Resources/play.png \
153         extras/package/macosx/Resources/play_blue.png \
154         extras/package/macosx/Resources/stop.png \
155         extras/package/macosx/Resources/stop_blue.png \
156         extras/package/macosx/Resources/display_left.png \
157         extras/package/macosx/Resources/display_middle.png \
158         extras/package/macosx/Resources/display_right.png \
159         extras/package/macosx/Resources/display_slider.png \
160         extras/package/macosx/Resources/display_track.png \
161         extras/package/macosx/Resources/equalizerdrawer_active.png \
162         extras/package/macosx/Resources/equalizerdrawer_blue.png \
163         extras/package/macosx/Resources/fullscreen_active.png \
164         extras/package/macosx/Resources/fullscreen_blue.png \
165         extras/package/macosx/Resources/next_active.png \
166         extras/package/macosx/Resources/next_blue.png \
167         extras/package/macosx/Resources/playlistdrawer_active.png \
168         extras/package/macosx/Resources/playlistdrawer_blue.png \
169         extras/package/macosx/Resources/previous_active.png \
170         extras/package/macosx/Resources/previous_blue.png \
171         extras/package/macosx/Resources/skip_forward_active.png \
172         extras/package/macosx/Resources/skip_forward_blue.png \
173         extras/package/macosx/Resources/skip_previous_active.png \
174         extras/package/macosx/Resources/skip_previous_blue.png \
175         extras/package/macosx/Resources/volume_high.png \
176         extras/package/macosx/Resources/volume_low.png \
177         extras/package/macosx/Resources/volumeslider_blue.png \
178         extras/package/macosx/Resources/volumeslider_normal.png \
179         extras/package/macosx/Resources/volumetrack.png \
180         extras/package/macosx/Resources/about_bg.png \
181         extras/package/macosx/Resources/skip_forward_active_embedded.png \
182         extras/package/macosx/Resources/play_embedded.png \
183         extras/package/macosx/Resources/pause_embedded.png \
184         extras/package/macosx/Resources/skip_previous_active_embedded.png \
185         extras/package/macosx/Resources/pause_embedded_blue.png \
186         extras/package/macosx/Resources/play_embedded_blue.png \
187         extras/package/macosx/Resources/skip_forward_embedded_blue.png \
188         extras/package/macosx/Resources/skip_previous_embedded_blue.png \
189         extras/package/macosx/Resources/vlc.scriptSuite \
190         extras/package/macosx/Resources/vlc.scriptTerminology \
191         extras/package/macosx/Resources/README \
192         extras/package/macosx/Resources/add_embedded.png \
193         extras/package/macosx/Resources/add_embedded_blue.png \
194         extras/package/macosx/Resources/repeat_embedded.png \
195         extras/package/macosx/Resources/repeat_embedded_blue.png \
196         extras/package/macosx/Resources/repeat_single_embedded_blue.png \
197         extras/package/macosx/Resources/shuffle_embedded.png \
198         extras/package/macosx/Resources/shuffle_embedded_blue.png \
199         extras/package/macosx/Resources/fs_volume_slider_knob_highlight.png \
200         extras/package/macosx/Resources/fs_volume_slider_knob.png \
201         extras/package/macosx/Resources/fs_volume_slider_bar.png \
202         extras/package/macosx/Resources/fs_volume_mute_highlight.png \
203         extras/package/macosx/Resources/fs_volume_mute.png \
204         extras/package/macosx/Resources/fs_volume_max_highlight.png \
205         extras/package/macosx/Resources/fs_volume_max.png \
206         extras/package/macosx/Resources/fs_time_slider_knob_highlight.png \
207         extras/package/macosx/Resources/fs_time_slider_knob.png \
208         extras/package/macosx/Resources/fs_time_slider.png \
209         extras/package/macosx/Resources/fs_stop_highlight.png \
210         extras/package/macosx/Resources/fs_stop.png \
211         extras/package/macosx/Resources/fs_skip_previous_highlight.png \
212         extras/package/macosx/Resources/fs_skip_previous.png \
213         extras/package/macosx/Resources/fs_skip_next_highlight.png \
214         extras/package/macosx/Resources/fs_skip_next.png \
215         extras/package/macosx/Resources/fs_rewind_highlight.png \
216         extras/package/macosx/Resources/fs_rewind.png \
217         extras/package/macosx/Resources/fs_play_highlight.png \
218         extras/package/macosx/Resources/fs_play.png \
219         extras/package/macosx/Resources/fs_pause_highlight.png \
220         extras/package/macosx/Resources/fs_pause.png \
221         extras/package/macosx/Resources/fs_forward_highlight.png \
222         extras/package/macosx/Resources/fs_forward.png \
223         extras/package/macosx/Resources/fs_exit_fullscreen_highlight.png \
224         extras/package/macosx/Resources/fs_exit_fullscreen.png \
225         extras/package/macosx/Resources/fs_background.png \
226         extras/package/macosx/Resources/add_embedded_graphite.png \
227         extras/package/macosx/Resources/equalizerdrawer_graphite.png \
228         extras/package/macosx/Resources/fullscreen_graphite.png \
229         extras/package/macosx/Resources/next_graphite.png \
230         extras/package/macosx/Resources/pause_embedded_graphite.png \
231         extras/package/macosx/Resources/pause_graphite.png \
232         extras/package/macosx/Resources/play_embedded_graphite.png \
233         extras/package/macosx/Resources/play_graphite.png \
234         extras/package/macosx/Resources/playlistdrawer_graphite.png \
235         extras/package/macosx/Resources/previous_graphite.png \
236         extras/package/macosx/Resources/repeat_embedded_graphite.png \
237         extras/package/macosx/Resources/repeat_single_embedded_graphite.png \
238         extras/package/macosx/Resources/shuffle_embedded_graphite.png \
239         extras/package/macosx/Resources/skip_forward_embedded_graphite.png \
240         extras/package/macosx/Resources/skip_forward_graphite.png \
241         extras/package/macosx/Resources/skip_previous_embedded_graphite.png \
242         extras/package/macosx/Resources/skip_previous_graphite.png \
243         extras/package/macosx/Resources/stop_graphite.png \
244         extras/package/macosx/Resources/volumeslider_graphite.png \
245         extras/package/macosx/Resources/backward_big_down.png \
246         extras/package/macosx/Resources/backward_big.png \
247         extras/package/macosx/Resources/eq_sm.pdf \
248         extras/package/macosx/Resources/forward_big_down.png \
249         extras/package/macosx/Resources/forward_big.png \
250         extras/package/macosx/Resources/fs_sm.pdf \
251         extras/package/macosx/Resources/list_sm.pdf \
252         extras/package/macosx/Resources/next_sm.pdf \
253         extras/package/macosx/Resources/pause_big_down.png \
254         extras/package/macosx/Resources/pause_big.png \
255         extras/package/macosx/Resources/play_big_down.png \
256         extras/package/macosx/Resources/play_big.png \
257         extras/package/macosx/Resources/prev_sm.pdf \
258         extras/package/macosx/Resources/sidebarAdd.png \
259         extras/package/macosx/Resources/sidebarRepeat.png \
260         extras/package/macosx/Resources/sidebarRepeatOn.png \
261         extras/package/macosx/Resources/sidebarRepeatOneOn.png \
262         extras/package/macosx/Resources/sidebarResizeWidget.png \
263         extras/package/macosx/Resources/sidebarShuffle.png \
264         extras/package/macosx/Resources/sidebarShuffleOn.png \
265         extras/package/macosx/Resources/sidebarStatusAreaBackground.png \
266         extras/package/macosx/Resources/stop_sm.pdf \
267         extras/package/macosx/Resources/noart.png \
268         extras/package/macosx/Resources/spref_cone_Audio_64.png \
269         extras/package/macosx/Resources/spref_cone_Hotkeys_64.png \
270         extras/package/macosx/Resources/spref_cone_Input_64.png \
271         extras/package/macosx/Resources/spref_cone_Interface_64.png \
272         extras/package/macosx/Resources/spref_cone_Subtitles_64.png \
273         extras/package/macosx/Resources/spref_cone_Video_64.png \
274         extras/package/macosx/fullscreen_panel.svg \
275         extras/package/macosx/ub.sh \
276         extras/package/macosx/vlc.xcodeproj/project.pbxproj \
277         extras/package/macosx/Delete_Preferences.app/Contents/Info.plist \
278         extras/package/macosx/Delete_Preferences.app/Contents/PkgInfo \
279         extras/package/macosx/Delete_Preferences.app/Contents/MacOS/applet \
280         extras/package/macosx/Delete_Preferences.app/Contents/Resources/description.rtfd/TXT.rtf \
281         extras/package/macosx/Delete_Preferences.app/Contents/Resources/applet.icns \
282         extras/package/macosx/Delete_Preferences.app/Contents/Resources/applet.rsrc \
283         extras/package/macosx/Delete_Preferences.app/Contents/Resources/Scripts/main.scpt \
284         extras/package/macosx/plugin/Info.plist.in \
285         extras/package/macosx/plugin/InstallerInfo.plist.in \
286         extras/package/macosx/plugin/InstallerDescription.plist \
287         extras/package/macosx/plugin/pbdevelopment.plist \
288         extras/package/macosx/eyetvplugin/EyeTVPluginDefs.h \
289         extras/package/macosx/eyetvplugin/Info.plist \
290         extras/package/macosx/eyetvplugin/eyetvplugin.c \
291         extras/package/macosx/eyetvplugin/eyetvplugin.h \
292         extras/package/macosx/eyetvplugin/English.lproj/InfoPlist.strings \
293         extras/package/macosx/eyetvplugin/eyetvplugin.xcodeproj/project.pbxproj \
294         extras/package/macosx/README.MacOSX.rtf \
295         extras/package/macosx/Info.plist.in
296
297
298 ###############################################################################
299 # Various utilities ( editor syntax files, D-Bus controller ... )
300 ##############################################################################
301 EXTRA_DIST += \
302         extras/analyser/zsh_completion.sh \
303         extras/analyser/zsh.cpp \
304         extras/analyser/emacs.init \
305         extras/analyser/vlc.vim \
306         extras/analyser/valgrind.suppressions \
307         extras/buildsystem/make.pl \
308         extras/misc/mpris.py \
309         extras/misc/mpris.glade
310
311 dist-hook:
312         distdir=$(distdir) srcdir=$(srcdir) $(SHELL) $(srcdir)/toolbox --dist-contrib
313
314 ###############################################################################
315 # Building libvlc
316 ###############################################################################
317
318 noinst_SCRIPTS = vlc-config
319 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
320         $(SHELL) ./config.status --file=$@
321         chmod 0755 $@
322         touch $@
323
324 vlc-config.in: vlc-config.in.in
325         ./config.status --recheck
326         touch $@
327
328 CLEANFILES = $(BUILT_SOURCES_clean)
329 DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in compile
330 MAINTAINERCLEANFILES = ChangeLog
331
332 # Shortcut for developpers to rebuild the core (libvlc + vlc)
333 # Don't use it if you don't know what it is about.
334 # Don't complain if it doesn't work. -- Courmisch
335 libcompat:
336         cd compat && $(MAKE) $(AM_MAKEFLAGS)
337
338 libvlc: libcompat
339         cd src && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
340
341 core: libvlc
342         cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT)
343
344 doc:
345         cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
346
347 .PHONY: libvlc core doc
348
349 #To get some nice output
350 nice:
351         $(top_builddir)/compile
352
353 if HAVE_BEOS
354 noinst_DATA = vlc-bundle
355 vlc-bundle: vlc
356         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
357         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
358         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
359         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
360           if test -n "$$i" ; then \
361             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
362             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
363           fi ; \
364         done
365         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
366           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
367           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
368             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
369           done ; \
370         fi
371         cat $(top_srcdir)/po/LINGUAS | while read i; do \
372           mkdir -p "$(top_builddir)/vlc-bundle/share/locale/$$i/LC_MESSAGES" ; \
373           cp "$(top_builddir)/po/$$i.gmo" \
374             "$(top_builddir)/vlc-bundle/share/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
375         done
376         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
377 endif
378
379 ###############################################################################
380 # Building aliases
381 ###############################################################################
382
383 ALL_ALIASES = cvlc rvlc svlc wxvlc qvlc nvlc mvlc
384 bin_SCRIPTS = $(ALIASES)
385 CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
386 EXTRA_SCRIPTS = $(ALL_ALIASES)
387
388 dist_noinst_SCRIPTS += make-alias
389
390 MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
391
392 cvlc: make-alias Makefile
393         $(MKALIAS) dummy
394
395 rvlc: make-alias Makefile
396         $(MKALIAS) rc
397
398 svlc: make-alias Makefile
399         $(MKALIAS) skins2
400
401 wxvlc: make-alias Makefile
402         $(MKALIAS) wx
403
404 qvlc: make-alias Makefile
405         $(MKALIAS) qt4
406
407 nvlc: make-alias Makefile
408         $(MKALIAS) ncurses
409
410 mvlc: make-alias Makefile
411         $(MKALIAS) maemo
412
413 if BUILD_VLC
414 noinst_SCRIPTS += vlc$(EXEEXT)
415 endif
416
417 vlc$(EXEEXT):
418         ln -sf bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
419
420 if HAVE_DARWIN
421 if BUILD_VLC
422 # Create the MacOS X app
423 noinst_DATA = VLC.app
424 endif
425 endif
426
427 # VLC-release.app for packaging and giving it to your friends
428 # use package-macosx to get a nice dmg
429 VLC-release.app: vlc
430         ( cd src && make install )
431         rm -Rf "$(top_builddir)/tmp"
432         mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
433         rm -Rf $(top_builddir)/VLC-release.app
434         for i in vlc.xcodeproj Resources README.MacOSX.rtf ; do \
435           cp -R $(srcdir)/extras/package/macosx/$$i $(top_builddir)/tmp/extras/package/macosx/; \
436         done
437         REVISION=`git describe --always` && \
438         cat $(top_builddir)/extras/package/macosx/Info.plist | \
439         sed "s/#REVISION#/$$REVISION/g" > $(top_builddir)/tmp/extras/package/macosx/Info.plist
440         cp -R $(top_builddir)/extras/package/macosx/Resources $(top_builddir)/tmp/extras/package/macosx/
441         for i in AUTHORS COPYING THANKS; do \
442           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
443         done
444         mkdir -p $(top_builddir)/tmp/modules/audio_output
445         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
446         for i in \
447             AppleRemote.h \
448             AppleRemote.m \
449             about.h \
450             about.m \
451             applescript.h \
452             applescript.m \
453             controls.h \
454             controls.m \
455             equalizer.h \
456             equalizer.m \
457             intf.h \
458             intf.m \
459             macosx.m \
460             misc.h \
461             misc.m \
462             open.h \
463             open.m \
464             output.h \
465             output.m \
466             playlist.h \
467             playlist.m \
468             playlistinfo.h \
469             playlistinfo.m \
470             prefs_widgets.h \
471             prefs_widgets.m \
472             prefs.h \
473             prefs.m \
474             simple_prefs.h \
475             simple_prefs.m \
476             vout.h \
477             voutgl.m \
478             wizard.h \
479             wizard.m \
480             extended.h \
481             extended.m \
482             bookmarks.h \
483             bookmarks.m \
484             update.h \
485             update.m \
486             coredialogs.h \
487             coredialogs.m \
488             embeddedwindow.h \
489             embeddedwindow.m \
490             fspanel.h \
491             fspanel.m \
492             vout.m; do \
493           cp "$(srcdir)/modules/gui/macosx/$$i" \
494              $(top_builddir)/tmp/modules/gui/macosx; \
495         done
496         cd $(top_builddir)/tmp/extras/package/macosx && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)' && \
497             cd ../../../../ && \
498             cp -R $(top_builddir)/tmp/extras/package/macosx/build/Default/VLC.bundle \
499                   $(top_builddir)/VLC-release.app; \
500         rm -Rf $(top_builddir)/tmp
501         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
502         PRODUCT="VLC-release.app" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
503         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua
504         for i in $(srcdir)/share/lua/*.* ; do \
505           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/`basename $${i}` ; \
506         done ; \
507         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist
508         for i in $(srcdir)/share/lua/playlist/*.* ; do \
509           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist/`basename $${i}` ; \
510         done ; \
511         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/meta
512         for i in $(srcdir)/share/lua/meta/*.* ; do \
513           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/meta/`basename $${i}` ; \
514         done ; \
515         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf
516         for i in $(srcdir)/share/lua/intf/*.* ; do \
517           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/`basename $${i}` ; \
518         done ; \
519         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/modules
520         for i in $(srcdir)/share/lua/intf/modules/*.* ; do \
521           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/modules/`basename $${i}` ; \
522         done ; \
523         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/dialogs
524         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/js
525         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/images
526         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests
527         $(INSTALL) -m 644 $(srcdir)/share/lua/http/.hosts $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/.hosts
528         for i in $(srcdir)/share/lua/http/*.* ; do \
529           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/`basename $${i}` ; \
530         done
531         for i in $(srcdir)/share/lua/http/dialogs/* ; do \
532           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/dialogs/`basename $${i}` ; \
533         done
534         for i in $(srcdir)/share/lua/http/js/*.* ; do \
535           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/js/`basename $${i}` ; \
536         done
537         for i in $(srcdir)/share/lua/http/images/*.* ; do \
538           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/images/`basename $${i}` ; \
539         done
540         for i in $(srcdir)/share/lua/http/requests/*.* ; do \
541           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/`basename $${i}` ; \
542         done
543         $(INSTALL) -m 644 $(srcdir)/share/lua/http/requests/readme $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/readme.txt
544         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs
545         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js
546         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old
547         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/admin
548         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/vlm
549         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images
550         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests
551         $(INSTALL) -m 644 $(srcdir)/share/http/.hosts $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/.hosts
552         $(INSTALL) -m 644 $(srcdir)/share/http/old/.hosts $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/.hosts
553         for i in $(srcdir)/share/http/*.* ; do \
554           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
555         done
556         for i in $(srcdir)/share/http/dialogs/* ; do \
557           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs/`basename $${i}` ; \
558         done
559         for i in $(srcdir)/share/http/js/*.* ; do \
560           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js/`basename $${i}` ; \
561         done
562         for i in $(srcdir)/share/http/old/*.* ; do \
563           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/`basename $${i}` ; \
564         done
565         for i in $(srcdir)/share/http/old/admin/*.* ; do \
566           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/admin/`basename $${i}` ; \
567         done
568         for i in $(srcdir)/share/http/old/vlm/*.* ; do \
569           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/vlm/`basename $${i}` ; \
570         done
571         for i in $(srcdir)/share/http/images/*.* ; do \
572           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images/`basename $${i}` ; \
573         done
574         for i in $(srcdir)/share/http/requests/*.* ; do \
575           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/`basename $${i}` ; \
576         done
577         $(INSTALL) -m 644 $(srcdir)/share/http/requests/readme $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/readme.txt
578         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale
579         cat $(top_srcdir)/po/LINGUAS | while read i; do \
580           $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES ; \
581           $(INSTALL) $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
582           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
583           ln -sf ../English.lproj/InfoPlist.strings \
584               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
585           ln -sf ../English.lproj/MainMenu.nib \
586               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
587         done
588         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
589         find $(top_builddir)/VLC-release.app/Contents/Resources/English.lproj -name classes.nib -delete;
590         find $(top_builddir)/VLC-release.app/Contents/Resources/English.lproj -name info.nib -delete;
591         find $(top_builddir)/VLC-release.app -type d -exec chmod ugo+rx '{}' \;
592         find $(top_builddir)/VLC-release.app -type f -exec chmod ugo+r '{}' \;
593
594 # This is just for development purposes. 
595 # The resulting VLC.app will only run in this tree.
596 VLC.app: vlc $(top_builddir)/src/.libs/libvlccore.dylib $(top_builddir)/src/.libs/libvlc.dylib
597         (cd src && make install)
598         rm -Rf $(top_builddir)/tmp
599         mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
600         rm -Rf $(top_builddir)/VLC.app
601         for i in vlc.xcodeproj Resources README.MacOSX.rtf; do \
602           cp -R $(srcdir)/extras/package/macosx/$$i $(top_builddir)/tmp/extras/package/macosx/; \
603         done
604         REVISION=`git describe --always` && \
605         cat $(top_builddir)/extras/package/macosx/Info.plist | \
606         sed "s/#REVISION#/$$REVISION/g" > $(top_builddir)/tmp/extras/package/macosx/Info.plist
607         cp -R $(top_builddir)/extras/package/macosx/Resources $(top_builddir)/tmp/extras/package/macosx/
608         for i in AUTHORS COPYING THANKS; do \
609           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
610         done
611         mkdir -p $(top_builddir)/tmp/modules/audio_output
612         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
613         for i in \
614             AppleRemote.h \
615             AppleRemote.m \
616             about.h \
617             about.m \
618             applescript.h \
619             applescript.m \
620             controls.h \
621             controls.m \
622             equalizer.h \
623             equalizer.m \
624             intf.h \
625             intf.m \
626             macosx.m \
627             misc.h \
628             misc.m \
629             open.h \
630             open.m \
631             output.h \
632             output.m \
633             playlist.h \
634             playlist.m \
635             playlistinfo.h \
636             playlistinfo.m \
637             prefs_widgets.h \
638             prefs_widgets.m \
639             prefs.h \
640             prefs.m \
641             simple_prefs.h \
642             simple_prefs.m \
643             vout.h \
644             voutgl.m \
645             wizard.h \
646             wizard.m \
647             extended.h \
648             extended.m \
649             bookmarks.h \
650             bookmarks.m \
651             update.h \
652             update.m \
653             coredialogs.h \
654             coredialogs.m \
655             embeddedwindow.h \
656             embeddedwindow.m \
657             fspanel.h \
658             fspanel.m \
659             vout.m; do \
660           cp "$(srcdir)/modules/gui/macosx/$$i" \
661              $(top_builddir)/tmp/modules/gui/macosx; \
662         done
663         cd $(top_builddir)/tmp/extras/package/macosx && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)' && \
664             cd ../../../../ && \
665             cp -R $(top_builddir)/tmp/extras/package/macosx/build/Default/VLC.bundle \
666                   $(top_builddir)/VLC.app
667         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
668         touch $(top_builddir)/VLC.app/Contents/MacOS/VLC
669         chmod +x $(top_builddir)/VLC.app/Contents/MacOS/VLC
670         $(INSTALL) $(top_builddir)/bin/.libs/vlc $(top_builddir)/VLC.app/Contents/MacOS/VLC
671         ln -sf ../../../modules $(top_builddir)/VLC.app/Contents/MacOS/modules
672         install -d $(top_builddir)/VLC.app/Contents/MacOS/share
673         for i in `ls $(srcdir)/share`; do \
674            ln -sf `pwd`/$(srcdir)/share/$$i $(top_builddir)/VLC.app/Contents/MacOS/share/; \
675         done
676         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/share/locale
677         cat $(top_srcdir)/po/LINGUAS | while read i; do \
678           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES ; \
679           ln -sfn `pwd`/$(srcdir)/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
680           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
681           ln -sf ../English.lproj/InfoPlist.strings \
682               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
683           ln -sf ../English.lproj/MainMenu.nib \
684               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
685         done
686         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
687
688 ###############################################################################
689 # Building architecture-specific binary packages
690 ###############################################################################
691
692 # XXX: this rule is probably only useful to you if you have exactly
693 # the same setup as the maintaner(s).
694 #
695
696 ############################################################################
697 ## Win                                                                    ##
698 ############################################################################
699 win32_destdir=$(top_builddir)/vlc-$(VERSION)
700 win32_debugdir=$(top_builddir)/symbols-$(VERSION)
701 npvlc=vlc-$(VERSION)/mozilla/npvlc$(LIBEXT)
702 axvlc=vlc-$(VERSION)/activex/axvlc$(LIBEXT)
703 win32_lua_destdir=$(win32_destdir)/lua
704 win32_http_destdir=$(win32_destdir)/http
705
706 #Win-common if for win32 and wince
707 package-win-common:
708 # Check that tmp isn't in the way
709         @if test -e "$(win32_destdir)"; then \
710           echo "Error: please remove $(win32_destdir), it is in the way"; \
711           false; \
712         else \
713           echo "OK."; mkdir -p "$(win32_destdir)"; \
714         fi
715
716 # Copy relevant files
717 # Copy executables and libs
718         cp "$(top_builddir)/bin/.libs/vlc$(EXEEXT)" "$(win32_destdir)/"
719         cp "$(top_srcdir)/extras/package/win32/vlc.exe.manifest" "$(win32_destdir)/"
720                 cp "$(top_srcdir)/extras/package/win32/libvlc.dll.manifest" "$(win32_destdir)/"
721         cp "$(top_builddir)/src/.libs/libvlccore$(LIBEXT)" "$(win32_destdir)/"
722         cp "$(top_builddir)/src/.libs/libvlc$(LIBEXT)" "$(win32_destdir)/"
723
724 # Copy Text files
725         for file in AUTHORS MAINTAINERS THANKS ; \
726           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(win32_destdir)/$${file}.txt" ; done;
727         for file in NEWS COPYING README; \
728           do cp "$(srcdir)/$$file" "$(win32_destdir)/$${file}.txt"; done
729         unix2dos "$(win32_destdir)/"*.txt || echo "WARNING: this shouldn't happen"
730
731 # Necessary icons
732         cp $(srcdir)/share/vlc.ico $(win32_destdir)/
733
734 # Copy the locales
735         mkdir -p $(win32_destdir)/locale
736         cat $(top_srcdir)/po/LINGUAS | while read i; do \
737           mkdir -p "$(win32_destdir)/locale/$${i}/LC_MESSAGES" ; \
738           cp "$(srcdir)/po/$${i}.gmo" \
739             "$(win32_destdir)/locale/$${i}/LC_MESSAGES/vlc.mo" \
740             || true ; \
741         done
742         mkdir -p $(win32_destdir)/locale/qt4/
743         cp $(QT4LOCALEDIR)/*.qm $(win32_destdir)/locale/qt4/ || true
744
745 #  Mozilla plugin
746 if BUILD_MOZILLA
747         mkdir -p "$(win32_destdir)/mozilla"
748         cp $(top_builddir)/projects/mozilla/.libs/npvlc$(LIBEXT) $(win32_destdir)/mozilla/
749         cp $(top_srcdir)/projects/mozilla/npvlc.dll.manifest $(win32_destdir)/mozilla/
750 endif
751
752 # ActiveX plugin
753 if BUILD_ACTIVEX
754         mkdir -p "$(win32_destdir)/activex"
755         cp $(srcdir)/projects/activex/README.TXT  $(win32_destdir)/activex/
756         cp $(srcdir)/projects/activex/test.html  $(win32_destdir)/activex/
757         unix2dos $(win32_destdir)/activex/*
758
759         cp $(top_builddir)/projects/activex/.libs/axvlc$(LIBEXT) $(win32_destdir)/activex/
760         cp $(top_srcdir)/projects/activex/axvlc.dll.manifest $(win32_destdir)/activex/
761 endif
762
763 # Rebase all those DLLs to speed up loading (need cygwin rebase)
764         if rebase -b 0x42 /dev/null >/dev/null 2>&1; then \
765                 find $(win32_destdir) -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
766         fi
767
768 package-win32-base-debug: package-win-common
769 # Copy relevant files
770 # Script installer
771         cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/"
772         mkdir "$(win32_destdir)/languages"
773         cp $(srcdir)/extras/package/win32/languages/*.nsh "$(win32_destdir)/languages/"
774
775 # Plugins
776         mkdir -p "$(win32_destdir)/plugins"
777         find modules/ -name '*_plugin$(LIBEXT)' | while read i; do \
778           if test -n "$$i" ; then \
779             $(INSTALL) "$$i" "vlc-$(VERSION)/plugins/" ; \
780           fi ; done
781
782 # Contrib *.dll's
783         cp $(srcdir)/extras/contrib/lib/*.dll "vlc-$(VERSION)/" || true
784
785 # Copy the lua scripts (HTTP)
786 if BUILD_LUA
787         mkdir -p "$(win32_lua_destdir)/http/images"
788         mkdir -p "$(win32_lua_destdir)/http/requests"
789         mkdir -p "$(win32_lua_destdir)/http/js"
790         mkdir -p "$(win32_lua_destdir)/http/dialogs"
791         cp $(srcdir)/share/lua/http/*.html $(win32_lua_destdir)/http/
792         unix2dos $(win32_lua_destdir)/http/*.html
793         cp $(srcdir)/share/lua/http/.hosts $(win32_lua_destdir)/http/
794         unix2dos $(win32_lua_destdir)/http/.hosts
795         cp $(srcdir)/share/lua/http/*.css $(win32_lua_destdir)/http/
796         unix2dos $(win32_lua_destdir)/http/*.css
797         cp $(srcdir)/share/lua/http/js/*.js $(win32_lua_destdir)/http/js/
798         unix2dos $(win32_lua_destdir)/http/js/*.js
799         cp $(srcdir)/share/lua/http/dialogs/* $(win32_lua_destdir)/http/dialogs/
800         unix2dos $(win32_lua_destdir)/http/dialogs/*
801         cp $(srcdir)/share/lua/http/dialogs/.hosts $(win32_lua_destdir)/http/dialogs/
802         unix2dos $(win32_lua_destdir)/http/dialogs/.hosts
803         cp $(srcdir)/share/lua/http/*.ico $(win32_lua_destdir)/http/
804         cp $(srcdir)/share/lua/http/images/*.png $(win32_lua_destdir)/http/images/
805         cp $(srcdir)/share/lua/http/requests/*.xml $(win32_lua_destdir)/http/requests/
806         unix2dos $(win32_lua_destdir)/http/requests/*.xml
807         cp $(srcdir)/share/lua/http/requests/readme $(win32_lua_destdir)/http/requests/readme.txt
808         unix2dos $(win32_lua_destdir)/http/requests/readme.txt
809 endif
810
811 if BUILD_LUA
812 #Lua Scripts
813         $(INSTALL) -d $(win32_lua_destdir)
814         for i in $(srcdir)/share/lua/*.* ; do \
815           $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/`basename $${i}` ; \
816         done
817         $(INSTALL) -d $(win32_lua_destdir)/playlist
818         for i in $(srcdir)/share/lua/playlist/*.* ; do \
819           $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/playlist/`basename $${i}` ; \
820         done
821         $(INSTALL) -d $(win32_lua_destdir)/meta
822         for i in $(srcdir)/share/lua/meta/*.* ; do \
823           $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/meta/`basename $${i}` ; \
824         done
825         $(INSTALL) -d $(win32_lua_destdir)/intf
826         for i in $(srcdir)/share/lua/intf/*.* ; do \
827           $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/intf/`basename $${i}` ; \
828         done
829         $(INSTALL) -d $(win32_lua_destdir)/intf/modules
830         for i in $(srcdir)/share/lua/intf/modules/*.* ; do \
831           $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/intf/modules/`basename $${i}` ; \
832         done
833 endif
834
835 # Copy the http files
836 if BUILD_HTTPD
837         mkdir -p "$(win32_http_destdir)/images"
838         mkdir -p "$(win32_http_destdir)/requests"
839         mkdir -p "$(win32_http_destdir)/js"
840         mkdir -p "$(win32_http_destdir)/dialogs"
841         mkdir -p "$(win32_http_destdir)/old"
842         mkdir -p "$(win32_http_destdir)/old/vlm"
843         mkdir -p "$(win32_http_destdir)/old/admin"
844         cp $(srcdir)/share/http/*.html $(win32_http_destdir)/
845         unix2dos $(win32_http_destdir)/*.html
846         cp $(srcdir)/share/http/.hosts $(win32_http_destdir)/
847         unix2dos $(win32_http_destdir)/.hosts
848         cp $(srcdir)/share/http/*.css $(win32_http_destdir)/
849         unix2dos $(win32_http_destdir)/*.css
850         cp $(srcdir)/share/http/js/*.js $(win32_http_destdir)/js/
851         unix2dos $(win32_http_destdir)/js/*.js
852         cp $(srcdir)/share/http/dialogs/* $(win32_http_destdir)/dialogs/
853         unix2dos $(win32_http_destdir)/dialogs/*
854         cp $(srcdir)/share/http/dialogs/.hosts $(win32_http_destdir)/dialogs/
855         unix2dos $(win32_http_destdir)/dialogs/.hosts
856         cp $(srcdir)/share/http/*.ico $(win32_http_destdir)/
857         cp $(srcdir)/share/http/images/*.png $(win32_http_destdir)/images/
858         cp $(srcdir)/share/http/requests/*.xml $(win32_http_destdir)/requests/
859         unix2dos $(win32_http_destdir)/requests/*.xml
860         cp $(srcdir)/share/http/requests/readme $(win32_http_destdir)/requests/readme.txt
861         unix2dos $(win32_http_destdir)/requests/readme.txt
862
863         cp $(srcdir)/share/http/old/*.html $(win32_http_destdir)/old/
864         unix2dos $(win32_http_destdir)/old/*.html
865         cp $(srcdir)/share/http/old/*.css $(win32_http_destdir)/old/
866         cp $(srcdir)/share/http/old/.hosts $(win32_http_destdir)/old/
867         cp $(srcdir)/share/http/old/*.png $(win32_http_destdir)/old/
868         cp $(srcdir)/share/http/old/vlm/*.html $(win32_http_destdir)/old/vlm/
869         unix2dos $(win32_http_destdir)/old/vlm/*.html
870         cp $(srcdir)/share/http/old/admin/*.html $(win32_http_destdir)/old/admin/
871         unix2dos $(win32_http_destdir)/old/admin/*.html
872         cp $(srcdir)/share/http/old/admin/.access $(win32_http_destdir)/old/admin/
873 endif
874
875 if BUILD_SKINS
876 # Skins
877         mkdir -p $(win32_destdir)/skins/fonts
878         for i in $(srcdir)/share/skins2/fonts/*.*; do \
879           cp -- "$$i" $(win32_destdir)/skins/fonts/ || true ; \
880         done
881         for i in $(top_builddir)/share/skins2/*.*; do \
882           cp -- "$$i" $(win32_destdir)/skins/ || true ; \
883         done
884         cp -- $(srcdir)/share/skins2/skin.catalog $(win32_destdir)/skins/ || true ;
885         cp -- $(srcdir)/share/skins2/skin.dtd $(win32_destdir)/skins/ || true ;
886 endif
887
888 if BUILD_OSDMENU
889 #OSD Menu
890         mkdir -p "$(win32_destdir)/osdmenu"
891         cp $(srcdir)/share/osdmenu/*.* "$(win32_destdir)/osdmenu"
892         for dir in default default/selected default/selection default/volume ;do \
893                 mkdir -p "$(win32_destdir)/osdmenu/$$dir"; \
894                 for file in $(srcdir)/share/osdmenu/$${dir}/*.png;do \
895                          cp -- "$$file" "$(win32_destdir)/osdmenu/$$dir"; \
896                 done; \
897         done
898         unix2dos $(win32_destdir)/osdmenu/*.cfg;
899         for file in $(win32_destdir)/osdmenu/*.cfg; do \
900                 sed 's%share/osdmenu%osdmenu%g' "$$file" > "$$file.tmp" || exit $$? ; \
901                 sed 's%/%\\%g' "$$file.tmp" > "$$file" || exit$$? ; \
902                 rm -f -- "$$file.tmp"; \
903         done
904 endif
905
906 # SDK
907         mkdir -p "$(win32_destdir)/sdk.tmp"
908         mkdir -p "$(win32_destdir)/sdk"
909         d=$$(pwd) && \
910         cd src && \
911         make install DESTDIR="$$d/vlc-$(VERSION)/sdk.tmp"
912         cd vlc-$(VERSION) && mv sdk.tmp/$(prefix)/* sdk/
913         find vlc-$(VERSION)/sdk.tmp -type d | sort -r | xargs rmdir
914         rm -Rf vlc-$(VERSION)/sdk/bin
915
916 #strip exe and main dll
917 package-win-common-strip: package-win32-base-debug
918         @if test -e "$(win32_debugdir)"; then \
919           echo "Error: please remove $(win32_debugdir), it is in the way"; \
920           false; \
921         else \
922           echo "OK."; mkdir -p "$(win32_debugdir)"; \
923         fi
924         for i in "" vlc-$(VERSION)/*$(LIBEXT) ; \
925       do if test -n "$$i" ; then \
926       $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
927       $(OBJCOPY) --strip-debug "$$i" ; \
928       $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
929           mv "$$i.dbg" "$(win32_debugdir)"; \
930     fi; done
931
932 if BUILD_MOZILLA
933         $(OBJCOPY) --only-keep-debug "$(npvlc)" "$(npvlc).dbg"
934         $(OBJCOPY) --strip-debug "$(npvlc)"
935         $(OBJCOPY) --add-gnu-debuglink="$(npvlc).dbg" "$(npvlc)"
936         mv "$(npvlc).dbg" "$(win32_debugdir)"
937 endif
938 if BUILD_ACTIVEX
939         $(OBJCOPY) --only-keep-debug "$(axvlc)" "$(axvlc).dbg"
940         $(OBJCOPY) --strip-debug "$(axvlc)"
941         $(OBJCOPY) --add-gnu-debuglink="$(axvlc).dbg" "$(axvlc)"
942         mv "$(axvlc).dbg" "$(win32_debugdir)"
943 endif
944
945 #strip all plugins dll
946 package-win32-base: package-win-common-strip
947         for i in "" $(win32_destdir)/plugins/*$(LIBEXT) ; \
948           do if test -n "$$i" ; then \
949           $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
950           $(OBJCOPY) --strip-debug "$$i" ; \
951           $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
952           mv "$$i.dbg" "$(win32_debugdir)"; \
953         fi ; done
954
955 package-win32-base-exe: package-win32-base
956 # Create package
957         rm -Rf $(win32_destdir)/sdk
958         if makensis -VERSION >/dev/null 2>&1; then \
959             MAKENSIS="makensis"; \
960         elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
961             MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \
962         elif [ -x "$(PROGRAMFILES)/NSIS/makensis" ]; then \
963             MAKENSIS="$(PROGRAMFILES)/NSIS/makensis"; \
964         elif wine --version >/dev/null 2>&1; then \
965             MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \
966         else \
967             echo 'Error: cannot locate makensis tool'; exit 1; \
968         fi; \
969         eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
970
971 package-win32-base-zip: package-win32-base
972 # Create package 
973         rm -f -- vlc-$(VERSION)-win32.zip
974         zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
975
976 package-win32-base-debug-zip: package-win32-base-debug
977 # Create package
978         rm -f -- vlc-$(VERSION)-win32-debug.zip
979         zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION)
980
981 package-win32-base-7zip: package-win32-base
982 # Create package 
983         7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION)
984
985 package-win32-base-debug-7zip: package-win32-base-debug
986 # Create package
987         7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION)
988
989 package-win32-exe: package-win32-base package-win32-base-exe
990 # Clean up
991         rm -Rf $(win32_destdir)
992
993 package-win32-zip: package-win32-base-zip
994 # Clean up
995         rm -Rf $(win32_destdir)
996
997 package-win32-debug-zip: package-win32-base-debug-zip
998 # Clean up
999         rm -Rf $(win32_destdir)
1000
1001 package-win32-7zip: package-win32-base-7zip
1002 # Clean up
1003         rm -Rf $(win32_destdir)
1004
1005 package-win32-debug-7zip: package-win32-base-debug-7zip
1006 # Clean up
1007         rm -Rf $(win32_destdir)
1008
1009 package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe 
1010
1011 package-win32: package-win32-no-clean
1012 # Clean up
1013         rm -Rf $(win32_destdir)
1014
1015 package-win32-debug: package-win32-base-debug-zip package-win32-base-debug-7zip
1016 # Clean up
1017         rm -Rf $(win32_destdir)
1018
1019 package-wince-base: package-win-common package-win-common-strip
1020
1021 package-wince-base-zip:
1022 # Create package 
1023         zip -r vlc-$(VERSION)-wince.zip vlc-$(VERSION)
1024
1025 package-wince: package-wince-base  package-wince-base-zip
1026 # Clean up
1027         rm -Rf $(win32_destdir)
1028
1029
1030 #####################################################################
1031 ##   BeOS                                                          ##
1032 #####################################################################
1033 package-beos:
1034 # Check that tmp isn't in the way
1035         @if test -e $(srcdir)/tmp; then \
1036           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
1037           false ; \
1038         else \
1039           echo "OK." ; mkdir $(srcdir)/tmp ; \
1040         fi
1041
1042 # Copy relevant files
1043         mkdir -p $(srcdir)/tmp/vlc
1044         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
1045           THANKS NEWS tmp/vlc/
1046
1047 # Create debug package
1048         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc
1049         find $(srcdir)/tmp/vlc -exec mimeset -f {} \;
1050         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-$(VERSION)
1051         (cd $(srcdir)/tmp && zip -9 -r vlc-$(VERSION)-BeOS-debug.zip vlc-$(VERSION) )
1052         mv $(srcdir)/tmp/vlc-$(VERSION)-BeOS-debug.zip $(srcdir)/
1053         mv $(srcdir)/tmp/vlc-$(VERSION) $(srcdir)/tmp/vlc
1054
1055 # Create normal package
1056         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc
1057         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
1058           --strip-debug --strip-unneeded "{}" \;
1059         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc
1060         find $(srcdir)/tmp/vlc -exec mimeset -f {} \;
1061         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-$(VERSION)
1062         (cd $(srcdir)/tmp &&  zip -9 -r vlc-$(VERSION)-BeOS.zip vlc-$(VERSION) )
1063         mv $(srcdir)/tmp/vlc-$(VERSION)-BeOS.zip $(srcdir)/
1064
1065 # Clean up
1066         rm -Rf $(srcdir)/tmp
1067
1068 #########################################################################
1069 ## MacOS X                                                             ##
1070 #########################################################################
1071 package-macosx: VLC-release.app ChangeLog
1072 # Check that the temporary location isn't in the way
1073         @if test -e "$(top_builddir)/vlc-$(VERSION)/"; then \
1074           rm -Rf "$(top_builddir)/vlc-$(VERSION)/" ; \
1075         fi
1076
1077         echo "Create package directory: vlc-$(VERSION)/";
1078         mkdir -p "$(top_builddir)/vlc-$(VERSION)/";
1079
1080 # Copy relevant files 
1081         @if test -e "$(top_builddir)/VLC-release.app/"; then \
1082           cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
1083         else \
1084           cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
1085         fi
1086         cd "$(srcdir)" && mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
1087           mkdir -p $(top_builddir)/vlc-$(VERSION)/.background/ && \
1088           cp AUTHORS COPYING ChangeLog README THANKS NEWS $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
1089           cp -R  extras/package/macosx/Delete_Preferences.app $(top_builddir)/vlc-$(VERSION)/Goodies/Delete\ VLC\ Preferences.app && \
1090           cp extras/package/macosx/README.MacOSX.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf && \
1091           cp extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png
1092
1093 # Place a link to the application folder
1094         ln -s /Applications $(top_builddir)/vlc-$(VERSION)/Applications
1095
1096 # Create disk image (temporarily taken from the 0.8.6-bugfix branch to provide reliable NBs)
1097         echo "Creating disk image"
1098         rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
1099         hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
1100           "$(top_builddir)/vlc-$(VERSION).dmg" -scrub
1101         echo "Disk image creation completed:"
1102         ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
1103
1104 # Create disk image 
1105 #       echo "Creating disk image"
1106 #       rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
1107 #       hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
1108 #         "$(top_builddir)/vlc-$(VERSION).dmg" -format UDRW \
1109 #         -scrub -imagekey zlib-level=9 -attach
1110
1111 # Make sure the root window of the dmg will pop up when the dmg is mounted.
1112 # Note: We dont mount in /Volumes to be sure we won't collide with an other
1113 # finder mounted dmg with the same name.
1114 #       echo "Make sure the root window of the dmg will pop up when the dmg is mounted"
1115 #       mkdir -p $(top_builddir)/vlcmnt
1116 #       hdiutil attach -nokernel -readwrite -noverify -noautoopen -private "$(top_builddir)/vlc-$(VERSION).dmg" -mountpoint "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
1117 #       bless --folder "$(top_builddir)/vlcmnt/vlc-$(VERSION)/" --openfolder "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
1118 #       sleep 1 # Make sure operation completes
1119 #       cd "$(srcdir)"
1120
1121 # Unmount the image now
1122 #       hdiutil detach "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
1123 #       rm -R $(top_builddir)/vlcmnt
1124
1125 # Make sure the image is not writable
1126 # Note: We can't directly create a read only dmg as we do the bless stuff
1127         echo "Make the disk image read-only"
1128         mv "$(top_builddir)/vlc-$(VERSION).dmg" "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
1129         hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDZO -o "$(top_builddir)/vlc-$(VERSION).dmg"
1130         rm "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
1131
1132 # We are done
1133         echo "Disk image creation completed:"
1134         ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
1135
1136 # Clean up
1137         rm -Rf "$(top_builddir)/vlc-$(VERSION)"
1138
1139 package-macosx-zip: VLC-release.app
1140         rm -Rf $(top_builddir)/vlc-$(VERSION)
1141         mkdir -p $(top_builddir)/vlc-$(VERSION)
1142         cp -R $(top_builddir)/VLC-release.app $(top_builddir)/vlc-$(VERSION)/VLC.app
1143         mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
1144         for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
1145           cp $(srcdir)/$$i $(top_builddir)/vlc-$(VERSION)/Goodies; \
1146         done
1147         cp -R  $(srcdir)/extras/package/macosx/Delete_Preferences.app \
1148              $(top_builddir)/vlc-$(VERSION)/Goodies
1149         cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf \
1150            $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf
1151         zip -r $(top_builddir)/vlc-$(VERSION).zip $(top_builddir)/vlc-$(VERSION)
1152         rm -Rf $(top_builddir)/vlc-$(VERSION)
1153
1154 package-macosx-framework-zip:
1155         rm -Rf $(top_builddir)/vlckit-$(VERSION)
1156         mkdir -p $(top_builddir)/vlckit-$(VERSION)
1157         cp -R $(srcdir)/projects/macosx/framework/build/Debug/VLCKit.framework \
1158           $(top_builddir)/vlckit-$(VERSION)/VLCKit.framework
1159         mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
1160         for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
1161           cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies; \
1162         done
1163         zip -r $(top_builddir)/vlckit-$(VERSION).zip $(top_builddir)/vlckit-$(VERSION)
1164         rm -Rf $(top_builddir)/vlc-$(VERSION)
1165
1166 package-macosx-plugin:
1167 if BUILD_MOZILLA
1168 # Create Installer
1169         rm -rf "$(top_builddir)/macosx-plugin-instdata/"; true
1170         mkdir -p "$(top_builddir)/macosx-plugin-instdata"
1171         cp -R "$(top_builddir)/projects/mozilla/VLC Plugin.plugin" "$(top_builddir)/macosx-plugin-instdata"
1172         rm -rf "$(top_builddir)/VLC Internet Plug-In.pkg"
1173         export PACKAGEMAKER=
1174         if test -x /Developer/Tools/packagemaker; then \
1175            export PACKAGEMAKER=/Developer/Tools/packagemaker; \
1176         fi; \
1177         if test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then \
1178            export PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; \
1179         fi; \
1180         $${PACKAGEMAKER} -build -ds -p "$(top_builddir)/VLC Internet Plug-In.pkg" \
1181         -f "$(top_builddir)/macosx-plugin-instdata" \
1182         -i "$(srcdir)/extras/package/macosx/plugin/InstallerInfo.plist" \
1183         -d "$(srcdir)/extras/package/macosx/plugin/InstallerDescription.plist"; true
1184         rm -rf "$(top_builddir)/macosx-plugin-instdata/"
1185
1186 # Create disk image 
1187         rm -f "$(top_builddir)/vlc-plugin-$(VERSION).dmg"; true
1188         rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)/"; true
1189         mkdir -p "$(top_builddir)/vlc-plugin-$(VERSION)/"
1190         mv "$(top_builddir)/VLC Internet Plug-In.pkg" "$(top_builddir)/vlc-plugin-$(VERSION)/"
1191         hdiutil create -srcfolder "$(top_builddir)/vlc-plugin-$(VERSION)" \
1192           "$(top_builddir)/vlc-plugin-$(VERSION).dmg" -format UDZO \
1193           -scrub -imagekey zlib-level=9
1194         echo "Disk image creation completed:"
1195         rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)"
1196 endif
1197
1198 package-translations:
1199         @if test -e "$(srcdir)/vlc-translations-$(VERSION)"; then \
1200           echo "Error: please remove $(srcdir)/vlc-translations-$(VERSION), it is in the way"; \
1201           false; \
1202         else \
1203           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-$(VERSION)"; \
1204         fi
1205 # Copy translations
1206         cat $(top_srcdir)/po/LINGUAS | while read i; do \
1207           cp "$(srcdir)/po/$${i}.po" \
1208             "$(srcdir)/vlc-translations-$(VERSION)/$${i}.po" \
1209             || true ; \
1210         done
1211         cp "$(srcdir)/doc/translations.txt" \
1212           "$(srcdir)/vlc-translations-$(VERSION)/README.txt"
1213
1214         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1215         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1216         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1217         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1218         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1219         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1220         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1221         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1222
1223         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1224           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1225
1226 ###############################################################################
1227 # PO translation files update
1228 ###############################################################################
1229 .PHONY: update-po
1230
1231 update-po:
1232         cd po && $(MAKE) POTFILES vlc.pot update-po
1233
1234
1235 ###############################################################################
1236 # Enforce Mac OS X deployment target environment variable
1237 ###############################################################################
1238 macosx-sdk: Makefile.in $(HEADERS_include) vlc-config
1239         export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)