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