]> git.sesse.net Git - vlc/blob - Makefile.am
Forward port of branches/0.8.1-jpsaman-thedj revision 12070. The OSD menu subsystem...
[vlc] / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 NULL =
6
7 # SUBDIRS stores the directories where a "make" is required when building
8 # something. DIST_SUBDIRS stores the directories where nothing is built but
9 # which have makefiles with distribution information.
10 #  - intl should come before modules and . because all the code uses gettext
11 #  - modules should come before . because vlc needs the builtins
12 #  - . should come before mozilla because the plugin needs libvlc_pic.a
13 #  - po should come before . because VLC.app needs the pofiles
14 #  - loader should come before modules because some plugins need it
15 SUBDIRS = intl loader modules po . mozilla activex share m4 doc
16 DIST_SUBDIRS = $(SUBDIRS) src debian ipkg lib
17
18 EXTRA_DIST = \
19         HACKING \
20         INSTALL.win32 \
21         vlc.exe.manifest \
22         MAINTAINERS \
23         README.MacOSX.rtf \
24         bootstrap \
25         src/extras/COPYING \
26         toolbox \
27         vlc-api.pl \
28         vlc-config.in.in \
29         vlc.spec \
30         vlc.spec.mdk \
31         vlc.win32.nsi \
32         $(NULL)
33
34 BUILT_SOURCES =
35 SUFFIXES = 
36
37 # Tell aclocal to use -I m4. Wonder if it really works.
38 ACLOCAL_AMFLAGS = -I m4
39
40 # XXX: these flags could be set in configure.ac, but we set them here
41 # because old versions of automake don't support them in configure.ac.
42 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
43
44 ###############################################################################
45 # Headers
46 ###############################################################################
47
48 BUILT_SOURCES += \
49         stamp-api \
50         src/misc/modules_builtin.h \
51         $(NULL)
52
53 pkgincludedir = $(includedir)/vlc
54
55 dist_pkginclude_HEADERS = \
56         include/vlc/vlc.h \
57         include/vlc/aout.h \
58         include/vlc/vout.h \
59         include/vlc/sout.h \
60         include/vlc/decoder.h \
61         include/vlc/input.h \
62         include/vlc/intf.h \
63         include/vlc/control.h \
64         $(NULL)
65
66 noinst_HEADERS = $(HEADERS_include)
67
68 HEADERS_include = \
69         include/aout_internal.h \
70         include/audio_output.h \
71         include/beos_specific.h \
72         include/charset.h \
73         include/codecs.h \
74         include/configuration.h \
75         include/darwin_specific.h \
76         include/intf_eject.h \
77         include/iso_lang.h \
78         include/main.h \
79         include/mmx.h \
80         include/modules.h \
81         include/modules_inner.h \
82         include/mtime.h \
83         include/network.h \
84         include/osd.h \
85         include/os_specific.h \
86         include/snapshot.h \
87         include/stream_output.h \
88         include/variables.h \
89         include/video_output.h \
90         include/vlc_access.h \
91         include/vlc_acl.h \
92         include/vlc_bits.h \
93         include/vlc_block.h \
94         include/vlc_block_helper.h \
95         include/vlc_codec.h \
96         include/vlc_common.h \
97         include/vlc_config.h \
98         include/vlc_cpu.h \
99         include/vlc_demux.h \
100         include/vlc_error.h \
101         include/vlc_es.h \
102         include/vlc_es_out.h \
103         include/vlc_filter.h \
104         include/vlc_config_cat.h \
105         include/vlc_httpd.h \
106         include/vlc_tls.h \
107         include/vlc_md5.h \
108         include/vlc_image.h \
109         include/vlc_input.h \
110         include/vlc_interface.h \
111         include/vlc_keys.h \
112         include/vlc_messages.h \
113         include/vlc_meta.h \
114         include/vlc_objects.h \
115         include/vlc_osd.h \
116         include/vlc_playlist.h \
117         include/vlc_spu.h \
118         include/vlc_stream.h \
119         include/vlc_symbols.h \
120         include/vlc_threads_funcs.h \
121         include/vlc_threads.h \
122         include/vlc_video.h \
123         include/vlc_vlm.h \
124         include/vlc_vod.h \
125         include/vlc_xml.h \
126         include/vout_synchro.h \
127         include/win32_specific.h \
128         $(NULL)
129
130 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in vlc-config
131         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
132         touch $@
133
134 # These dependencies are mandatory
135 $(SOURCES_libvlc): src/misc/modules_builtin.h $(LIB_intl)
136
137 ###############################################################################
138 # Optional libintl - FIXME, bad dependencies
139 ###############################################################################
140
141 intl/libintl.a: FORCE
142         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
143
144 if BUILD_INTL
145 LIB_intl = intl/libintl.a
146 endif
147
148 ###############################################################################
149 # MacOS X project
150 ###############################################################################
151
152 EXTRA_DIST += \
153         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
154         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
155         extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib \
156         extras/MacOSX/Resources/English.lproj/About.nib/classes.nib \
157         extras/MacOSX/Resources/English.lproj/About.nib/info.nib \
158         extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib \
159         extras/MacOSX/Resources/English.lproj/Open.nib/classes.nib \
160         extras/MacOSX/Resources/English.lproj/Open.nib/info.nib \
161         extras/MacOSX/Resources/English.lproj/Open.nib/keyedobjects.nib \
162         extras/MacOSX/Resources/English.lproj/Preferences.nib/classes.nib \
163         extras/MacOSX/Resources/English.lproj/Preferences.nib/info.nib \
164         extras/MacOSX/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
165         extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib \
166         extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib \
167         extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
168         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/classes.nib \
169         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/info.nib \
170         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/keyedobjects.nib \
171         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
172         extras/MacOSX/Resources/a52.icns \
173         extras/MacOSX/Resources/aac.icns \
174         extras/MacOSX/Resources/asf.icns \
175         extras/MacOSX/Resources/asx.icns \
176         extras/MacOSX/Resources/avi.icns \
177         extras/MacOSX/Resources/bin.icns \
178         extras/MacOSX/Resources/cue.icns \
179         extras/MacOSX/Resources/dat.icns \
180         extras/MacOSX/Resources/divx.icns \
181         extras/MacOSX/Resources/dv.icns \
182         extras/MacOSX/Resources/generic.icns \
183         extras/MacOSX/Resources/m3u.icns \
184         extras/MacOSX/Resources/mov.icns \
185         extras/MacOSX/Resources/mp3.icns \
186         extras/MacOSX/Resources/mp4.icns \
187         extras/MacOSX/Resources/mpeg.icns \
188         extras/MacOSX/Resources/mpeg1.icns \
189         extras/MacOSX/Resources/mpeg2.icns \
190         extras/MacOSX/Resources/mpeg4.icns \
191         extras/MacOSX/Resources/mpg.icns \
192         extras/MacOSX/Resources/ogg.icns \
193         extras/MacOSX/Resources/ogm.icns \
194         extras/MacOSX/Resources/pls.icns \
195         extras/MacOSX/Resources/srt.icns \
196         extras/MacOSX/Resources/sub.icns \
197         extras/MacOSX/Resources/vlc.icns \
198         extras/MacOSX/Resources/vob.icns \
199         extras/MacOSX/Resources/wma.icns \
200         extras/MacOSX/Resources/wmv.icns \
201         extras/MacOSX/Resources/pause.png \
202         extras/MacOSX/Resources/pause_blue.png \
203         extras/MacOSX/Resources/play.png \
204         extras/MacOSX/Resources/play_blue.png \
205         extras/MacOSX/Resources/stop.png \
206         extras/MacOSX/Resources/stop_blue.png \
207         extras/MacOSX/Resources/display.png \
208         extras/MacOSX/Resources/display_slider.png \
209         extras/MacOSX/Resources/display_track.png \
210         extras/MacOSX/Resources/equalizerdrawer_active.png \
211         extras/MacOSX/Resources/equalizerdrawer_blue.png \
212         extras/MacOSX/Resources/fullscreen_active.png \
213         extras/MacOSX/Resources/fullscreen_blue.png \
214         extras/MacOSX/Resources/next_active.png \
215         extras/MacOSX/Resources/next_blue.png \
216         extras/MacOSX/Resources/playlistdrawer_active.png \
217         extras/MacOSX/Resources/playlistdrawer_blue.png \
218         extras/MacOSX/Resources/previous_active.png \
219         extras/MacOSX/Resources/previous_blue.png \
220         extras/MacOSX/Resources/skip_forward_active.png \
221         extras/MacOSX/Resources/skip_forward_blue.png \
222         extras/MacOSX/Resources/skip_previous_active.png \
223         extras/MacOSX/Resources/skip_previous_blue.png \
224         extras/MacOSX/Resources/volume_high.png \
225         extras/MacOSX/Resources/volume_low.png \
226         extras/MacOSX/Resources/volumeslider_blue.png \
227         extras/MacOSX/Resources/volumeslider_normal.png \
228         extras/MacOSX/Resources/volumetrack.png \
229         extras/MacOSX/Resources/about_bg.png \
230         extras/MacOSX/Resources/vlc.scriptSuite \
231         extras/MacOSX/Resources/vlc.scriptTerminology \
232         extras/MacOSX/Resources/README \
233         extras/MacOSX/vlc.pbproj/project.pbxproj \
234         extras/MacOSX/macosx-dmg \
235         \
236         extras/Makefile \
237         extras/zsh.cpp \
238         $(NULL)
239
240 ###############################################################################
241 # MS Visual Studio and eMbedded Visual Studio projects
242 ###############################################################################
243
244 EXTRA_DIST += \
245         msvc/vlc.dsw \
246         msvc/libvlc.dsp.in \
247         msvc/plugins.dsp.in \
248         msvc/vlc.dsp.in \
249         msvc/config.h.in \
250         msvc/modules_builtin_msvc.h \
251         evc/vlc.vcw \
252         evc/libvlc.vcp.in \
253         evc/vlc.vcp.in \
254         evc/plugins.vcp.in \
255         evc/errno.h \
256         evc/config.h.in \
257         evc/modules_builtin_evc.h \
258         $(NULL)
259
260 dist-hook:
261         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
262         distdir=$(distdir) srcdir=$(srcdir) $(srcdir)/toolbox --dist-contrib
263
264 ###############################################################################
265 # Building libvlc
266 ###############################################################################
267
268 bin_SCRIPTS = vlc-config
269 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
270         cd $(top_builddir) && $(SHELL) ./config.status --file=$@
271         -cd $(top_builddir) && chmod 0755 $@
272
273 $(SOURCES): vlc-config
274
275 CLEANFILES = $(BUILT_SOURCES)
276
277 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
278
279 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
280 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
281 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
282 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
283
284 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
285 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
286 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
287 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
288
289 if HAVE_BEOS
290 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
291 endif
292 if HAVE_DARWIN
293 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
294 endif
295 if HAVE_WIN32
296 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
297 endif
298 if HAVE_WINCE
299 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
300 endif
301 if BUILD_DIRENT
302 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
303 endif
304 if BUILD_GETOPT
305 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
306 endif
307 if BUILD_MOZILLA
308 if !HAVE_WIN32
309 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
310 endif
311 endif
312
313 EXTRA_DIST += \
314         $(SOURCES_libvlc_beos) \
315         $(SOURCES_libvlc_darwin) \
316         $(SOURCES_libvlc_win32) \
317         $(SOURCES_libvlc_dirent) \
318         $(SOURCES_libvlc_getopt) \
319         $(NULL)
320
321 SOURCES_libvlc_beos = \
322         src/misc/beos_specific.cpp \
323         $(NULL)
324
325 SOURCES_libvlc_darwin = \
326         src/misc/darwin_specific.m \
327         $(NULL)
328
329 SOURCES_libvlc_win32 = \
330         src/misc/win32_specific.c \
331         $(NULL)
332
333 SOURCES_libvlc_dirent = \
334         src/extras/dirent.c \
335         $(NULL)
336
337 SOURCES_libvlc_getopt = \
338         src/extras/getopt.c \
339         src/extras/getopt.h \
340         src/extras/getopt1.c \
341         $(NULL)
342
343 SOURCES_libvlc_common = \
344         src/libvlc.c \
345         src/libvlc.h \
346         src/interface/interface.c \
347         src/interface/intf_eject.c \
348         src/playlist/playlist.c \
349         src/playlist/sort.c \
350         src/playlist/loadsave.c \
351         src/playlist/view.c \
352         src/playlist/item.c \
353         src/playlist/item-ext.c \
354         src/playlist/services_discovery.c \
355         src/input/access.c \
356         src/input/clock.c \
357         src/input/control.c \
358         src/input/decoder.c \
359         src/input/demux.c \
360         src/input/es_out.c \
361         src/input/input.c \
362         src/input/input_internal.h \
363         src/input/stream.c \
364         src/input/mem_stream.c \
365         src/input/subtitles.c \
366         src/input/var.c \
367         src/video_output/video_output.c \
368         src/video_output/vout_pictures.c \
369         src/video_output/vout_pictures.h \
370         src/video_output/video_text.c \
371         src/video_output/video_widgets.c \
372         src/video_output/vout_subpictures.c \
373         src/video_output/vout_synchro.c \
374         src/video_output/vout_intf.c \
375         src/audio_output/common.c \
376         src/audio_output/dec.c \
377         src/audio_output/filters.c \
378         src/audio_output/input.c \
379         src/audio_output/mixer.c \
380         src/audio_output/output.c \
381         src/audio_output/intf.c \
382         src/stream_output/stream_output.c \
383         src/stream_output/announce.c \
384         src/stream_output/sap.c \
385         src/stream_output/acl.c \
386         src/osd/osd.c \
387         src/osd/osd_widgets.c \
388         src/osd/osd_parser.c \
389         src/misc/charset.c \
390         src/misc/httpd.c \
391         src/misc/tls.c \
392         src/misc/md5.c \
393         src/misc/mtime.c \
394         src/misc/block.c \
395         src/misc/modules.c \
396         src/misc/threads.c \
397         src/misc/unicode.c \
398         src/misc/cpu.c \
399         src/misc/configuration.c \
400         src/misc/image.c \
401         src/misc/iso_lang.c \
402         src/misc/iso-639_def.h \
403         src/misc/messages.c \
404         src/misc/objects.c \
405         src/misc/variables.c \
406         src/misc/error.c \
407         src/misc/net.c \
408         src/misc/getaddrinfo.c \
409         src/misc/vlm.c \
410         src/misc/xml.c \
411         src/extras/libc.c \
412         src/control/core.c \
413         src/control/util.c \
414         src/control/audio_video.c \
415         $(NULL)
416
417 SOURCES_libvlc = \
418         $(SOURCES_libvlc_common) \
419         $(OPT_SOURCES_libvlc_beos) \
420         $(OPT_SOURCES_libvlc_darwin) \
421         $(OPT_SOURCES_libvlc_win32) \
422         $(OPT_SOURCES_libvlc_dirent) \
423         $(OPT_SOURCES_libvlc_getopt) \
424         $(NULL)
425
426 ###############################################################################
427 # Building vlc
428 ###############################################################################
429
430 bin_PROGRAMS = vlc
431
432 vlc_SOURCES = src/vlc.c
433
434 # Work around a bug in the arm-wince-pe linker
435 if HAVE_WINCE
436 vlc_WORKAROUNDLDFLAGS = lib/libvlc.a
437 endif
438
439 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin` $(vlc_WORKAROUNDLDFLAGS)
440 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
441 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
442
443 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
444 # old automake-1.5 bug (automake/279).
445 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
446
447 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
448         @rm -f $(top_builddir)/vlc$(EXEEXT)
449         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
450           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
451           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
452           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
453         esac
454
455 if HAVE_BEOS
456 noinst_DATA = vlc-bundle
457 vlc-bundle: vlc
458         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
459         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
460         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
461         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
462           if test -n "$$i" ; then \
463             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
464             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
465           fi ; \
466         done
467         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
468           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
469           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
470             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
471           done ; \
472         fi
473         for i in $(ALL_LINGUAS); do \
474           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
475           cp "$(top_builddir)/po/$$i.gmo" \
476             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
477         done
478         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
479 endif
480
481 # Install the modules and the symlinks
482 install-exec-local:
483         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
484           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
485           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
486         fi ; done
487         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
488           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
489           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
490         fi ; done
491 if BUILD_MOZILLA
492         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
493           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
494           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
495         fi ; done
496 endif
497         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
498           rm -f "$(DESTDIR)$(bindir)/$$i" && \
499           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
500         fi ; done
501
502 # the opposite of install-{data,exec}-local
503 uninstall-local:
504         @for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
505           echo rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
506           rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
507         fi ; done
508         @for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
509           echo rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
510           rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
511         fi ; done
512 if BUILD_MOZILLA
513         @for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
514           echo rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
515           rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
516         fi ; done
517 endif
518         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
519           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
520         fi ; done
521
522 if HAVE_DARWIN
523 # Create the MacOS X app
524 vlc_app_DATA = VLC.app
525 vlc_appdir = $(bindir)
526 # VLC-release.app is the old VLC.app target
527 VLC-release.app: vlc
528         @if test -e "$(top_builddir)/tmp"; then \
529           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
530           false; \
531         else \
532           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
533         fi
534         rm -Rf $(top_builddir)/VLC-release.app
535         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
536         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
537           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
538         done
539         mkdir -p $(top_builddir)/tmp/modules/audio_output
540         cp $(srcdir)/modules/audio_output/coreaudio.c \
541            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
542         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
543         for i in \
544             about.h \
545             about.m \
546             applescript.h \
547             applescript.m \
548             controls.h \
549             controls.m \
550             equalizer.h \
551             equalizer.m \
552             intf.h \
553             intf.m \
554             macosx.m \
555             misc.h \
556             misc.m \
557             open.h \
558             open.m \
559             output.h \
560             output.m \
561             playlist.h \
562             playlist.m \
563             playlistinfo.h \
564             playlistinfo.m \
565             prefs_widgets.h \
566             prefs_widgets.m \
567             prefs.h \
568             prefs.m \
569             vout.h \
570             voutqt.m \
571             voutgl.m \
572             wizard.h \
573             wizard.m \
574             extended.h \
575             extended.m \
576         bookmarks.h \
577         bookmarks.m \
578             vout.m; do \
579           cp "$(srcdir)/modules/gui/macosx/$$i" \
580              $(top_builddir)/tmp/modules/gui/macosx; \
581         done
582         case $(target_triplet) in \
583           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
584             cd ../../../; \
585             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
586                   $(top_builddir)/VLC-release.app;; \
587           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
588             cd ../../../; \
589             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
590                   $(top_builddir)/VLC-release.app;; \
591           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
592             cd ../../../; \
593             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
594                   $(top_builddir)/VLC-release.app;; \
595         esac
596         rm -Rf $(top_builddir)/tmp
597         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
598         $(INSTALL) $(top_builddir)/vlc \
599                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
600         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
601         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
602         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
603           if test -n "$$i" ; \
604             then $(INSTALL) "$$i$(LIBEXT)" \
605                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
606           fi ; done
607         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
608           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
609           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
610             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
611           done ; \
612         fi
613         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
614         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
615         for i in $(srcdir)/share/http/* ; do \
616           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
617         done ; \
618         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
619         for i in $(srcdir)/share/http/vlm/* ; do \
620           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
621         done ; \
622         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
623         for i in $(srcdir)/share/http/admin/* ; do \
624           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
625         done ; \
626         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
627         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
628         for i in $(ALL_LINGUAS); do \
629           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
630           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
631           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
632           ln -sf ../English.lproj/InfoPlist.strings \
633               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
634           ln -sf ../English.lproj/MainMenu.nib \
635               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
636           ln -sf ../English.lproj/vlc.scriptTerminology \
637               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
638         done
639         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
640
641 VLC.app: vlc
642         @if test -e "$(top_builddir)/tmp"; then \
643           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
644           false; \
645         else \
646           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
647         fi
648         rm -Rf $(top_builddir)/VLC.app
649         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
650         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
651           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
652         done
653         mkdir -p $(top_builddir)/tmp/modules/audio_output
654         cp $(srcdir)/modules/audio_output/coreaudio.c \
655            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
656         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
657         for i in \
658             about.h \
659             about.m \
660             applescript.h \
661             applescript.m \
662             controls.h \
663             controls.m \
664             equalizer.h \
665             equalizer.m \
666             intf.h \
667             intf.m \
668             macosx.m \
669             misc.h \
670             misc.m \
671             open.h \
672             open.m \
673             output.h \
674             output.m \
675             playlist.h \
676             playlist.m \
677             playlistinfo.h \
678             playlistinfo.m \
679             prefs_widgets.h \
680             prefs_widgets.m \
681             prefs.h \
682             prefs.m \
683             vout.h \
684             voutqt.m \
685             voutgl.m \
686             wizard.h \
687             wizard.m \
688             extended.h \
689             extended.m \
690         bookmarks.h \
691         bookmarks.m \
692             vout.m; do \
693           cp "$(srcdir)/modules/gui/macosx/$$i" \
694              $(top_builddir)/tmp/modules/gui/macosx; \
695         done
696         case $(target_triplet) in \
697           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
698             cd ../../../; \
699             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
700                   $(top_builddir)/VLC.app;; \
701           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
702             cd ../../../; \
703             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
704                   $(top_builddir)/VLC.app;; \
705           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
706             cd ../../../; \
707             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
708                   $(top_builddir)/VLC.app;; \
709         esac
710         rm -Rf $(top_builddir)/tmp
711         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
712         $(INSTALL) $(top_builddir)/vlc \
713                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
714         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
715         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
716         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
717           if test -n "$$i" ; \
718             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
719                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
720           fi ; done
721         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
722           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
723           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
724             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
725           done ; \
726         fi
727         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
728         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
729         for i in $(ALL_LINGUAS); do \
730           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
731           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
732           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
733           ln -sf ../English.lproj/InfoPlist.strings \
734               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
735           ln -sf ../English.lproj/MainMenu.nib \
736               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
737         done
738         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
739 endif
740
741 if HAVE_WIN32
742 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
743 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
744 noinst_share_vlc_win32_rcdir = $(libdir)
745 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
746         $(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 $@
747 endif
748
749
750 ###############################################################################
751 # Building specific source packages
752 ###############################################################################
753
754 dist-woody: distdir
755         $(remove_distdir_woody)
756         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
757         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
758         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
759           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
760         $(remove_distdir_woody)
761
762 remove_distdir_woody = \
763   { test ! -d $(PACKAGE)-woody-$(VERSION) \
764     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
765            -exec chmod u+w {} ';' \
766          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
767
768 ###############################################################################
769 # Building architecture-specific binary packages
770 ###############################################################################
771
772 # XXX: this rule is probably only useful to you if you have exactly
773 # the same setup as me. Contact sam@zoy.org if you need to use it.
774 #
775 package-win32-base:
776 # Check that tmp isn't in the way
777         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
778           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
779           false; \
780         else \
781           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
782         fi
783
784 # Copy relevant files
785         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
786         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
787         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
788         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
789
790         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
791           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
792           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
793
794         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
795         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
796           if test -n "$$i" ; then \
797             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
798             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
799           fi ; done
800
801         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
802           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
803
804         mkdir $(top_builddir)/vlc-${VERSION}/locale
805         for i in $(ALL_LINGUAS); do \
806           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
807           cp "$(srcdir)/po/$${i}.gmo" \
808             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
809             || true ; \
810         done
811
812         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
813         for i in $(srcdir)/share/skins2/fonts/*.*; do \
814           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
815         done
816         for i in $(srcdir)/share/skins2/*.*; do \
817           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
818         done
819
820         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu"
821         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/dvd"
822         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/dvd/selected"
823         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/dvd/unselect"
824         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/dvd/selection"
825         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/dvd/volume"
826         for i in $(srcdir)/share/osdmenu/*.*; do \
827           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/ || true ; \
828           unix2dos $(srcdir)/vlc-${VERSION}/osdmenu/`basename $$i` ; \
829         done
830         for i in $(srcdir)/share/osdmenu/dvd/*.*; do \
831           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/dvd || true ; \
832         done
833         for i in $(srcdir)/share/osdmenu/dvd/unselect/*.*; do \
834           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/dvd/unselect || true ; \
835         done
836         for i in $(srcdir)/share/osdmenu/dvd/selected/*.*; do \
837           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/dvd/selected/ || true ; \
838         done
839         for i in $(srcdir)/share/osdmenu/dvd/selection/*.*; do \
840           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/dvd/selection/ || true ; \
841         done
842         for i in $(srcdir)/share/osdmenu/dvd/volume/*.*; do \
843           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/dvd/volume/ || true ; \
844         done
845
846         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/default"
847         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/default/selected"
848         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/default/selection"
849         mkdir -p "$(srcdir)/vlc-${VERSION}/osdmenu/default/volume"
850         for i in $(srcdir)/share/osdmenu/default/*.*; do \
851           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/default || true ; \
852         done
853         for i in $(srcdir)/share/osdmenu/default/selected/*.*; do \
854           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/default/selected/ || true ; \
855         done
856         for i in $(srcdir)/share/osdmenu/default/selection/*.*; do \
857           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/default/selection/ || true ; \
858         done
859         for i in $(srcdir)/share/osdmenu/default/volume/*.*; do \
860           cp $$i $(srcdir)/vlc-${VERSION}/osdmenu/default/volume/ || true ; \
861         done
862
863         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
864         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
865         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
866         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
867         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
868         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
869         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
870         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
871         cp $(srcdir)/share/http/admin/*.html \
872            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
873         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
874         cp $(srcdir)/share/http/admin/dboxfiles.html \
875            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
876         cp $(srcdir)/share/http/admin/.access \
877            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
878         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
879         cp $(srcdir)/share/http/vlm/*.html \
880            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
881         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
882
883         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
884
885         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
886 if BUILD_MOZILLA
887         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
888         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
889         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
890 endif
891
892         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
893 if BUILD_ACTIVEX
894         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
895         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
896         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
897
898         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
899         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
900 endif
901 # Rebase all those DLLs to speed up loading (need cygwin rebase)
902         if [ -x rebase ]; then \
903                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
904         fi
905
906 package-win32-base-exe:
907 # Create package
908         wine C:/Program\ Files/NSIS/makensis.exe \
909              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
910
911 package-win32-base-exe-cygwin:
912 # Create package
913         C:/Program\ Files/NSIS/makensis.exe \
914              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
915
916 package-win32-base-exe-linux:
917 # Create package
918         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
919
920 package-win32-base-zip:
921 # Create package 
922         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
923
924 package-win32-exe: package-win32-base package-win32-base-exe
925 # Clean up
926         rm -Rf $(top_builddir)/vlc-${VERSION}
927
928 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
929 # Clean up
930         rm -Rf $(top_builddir)/vlc-${VERSION}
931
932 package-win32-zip: package-win32-base package-win32-base-zip
933 # Clean up
934         rm -Rf $(top_builddir)/vlc-${VERSION}
935
936 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
937 # Clean up
938         rm -Rf $(top_builddir)/vlc-${VERSION}
939
940 package-beos:
941 # Check that tmp isn't in the way
942         @if test -e $(srcdir)/tmp; then \
943           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
944           false ; \
945         else \
946           echo "OK." ; mkdir $(srcdir)/tmp ; \
947         fi
948
949 # Copy relevant files
950         mkdir -p $(srcdir)/tmp/vlc ;
951         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
952           THANKS NEWS tmp/vlc/ ;
953
954 # Create debug package
955         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
956         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
957         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
958         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
959         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
960         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
961
962 # Create normal package
963         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
964         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
965           --strip-debug --strip-unneeded "{}" \; ;
966         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
967         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
968         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
969         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
970         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
971
972 # Clean up
973         rm -Rf $(srcdir)/tmp ;
974
975 package-macosx:
976 # Check that tmp isn't in the way
977         @if test -e "$(top_builddir)/tmp"; then \
978           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
979           false; \
980         else \
981           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
982         fi
983
984 # Copy relevant files 
985         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
986         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
987
988 # Create disk image 
989         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
990
991 # Clean up
992         rm -Rf $(top_builddir)/tmp
993
994 package-translations:
995         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
996           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
997           false; \
998         else \
999           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
1000         fi
1001 # Copy translations
1002         for i in $(ALL_LINGUAS); do \
1003           cp "$(srcdir)/po/$${i}.po" \
1004             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
1005             || true ; \
1006         done
1007         cp "$(srcdir)/doc/translations.txt" \
1008           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
1009
1010         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1011         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1012         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1013         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1014         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1015         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1016         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1017         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1018
1019         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1020           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1021
1022 ###############################################################################
1023 # Stamp rules
1024 ###############################################################################
1025 clean: clean-stamp clean-recursive
1026 clean-stamp:
1027         rm -f stamp-builtin stamp-api
1028
1029 stamp-builtin: FORCE
1030         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
1031           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
1032             rm -f $@; \
1033             break; \
1034           fi; \
1035         done
1036         @if test ! -f $@; then printf "" > $@; fi
1037
1038 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in
1039         cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl
1040         touch stamp-api
1041
1042 ###############################################################################
1043 # Force rule
1044 ###############################################################################
1045 FORCE: