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