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