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