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