]> git.sesse.net Git - vlc/blob - Makefile.am
Add Basque translation in Win32 installer
[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
9 #  - libs/* are needed by modules
10 DIST_SUBDIRS = m4 compat doc po share src modules lib bin test
11 SUBDIRS = compat doc po share src modules lib
12 if BUILD_VLC
13 SUBDIRS += bin
14 endif
15 SUBDIRS += test
16
17 EXTRA_DIST = \
18         HACKING \
19         INSTALL.win32 \
20         extras/package/win32/vlc.exe.manifest \
21         extras/package/win32/libvlc.dll.manifest \
22         extras/package/macosx/README.MacOSX.rtf \
23         extras/package/rpm/vlc.fedora.spec \
24         extras/package/rpm/vlc.altlinux.spec \
25         extras/package/win32/vlc.win32.nsi.in \
26         extras/package/win32/spad.nsi.in \
27         extras/package/win32/UAC.nsh \
28         extras/package/win32/UAC.dll \
29         extras/package/win32/languages/declaration.nsh \
30         extras/package/win32/languages/bengali.nsh \
31         extras/package/win32/languages/basque.nsh \
32         extras/package/win32/languages/brazilian_portuguese.nsh \
33         extras/package/win32/languages/bulgarian.nsh \
34         extras/package/win32/languages/catalan.nsh \
35         extras/package/win32/languages/danish.nsh \
36         extras/package/win32/languages/dutch.nsh \
37         extras/package/win32/languages/english.nsh \
38         extras/package/win32/languages/estonian.nsh \
39         extras/package/win32/languages/finnish.nsh \
40         extras/package/win32/languages/french.nsh \
41         extras/package/win32/languages/german.nsh \
42         extras/package/win32/languages/hungarian.nsh \
43         extras/package/win32/languages/italian.nsh \
44         extras/package/win32/languages/japanese.nsh \
45         extras/package/win32/languages/occitan.nsh \
46         extras/package/win32/languages/polish.nsh \
47         extras/package/win32/languages/punjabi.nsh \
48         extras/package/win32/languages/romanian.nsh \
49         extras/package/win32/languages/schinese.nsh \
50         extras/package/win32/languages/slovak.nsh \
51         extras/package/win32/languages/slovenian.nsh \
52         extras/package/win32/languages/sorani.nsh \
53         extras/package/win32/languages/spanish.nsh
54
55 dist_noinst_SCRIPTS = bootstrap
56 nodist_noinst_SCRIPTS = compile
57
58 BUILT_SOURCES_distclean =
59 if HAVE_WIN32
60 BUILT_SOURCES_distclean += \
61         extras/package/win32/vlc.win32.nsi extras/package/win32/spad.nsi
62 endif
63 if HAVE_DARWIN
64 BUILT_SOURCES_clean = macosx-sdk
65 else
66 BUILT_SOURCES_clean =
67 endif
68
69 BUILT_SOURCES = $(BUILT_SOURCES_distclean) $(BUILT_SOURCES_clean)
70
71 SUFFIXES = 
72
73 DISTCHECK_CONFIGURE_FLAGS = \
74         --enable-fast-install \
75         --disable-a52 \
76         --disable-avcodec --disable-avformat \
77         --disable-postproc --disable-swscale \
78         --disable-dbus \
79         --disable-mad --disable-libmpeg2 \
80         --disable-faad --disable-skins2 \
81         --disable-live555 \
82         --disable-fribidi --disable-glx \
83         --disable-mkv \
84         --with-kde-solid='$${datadir}/kde4/apps'
85
86 ACLOCAL_AMFLAGS = -I m4
87 AUTOMAKE_OPTIONS = \
88         1.11 \
89         -Wall \
90         check-news \
91         dist-xz \
92         no-dist-gzip
93 #       std-options
94
95 ChangeLog: Makefile.am
96         rm -f -- "$@"
97         cd doc && $(MAKE) $(AM_MAKEFLAGS) changelogs
98         $(LN_S) -f doc/ChangeLog-2009 "$@"
99
100 ###############################################################################
101 # MacOS X project
102 ###############################################################################
103
104 EXTRA_DIST += \
105         extras/package/macosx/Resources/about_bg.png \
106         extras/package/macosx/Resources/add_embedded.png \
107         extras/package/macosx/Resources/add_embedded_graphite.png \
108         extras/package/macosx/Resources/dsa_pub.pem \
109         extras/package/macosx/Resources/embedded_vout.png \
110         extras/package/macosx/Resources/English.lproj/About.xib \
111         extras/package/macosx/Resources/English.lproj/AudioEffects.xib \
112         extras/package/macosx/Resources/English.lproj/Bookmarks.xib \
113         extras/package/macosx/Resources/English.lproj/CoreDialogs.xib \
114         extras/package/macosx/Resources/English.lproj/ErrorPanel.xib \
115         extras/package/macosx/Resources/English.lproj/MainMenu.xib \
116         extras/package/macosx/Resources/English.lproj/MediaInfo.xib \
117         extras/package/macosx/Resources/English.lproj/Open.xib \
118         extras/package/macosx/Resources/English.lproj/Preferences.xib \
119         extras/package/macosx/Resources/English.lproj/SyncTracks.xib \
120         extras/package/macosx/Resources/English.lproj/VideoEffects.xib \
121         extras/package/macosx/Resources/English.lproj/Wizard.xib \
122         extras/package/macosx/Resources/fspanel/fs_background.png \
123         extras/package/macosx/Resources/fspanel/fs_exit_fullscreen.png \
124         extras/package/macosx/Resources/fspanel/fs_exit_fullscreen_highlight.png \
125         extras/package/macosx/Resources/fspanel/fs_forward.png \
126         extras/package/macosx/Resources/fspanel/fs_forward_highlight.png \
127         extras/package/macosx/Resources/fspanel/fs_pause.png \
128         extras/package/macosx/Resources/fspanel/fs_pause_highlight.png \
129         extras/package/macosx/Resources/fspanel/fs_play.png \
130         extras/package/macosx/Resources/fspanel/fs_play_highlight.png \
131         extras/package/macosx/Resources/fspanel/fs_rewind.png \
132         extras/package/macosx/Resources/fspanel/fs_rewind_highlight.png \
133         extras/package/macosx/Resources/fspanel/fs_skip_next.png \
134         extras/package/macosx/Resources/fspanel/fs_skip_next_highlight.png \
135         extras/package/macosx/Resources/fspanel/fs_skip_previous.png \
136         extras/package/macosx/Resources/fspanel/fs_skip_previous_highlight.png \
137         extras/package/macosx/Resources/fspanel/fs_stop.png \
138         extras/package/macosx/Resources/fspanel/fs_stop_highlight.png \
139         extras/package/macosx/Resources/fspanel/fs_time_slider.png \
140         extras/package/macosx/Resources/fspanel/fs_time_slider_knob.png \
141         extras/package/macosx/Resources/fspanel/fs_time_slider_knob_highlight.png \
142         extras/package/macosx/Resources/fspanel/fs_volume_max.png \
143         extras/package/macosx/Resources/fspanel/fs_volume_max_highlight.png \
144         extras/package/macosx/Resources/fspanel/fs_volume_mute.png \
145         extras/package/macosx/Resources/fspanel/fs_volume_mute_highlight.png \
146         extras/package/macosx/Resources/fspanel/fs_volume_slider_bar.png \
147         extras/package/macosx/Resources/fspanel/fs_volume_slider_knob.png \
148         extras/package/macosx/Resources/fspanel/fs_volume_slider_knob_highlight.png \
149         extras/package/macosx/Resources/icons/aiff.icns \
150         extras/package/macosx/Resources/icons/audio.icns \
151         extras/package/macosx/Resources/icons/avi.icns \
152         extras/package/macosx/Resources/icons/flv.icns \
153         extras/package/macosx/Resources/icons/generic.icns \
154         extras/package/macosx/Resources/icons/m4a.icns \
155         extras/package/macosx/Resources/icons/m4v.icns \
156         extras/package/macosx/Resources/icons/mkv.icns \
157         extras/package/macosx/Resources/icons/mov.icns \
158         extras/package/macosx/Resources/icons/movie.icns \
159         extras/package/macosx/Resources/icons/mp3.icns \
160         extras/package/macosx/Resources/icons/mpeg.icns \
161         extras/package/macosx/Resources/icons/ogg.icns \
162         extras/package/macosx/Resources/icons/playlist.icns \
163         extras/package/macosx/Resources/icons/rm.icns \
164         extras/package/macosx/Resources/icons/subtitle.icns \
165         extras/package/macosx/Resources/icons/vlc.icns \
166         extras/package/macosx/Resources/icons/vob.icns \
167         extras/package/macosx/Resources/icons/wav.icns \
168         extras/package/macosx/Resources/icons/wma.icns \
169         extras/package/macosx/Resources/icons/wmv.icns \
170         extras/package/macosx/Resources/mainwindow/back-pressed.png \
171         extras/package/macosx/Resources/mainwindow/back.png \
172         extras/package/macosx/Resources/mainwindow/bottom-background.png \
173         extras/package/macosx/Resources/mainwindow/bottom-bar-mini.png \
174         extras/package/macosx/Resources/mainwindow/dropzone-background.png \
175         extras/package/macosx/Resources/mainwindow/dropzone.png \
176         extras/package/macosx/Resources/mainwindow/effects-double-buttons-blue.png \
177         extras/package/macosx/Resources/mainwindow/effects-double-buttons-pressed.png \
178         extras/package/macosx/Resources/mainwindow/effects-double-buttons.png \
179         extras/package/macosx/Resources/mainwindow/effects-one-button-blue.png \
180         extras/package/macosx/Resources/mainwindow/effects-one-button.png \
181         extras/package/macosx/Resources/mainwindow/forward-pressed.png \
182         extras/package/macosx/Resources/mainwindow/forward.png \
183         extras/package/macosx/Resources/mainwindow/fullscreen-double-buttons-pressed.png \
184         extras/package/macosx/Resources/mainwindow/fullscreen-double-buttons.png \
185         extras/package/macosx/Resources/mainwindow/mini-progressbar-fill-left.png \
186         extras/package/macosx/Resources/mainwindow/mini-progressbar-fill-middle.png \
187         extras/package/macosx/Resources/mainwindow/mini-progressbar-fill-right.png \
188         extras/package/macosx/Resources/mainwindow/mini-progressbar-knob.png \
189         extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-left.png \
190         extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-middle.png \
191         extras/package/macosx/Resources/mainwindow/mini-progressbar-wrapper-right.png \
192         extras/package/macosx/Resources/mainwindow/pause-pressed.png \
193         extras/package/macosx/Resources/mainwindow/pause.png \
194         extras/package/macosx/Resources/mainwindow/play-pressed.png \
195         extras/package/macosx/Resources/mainwindow/play.png \
196         extras/package/macosx/Resources/mainwindow/playlist-blue.png \
197         extras/package/macosx/Resources/mainwindow/playlist-pressed.png \
198         extras/package/macosx/Resources/mainwindow/playlist.png \
199         extras/package/macosx/Resources/mainwindow/progression-fill-left.png \
200         extras/package/macosx/Resources/mainwindow/progression-fill-middle.png \
201         extras/package/macosx/Resources/mainwindow/progression-fill-right.png \
202         extras/package/macosx/Resources/mainwindow/progression-knob.png \
203         extras/package/macosx/Resources/mainwindow/progression-track-wrapper-left.png \
204         extras/package/macosx/Resources/mainwindow/progression-track-wrapper-middle.png \
205         extras/package/macosx/Resources/mainwindow/progression-track-wrapper-right.png \
206         extras/package/macosx/Resources/mainwindow/repeat-all-pressed.png \
207         extras/package/macosx/Resources/mainwindow/repeat-all.png \
208         extras/package/macosx/Resources/mainwindow/repeat-one-pressed.png \
209         extras/package/macosx/Resources/mainwindow/repeat-one.png \
210         extras/package/macosx/Resources/mainwindow/repeat-pressed.png \
211         extras/package/macosx/Resources/mainwindow/repeat.png \
212         extras/package/macosx/Resources/mainwindow/shuffle-blue-pressed.png \
213         extras/package/macosx/Resources/mainwindow/shuffle-on.png \
214         extras/package/macosx/Resources/mainwindow/shuffle-pressed.png \
215         extras/package/macosx/Resources/mainwindow/shuffle.png \
216         extras/package/macosx/Resources/mainwindow/stop-pressed.png \
217         extras/package/macosx/Resources/mainwindow/stop.png \
218         extras/package/macosx/Resources/mainwindow/volume-high.png \
219         extras/package/macosx/Resources/mainwindow/volume-low.png \
220         extras/package/macosx/Resources/mainwindow/volume-slider-knob.png \
221         extras/package/macosx/Resources/mainwindow/volume-slider-track.png \
222         extras/package/macosx/Resources/mainwindow_dark/back-pressed_dark.png \
223         extras/package/macosx/Resources/mainwindow_dark/back_dark.png \
224         extras/package/macosx/Resources/mainwindow_dark/bottom-background_dark.png \
225         extras/package/macosx/Resources/mainwindow_dark/effects-double-buttons-blue_dark.png \
226         extras/package/macosx/Resources/mainwindow_dark/effects-double-buttons-pressed_dark.png \
227         extras/package/macosx/Resources/mainwindow_dark/effects-double-buttons_dark.png \
228         extras/package/macosx/Resources/mainwindow_dark/effects-one-button-blue_dark.png \
229         extras/package/macosx/Resources/mainwindow_dark/effects-one-button_dark.png \
230         extras/package/macosx/Resources/mainwindow_dark/forward-pressed_dark.png \
231         extras/package/macosx/Resources/mainwindow_dark/forward_dark.png \
232         extras/package/macosx/Resources/mainwindow_dark/fullscreen-double-buttons-pressed_dark.png \
233         extras/package/macosx/Resources/mainwindow_dark/fullscreen-double-buttons_dark.png \
234         extras/package/macosx/Resources/mainwindow_dark/pause-pressed_dark.png \
235         extras/package/macosx/Resources/mainwindow_dark/pause_dark.png \
236         extras/package/macosx/Resources/mainwindow_dark/play-pressed_dark.png \
237         extras/package/macosx/Resources/mainwindow_dark/play_dark.png \
238         extras/package/macosx/Resources/mainwindow_dark/playlist-blue-pressed_dark.png \
239         extras/package/macosx/Resources/mainwindow_dark/playlist-blue_dark.png \
240         extras/package/macosx/Resources/mainwindow_dark/playlist-pressed_dark.png \
241         extras/package/macosx/Resources/mainwindow_dark/playlist_dark.png \
242         extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-left_dark.png \
243         extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-middle_dark.png \
244         extras/package/macosx/Resources/mainwindow_dark/progressbar-fill-right_dark.png \
245         extras/package/macosx/Resources/mainwindow_dark/progression-knob_dark.png \
246         extras/package/macosx/Resources/mainwindow_dark/progression-track-wrapper-left_dark.png \
247         extras/package/macosx/Resources/mainwindow_dark/progression-track-wrapper-middle_dark.png \
248         extras/package/macosx/Resources/mainwindow_dark/progression-track-wrapper-right_dark.png \
249         extras/package/macosx/Resources/mainwindow_dark/repeat-all-blue-pressed_dark.png \
250         extras/package/macosx/Resources/mainwindow_dark/repeat-all-blue_dark.png \
251         extras/package/macosx/Resources/mainwindow_dark/repeat-one-blue-pressed_dark.png \
252         extras/package/macosx/Resources/mainwindow_dark/repeat-one-blue_dark.png \
253         extras/package/macosx/Resources/mainwindow_dark/repeat-pressed_dark.png \
254         extras/package/macosx/Resources/mainwindow_dark/repeat_dark.png \
255         extras/package/macosx/Resources/mainwindow_dark/shuffle-blue-pressed_dark.png \
256         extras/package/macosx/Resources/mainwindow_dark/shuffle-blue_dark.png \
257         extras/package/macosx/Resources/mainwindow_dark/shuffle-pressed_dark.png \
258         extras/package/macosx/Resources/mainwindow_dark/shuffle_dark.png \
259         extras/package/macosx/Resources/mainwindow_dark/stop-pressed_dark.png \
260         extras/package/macosx/Resources/mainwindow_dark/stop_dark.png \
261         extras/package/macosx/Resources/mainwindow_dark/volume-high_dark.png \
262         extras/package/macosx/Resources/mainwindow_dark/volume-low_dark.png \
263         extras/package/macosx/Resources/mainwindow_dark/volume-slider-knob_dark.png \
264         extras/package/macosx/Resources/mainwindow_dark/volume-slider-track_dark.png \
265         extras/package/macosx/Resources/noart.png \
266         extras/package/macosx/Resources/pause_embedded.png \
267         extras/package/macosx/Resources/pause_embedded_graphite.png \
268         extras/package/macosx/Resources/play_embedded.png \
269         extras/package/macosx/Resources/play_embedded_graphite.png \
270         extras/package/macosx/Resources/prefs/spref_cone_Audio_64.png \
271         extras/package/macosx/Resources/prefs/spref_cone_Hotkeys_64.png \
272         extras/package/macosx/Resources/prefs/spref_cone_Input_64.png \
273         extras/package/macosx/Resources/prefs/spref_cone_Interface_64.png \
274         extras/package/macosx/Resources/prefs/spref_cone_Subtitles_64.png \
275         extras/package/macosx/Resources/prefs/spref_cone_Video_64.png \
276         extras/package/macosx/Resources/README \
277         extras/package/macosx/Resources/repeat_embedded.png \
278         extras/package/macosx/Resources/repeat_embedded_graphite.png \
279         extras/package/macosx/Resources/repeat_single_embedded_graphite.png \
280         extras/package/macosx/Resources/shuffle_embedded.png \
281         extras/package/macosx/Resources/shuffle_embedded_graphite.png \
282         extras/package/macosx/Resources/sidebar-icons/document-music-playlist.png \
283         extras/package/macosx/Resources/sidebar-icons/film-cast.png \
284         extras/package/macosx/Resources/sidebar-icons/film.png \
285         extras/package/macosx/Resources/sidebar-icons/music-beam.png \
286         extras/package/macosx/Resources/sidebar-icons/network-cloud.png \
287         extras/package/macosx/Resources/sidebar-icons/picture.png \
288         extras/package/macosx/Resources/sidebar-icons/README \
289         extras/package/macosx/Resources/skip_forward_active_embedded.png \
290         extras/package/macosx/Resources/skip_forward_embedded_graphite.png \
291         extras/package/macosx/Resources/skip_previous_active_embedded.png \
292         extras/package/macosx/Resources/skip_previous_embedded_graphite.png \
293         extras/package/macosx/Resources/vlc.scriptSuite \
294         extras/package/macosx/Resources/vlc.scriptTerminology \
295         extras/package/macosx/fullscreen_panel.svg \
296         extras/package/macosx/ub.sh \
297         extras/package/macosx/vlc.xcodeproj/project.pbxproj \
298         extras/package/macosx/Delete_Preferences.app/Contents/Info.plist \
299         extras/package/macosx/Delete_Preferences.app/Contents/PkgInfo \
300         extras/package/macosx/Delete_Preferences.app/Contents/MacOS/applet \
301         extras/package/macosx/Delete_Preferences.app/Contents/Resources/description.rtfd/TXT.rtf \
302         extras/package/macosx/Delete_Preferences.app/Contents/Resources/applet.icns \
303         extras/package/macosx/Delete_Preferences.app/Contents/Resources/applet.rsrc \
304         extras/package/macosx/Delete_Preferences.app/Contents/Resources/Scripts/main.scpt \
305         extras/package/macosx/eyetvplugin/EyeTVPluginDefs.h \
306         extras/package/macosx/eyetvplugin/Info.plist \
307         extras/package/macosx/eyetvplugin/eyetvplugin.c \
308         extras/package/macosx/eyetvplugin/eyetvplugin.h \
309         extras/package/macosx/eyetvplugin/English.lproj/InfoPlist.strings \
310         extras/package/macosx/eyetvplugin/eyetvplugin.xcodeproj/project.pbxproj \
311         extras/package/macosx/README.MacOSX.rtf \
312         extras/package/macosx/Info.plist.in
313
314
315 ###############################################################################
316 # Various utilities ( editor syntax files, D-Bus controller ... )
317 ##############################################################################
318 EXTRA_DIST += \
319         extras/analyser/zsh_completion.sh \
320         extras/analyser/zsh.cpp \
321         extras/analyser/emacs.init \
322         extras/analyser/vlc.vim \
323         extras/analyser/valgrind.suppressions \
324         extras/buildsystem/make.pl \
325         extras/misc/mpris.py \
326         extras/misc/mpris.xml
327
328 ###############################################################################
329 # Scripts for building dependencies.
330 ##############################################################################
331 EXTRA_DIST += \
332         contrib/bootstrap \
333         contrib/src/
334
335 ###############################################################################
336 # Building libvlc
337 ###############################################################################
338
339 CLEANFILES = $(BUILT_SOURCES_clean)
340 DISTCLEANFILES = $(BUILT_SOURCES_distclean) compile
341 MAINTAINERCLEANFILES = ChangeLog
342
343 # Shortcut for developers to rebuild the core (libvlc + vlc)
344 # Don't use it if you don't know what it is about.
345 # Don't complain if it doesn't work. -- Courmisch
346 libcompat:
347         cd compat && $(MAKE) $(AM_MAKEFLAGS)
348
349 libvlccore: libcompat
350         cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
351
352 libvlc: libvlccore
353         cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
354
355 core: libvlc vlc$(EXEEXT)
356         cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
357
358 doc:
359         cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
360
361 .PHONY: libvlc core doc
362
363 ###############################################################################
364 # Building aliases
365 ###############################################################################
366
367 ALL_ALIASES = cvlc rvlc svlc qvlc nvlc mvlc
368 bin_SCRIPTS = $(ALIASES)
369 CLEANFILES += $(ALIASES) $(noinst_SCRIPTS)
370 EXTRA_SCRIPTS = $(ALL_ALIASES)
371
372 dist_noinst_SCRIPTS += make-alias
373
374 MKALIAS = bindir="$(bindir)" transform="$(transform)" program_prefix="$(program_prefix)" program_suffix="$(program_suffix)" $(top_srcdir)/make-alias $@
375
376 cvlc: make-alias Makefile
377         $(AM_V_GEN)$(MKALIAS) dummy
378
379 rvlc: make-alias Makefile
380         $(AM_V_GEN)$(MKALIAS) rc
381
382 svlc: make-alias Makefile
383         $(AM_V_GEN)$(MKALIAS) skins2
384
385 qvlc: make-alias Makefile
386         $(AM_V_GEN)$(MKALIAS) qt4
387
388 nvlc: make-alias Makefile
389         $(AM_V_GEN)$(MKALIAS) ncurses
390
391 mvlc: make-alias Makefile
392         $(AM_V_GEN)$(MKALIAS) maemo
393
394 if BUILD_VLC
395 noinst_SCRIPTS = vlc$(EXEEXT)
396 endif
397
398 vlc$(EXEEXT):
399         $(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
400
401 if HAVE_DARWIN
402 if BUILD_MACOSX_VLC_APP
403 # Create the MacOS X app
404 noinst_DATA = VLC.app
405 endif
406 endif
407
408 ###############################################################################
409 # Installing plugins cache
410 ###############################################################################
411 install-exec-hook:
412         if test "$(build)" = "$(host)"; then \
413                 LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
414                 "$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \
415                          "$(DESTDIR)$(vlclibdir)/plugins" ; \
416         else \
417                 echo "Cross-compilation: cache generation skipped!" ; \
418         fi
419
420 silentstd = $(silentstd_$(V))
421 silentstd_ = $(silentstd_$(AM_DEFAULT_VERBOSITY))
422 silentstd_0 = 2>&1 >/dev/null
423
424 # VLC-release.app for packaging and giving it to your friends
425 # use package-macosx to get a nice dmg
426 VLC-release.app: vlc
427         ( cd src && $(MAKE) $(AM_MAKEFLAGS) install $(silentstd) )
428         rm -Rf "$(top_builddir)/tmp"
429         mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
430         rm -Rf $(top_builddir)/VLC-release.app
431         for i in vlc.xcodeproj Resources README.MacOSX.rtf ; do \
432           cp -R $(srcdir)/extras/package/macosx/$$i $(top_builddir)/tmp/extras/package/macosx/; \
433         done
434         REVISION=`(git --git-dir=$(srcdir)/.git describe --always || echo exported)` && \
435         cat $(top_builddir)/extras/package/macosx/Info.plist | \
436         sed "s/#REVISION#/$$REVISION/g" > $(top_builddir)/tmp/extras/package/macosx/Info.plist
437         cp -R $(top_builddir)/extras/package/macosx/Resources $(top_builddir)/tmp/extras/package/macosx/
438         for i in AUTHORS COPYING THANKS; do \
439           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
440         done
441         mkdir -p $(top_builddir)/tmp/extras/contrib/Sparkle
442         cp -R $(CONTRIB_DIR)/Sparkle/Sparkle.framework $(top_builddir)/tmp/extras/contrib/Sparkle
443         mkdir -p $(top_builddir)/tmp/extras/contrib/BGHUDAppKit
444         cp -R $(CONTRIB_DIR)/BGHUDAppKit/BGHUDAppKit.framework $(top_builddir)/tmp/extras/contrib/BGHUDAppKit
445         mkdir -p $(top_builddir)/tmp/extras/contrib/Growl
446         cp -R $(CONTRIB_DIR)/Growl/Growl.framework $(top_builddir)/tmp/extras/contrib/Growl
447         mkdir -p $(top_builddir)/tmp/modules/audio_output
448         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
449         for i in \
450             AppleRemote.h \
451             AppleRemote.m \
452             about.h \
453             about.m \
454             applescript.h \
455             applescript.m \
456             controls.h \
457             controls.m \
458             intf.h \
459             intf.m \
460             macosx.m \
461             misc.h \
462             misc.m \
463             open.h \
464             open.m \
465             output.h \
466             output.m \
467             playlist.h \
468             playlist.m \
469             playlistinfo.h \
470             playlistinfo.m \
471             prefs_widgets.h \
472             prefs_widgets.m \
473             prefs.h \
474             prefs.m \
475             simple_prefs.h \
476             simple_prefs.m \
477             vout.h \
478             voutgl.m \
479             wizard.h \
480             wizard.m \
481             bookmarks.h \
482             bookmarks.m \
483             coredialogs.h \
484             coredialogs.m \
485             embeddedwindow.h \
486             embeddedwindow.m \
487             fspanel.h \
488             fspanel.m \
489             vout.m; do \
490           cp "$(srcdir)/modules/gui/macosx/$$i" \
491              $(top_builddir)/tmp/modules/gui/macosx; \
492         done
493         $(AM_V_GEN)cd $(top_builddir)/tmp/extras/package/macosx && \
494         xcodebuild -target vlc SYMROOT=../../../build DSTROOT=../../../build $(silentstd) && \
495         cd ../../../../ && \
496         cp -R $(top_builddir)/tmp/build/Default/VLC.bundle $(top_builddir)/VLC-release.app; \
497         rm -Rf $(top_builddir)/tmp
498         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
499         PRODUCT="VLC-release.app" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
500         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua
501         for i in $(srcdir)/share/lua/*.* ; do \
502           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/`basename $${i}` ; \
503         done ; \
504         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist
505         for i in $(srcdir)/share/lua/playlist/*.* ; do \
506           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist/`basename $${i}` ; \
507         done ; \
508         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/meta
509         for i in $(srcdir)/share/lua/meta/*.* ; do \
510           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/meta/`basename $${i}` ; \
511         done ; \
512         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf
513         for i in $(srcdir)/share/lua/intf/*.* ; do \
514           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/`basename $${i}` ; \
515         done ; \
516         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/modules
517         for i in $(srcdir)/share/lua/intf/modules/*.* ; do \
518           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/intf/modules/`basename $${i}` ; \
519         done ; \
520         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/dialogs
521         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/js
522         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/images
523         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests
524         $(INSTALL) -m 644 $(srcdir)/share/lua/http/.hosts $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/.hosts
525         for i in $(srcdir)/share/lua/http/*.* ; do \
526           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/`basename $${i}` ; \
527         done
528         for i in $(srcdir)/share/lua/http/dialogs/* ; do \
529           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/dialogs/`basename $${i}` ; \
530         done
531         for i in $(srcdir)/share/lua/http/js/*.* ; do \
532           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/js/`basename $${i}` ; \
533         done
534         for i in $(srcdir)/share/lua/http/images/*.* ; do \
535           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/images/`basename $${i}` ; \
536         done
537         for i in $(srcdir)/share/lua/http/requests/*.* ; do \
538           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/`basename $${i}` ; \
539         done
540         $(INSTALL) -m 644 $(srcdir)/share/lua/http/requests/README.txt $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/README.txt
541         $(INSTALL) -m 644 $(srcdir)/share/vlc512x512.png $(top_builddir)/VLC-release.app/Contents/MacOS/share/vlc512x512.png
542         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale
543         cat $(top_srcdir)/po/LINGUAS | while read i; do \
544           $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES ; \
545           $(INSTALL) $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
546           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
547           $(LN_S) -f ../English.lproj/InfoPlist.strings \
548               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
549           $(LN_S) -f ../English.lproj/MainMenu.xib \
550               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
551         done
552         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
553         rm -Rf $(top_builddir)/VLC-release.app/Contents/Frameworks/BGHUDAppKit.framework/Resources/
554         find $(top_builddir)/VLC-release.app -type d -exec chmod ugo+rx '{}' \;
555         find $(top_builddir)/VLC-release.app -type f -exec chmod ugo+r '{}' \;
556
557 # This is just for development purposes. 
558 # The resulting VLC.app will only run in this tree.
559 VLC.app: vlc $(top_builddir)/src/.libs/libvlccore.dylib $(top_builddir)/lib/.libs/libvlc.dylib
560         $(AM_V_GEN)(cd src && make install $(silentstd))
561         rm -Rf $(top_builddir)/tmp
562         mkdir -p "$(top_builddir)/tmp/extras/package/macosx"
563         rm -Rf $(top_builddir)/VLC.app
564         for i in vlc.xcodeproj Resources README.MacOSX.rtf; do \
565           cp -R $(srcdir)/extras/package/macosx/$$i $(top_builddir)/tmp/extras/package/macosx/; \
566         done
567         REVISION=`(git --git-dir=$(srcdir)/.git describe --always || echo exported)` && \
568         cat $(top_builddir)/extras/package/macosx/Info.plist | \
569         sed "s/#REVISION#/$$REVISION/g" > $(top_builddir)/tmp/extras/package/macosx/Info.plist
570         cp -R $(top_builddir)/extras/package/macosx/Resources $(top_builddir)/tmp/extras/package/macosx/
571         for i in AUTHORS COPYING THANKS; do \
572           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
573         done
574         mkdir -p $(top_builddir)/tmp/extras/contrib/Sparkle
575         cp -R $(CONTRIB_DIR)/Sparkle/Sparkle.framework $(top_builddir)/tmp/extras/contrib/Sparkle
576         mkdir -p $(top_builddir)/tmp/extras/contrib/BGHUDAppKit
577         cp -R $(CONTRIB_DIR)/BGHUDAppKit/BGHUDAppKit.framework $(top_builddir)/tmp/extras/contrib/BGHUDAppKit
578         mkdir -p $(top_builddir)/tmp/extras/contrib/Growl
579         cp -R $(CONTRIB_DIR)/Growl/Growl.framework $(top_builddir)/tmp/extras/contrib/Growl
580         mkdir -p $(top_builddir)/tmp/modules/audio_output
581         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
582         for i in \
583             AppleRemote.h \
584             AppleRemote.m \
585             about.h \
586             about.m \
587             applescript.h \
588             applescript.m \
589             controls.h \
590             controls.m \
591             intf.h \
592             intf.m \
593             macosx.m \
594             misc.h \
595             misc.m \
596             open.h \
597             open.m \
598             output.h \
599             output.m \
600             playlist.h \
601             playlist.m \
602             playlistinfo.h \
603             playlistinfo.m \
604             prefs_widgets.h \
605             prefs_widgets.m \
606             prefs.h \
607             prefs.m \
608             simple_prefs.h \
609             simple_prefs.m \
610             vout.h \
611             voutgl.m \
612             wizard.h \
613             wizard.m \
614             bookmarks.h \
615             bookmarks.m \
616             coredialogs.h \
617             coredialogs.m \
618             embeddedwindow.h \
619             embeddedwindow.m \
620             fspanel.h \
621             fspanel.m \
622             vout.m; do \
623           cp "$(srcdir)/modules/gui/macosx/$$i" \
624              $(top_builddir)/tmp/modules/gui/macosx; \
625         done
626         $(AM_V_GEN)cd $(top_builddir)/tmp/extras/package/macosx && \
627         xcodebuild -target vlc SYMROOT=../../../build DSTROOT=../../../build $(silentstd) && \
628         cd ../../../../ && \
629         cp -R -L $(top_builddir)/tmp/build/Default/VLC.bundle $(top_builddir)/VLC.app
630         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
631         touch $(top_builddir)/VLC.app/Contents/MacOS/VLC
632         chmod +x $(top_builddir)/VLC.app/Contents/MacOS/VLC
633         $(INSTALL) $(top_builddir)/bin/.libs/vlc $(top_builddir)/VLC.app/Contents/MacOS/VLC
634         $(LN_S) -f ../../../modules $(top_builddir)/VLC.app/Contents/MacOS/plugins
635         install -d $(top_builddir)/VLC.app/Contents/MacOS/share
636         for i in `ls $(srcdir)/share`; do \
637            $(LN_S) -f `pwd`/$(srcdir)/share/$$i $(top_builddir)/VLC.app/Contents/MacOS/share/; \
638         done
639         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/share/locale
640         cat $(top_srcdir)/po/LINGUAS | while read i; do \
641           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES ; \
642           $(LN_S) -f `pwd`/$(srcdir)/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/share/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
643           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
644           $(LN_S) -f ../English.lproj/InfoPlist.strings \
645               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
646           $(LN_S) -f ../English.lproj/MainMenu.xib \
647               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
648         done
649         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
650
651 ###############################################################################
652 # Building architecture-specific binary packages
653 ###############################################################################
654
655 # XXX: this rule is probably only useful to you if you have exactly
656 # the same setup as the maintaner(s).
657 #
658
659 ############################################################################
660 ## Win                                                                    ##
661 ############################################################################
662 destdir=$(prefix)
663 win32_destdir=$(top_builddir)/vlc-$(VERSION)
664 win32_debugdir=$(top_builddir)/symbols-$(VERSION)
665 win32_xpi_destdir=$(win32_destdir)/vlc-plugin
666
667 if HAVE_WIN64
668 build-npapi:
669         touch $@
670
671 build-activex:
672         touch $@
673 else
674 if HAVE_WINCE
675 build-npapi:
676         touch $@
677
678 build-activex:
679         touch $@
680 else
681 if HAVE_WIN32
682 include extras/package/npapi.am
683 include extras/package/activex.am
684 endif
685 endif
686 endif
687
688 #Win-common is for win32 and wince
689 package-win-common: install build-npapi build-activex
690 # Check that tmp isn't in the way
691         @if test -e "$(win32_destdir)"; then \
692             echo "Error: please remove $(win32_destdir), it is in the way"; \
693             false; \
694         elif test -e "$(win32_debugdir)"; then \
695             echo "Error: please remove $(win32_debugdir), it is in the way"; \
696             false; \
697         else \
698             echo "Debug dir OK."; mkdir -p "$(win32_debugdir)"; \
699             echo "Dest dir OK."; mkdir -p "$(win32_destdir)"; \
700         fi
701
702 # Executables, major libs+manifests
703         find $(destdir) -maxdepth 4 \( -name "*$(LIBEXT)" -o -name "*$(EXEEXT)" \) -exec cp {} "$(win32_destdir)/" \;
704         for file in $(top_srcdir)/extras/package/win32/vlc$(EXEEXT).manifest \
705                 $(top_srcdir)/extras/package/win32/libvlc$(LIBEXT).manifest; \
706             do cp $$file "$(win32_destdir)/" ; done;
707
708 # Text files and clean them
709         for file in AUTHORS THANKS ; \
710           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(win32_destdir)/$${file}.txt" ; done;
711         for file in NEWS COPYING README; \
712           do cp "$(srcdir)/$$file" "$(win32_destdir)/$${file}.txt"; done
713
714 # Necessary icon
715         cp $(srcdir)/share/icons/vlc.ico $(win32_destdir)
716
717 # Locales
718         -cp -r $(destdir)/share/locale $(win32_destdir)
719
720 # Plugins
721         cp -r $(destdir)/lib/vlc/plugins $(win32_destdir)
722
723 if BUILD_LUA
724         mkdir -p $(win32_destdir)/lua
725         cp -r $(destdir)/lib/vlc/lua/* $(win32_destdir)/lua
726         cp -r $(destdir)/share/vlc/lua/* $(win32_destdir)/lua
727 endif
728
729 if BUILD_SKINS
730         cp -r $(destdir)/share/vlc/skins2 $(win32_destdir)/skins
731 endif
732 if BUILD_OSDMENU
733         cp -r $(destdir)/share/vlc/osdmenu "$(win32_destdir)/osdmenu"
734         for file in $(win32_destdir)/osdmenu/*.cfg; do \
735                 sed 's%share/osdmenu%osdmenu%g' "$$file" > "$$file.tmp" || exit $$? ; \
736                 sed 's%/%\\%g' "$$file.tmp" > "$$file" || exit$$? ; \
737                 rm -f -- "$$file.tmp"; \
738         done
739 endif
740 if !HAVE_WIN64
741 if !HAVE_WINCE
742         cp "$(top_builddir)/activex-vlc/src/axvlc.dll.manifest" "$(win32_destdir)/"
743         cp "$(top_builddir)/activex-vlc/installed/lib/axvlc.dll" "$(win32_destdir)/"
744         cp "$(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest" "$(win32_destdir)/"
745         cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/"
746 endif
747 endif
748
749 # SDK
750         mkdir -p "$(win32_destdir)/sdk/lib"
751         cp -r $(destdir)/include "$(win32_destdir)/sdk"
752         cp -r $(destdir)/lib/pkgconfig "$(win32_destdir)/sdk/lib"
753         for file in libvlc.dll.a libvlc.la libvlccore.dll.a libvlccore.la; do \
754         cp -rv $(destdir)/lib/$$file "$(win32_destdir)/sdk/lib"; done
755 if !HAVE_WIN64
756 if !HAVE_WINCE
757         mkdir -p "$(win32_destdir)/sdk/activex"
758         cp $(top_builddir)/activex-vlc/README $(win32_destdir)/sdk/activex/README.TXT
759         cp $(top_builddir)/activex-vlc/src/test.html $(win32_destdir)/sdk/activex/
760 endif
761 endif
762
763         find $(win32_destdir) -type f \( -name "*xml" -or -name "*html" -or -name '*js' -or -name '*css' -or -name '*hosts' -or -iname '*txt' -or -name '*.cfg' -or -name '*.lua' \) -exec $(U2D) {} \;
764
765 #Enable DEP and ASLR for all the binaries
766 if USE_PEFLAGS
767         find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -print -o -name '*$(EXEEXT)' -print \) -exec $(PEFLAGS) --dynamicbase=true --nxcompat=true {} \;
768 endif
769         find $(win32_destdir)/plugins/ -type f \( -name '*.a' -or -name '*.la' \) -exec rm -rvf {} \;
770
771 package-win-base: package-win-common
772         find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -or -name '*$(EXEEXT)' \) | while read i; \
773         do if test -n "$$i" ; then \
774             $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
775             $(OBJCOPY) --strip-all "$$i" ; \
776             $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
777             mv "$$i.dbg" "$(win32_debugdir)"; \
778           fi ; \
779         done
780
781 package-win32-webplugin-common: package-win-base
782         mkdir -p "$(win32_xpi_destdir)/plugins"
783         find $(destdir) -maxdepth 4 -name "*$(LIBEXT)" -exec cp {} "$(win32_xpi_destdir)/" \;
784 if !HAVE_WIN64
785         cp $(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins"
786 endif
787         cp "$(top_srcdir)/extras/package/win32/libvlc.dll.manifest" "$(win32_xpi_destdir)/plugins"
788         cp -r $(win32_destdir)/plugins/ "$(win32_xpi_destdir)/plugins"
789         rm -rf "$(win32_xpi_destdir)/plugins/plugins/*qt*"
790         rm -rf "$(win32_xpi_destdir)/plugins/plugins/*skins*"
791
792 package-win32-xpi: package-win32-webplugin-common
793 if !HAVE_WIN64
794         cp $(top_builddir)/npapi-vlc/npapi/install.rdf "$(win32_xpi_destdir)"
795         cd $(win32_xpi_destdir) && zip -r "../vlc-$(VERSION).xpi" install.rdf plugins
796 endif
797
798 package-win32-crx: package-win32-webplugin-common
799 if !HAVE_WIN64
800         cp $(top_builddir)/npapi-vlc/npapi/manifest.json "$(win32_xpi_destdir)"
801         crxmake --pack-extension "$(win32_xpi_destdir)" \
802                 --extension-output "$(win32_destdir)/vlc-$(VERSION).crx" --ignore-file install.rdf
803 endif
804
805 package-win32-base-exe: package-win-base
806 # Script installer
807         cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/"
808         cp "$(top_builddir)/extras/package/win32/spad.nsi" "$(win32_destdir)/"
809         mkdir "$(win32_destdir)/languages"
810         cp $(srcdir)/extras/package/win32/languages/*.nsh "$(win32_destdir)/languages/"
811 # Copy the UAC NSIS plugin
812         mkdir -p "$(win32_destdir)/NSIS"
813         cp "$(top_srcdir)/extras/package/win32/UAC.nsh" "$(win32_destdir)/NSIS"
814         cp "$(top_srcdir)/extras/package/win32/UAC.dll" "$(win32_destdir)/NSIS"
815
816 # Create package
817         if makensis -VERSION >/dev/null 2>&1; then \
818             MAKENSIS="makensis"; \
819         elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
820             MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \
821         elif [ -x "$(PROGRAMFILES)/NSIS/makensis" ]; then \
822             MAKENSIS="$(PROGRAMFILES)/NSIS/makensis"; \
823         elif wine --version >/dev/null 2>&1; then \
824             MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \
825         else \
826             echo 'Error: cannot locate makensis tool'; exit 1; \
827         fi; \
828         eval "$$MAKENSIS $(win32_destdir)/spad.nsi"; \
829         eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
830
831 package-win32-base-zip: package-win-base
832 # Create package
833         rm -f -- vlc-$(VERSION)-win32.zip
834         zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
835
836 package-win32-base-debug-zip: package-win-common
837 # Create package
838         rm -f -- vlc-$(VERSION)-win32-debug.zip
839         zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION)
840
841 package-win32-base-7zip: package-win-base
842 # Create package
843         7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION)
844
845 package-win32-base-debug-7zip: package-win-common
846 # Create package
847         7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION)
848
849 package-win32-cleanup:
850         rm -Rf $(win32_destdir) $(win32_debugdir)
851
852 package-win32-exe: package-win-base package-win32-base-exe package-win32-cleanup
853
854 package-win32-zip: package-win32-base-zip package-win32-cleanup
855
856 package-win32-debug-zip: package-win32-base-debug-zip package-win32-cleanup
857
858 package-win32-7zip: package-win32-base-7zip package-win32-cleanup
859
860 package-win32-debug-7zip: package-win32-base-debug-7zip package-win32-cleanup
861
862 package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe package-win32-xpi
863
864 package-win32: package-win32-no-clean package-win32-cleanup
865
866 package-win32-debug: package-win32-base-debug-zip package-win32-base-debug-7zip package-win32-cleanup
867
868
869 #######
870 # WinCE
871 #######
872 package-wince-base: package-win-base
873
874 package-wince-base-zip: package-wince-base
875 # Create package
876         rm -f -- vlc-$(VERSION)-wince.zip
877         zip -r -9 vlc-$(VERSION)-wince.zip vlc-$(VERSION)
878
879 package-wince: package-wince-base-zip package-win32-cleanup
880
881
882 #########################################################################
883 ## MacOS X                                                             ##
884 #########################################################################
885 package-macosx: VLC-release.app ChangeLog
886 # Check that the temporary location isn't in the way
887         @if test -e "$(top_builddir)/vlc-$(VERSION)/"; then \
888           rm -Rf "$(top_builddir)/vlc-$(VERSION)/" ; \
889         fi
890
891         echo "Create package directory: vlc-$(VERSION)/";
892         mkdir -p "$(top_builddir)/vlc-$(VERSION)/";
893
894 # Copy relevant files 
895         @if test -e "$(top_builddir)/VLC-release.app/"; then \
896           cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
897         else \
898           cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
899         fi
900         mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
901           mkdir -p $(top_builddir)/vlc-$(VERSION)/.background/ && \
902           cp $(srcdir)/AUTHORS $(srcdir)/COPYING $(srcdir)/README $(srcdir)/THANKS $(srcdir)/NEWS $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
903           cp -R  $(srcdir)/extras/package/macosx/Delete_Preferences.app $(top_builddir)/vlc-$(VERSION)/Goodies/Delete\ VLC\ Preferences.app && \
904           cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf && \
905           cp $(srcdir)/extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png
906         cp -L $(top_builddir)/ChangeLog $(top_builddir)/vlc-$(VERSION)/Goodies/
907
908 # Place a link to the application folder
909         $(LN_S) /Applications $(top_builddir)/vlc-$(VERSION)/Applications
910
911 # Create disk image (temporarily taken from the 0.8.6-bugfix branch to provide reliable NBs)
912         echo "Creating disk image"
913         rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
914         hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
915           "$(top_builddir)/vlc-$(VERSION).dmg" -scrub
916         echo "Disk image creation completed:"
917         ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
918
919 # Create disk image 
920 #       echo "Creating disk image"
921 #       rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
922 #       hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
923 #         "$(top_builddir)/vlc-$(VERSION).dmg" -format UDRW \
924 #         -scrub -imagekey zlib-level=9 -attach
925
926 # Make sure the root window of the dmg will pop up when the dmg is mounted.
927 # Note: We dont mount in /Volumes to be sure we won't collide with an other
928 # finder mounted dmg with the same name.
929 #       echo "Make sure the root window of the dmg will pop up when the dmg is mounted"
930 #       mkdir -p $(top_builddir)/vlcmnt
931 #       hdiutil attach -nokernel -readwrite -noverify -noautoopen -private "$(top_builddir)/vlc-$(VERSION).dmg" -mountpoint "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
932 #       bless --folder "$(top_builddir)/vlcmnt/vlc-$(VERSION)/" --openfolder "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
933 #       sleep 1 # Make sure operation completes
934 #       cd "$(srcdir)"
935
936 # Unmount the image now
937 #       hdiutil detach "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
938 #       rm -R $(top_builddir)/vlcmnt
939
940 # Make sure the image is not writable
941 # Note: We can't directly create a read only dmg as we do the bless stuff
942         echo "Make the disk image read-only"
943         mv "$(top_builddir)/vlc-$(VERSION).dmg" "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
944         hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDBZ -o "$(top_builddir)/vlc-$(VERSION).dmg"
945         rm "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
946
947 # We are done
948         echo "Disk image creation completed:"
949         ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
950
951 # Clean up
952         rm -Rf "$(top_builddir)/vlc-$(VERSION)"
953
954 package-macosx-zip: VLC-release.app
955         rm -Rf $(top_builddir)/vlc-$(VERSION)
956         mkdir -p $(top_builddir)/vlc-$(VERSION)
957         cp -R $(top_builddir)/VLC-release.app $(top_builddir)/vlc-$(VERSION)/VLC.app
958         mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
959         for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
960           cp $(srcdir)/$$i $(top_builddir)/vlc-$(VERSION)/Goodies; \
961         done
962         cp -R  $(srcdir)/extras/package/macosx/Delete_Preferences.app \
963              $(top_builddir)/vlc-$(VERSION)/Goodies
964         cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf \
965            $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf
966         zip -r -y -9 $(top_builddir)/vlc-$(VERSION).zip $(top_builddir)/vlc-$(VERSION)
967         rm -Rf $(top_builddir)/vlc-$(VERSION)
968
969 package-macosx-framework-zip:
970         rm -Rf $(top_builddir)/vlckit-$(VERSION)
971         mkdir -p $(top_builddir)/vlckit-$(VERSION)
972         cp -R $(srcdir)/projects/macosx/framework/build/Debug/VLCKit.framework \
973           $(top_builddir)/vlckit-$(VERSION)/VLCKit.framework
974         mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
975         for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
976           cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies; \
977         done
978         zip -r -y -9 $(top_builddir)/vlckit-$(VERSION).zip $(top_builddir)/vlckit-$(VERSION)
979         rm -Rf $(top_builddir)/vlc-$(VERSION)
980
981 package-translations:
982         @if test -e "$(srcdir)/vlc-translations-$(VERSION)"; then \
983           echo "Error: please remove $(srcdir)/vlc-translations-$(VERSION), it is in the way"; \
984           false; \
985         else \
986           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-$(VERSION)"; \
987         fi
988 # Copy translations
989         cat $(top_srcdir)/po/LINGUAS | while read i; do \
990           cp "$(srcdir)/po/$${i}.po" \
991             "$(srcdir)/vlc-translations-$(VERSION)/$${i}.po" \
992             || true ; \
993         done
994         cp "$(srcdir)/doc/translations.txt" \
995           "$(srcdir)/vlc-translations-$(VERSION)/README.txt"
996
997         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
998         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
999         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1000         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1001         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1002         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1003         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1004         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1005
1006         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1007           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1008
1009 ###############################################################################
1010 # PO translation files update
1011 ###############################################################################
1012 .PHONY: update-po
1013
1014 update-po:
1015         cd po && $(MAKE) POTFILES vlc.pot update-po
1016
1017
1018 ###############################################################################
1019 # Enforce Mac OS X deployment target environment variable
1020 ###############################################################################
1021 macosx-sdk: Makefile.in $(HEADERS_include)
1022         export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)