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