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