]> git.sesse.net Git - vlc/blob - Makefile.am
* modules/gui/wxwindows/*, include/vlc_interface.h: new generic "open file" dialog.
[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 SUBDIRS = intl modules . mozilla share po m4
11 DIST_SUBDIRS = $(SUBDIRS) src debian doc ipkg lib autotools
12
13 EXTRA_DIST = \
14         HACKING \
15         INSTALL.win32 \
16         MAINTAINERS \
17         README.MacOSX.rtf \
18         bootstrap \
19         install-win32 \
20         src/extras/COPYING \
21         toolbox \
22         vlc-config.in.in \
23         vlc.ebuild \
24         vlc.spec \
25         vlc.spec.mdk \
26         $(NULL)
27
28 BUILT_SOURCES =
29 SUFFIXES = 
30
31 # Tell aclocal to use -I m4. Wonder if it really works.
32 ACLOCAL_AMFLAGS = -I m4
33
34 # XXX: these flags could be set in configure.ac, but we set them here
35 # because old versions of automake don't support them in configure.ac.
36 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
37
38 ###############################################################################
39 # Headers
40 ###############################################################################
41
42 BUILT_SOURCES += \
43         include/vlc_symbols.h \
44         src/misc/modules_builtin.h \
45         src/misc/modules_plugin.h \
46         $(NULL)
47
48 pkgincludedir = $(includedir)/vlc
49
50 dist_pkginclude_HEADERS = \
51         include/vlc/vlc.h \
52         include/vlc/aout.h \
53         include/vlc/vout.h \
54         include/vlc/sout.h \
55         include/vlc/decoder.h \
56         include/vlc/input.h \
57         include/vlc/intf.h \
58         $(NULL)
59
60 noinst_HEADERS = $(HEADERS_include) $(HEADERS_include_built)
61
62 HEADERS_include = \
63         include/aout_internal.h \
64         include/audio_output.h \
65         include/beos_specific.h \
66         include/configuration.h \
67         include/darwin_specific.h \
68         include/codecs.h \
69         include/encoder.h \
70         include/input_ext-dec.h \
71         include/input_ext-intf.h \
72         include/input_ext-plugins.h \
73         include/intf_eject.h \
74         include/iso_lang.h \
75         include/httpd.h \
76         include/main.h \
77         include/mmx.h \
78         include/modules.h \
79         include/modules_inner.h \
80         include/mtime.h \
81         include/network.h \
82         include/os_specific.h \
83         include/stream_control.h \
84         include/stream_output.h \
85         include/announce.h \
86         include/variables.h \
87         include/video_output.h \
88         include/vlc_common.h \
89         include/vlc_config.h \
90         include/vlc_cpu.h \
91         include/vlc_error.h \
92         include/vlc_interface.h \
93         include/vlc_messages.h \
94         include/vlc_objects.h \
95         include/vlc_playlist.h \
96         include/vlc_threads.h \
97         include/vlc_threads_funcs.h \
98         include/vlc_video.h \
99         include/vout_synchro.h \
100         include/win32_specific.h \
101         include/osd.h \
102         $(NULL)
103
104 HEADERS_include_built = \
105         include/vlc_symbols.h \
106         $(NULL)
107
108 include/vlc_symbols.h: Makefile $(HEADERS_include)
109         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
110
111 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
112         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
113
114 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
115         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
116
117 # These dependencies are mandatory
118 $(SOURCES): include/vlc_symbols.h
119 $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl)
120
121 ###############################################################################
122 # Optional libintl - FIXME, bad dependencies
123 ###############################################################################
124
125 intl/libintl.a: FORCE
126         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
127
128 if BUILD_INTL
129 LIB_intl = intl/libintl.a
130 endif
131
132 ###############################################################################
133 # MacOS X project
134 ###############################################################################
135
136 EXTRA_DIST += \
137         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
138         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
139         extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
140         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
141         extras/MacOSX/Resources/English.lproj/vlc.scriptTerminology \
142         extras/MacOSX/Resources/a52.icns \
143         extras/MacOSX/Resources/aac.icns \
144         extras/MacOSX/Resources/asf.icns \
145         extras/MacOSX/Resources/asx.icns \
146         extras/MacOSX/Resources/avi.icns \
147         extras/MacOSX/Resources/bin.icns \
148         extras/MacOSX/Resources/cue.icns \
149         extras/MacOSX/Resources/dat.icns \
150         extras/MacOSX/Resources/divx.icns \
151         extras/MacOSX/Resources/dv.icns \
152         extras/MacOSX/Resources/generic.icns \
153         extras/MacOSX/Resources/m3u.icns \
154         extras/MacOSX/Resources/mov.icns \
155         extras/MacOSX/Resources/mp3.icns \
156         extras/MacOSX/Resources/mp4.icns \
157         extras/MacOSX/Resources/mpeg.icns \
158         extras/MacOSX/Resources/mpeg1.icns \
159         extras/MacOSX/Resources/mpeg2.icns \
160         extras/MacOSX/Resources/mpeg4.icns \
161         extras/MacOSX/Resources/mpg.icns \
162         extras/MacOSX/Resources/ogg.icns \
163         extras/MacOSX/Resources/ogm.icns \
164         extras/MacOSX/Resources/pls.icns \
165         extras/MacOSX/Resources/srt.icns \
166         extras/MacOSX/Resources/sub.icns \
167         extras/MacOSX/Resources/vlc.icns \
168         extras/MacOSX/Resources/vob.icns \
169         extras/MacOSX/Resources/wma.icns \
170         extras/MacOSX/Resources/wmv.icns \
171         extras/MacOSX/Resources/back.png \
172         extras/MacOSX/Resources/begin.png \
173         extras/MacOSX/Resources/end.png \
174         extras/MacOSX/Resources/forw.png \
175         extras/MacOSX/Resources/list.png \
176         extras/MacOSX/Resources/pause.png \
177         extras/MacOSX/Resources/play.png \
178         extras/MacOSX/Resources/prefs.png \
179         extras/MacOSX/Resources/slow.png \
180         extras/MacOSX/Resources/stop.png \
181         extras/MacOSX/Resources/vlc_hg.png \
182         extras/MacOSX/Resources/about_bg.png \
183         extras/MacOSX/Resources/vlc.scriptSuite \
184         extras/MacOSX/Resources/README \
185         extras/MacOSX/vlc.pbproj/project.pbxproj \
186         extras/MacOSX/macosx-dmg \
187         $(NULL)
188
189 ###############################################################################
190 # MS Visual Studio and eMbedded Visual Studio projects
191 ###############################################################################
192
193 EXTRA_DIST += \
194         msvc/vlc.dsw \
195         msvc/libvlc.dsp.in \
196         msvc/plugins.dsp.in \
197         msvc/vlc.dsp.in \
198         msvc/config.h.in \
199         msvc/modules_builtin_msvc.h \
200         evc/vlc.vcw \
201         evc/libvlc.vcp.in \
202         evc/vlc.vcp.in \
203         evc/plugins.vcp.in \
204         evc/vlc.c \
205         evc/config.h.in \
206         evc/modules_builtin_evc.h \
207         $(NULL)
208
209 dist-hook:
210         mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
211         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
212
213 ###############################################################################
214 # Building libvlc
215 ###############################################################################
216
217 bin_SCRIPTS = vlc-config
218
219 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
220
221 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
222 dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h
223 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
224 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
225 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
226
227 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
228 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
229 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
230 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
231
232 if HAVE_BEOS
233 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
234 endif
235 if HAVE_DARWIN
236 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
237 endif
238 if HAVE_WIN32
239 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
240 endif
241 if BUILD_DIRENT
242 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
243 endif
244 if BUILD_GETOPT
245 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
246 endif
247 if BUILD_MOZILLA
248 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
249 endif
250
251 EXTRA_DIST += \
252         $(SOURCES_libvlc_beos) \
253         $(SOURCES_libvlc_darwin) \
254         $(SOURCES_libvlc_win32) \
255         $(SOURCES_libvlc_dirent) \
256         $(SOURCES_libvlc_getopt) \
257         $(NULL)
258
259 SOURCES_libvlc_beos = \
260         src/misc/beos_specific.cpp \
261         $(NULL)
262
263 SOURCES_libvlc_darwin = \
264         src/misc/darwin_specific.m \
265         $(NULL)
266
267 SOURCES_libvlc_win32 = \
268         src/misc/win32_specific.c \
269         $(NULL)
270
271 SOURCES_libvlc_dirent = \
272         src/extras/dirent.c \
273         src/extras/dirent.h \
274         $(NULL)
275
276 SOURCES_libvlc_getopt = \
277         src/extras/getopt.c \
278         src/extras/getopt.h \
279         src/extras/getopt1.c \
280         $(NULL)
281
282 SOURCES_libvlc_common = \
283         src/libvlc.c \
284         src/libvlc.h \
285         src/interface/interface.c \
286         src/interface/intf_eject.c \
287         src/playlist/playlist.c \
288         src/input/input.c \
289         src/input/input_ext-plugins.c \
290         src/input/input_ext-dec.c \
291         src/input/input_ext-intf.c \
292         src/input/input_dec.c \
293         src/input/input_programs.c \
294         src/input/input_clock.c \
295         src/input/input_info.c \
296         src/video_output/video_output.c \
297         src/video_output/vout_pictures.c \
298         src/video_output/vout_pictures.h \
299         src/video_output/video_text.c \
300         src/video_output/video_text.h \
301         src/video_output/vout_subpictures.c \
302         src/video_output/vout_synchro.c \
303         src/audio_output/common.c \
304         src/audio_output/dec.c \
305         src/audio_output/filters.c \
306         src/audio_output/input.c \
307         src/audio_output/mixer.c \
308         src/audio_output/output.c \
309         src/audio_output/intf.c \
310         src/stream_output/stream_output.c \
311         src/stream_output/announce.c \
312         src/misc/mtime.c \
313         src/misc/modules.c \
314         src/misc/threads.c \
315         src/misc/cpu.c \
316         src/misc/configuration.c \
317         src/misc/iso_lang.c \
318         src/misc/iso-639_def.h \
319         src/misc/messages.c \
320         src/misc/objects.c \
321         src/misc/variables.c \
322         src/misc/error.c \
323         src/extras/libc.c \
324         $(NULL)
325
326 SOURCES_libvlc = \
327         $(SOURCES_libvlc_common) \
328         $(OPT_SOURCES_libvlc_beos) \
329         $(OPT_SOURCES_libvlc_darwin) \
330         $(OPT_SOURCES_libvlc_win32) \
331         $(OPT_SOURCES_libvlc_dirent) \
332         $(OPT_SOURCES_libvlc_getopt) \
333         $(NULL)
334
335 ###############################################################################
336 # Building vlc
337 ###############################################################################
338
339 bin_PROGRAMS = vlc
340
341 vlc_SOURCES = src/vlc.c
342
343 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin`
344 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
345 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
346
347 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
348 # old automake-1.5 bug (automake/279).
349 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
350
351 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
352         @rm -f $(top_builddir)/vlc$(EXEEXT)
353         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
354           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
355           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
356           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
357         esac
358
359 if HAVE_BEOS
360         xres -o $@ $(srcdir)/share/vlc_beos.rsrc
361         mimeset -f $@
362         rm -Rf $(srcdir)/locale ; mkdir -p "$(srcdir)/locale"
363         for i in $(ALL_LINGUAS); do \
364           mkdir -p "$(srcdir)/locale/$${i}/LC_MESSAGES" ; \
365           cp "$(srcdir)/po/$${i}.gmo" \
366             "$(srcdir)/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
367         done
368 endif
369
370 # Install the modules and the symlinks
371 install-exec-local:
372         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
373           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
374           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
375         fi ; done
376         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
377           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
378           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
379         fi ; done
380 if BUILD_MOZILLA
381         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
382           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
383           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
384         fi ; done
385 endif
386         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
387           rm -f "$(DESTDIR)$(bindir)/$$i" && \
388           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
389         fi ; done
390
391 if HAVE_DARWIN
392 # Create the MacOS X app
393 vlc_app_DATA = VLC.app
394 vlc_appdir = $(bindir)
395 VLC.app: vlc
396         rm -Rf VLC.app
397         cd $(srcdir)/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
398         cp -r $(srcdir)/extras/MacOSX/build/vlc.bundle $(srcdir)/VLC.app
399         $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS
400         $(INSTALL) vlc $(srcdir)/VLC.app/Contents/MacOS/VLC
401         $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/modules
402         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
403           if test -n "$$i" ; then $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" \
404             "$(srcdir)/VLC.app/Contents/MacOS/modules" ; \
405           fi ; done
406         $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share
407         $(INSTALL) -m 644 $(srcdir)/share/*.psf $(srcdir)/share/*.rle \
408           $(srcdir)/VLC.app/Contents/MacOS/share
409         $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/locale
410         for i in $(ALL_LINGUAS); do \
411           mkdir -p $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
412           cp $(srcdir)/po/$${i}.gmo $(srcdir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
413           mkdir -p $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
414           ln -sf ../English.lproj/InfoPlist.strings $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
415           ln -sf ../English.lproj/MainMenu.nib $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
416           ln -sf ../English.lproj/vlc.scriptTerminology $(srcdir)/VLC.app/Contents/Resources/$${i}.lproj ; \
417         done
418         printf "APPLVLC#" >| $(srcdir)/VLC.app/Contents/PkgInfo
419 endif
420
421 if HAVE_WIN32
422 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
423 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
424 noinst_share_vlc_win32_rcdir = $(libdir)
425 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
426         $(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 $@
427 endif
428
429 ###############################################################################
430 # Building specific source packages
431 ###############################################################################
432
433 dist-woody: distdir
434         $(remove_distdir_woody)
435         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
436         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
437         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
438           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
439         $(remove_distdir_woody)
440
441 remove_distdir_woody = \
442   { test ! -d $(PACKAGE)-woody-$(VERSION) \
443     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
444            -exec chmod u+w {} ';' \
445          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
446
447 ###############################################################################
448 # Building architecture-specific binary packages
449 ###############################################################################
450
451 # XXX: this rule is probably only useful to you if you have exactly
452 # the same setup as me. Contact sam@zoy.org if you need to use it.
453 #
454 # Check that tmp isn't in the way
455 package-win32:
456         @if test -e "$(srcdir)/tmp"; then \
457           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
458           false; \
459         else \
460           echo "OK."; mkdir -p "$(srcdir)/tmp"; \
461         fi
462 # Create installation script
463         cp "$(srcdir)/install-win32" "$(srcdir)/tmp/nsi"
464 # Copy relevant files
465         cp "$(top_builddir)/vlc$(EXEEXT)" "$(srcdir)/tmp/"
466         $(STRIP) "$(srcdir)/tmp/vlc$(EXEEXT)"
467         cp "$(srcdir)/INSTALL.win32" "$(srcdir)/tmp/INSTALL.txt"
468         unix2dos "$(srcdir)/tmp/INSTALL.txt"
469         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
470           do cp "$(srcdir)/$$file" "$(srcdir)/tmp/$${file}.txt" ; \
471           unix2dos "$(srcdir)/tmp/$${file}.txt" ; done
472
473         mkdir -p "$(srcdir)/tmp/plugins"
474         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
475           if test -n "$$i" ; then \
476             $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" "$(srcdir)/tmp/plugins/" ; \
477           fi ; done
478
479         for i in "" $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
480           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
481
482         mkdir -p "$(srcdir)/tmp/share"
483         cp $(srcdir)/share/*.rle $(srcdir)/tmp/share/ ;
484
485         mkdir $(srcdir)/tmp/locale
486         for i in $(ALL_LINGUAS); do \
487           mkdir -p "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES" ; \
488           cp "$(srcdir)/po/$${i}.gmo" \
489             "$(srcdir)/tmp/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
490         done
491
492         mkdir -p $(srcdir)/tmp/skins/default
493         for i in $(srcdir)/share/skins/default/*.*; do \
494           cp $$i $(srcdir)/tmp/skins/default/ || true ; \
495         done
496         for i in $(srcdir)/doc/skins/*.txt; do \
497           cp $$i $(srcdir)/tmp/skins/ || true ; \
498         done
499
500 # Create package 
501         wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} $(srcdir)/tmp/nsi
502 # Clean up
503         rm -Rf $(srcdir)/tmp
504
505 package-beos:
506 # Check that tmp isn't in the way
507         @if test -e $(srcdir)/tmp; then \
508           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
509           false; \
510         else \
511           echo "OK."; mkdir $(srcdir)/tmp; \
512         fi
513
514 # Copy relevant files
515         mkdir -p $(srcdir)/tmp/vlc
516         cd $(srcdir) && \
517           cp vlc AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
518 # We cannot use ${PLUGIN_FILES}, it looks like it is too long for the BeOS shell...
519         if [ `find $(srcdir)/modules -name "lib*_plugin.so" | wc -l` -gt 0 ]; then \
520           mkdir -p $(srcdir)/tmp/vlc/plugins; \
521           find $(srcdir)/modules -name "lib*_plugin.so" | xargs -i{} cp {} $(srcdir)/tmp/vlc/plugins/; \
522         fi
523         for i in $(ALL_LINGUAS); do \
524           mkdir -p $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES ; \
525           cp $(srcdir)/po/$${i}.gmo $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
526         done
527         mkdir -p $(srcdir)/tmp/vlc/share
528         cp $(srcdir)/share/*.rle $(srcdir)/tmp/vlc/share/
529
530 # Create package with debug symbols
531         mimeset -f $(srcdir)/tmp/vlc/* $(srcdir)/tmp/vlc/*/*
532         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION}
533         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
534         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/
535
536 # Create package without debug symbols
537         strip $(srcdir)/tmp/vlc-${VERSION}/vlc
538         if [ -d $(srcdir)/tmp/vlc-${VERSION}/plugins ]; then \
539           strip $(srcdir)/tmp/vlc-${VERSION}/plugins/lib*_plugin.so; \
540         fi
541         xres -o $(srcdir)/tmp/vlc-${VERSION}/vlc $(srcdir)/share/vlc_beos.rsrc
542         mimeset -f $(srcdir)/tmp/vlc-${VERSION}/* $(srcdir)/tmp/vlc-${VERSION}/*/*
543         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
544         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/
545
546 # Clean up
547         rm -Rf $(srcdir)/tmp
548
549 package-macosx:
550 # Check that tmp isn't in the way
551         @if test -e "$(srcdir)/tmp"; then \
552           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
553           false; \
554         else \
555           echo "OK."; mkdir -p "$(srcdir)/tmp"; \
556         fi
557
558 # Copy relevant files 
559         cp -R "$(srcdir)/VLC.app" "$(srcdir)/tmp/"
560         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
561
562 # Create disk image 
563         $(srcdir)/extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" $(srcdir)/tmp/* 
564
565 # Clean up
566         rm -Rf $(srcdir)/tmp
567
568 ###############################################################################
569 # Stamp rules
570 ###############################################################################
571 clean: clean-stamp
572 clean-stamp:
573         rm -f stamp-builtin
574
575 stamp-builtin: FORCE
576         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
577           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
578             rm -f $@; \
579             break; \
580           fi; \
581         done
582         @if test ! -f $@; then printf "" > $@; fi
583
584 ###############################################################################
585 # Force rule
586 ###############################################################################
587 FORCE: