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