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