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