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