]> git.sesse.net Git - vlc/blob - Makefile.am
Remove vlc_symbols - refs #297.
[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 #  - intl (gettext) is needed by src and modules
9 #  - src (libvlc) is nedeed by modules, mozilla and bindings
10 #  - libs/* are needed by modules
11 SUBDIRS = intl po libs/loader libs/srtp src modules \
12                 mozilla bindings activex share doc
13 DIST_SUBDIRS = $(SUBDIRS) m4 ipkg
14
15 EXTRA_DIST = \
16         HACKING \
17         INSTALL.win32 \
18         INSTALL.wince \
19         vlc.exe.manifest \
20         MAINTAINERS \
21         README.MacOSX.rtf \
22         bootstrap \
23         toolbox \
24         vlc-config.in.in \
25         vlc.fedora.spec \
26         vlc.mandriva.spec \
27         vlc.altlinux.spec \
28         vlc.win32.nsi.in
29
30 BUILT_SOURCES_distclean = vlc-config compile vlc.win32.nsi
31 BUILT_SOURCES_clean = macosx-sdk
32
33 BUILT_SOURCES = $(BUILT_SOURCES_distclean) $(BUILT_SOURCES_clean)
34
35 SUFFIXES = 
36
37 DISTCHECK_CONFIGURE_FLAGS = --disable-dvd --disable-mad --disable-libmpeg2 \
38         --disable-ffmpeg --disable-faad --disable-wxwidgets --disable-skins2
39
40 # Tell aclocal to use -I m4. Wonder if it really works.
41 ACLOCAL_AMFLAGS = -I m4
42
43 ###############################################################################
44 # MacOS X project
45 ###############################################################################
46
47 EXTRA_DIST += \
48         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
49         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
50         extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib \
51         extras/MacOSX/Resources/English.lproj/About.nib/classes.nib \
52         extras/MacOSX/Resources/English.lproj/About.nib/info.nib \
53         extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib \
54         extras/MacOSX/Resources/English.lproj/Open.nib/classes.nib \
55         extras/MacOSX/Resources/English.lproj/Open.nib/info.nib \
56         extras/MacOSX/Resources/English.lproj/Open.nib/keyedobjects.nib \
57         extras/MacOSX/Resources/English.lproj/Preferences.nib/classes.nib \
58         extras/MacOSX/Resources/English.lproj/Preferences.nib/info.nib \
59         extras/MacOSX/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
60         extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib \
61         extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib \
62         extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
63         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/classes.nib \
64         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/info.nib \
65         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/keyedobjects.nib \
66         extras/MacOSX/Resources/English.lproj/Extended.nib/classes.nib \
67         extras/MacOSX/Resources/English.lproj/Extended.nib/info.nib \
68         extras/MacOSX/Resources/English.lproj/Extended.nib/keyedobjects.nib \
69         extras/MacOSX/Resources/English.lproj/SFilters.nib/classes.nib \
70         extras/MacOSX/Resources/English.lproj/SFilters.nib/info.nib \
71         extras/MacOSX/Resources/English.lproj/SFilters.nib/keyedobjects.nib \
72         extras/MacOSX/Resources/English.lproj/Update.nib/classes.nib \
73         extras/MacOSX/Resources/English.lproj/Update.nib/info.nib \
74         extras/MacOSX/Resources/English.lproj/Update.nib/keyedobjects.nib \
75         extras/MacOSX/Resources/English.lproj/Interaction.nib/classes.nib \
76         extras/MacOSX/Resources/English.lproj/Interaction.nib/info.nib \
77         extras/MacOSX/Resources/English.lproj/Interaction.nib/keyedobjects.nib \
78         extras/MacOSX/Resources/English.lproj/InteractionErrorPanel.nib/classes.nib \
79         extras/MacOSX/Resources/English.lproj/InteractionErrorPanel.nib/info.nib \
80         extras/MacOSX/Resources/English.lproj/InteractionErrorPanel.nib/keyedobjects.nib \
81         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
82         extras/MacOSX/Resources/a52.icns \
83         extras/MacOSX/Resources/aac.icns \
84         extras/MacOSX/Resources/asf.icns \
85         extras/MacOSX/Resources/asx.icns \
86         extras/MacOSX/Resources/avi.icns \
87         extras/MacOSX/Resources/bin.icns \
88         extras/MacOSX/Resources/cue.icns \
89         extras/MacOSX/Resources/dat.icns \
90         extras/MacOSX/Resources/divx.icns \
91         extras/MacOSX/Resources/dv.icns \
92         extras/MacOSX/Resources/generic.icns \
93         extras/MacOSX/Resources/m3u.icns \
94         extras/MacOSX/Resources/mov.icns \
95         extras/MacOSX/Resources/mp3.icns \
96         extras/MacOSX/Resources/mp4.icns \
97         extras/MacOSX/Resources/mpeg.icns \
98         extras/MacOSX/Resources/mpeg1.icns \
99         extras/MacOSX/Resources/mpeg2.icns \
100         extras/MacOSX/Resources/mpeg4.icns \
101         extras/MacOSX/Resources/mpg.icns \
102         extras/MacOSX/Resources/ogg.icns \
103         extras/MacOSX/Resources/ogm.icns \
104         extras/MacOSX/Resources/pls.icns \
105         extras/MacOSX/Resources/srt.icns \
106         extras/MacOSX/Resources/sub.icns \
107         extras/MacOSX/Resources/vlc.icns \
108         extras/MacOSX/Resources/vob.icns \
109         extras/MacOSX/Resources/wma.icns \
110         extras/MacOSX/Resources/wmv.icns \
111         extras/MacOSX/Resources/pause.png \
112         extras/MacOSX/Resources/pause_blue.png \
113         extras/MacOSX/Resources/play.png \
114         extras/MacOSX/Resources/play_blue.png \
115         extras/MacOSX/Resources/stop.png \
116         extras/MacOSX/Resources/stop_blue.png \
117         extras/MacOSX/Resources/display.png \
118         extras/MacOSX/Resources/display_slider.png \
119         extras/MacOSX/Resources/display_track.png \
120         extras/MacOSX/Resources/equalizerdrawer_active.png \
121         extras/MacOSX/Resources/equalizerdrawer_blue.png \
122         extras/MacOSX/Resources/fullscreen_active.png \
123         extras/MacOSX/Resources/fullscreen_blue.png \
124         extras/MacOSX/Resources/next_active.png \
125         extras/MacOSX/Resources/next_blue.png \
126         extras/MacOSX/Resources/playlistdrawer_active.png \
127         extras/MacOSX/Resources/playlistdrawer_blue.png \
128         extras/MacOSX/Resources/previous_active.png \
129         extras/MacOSX/Resources/previous_blue.png \
130         extras/MacOSX/Resources/skip_forward_active.png \
131         extras/MacOSX/Resources/skip_forward_blue.png \
132         extras/MacOSX/Resources/skip_previous_active.png \
133         extras/MacOSX/Resources/skip_previous_blue.png \
134         extras/MacOSX/Resources/volume_high.png \
135         extras/MacOSX/Resources/volume_low.png \
136         extras/MacOSX/Resources/volumeslider_blue.png \
137         extras/MacOSX/Resources/volumeslider_normal.png \
138         extras/MacOSX/Resources/volumetrack.png \
139         extras/MacOSX/Resources/about_bg.png \
140         extras/MacOSX/Resources/skip_forward_active_embedded.png \
141         extras/MacOSX/Resources/play_embedded.png \
142         extras/MacOSX/Resources/pause_embedded.png \
143         extras/MacOSX/Resources/skip_previous_active_embedded.png \
144         extras/MacOSX/Resources/pause_embedded_blue.png \
145         extras/MacOSX/Resources/play_embedded_blue.png \
146         extras/MacOSX/Resources/skip_forward_embedded_blue.png \
147         extras/MacOSX/Resources/skip_previous_embedded_blue.png \
148         extras/MacOSX/Resources/vlc.scriptSuite \
149         extras/MacOSX/Resources/vlc.scriptTerminology \
150         extras/MacOSX/Resources/README \
151         extras/MacOSX/Resources/add_embedded.png \
152         extras/MacOSX/Resources/add_embedded_blue.png \
153         extras/MacOSX/Resources/repeat_embedded.png \
154         extras/MacOSX/Resources/repeat_embedded_blue.png \
155         extras/MacOSX/Resources/repeat_single_embedded_blue.png \
156         extras/MacOSX/Resources/shuffle_embedded.png \
157         extras/MacOSX/Resources/shuffle_embedded_blue.png \
158         extras/MacOSX/Resources/fs_volume_slider_knob_highlight.png \
159         extras/MacOSX/Resources/fs_volume_slider_knob.png \
160         extras/MacOSX/Resources/fs_volume_slider_bar.png \
161         extras/MacOSX/Resources/fs_volume_mute_highlight.png \
162         extras/MacOSX/Resources/fs_volume_mute.png \
163         extras/MacOSX/Resources/fs_volume_max_highlight.png \
164         extras/MacOSX/Resources/fs_volume_max.png \
165         extras/MacOSX/Resources/fs_time_slider_knob_highlight.png \
166         extras/MacOSX/Resources/fs_time_slider_knob.png \
167         extras/MacOSX/Resources/fs_time_slider.png \
168         extras/MacOSX/Resources/fs_stop_highlight.png \
169         extras/MacOSX/Resources/fs_stop.png \
170         extras/MacOSX/Resources/fs_skip_previous_highlight.png \
171         extras/MacOSX/Resources/fs_skip_previous.png \
172         extras/MacOSX/Resources/fs_skip_next_highlight.png \
173         extras/MacOSX/Resources/fs_skip_next.png \
174         extras/MacOSX/Resources/fs_rewind_highlight.png \
175         extras/MacOSX/Resources/fs_rewind.png \
176         extras/MacOSX/Resources/fs_play_highlight.png \
177         extras/MacOSX/Resources/fs_play.png \
178         extras/MacOSX/Resources/fs_pause_highlight.png \
179         extras/MacOSX/Resources/fs_pause.png \
180         extras/MacOSX/Resources/fs_forward_highlight.png \
181         extras/MacOSX/Resources/fs_forward.png \
182         extras/MacOSX/Resources/fs_exit_fullscreen_highlight.png \
183         extras/MacOSX/Resources/fs_exit_fullscreen.png \
184         extras/MacOSX/Resources/fs_background.png \
185         extras/MacOSX/fullscreen_panel.svg \
186         extras/MacOSX/ub.sh \
187         extras/MacOSX/vlc.xcodeproj/project.pbxproj \
188         extras/MacOSX/Delete_Preferences.app/Contents/Info.plist \
189         extras/MacOSX/Delete_Preferences.app/Contents/PkgInfo \
190         extras/MacOSX/Delete_Preferences.app/Contents/MacOS/applet \
191         extras/MacOSX/Delete_Preferences.app/Contents/Resources/description.rtfd/TXT.rtf \
192         extras/MacOSX/Delete_Preferences.app/Contents/Resources/applet.icns \
193         extras/MacOSX/Delete_Preferences.app/Contents/Resources/applet.rsrc \
194         extras/MacOSX/Delete_Preferences.app/Contents/Resources/Scripts/main.scpt \
195         extras/MacOSX/plugin/Info.plist \
196         extras/MacOSX/plugin/InstallerInfo.plist \
197         extras/MacOSX/plugin/InstallerDescription.plist \
198         extras/MacOSX/plugin/pbdevelopment.plist \
199         extras/MacOSX/plugin/English.lproj/InfoPlist.strings
200
201 ###############################################################################
202 # Various utilities ( editor syntax files, D-Bus controller ... )
203 ##############################################################################
204 EXTRA_DIST += \
205         extras/Makefile \
206         extras/zsh.cpp \
207         extras/emacs.init \
208         extras/vlc.vim \
209         extras/make.pl \
210         extras/valgrind.suppressions \
211         extras/m4/autoconf260.m4 \
212         extras/dbus-vlc.py \
213         extras/dbus-vlc.glade
214
215 ###############################################################################
216 # MS Visual Studio and eMbedded Visual Studio projects
217 ###############################################################################
218
219 EXTRA_DIST += \
220         msvc/vlc.dsw \
221         msvc/libvlc.dsp.in \
222         msvc/plugins.dsp.in \
223         msvc/vlc.dsp.in \
224         msvc/config.h.in \
225         msvc/modules_builtin_msvc.h \
226         evc/vlc.vcw \
227         evc/libvlc.vcp.in \
228         evc/vlc.vcp.in \
229         evc/plugins.vcp.in \
230         evc/errno.h \
231         evc/config.h.in \
232         evc/modules_builtin_evc.h
233
234 dist-hook:
235         cd $(distdir) && srcdir=. $(SHELL) ./toolbox --update-vc
236         distdir=$(distdir) srcdir=$(srcdir) $(SHELL) $(srcdir)/toolbox --dist-contrib
237
238 ###############################################################################
239 # Building libvlc
240 ###############################################################################
241
242 bin_SCRIPTS = vlc-config
243 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
244         $(SHELL) ./config.status --file=$@
245         chmod 0755 $@
246         touch $@
247
248 vlc-config.in: vlc-config.in.in
249         ./config.status --recheck
250         touch $@
251
252 CLEANFILES = $(BUILT_SOURCES_clean) stamp-builtin
253 DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in compile
254
255 ###############################################################################
256 # Building vlc
257 ###############################################################################
258
259 bin_PROGRAMS = vlc
260
261 vlc_SOURCES = src/vlc.c
262 # Ugly kludge so that automake defines $(CXXLINK)
263 nodist_EXTRA_vlc_SOURCES = extras/zsh.cpp src/misc/darwin_specific.m
264
265 # Work around a bug in the arm-wince-pe linker
266 if HAVE_WINCE
267 vlc_WORKAROUNDLDFLAGS = $(LIBVLC)
268 endif
269
270 vlc_DEPENDENCIES = src/$(LIB_libvlc) $(DATA_win32_rc)
271
272 vlc_LDADD = $(DATA_win32_rc) $(LIBVLC)
273
274 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
275 if USE_LIBTOOL
276 LIB_libvlc = libvlc.la
277 LIBVLC = src/$(LIB_libvlc)
278 vlc_LDFLAGS =
279 else
280 if HAVE_WIN32
281 vlc_LDFLAGS = -L$(top_builddir)/src -lvlc `$(VLC_CONFIG) --libs vlc`
282 LIB_libvlc = libvlc.dll.a
283 LIBVLC =
284 else
285 vlc_LDFLAGS = $(vlc_WORKAROUNDLFDLAGS) `$(VLC_CONFIG) --libs vlc builtin`
286 LIB_libvlc = libvlc.a
287 LIBVLC = src/$(LIB_libvlc)
288 vlc_DEPENDENCIES += stamp-builtin
289 endif
290 vlc_LDADD += $(INCLUDED_LIBINTL)
291 endif
292
293 # Shortcut for developpers to rebuild the core (libvlc + vlc)
294 # Don't use it if you don't know what it is about.
295 # Don't complain if it doesn't work. -- Courmisch
296 libvlc:
297         cd src && $(MAKE) $(AM_MAKEFLAGS) $(LIB_libvlc)
298
299 core: libvlc
300         $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT)
301
302 .PHONY: libvlc core
303
304 src/$(LIB_libvlc): libvlc
305
306 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_DEPENDENCIES)
307         @rm -f vlc$(EXEEXT)
308         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
309           c++) cmd="$(CXXLINK)" ;; \
310           objc) cmd="$(OBJCLINK)" ;; \
311           c|*) cmd="$(LINK)" ;; \
312         esac ; \
313         cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
314         echo $$cmd ; \
315         eval $$cmd
316
317 if HAVE_BEOS
318 noinst_DATA = vlc-bundle
319 vlc-bundle: vlc
320         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
321         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
322         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
323         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
324           if test -n "$$i" ; then \
325             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
326             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
327           fi ; \
328         done
329         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
330           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
331           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
332             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
333           done ; \
334         fi
335         for i in $(ALL_LINGUAS); do \
336           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
337           cp "$(top_builddir)/po/$$i.gmo" \
338             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
339         done
340         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
341 endif
342
343 # Install the symlinks
344 install-exec-local: install-binPROGRAMS
345         inst="`echo vlc | sed -e '$(transform)'`" ; \
346         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
347           rm -f "$(DESTDIR)$(bindir)/$$i" && \
348           ln -sf "$${inst}" "$(DESTDIR)$(bindir)/$$i" ; \
349         fi ; done
350
351 # the opposite of install-{data,exec}-local
352 uninstall-local:
353         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
354           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
355         fi ; done
356
357 if HAVE_DARWIN
358 # Create the MacOS X app
359 vlc_app_DATA = VLC.app
360 vlc_appdir = $(bindir)
361 # VLC-release.app is the old VLC.app target
362 VLC-release.app: vlc
363         @if test -e "$(top_builddir)/tmp"; then \
364           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
365           false; \
366         else \
367           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
368         fi
369         rm -Rf $(top_builddir)/VLC-release.app
370         cp -R $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
371         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
372           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
373         done
374         mkdir -p $(top_builddir)/tmp/modules/audio_output
375         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
376         for i in \
377             AppleRemote.h \
378             AppleRemote.m \
379             about.h \
380             about.m \
381             applescript.h \
382             applescript.m \
383             controls.h \
384             controls.m \
385             equalizer.h \
386             equalizer.m \
387             intf.h \
388             intf.m \
389             macosx.m \
390             misc.h \
391             misc.m \
392             open.h \
393             open.m \
394             output.h \
395             output.m \
396             playlist.h \
397             playlist.m \
398             playlistinfo.h \
399             playlistinfo.m \
400             prefs_widgets.h \
401             prefs_widgets.m \
402             prefs.h \
403             prefs.m \
404             vout.h \
405             voutqt.m \
406             voutgl.m \
407             wizard.h \
408             wizard.m \
409             extended.h \
410             extended.m \
411             bookmarks.h \
412             bookmarks.m \
413             sfilters.h \
414             sfilters.m \
415             update.h \
416             update.m \
417             interaction.h \
418             interaction.m \
419             embeddedwindow.h \
420             embeddedwindow.m \
421             fspanel.h \
422             fspanel.m \
423             vout.m; do \
424           cp "$(srcdir)/modules/gui/macosx/$$i" \
425              $(top_builddir)/tmp/modules/gui/macosx; \
426         done
427         cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)' && \
428             cd ../../../ && \
429             cp -R $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
430                   $(top_builddir)/VLC-release.app; \
431         rm -Rf $(top_builddir)/tmp
432         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
433         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/lib
434         $(INSTALL) $(top_builddir)/.libs/vlc \
435                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
436         $(INSTALL) $(top_builddir)/src/.libs/libvlc.1.dylib \
437                    $(top_builddir)/VLC-release.app/Contents/MacOS/lib/libvlc.dylib
438         install_name_tool -change /usr/local/lib/libvlc.1.dylib \
439                    @executable_path/lib/libvlc.dylib \
440                $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
441         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
442         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
443         for i in `$(VLC_CONFIG) --target plugin` ; do \
444           if test -n "$$i" ; \
445             then $(INSTALL) "`pwd`/`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" \
446                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
447           fi ; done
448         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
449           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
450           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
451             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/`basename $${i}` ; \
452           done ; \
453         fi
454         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaplaylist
455         for i in $(srcdir)/share/luaplaylist/*.* ; do \
456           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaplaylist/`basename $${i}` ; \
457         done ; \
458         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs
459         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js
460         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old
461         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/admin
462         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/vlm
463         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images
464         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests
465         for i in $(srcdir)/share/http/*.* ; do \
466           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
467         done ; \
468         for i in $(srcdir)/share/http/dialogs/* ; do \
469           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs/`basename $${i}` ; \
470         done ; \
471         for i in $(srcdir)/share/http/js/*.* ; do \
472           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js/`basename $${i}` ; \
473         done ; \
474         for i in $(srcdir)/share/http/old/*.* ; do \
475           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/`basename $${i}` ; \
476         done ; \
477         for i in $(srcdir)/share/http/old/admin/*.* ; do \
478           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/admin/`basename $${i}` ; \
479         done ; \
480         for i in $(srcdir)/share/http/old/vlm/*.* ; do \
481           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old/vlm/`basename $${i}` ; \
482         done ; \
483         for i in $(srcdir)/share/http/images/*.* ; do \
484           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images/`basename $${i}` ; \
485         done ; \
486         for i in $(srcdir)/share/http/requests/*.* ; do \
487           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/`basename $${i}` ; \
488         done ; \
489         $(INSTALL) -m 644 $(srcdir)/share/http/requests/readme $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/readme.txt
490         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
491         for i in $(ALL_LINGUAS); do \
492           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
493           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
494           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
495           ln -sf ../English.lproj/InfoPlist.strings \
496               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
497           ln -sf ../English.lproj/MainMenu.nib \
498               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
499         done
500         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
501         find $(top_builddir)/VLC-release.app -type d -exec chmod ugo+rx '{}' \;
502         find $(top_builddir)/VLC-release.app -type f -exec chmod ugo+r '{}' \;
503
504 VLC.app: vlc
505         @if test -e "$(top_builddir)/tmp"; then \
506           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
507           false; \
508         else \
509           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
510         fi
511         rm -Rf $(top_builddir)/VLC.app
512         cp -R $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
513         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
514           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
515         done
516         mkdir -p $(top_builddir)/tmp/modules/audio_output
517         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
518         for i in \
519             AppleRemote.h \
520             AppleRemote.m \
521             about.h \
522             about.m \
523             applescript.h \
524             applescript.m \
525             controls.h \
526             controls.m \
527             equalizer.h \
528             equalizer.m \
529             intf.h \
530             intf.m \
531             macosx.m \
532             misc.h \
533             misc.m \
534             open.h \
535             open.m \
536             output.h \
537             output.m \
538             playlist.h \
539             playlist.m \
540             playlistinfo.h \
541             playlistinfo.m \
542             prefs_widgets.h \
543             prefs_widgets.m \
544             prefs.h \
545             prefs.m \
546             vout.h \
547             voutqt.m \
548             voutgl.m \
549             wizard.h \
550             wizard.m \
551             extended.h \
552             extended.m \
553             bookmarks.h \
554             bookmarks.m \
555             sfilters.h \
556             sfilters.m \
557             update.h \
558             update.m \
559             interaction.h \
560             interaction.m \
561             embeddedwindow.h \
562             embeddedwindow.m \
563             fspanel.h \
564             fspanel.m \
565             vout.m; do \
566           cp "$(srcdir)/modules/gui/macosx/$$i" \
567              $(top_builddir)/tmp/modules/gui/macosx; \
568         done
569         cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)' && \
570             cd ../../../ && \
571             cp -R $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
572                   $(top_builddir)/VLC.app; \
573         rm -Rf $(top_builddir)/tmp
574         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
575         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/lib
576         $(INSTALL) $(top_builddir)/.libs/vlc \
577                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
578         $(INSTALL) $(top_builddir)/src/.libs/libvlc.1.dylib \
579                    $(top_builddir)/VLC.app/Contents/MacOS/lib/libvlc.dylib
580         install_name_tool -change /usr/local/lib/libvlc.1.dylib \
581                    @executable_path/lib/libvlc.dylib \
582                $(top_builddir)/VLC.app/Contents/MacOS/VLC
583         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
584         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
585         for i in `$(VLC_CONFIG) --target plugin` ; do \
586           if test -n "$$i" ; \
587         then install_name_tool -change /usr/local/lib/libvlc.1.dylib \
588                                   @executable_path/lib/libvlc.dylib \
589                           "`pwd`/`dirname $$i`/.libs/`basename $$i`$(LIBEXT)"; \
590             ln -sfn "`pwd`/`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" \
591                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
592           fi ; done
593         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
594           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
595           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
596                 install_name_tool -change /usr/local/lib/libvlc.1.dylib @executable_path/lib/libvlc.dylib $${i}; \
597             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/`basename $${i}` ; \
598           done ; \
599         fi
600         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
601         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
602         for i in $(ALL_LINGUAS); do \
603           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
604           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
605           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
606           ln -sf ../English.lproj/InfoPlist.strings \
607               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
608           ln -sf ../English.lproj/MainMenu.nib \
609               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
610         done
611         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
612 endif
613
614 if HAVE_WIN32
615 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
616 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
617 noinst_share_vlc_win32_rcdir = $(libdir)
618 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
619         $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir)/share -i $< -o $@
620 endif
621
622
623 ###############################################################################
624 # Building specific source packages
625 ###############################################################################
626
627 dist-woody: distdir
628         $(remove_distdir_woody)
629         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
630         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
631         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
632           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
633         $(remove_distdir_woody)
634
635 remove_distdir_woody = \
636   { test ! -d $(PACKAGE)-woody-$(VERSION) \
637     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
638            -exec chmod u+w {} ';' \
639          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
640
641 ###############################################################################
642 # Building architecture-specific binary packages
643 ###############################################################################
644
645 # XXX: this rule is probably only useful to you if you have exactly
646 # the same setup as me. Contact sam@zoy.org if you need to use it.
647 #
648
649 package-win-common:
650 # Check that tmp isn't in the way
651         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
652           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
653           false; \
654         else \
655           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
656         fi
657
658 # Copy relevant files
659         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
660         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
661         cp "src/libvlc$(LIBEXT)" "vlc-${VERSION}/"
662
663         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
664           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
665           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
666
667         mkdir $(top_builddir)/vlc-${VERSION}/locale
668         for i in $(ALL_LINGUAS); do \
669           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
670           cp "$(srcdir)/po/$${i}.gmo" \
671             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
672             || true ; \
673         done
674
675         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/images"
676         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/requests"
677         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/js"
678         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/dialogs"
679         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/old"
680         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/old/vlm"
681         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/old/admin"
682         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
683         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
684         cp $(srcdir)/share/http/.hosts $(top_builddir)/vlc-${VERSION}/http/ ;
685         unix2dos $(top_builddir)/vlc-${VERSION}/http/.hosts ;
686         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
687         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
688         cp $(srcdir)/share/http/js/*.js $(top_builddir)/vlc-${VERSION}/http/js/ ;
689         unix2dos $(top_builddir)/vlc-${VERSION}/http/js/*.js ;
690         cp $(srcdir)/share/http/dialogs/* $(top_builddir)/vlc-${VERSION}/http/dialogs/ ;
691         unix2dos $(top_builddir)/vlc-${VERSION}/http/dialogs/* ;
692         cp $(srcdir)/share/http/dialogs/.hosts $(top_builddir)/vlc-${VERSION}/http/dialogs/ ;
693         unix2dos $(top_builddir)/vlc-${VERSION}/http/dialogs/.hosts ;
694         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
695         cp $(srcdir)/share/http/images/*.png $(top_builddir)/vlc-${VERSION}/http/images/
696         cp $(srcdir)/share/http/requests/*.xml $(top_builddir)/vlc-${VERSION}/http/requests/ ;
697         unix2dos $(top_builddir)/vlc-${VERSION}/http/requests/*.xml ;
698         cp $(srcdir)/share/http/requests/readme $(top_builddir)/vlc-${VERSION}/http/requests/readme.txt ;
699         unix2dos $(top_builddir)/vlc-${VERSION}/http/requests/readme.txt ;
700
701         cp $(srcdir)/share/http/old/*.html $(top_builddir)/vlc-${VERSION}/http/old/ ;
702         unix2dos $(top_builddir)/vlc-${VERSION}/http/old/*.html ;
703         cp $(srcdir)/share/http/old/*.css $(top_builddir)/vlc-${VERSION}/http/old/ ;
704         cp $(srcdir)/share/http/old/.hosts $(top_builddir)/vlc-${VERSION}/http/old/ ;
705         cp $(srcdir)/share/http/old/*.png $(top_builddir)/vlc-${VERSION}/http/old/ ;
706         cp $(srcdir)/share/http/old/vlm/*.html $(top_builddir)/vlc-${VERSION}/http/old/vlm/ ;
707         unix2dos $(top_builddir)/vlc-${VERSION}/http/old/vlm/*.html ;
708         cp $(srcdir)/share/http/old/admin/*.html $(top_builddir)/vlc-${VERSION}/http/old/admin/ ;
709         unix2dos $(top_builddir)/vlc-${VERSION}/http/old/admin/*.html ;
710         cp $(srcdir)/share/http/old/admin/.access $(top_builddir)/vlc-${VERSION}/http/old/admin/ ;
711
712         cp $(srcdir)/share/vlc48x48.ico $(top_builddir)/vlc-${VERSION}/ ;
713
714 if BUILD_MOZILLA
715         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
716         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
717 endif
718
719 if BUILD_ACTIVEX
720         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
721         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
722         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
723         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
724
725         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
726 endif
727 # Rebase all those DLLs to speed up loading (need cygwin rebase)
728         if rebase -b 0x42 /dev/null >/dev/null 2>&1; then \
729                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
730         fi
731
732 package-win-common-strip:
733         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
734         $(STRIP) "vlc-${VERSION}/libvlc$(LIBEXT)"
735 if BUILD_MOZILLA
736         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
737 endif
738 if BUILD_ACTIVEX
739         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
740 endif
741
742 package-win32-base-debug: package-win-common
743 # Copy relevant files
744         cp "$(top_builddir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
745
746         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
747         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
748           if test -n "$$i" ; then \
749             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
750             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
751           fi ; done
752
753         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
754         for i in $(srcdir)/share/skins2/fonts/*.*; do \
755           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
756         done
757         for i in $(srcdir)/share/skins2/*.*; do \
758           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
759         done
760
761         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu"
762         cp $(srcdir)/share/osdmenu/*.* "$(top_builddir)/vlc-${VERSION}/osdmenu"
763         for dir in dvd dvd/selected dvd/unselect dvd/selection dvd/volume default default/selected default/selection default/volume;do \
764                 mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/$$dir"; \
765                 for file in $(srcdir)/share/osdmenu/$${dir}/*.*;do \
766                          cp $$file "$(top_builddir)/vlc-${VERSION}/osdmenu/$$dir" || true; \
767                 done; \
768         done
769         unix2dos $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg;
770         sed -i 's%share/osdmenu%osdmenu%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg
771         sed -i 's%/%\\%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg 
772
773
774 package-win32-base: package-win32-base-debug package-win-common-strip
775         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
776           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
777
778 package-win32-base-exe: package-win32-base
779 # Create package
780         if makensis -VERSION >/dev/null 2>&1; then \
781             MAKENSIS="makensis -DVERSION=${VERSION}"; \
782         elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
783             MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis /DVERSION=${VERSION}"; \
784         elif wine --version >dev/null 2>&1; then \
785             MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe /DVERSION=${VERSION}"; \
786         else \
787             echo 'Error: cannot locate makensis tool'; exit 1; \
788         fi; \
789         eval "$$MAKENSIS $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi"
790
791 package-win32-base-exe-cygwin: package-win32-base-exe
792 # Create package
793
794 package-win32-base-exe-linux:
795 # Create package
796         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
797
798 package-win32-base-zip: package-win32-base
799 # Create package 
800         zip -r -9 vlc-${VERSION}-win32.zip vlc-${VERSION}
801
802 package-win32-base-7zip: package-win32-base
803 # Create package 
804         7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-${VERSION}-win32.7z vlc-${VERSION}
805
806 package-win32-exe: package-win32-base package-win32-base-exe
807 # Clean up
808         rm -Rf $(top_builddir)/vlc-${VERSION}
809
810 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
811 # Clean up
812         rm -Rf $(top_builddir)/vlc-${VERSION}
813
814 package-win32-zip: package-win32-base-zip
815 # Clean up
816         rm -Rf $(top_builddir)/vlc-${VERSION}
817
818 package-win32-7zip: package-win32-base-7zip
819 # Clean up
820         rm -Rf $(top_builddir)/vlc-${VERSION}
821
822 package-win32-no-clean: package-win32-base-exe package-win32-base-zip package-win32-base-7zip
823
824 package-win32: package-win32-no-clean
825 # Clean up
826         rm -Rf $(top_builddir)/vlc-${VERSION}
827
828 package-wince-base: package-win-common package-win-common-strip
829
830 package-wince-base-zip:
831 # Create package 
832         zip -r vlc-${VERSION}-wince.zip vlc-${VERSION}
833
834 package-wince: package-wince-base  package-wince-base-zip
835 # Clean up
836         rm -Rf $(top_builddir)/vlc-${VERSION}
837
838
839 package-beos:
840 # Check that tmp isn't in the way
841         @if test -e $(srcdir)/tmp; then \
842           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
843           false ; \
844         else \
845           echo "OK." ; mkdir $(srcdir)/tmp ; \
846         fi
847
848 # Copy relevant files
849         mkdir -p $(srcdir)/tmp/vlc ;
850         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
851           THANKS NEWS tmp/vlc/ ;
852
853 # Create debug package
854         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
855         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
856         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
857         (cd $(srcdir)/tmp && zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
858         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
859         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
860
861 # Create normal package
862         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
863         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
864           --strip-debug --strip-unneeded "{}" \; ;
865         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
866         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
867         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
868         (cd $(srcdir)/tmp &&  zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
869         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
870
871 # Clean up
872         rm -Rf $(srcdir)/tmp ;
873
874 package-macosx:
875 # Check that the temporary location isn't in the way
876         @if test -e "$(top_builddir)/vlc-${VERSION}/"; then \
877           rm -Rf "$(top_builddir)/vlc-${VERSION}/" ; \
878         fi
879
880         echo "Create package directory: vlc-${VERSION}/";
881         mkdir -p "$(top_builddir)/vlc-${VERSION}/";
882
883 # Copy relevant files 
884         @if test -e "$(top_builddir)/VLC-release.app/"; then \
885           cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-${VERSION}/VLC.app"; \
886         else \
887           cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-${VERSION}/VLC.app"; \
888         fi
889         cd "$(srcdir)" && mkdir -p $(top_builddir)/vlc-${VERSION}/Goodies/ && \
890           mkdir -p $(top_builddir)/vlc-${VERSION}/.background/ && \
891           cp AUTHORS COPYING ChangeLog README THANKS NEWS $(top_builddir)/vlc-${VERSION}/Goodies/ && \
892           cp -R extras/MacOSX/Delete_Preferences.app $(top_builddir)/vlc-${VERSION}/Goodies/Delete\ VLC\ Preferences.app && \
893           cp README.MacOSX.rtf $(top_builddir)/vlc-${VERSION}/Read\ Me.rtf && \
894           cp extras/MacOSX/Resources/about_bg.png $(top_builddir)/vlc-${VERSION}/.background/background.png ;
895
896 # Place a link to the application folder
897         ln -s /Applications $(top_builddir)/vlc-${VERSION}/Applications ;
898
899 # Create disk image 
900         echo "Creating disk image" ;
901         rm -f "$(top_builddir)/vlc-${VERSION}.dmg" ;
902         hdiutil create -srcfolder "$(top_builddir)/vlc-${VERSION}" \
903           "$(top_builddir)/vlc-${VERSION}.dmg" -format UDRW \
904           -scrub -imagekey zlib-level=9 ;
905
906 # Make sure the root window of the dmg will pop up when the dmg is mounted.
907 # Note: We dont mount in /Volumes to be sure we won't collide with an other
908 # finder mounted dmg with the same name.
909         echo "Make sure the root window of the dmg will pop up when the dmg is mounted" ;
910         mkdir -p $(top_builddir)/vlcmnt ;
911         hdiutil attach -readwrite -noverify -noautoopen "$(top_builddir)/vlc-${VERSION}.dmg" -mountpoint "$(top_builddir)/vlcmnt/vlc-${VERSION}" ;
912         bless --folder "$(top_builddir)/vlcmnt/vlc-${VERSION}/" --openfolder "$(top_builddir)/vlcmnt/vlc-${VERSION}" ;
913         sleep 1 # Make sure operation completes
914
915 # Place the image disk finder icon at the correct place
916 # Note: careful here the finder does some weird things
917 # sometimes. delays in the script should prevent those.
918         cd "$(srcdir)"
919         osascript -e "tell application \"Finder\"" \
920         -e "   set f to POSIX file (\"$(top_builddir)/vlcmnt/vlc-${VERSION}/\" as string) as alias" \
921         -e "   tell folder f" \
922         -e "       open" \
923         -e "       tell container window" \
924         -e "          set toolbar visible to false" \
925         -e "          set statusbar visible to false" \
926         -e "          set current view to icon view" \
927         -e "          delay 1 -- Sync" \
928         -e "          set the bounds to {50, 100, 1000, 1000} -- Big size so the finder won't do silly things" \
929         -e "       end tell" \
930         -e "       delay 1 -- Sync" \
931         -e "       set icon size of the icon view options of container window to 128" \
932         -e "       set arrangement of the icon view options of container window to not arranged" \
933         -e "       set background picture of the icon view options of container window to file \".background:background.png\"" \
934         -e "       set position of item \"VLC.app\" to {100, 20}" \
935         -e "       set position of item \"Applications\" to {310, 20}" \
936         -e "       set position of item \"Goodies\" to {40, 200}" \
937         -e "       set position of item \"Read Me.rtf\" to {410, 200}" \
938         -e "       set the bounds of the container window to {50, 100, 590, 500}" \
939         -e "       update without registering applications" \
940         -e "       delay 5 -- Sync" \
941         -e "       close" \
942         -e "   end tell" \
943         -e "   -- Sync" \
944         -e "   delay 5" \
945         -e "end tell" || true # Make sure we don't make the build bots fail
946
947 # Unmount the image now
948         hdiutil detach "$(top_builddir)/vlcmnt/vlc-${VERSION}" ;
949         rm -R $(top_builddir)/vlcmnt ;
950
951 # Make sure the image is not writable
952 # Note: We can't directly create a read only dmg as we do the bless stuff
953         echo "Make the disk image read-only" ;
954         mv "$(top_builddir)/vlc-${VERSION}.dmg" "$(top_builddir)/vlc-${VERSION}-rw.dmg" ;
955         hdiutil convert "$(top_builddir)/vlc-${VERSION}-rw.dmg" -format UDZO -o "$(top_builddir)/vlc-${VERSION}.dmg" ;
956         rm "$(top_builddir)/vlc-${VERSION}-rw.dmg" ;
957
958 # We are done
959         echo "Disk image creation completed:" ;
960         ls -la "$(top_builddir)/vlc-${VERSION}.dmg" ; echo ;
961
962 # Clean up
963         rm -Rf "$(top_builddir)/vlc-${VERSION}" ;
964
965 package-macosx-plugin:
966 if BUILD_MOZILLA
967 # Create Installer
968         rm -rf "$(top_builddir)/macosx-plugin-instdata/"; true
969         mkdir -p "$(top_builddir)/macosx-plugin-instdata"
970         cp -R "$(top_builddir)/mozilla/VLC Plugin.plugin" "$(top_builddir)/macosx-plugin-instdata"
971         rm -rf "$(top_builddir)/VLC Internet Plug-In.pkg"
972         /Developer/Tools/packagemaker -build -ds -p "$(top_builddir)/VLC Internet Plug-In.pkg" \
973         -f "$(top_builddir)/macosx-plugin-instdata" \
974         -i "$(srcdir)/extras/MacOSX/plugin/InstallerInfo.plist" \
975         -d "$(srcdir)/extras/MacOSX/plugin/InstallerDescription.plist"; true
976         rm -rf "$(top_builddir)/macosx-plugin-instdata/"
977
978 # Create disk image 
979         rm -f "$(top_builddir)/vlc-plugin-${VERSION}.dmg"; true
980         rm -rf "$(top_builddir)/vlc-plugin-${VERSION}/"; true
981         mkdir -p "$(top_builddir)/vlc-plugin-${VERSION}/"
982         mv "$(top_builddir)/VLC Internet Plug-In.pkg" "$(top_builddir)/vlc-plugin-${VERSION}/"
983         hdiutil create -srcfolder "$(top_builddir)/vlc-plugin-${VERSION}" \
984           "$(top_builddir)/vlc-plugin-${VERSION}.dmg" -format UDZO \
985           -scrub -imagekey zlib-level=9 ;
986         echo "Disk image creation completed:"
987         rm -rf "$(top_builddir)/vlc-plugin-${VERSION}"
988 endif
989
990 package-translations:
991         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
992           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
993           false; \
994         else \
995           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
996         fi
997 # Copy translations
998         for i in $(ALL_LINGUAS); do \
999           cp "$(srcdir)/po/$${i}.po" \
1000             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
1001             || true ; \
1002         done
1003         cp "$(srcdir)/doc/translations.txt" \
1004           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
1005
1006         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1007         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1008         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1009         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1010         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1011         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1012         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1013         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1014
1015         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1016           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1017
1018 ###############################################################################
1019 # PO translation files update
1020 ###############################################################################
1021 .PHONY: update-po
1022
1023 update-po:
1024         rm -f $(top_srcdir)/po/POTFILES.in
1025         { \
1026           cd $(top_srcdir) && \
1027           echo "# automatically created by make update-po" ; \
1028           echo "" ; \
1029           echo "# main sources" ; \
1030           find include src -name '*.[chm]' -o -name '*.[ch]pp' \
1031             | grep -v '\(misc/modules_\|src/misc/revision.c\|modules/builtin.h\)' \
1032             | sort ; \
1033           echo "" ; \
1034           echo "# modules" ; \
1035           find modules -name '*.[chm]' -o -name '*.[ch]pp' -o -wholename 'modules/gui/qt4/ui/*.ui'\
1036             | grep -v '\(\.moc\.\|gui/gtk2/\)' \
1037             | grep -vE 'qt4/ui/.*.h' |grep -v qt4/resources.cpp \
1038             | sort ; \
1039         } > $(top_srcdir)/po/POTFILES.in
1040         rm -f $(top_srcdir)/po/vlc.pot
1041         cd po && $(MAKE) POTFILES vlc.pot update-po
1042
1043 #cd po && $(MAKE) update-po
1044
1045 ###############################################################################
1046 # Stamp rules
1047 ###############################################################################
1048 stamp-builtin: FORCE
1049         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
1050           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
1051             rm -f $@; \
1052             break; \
1053           fi; \
1054         done
1055         @if test ! -f $@; then printf "" > $@; fi
1056
1057 ###############################################################################
1058 # Enforce Mac OS X deployment target environment variable
1059 ###############################################################################
1060 macosx-sdk: Makefile.in $(HEADERS_include) vlc-config
1061         export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
1062
1063 ###############################################################################
1064 # Force rule
1065 ###############################################################################
1066 FORCE: