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