Fix a bunch of preferences errors
[vlc.git] / 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 #  - loader should come before modules because some plugins need it
15 SUBDIRS = intl loader modules po . mozilla activex share m4 doc
16 DIST_SUBDIRS = $(SUBDIRS) debian ipkg lib
17
18 EXTRA_DIST = \
19         HACKING \
20         INSTALL.win32 \
21         INSTALL.wince \
22         vlc.exe.manifest \
23         MAINTAINERS \
24         README.MacOSX.rtf \
25         bootstrap \
26         src/extras/COPYING \
27         toolbox \
28         vlc-api.pl \
29         vlc-config.in.in \
30         vlc.spec \
31         vlc.spec.mdk \
32         vlc.win32.nsi \
33         src/misc/modules_builtin.h.in \
34         $(NULL)
35
36 BUILT_SOURCES_distclean = vlc-config
37 BUILT_SOURCES_clean = \
38         stamp-api \
39         src/misc/modules_builtin.h \
40         src/misc/version.c \
41         $(NULL)
42
43 BUILT_SOURCES = $(BUILT_SOURCES_distclean) $(BUILT_SOURCES_clean)
44
45 SUFFIXES = 
46
47 # Tell aclocal to use -I m4. Wonder if it really works.
48 ACLOCAL_AMFLAGS = -I m4
49
50 # XXX: these flags could be set in configure.ac, but we set them here
51 # because old versions of automake don't support them in configure.ac.
52 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
53
54 ###############################################################################
55 # Headers
56 ###############################################################################
57
58 pkgincludedir = $(includedir)/vlc
59
60 dist_pkginclude_HEADERS = \
61         include/vlc/vlc.h \
62         include/vlc/aout.h \
63         include/vlc/vout.h \
64         include/vlc/sout.h \
65         include/vlc/decoder.h \
66         include/vlc/input.h \
67         include/vlc/intf.h \
68         include/vlc/control.h \
69         $(NULL)
70
71 noinst_HEADERS = $(HEADERS_include)
72 noinst_DATA = $(DATA_noinst_beos) $(DATA_noinst_libvlc)
73
74 HEADERS_include = \
75         include/aout_internal.h \
76         include/audio_output.h \
77         include/beos_specific.h \
78         include/charset.h \
79         include/codecs.h \
80         include/configuration.h \
81         include/darwin_specific.h \
82         include/intf_eject.h \
83         include/iso_lang.h \
84         include/main.h \
85         include/mmx.h \
86         include/modules.h \
87         include/modules_inner.h \
88         include/mtime.h \
89         include/network.h \
90         include/os_specific.h \
91         include/snapshot.h \
92         include/stream_output.h \
93         include/variables.h \
94         include/video_output.h \
95         include/vlc_access.h \
96         include/vlc_acl.h \
97         include/vlc_bits.h \
98         include/vlc_block.h \
99         include/vlc_block_helper.h \
100         include/vlc_codec.h \
101         include/vlc_common.h \
102         include/vlc_config.h \
103         include/vlc_cpu.h \
104         include/vlc_demux.h \
105         include/vlc_error.h \
106         include/vlc_es.h \
107         include/vlc_es_out.h \
108         include/vlc_filter.h \
109         include/vlc_config_cat.h \
110         include/vlc_httpd.h \
111         include/vlc_tls.h \
112         include/vlc_md5.h \
113         include/vlc_image.h \
114         include/vlc_input.h \
115         include/vlc_interface.h \
116         include/vlc_keys.h \
117         include/vlc_messages.h \
118         include/vlc_meta.h \
119         include/vlc_objects.h \
120         include/vlc_osd.h \
121         include/vlc_playlist.h \
122         include/vlc_spu.h \
123         include/vlc_stream.h \
124         include/vlc_symbols.h \
125         include/vlc_threads_funcs.h \
126         include/vlc_threads.h \
127         include/vlc_video.h \
128         include/vlc_vlm.h \
129         include/vlc_vod.h \
130         include/vlc_xml.h \
131         include/vout_synchro.h \
132         include/win32_specific.h \
133         $(NULL)
134
135 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in vlc-config
136         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
137         touch src/misc/modules_builtin.h
138
139 src/misc/modules.c: src/misc/modules_builtin.h
140
141 src/misc/version.c: FORCE
142         srcdir=$(srcdir) $(srcdir)/toolbox --update-version
143
144 # These dependencies are mandatory
145 $(SOURCES_libvlc): $(LIB_intl)
146
147 ###############################################################################
148 # Optional libintl - FIXME, bad dependencies
149 ###############################################################################
150
151 intl/libintl.a: FORCE
152         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
153
154 if BUILD_INTL
155 LIB_intl = intl/libintl.a
156 endif
157
158 ###############################################################################
159 # MacOS X project
160 ###############################################################################
161
162 EXTRA_DIST += \
163         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
164         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
165         extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib \
166         extras/MacOSX/Resources/English.lproj/About.nib/classes.nib \
167         extras/MacOSX/Resources/English.lproj/About.nib/info.nib \
168         extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib \
169         extras/MacOSX/Resources/English.lproj/Open.nib/classes.nib \
170         extras/MacOSX/Resources/English.lproj/Open.nib/info.nib \
171         extras/MacOSX/Resources/English.lproj/Open.nib/keyedobjects.nib \
172         extras/MacOSX/Resources/English.lproj/Preferences.nib/classes.nib \
173         extras/MacOSX/Resources/English.lproj/Preferences.nib/info.nib \
174         extras/MacOSX/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
175         extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib \
176         extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib \
177         extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
178         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/classes.nib \
179         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/info.nib \
180         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/keyedobjects.nib \
181         extras/MacOSX/Resources/English.lproj/Extended.nib/classes.nib \
182         extras/MacOSX/Resources/English.lproj/Extended.nib/info.nib \
183         extras/MacOSX/Resources/English.lproj/Extended.nib/keyedobjects.nib \
184         extras/MacOSX/Resources/English.lproj/Update.nib/classes.nib \
185         extras/MacOSX/Resources/English.lproj/Update.nib/info.nib \
186         extras/MacOSX/Resources/English.lproj/Update.nib/keyedobjects.nib \
187         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
188         extras/MacOSX/Resources/a52.icns \
189         extras/MacOSX/Resources/aac.icns \
190         extras/MacOSX/Resources/asf.icns \
191         extras/MacOSX/Resources/asx.icns \
192         extras/MacOSX/Resources/avi.icns \
193         extras/MacOSX/Resources/bin.icns \
194         extras/MacOSX/Resources/cue.icns \
195         extras/MacOSX/Resources/dat.icns \
196         extras/MacOSX/Resources/divx.icns \
197         extras/MacOSX/Resources/dv.icns \
198         extras/MacOSX/Resources/generic.icns \
199         extras/MacOSX/Resources/m3u.icns \
200         extras/MacOSX/Resources/mov.icns \
201         extras/MacOSX/Resources/mp3.icns \
202         extras/MacOSX/Resources/mp4.icns \
203         extras/MacOSX/Resources/mpeg.icns \
204         extras/MacOSX/Resources/mpeg1.icns \
205         extras/MacOSX/Resources/mpeg2.icns \
206         extras/MacOSX/Resources/mpeg4.icns \
207         extras/MacOSX/Resources/mpg.icns \
208         extras/MacOSX/Resources/ogg.icns \
209         extras/MacOSX/Resources/ogm.icns \
210         extras/MacOSX/Resources/pls.icns \
211         extras/MacOSX/Resources/srt.icns \
212         extras/MacOSX/Resources/sub.icns \
213         extras/MacOSX/Resources/vlc.icns \
214         extras/MacOSX/Resources/vob.icns \
215         extras/MacOSX/Resources/wma.icns \
216         extras/MacOSX/Resources/wmv.icns \
217         extras/MacOSX/Resources/pause.png \
218         extras/MacOSX/Resources/pause_blue.png \
219         extras/MacOSX/Resources/play.png \
220         extras/MacOSX/Resources/play_blue.png \
221         extras/MacOSX/Resources/stop.png \
222         extras/MacOSX/Resources/stop_blue.png \
223         extras/MacOSX/Resources/display.png \
224         extras/MacOSX/Resources/display_slider.png \
225         extras/MacOSX/Resources/display_track.png \
226         extras/MacOSX/Resources/equalizerdrawer_active.png \
227         extras/MacOSX/Resources/equalizerdrawer_blue.png \
228         extras/MacOSX/Resources/fullscreen_active.png \
229         extras/MacOSX/Resources/fullscreen_blue.png \
230         extras/MacOSX/Resources/next_active.png \
231         extras/MacOSX/Resources/next_blue.png \
232         extras/MacOSX/Resources/playlistdrawer_active.png \
233         extras/MacOSX/Resources/playlistdrawer_blue.png \
234         extras/MacOSX/Resources/previous_active.png \
235         extras/MacOSX/Resources/previous_blue.png \
236         extras/MacOSX/Resources/skip_forward_active.png \
237         extras/MacOSX/Resources/skip_forward_blue.png \
238         extras/MacOSX/Resources/skip_previous_active.png \
239         extras/MacOSX/Resources/skip_previous_blue.png \
240         extras/MacOSX/Resources/volume_high.png \
241         extras/MacOSX/Resources/volume_low.png \
242         extras/MacOSX/Resources/volumeslider_blue.png \
243         extras/MacOSX/Resources/volumeslider_normal.png \
244         extras/MacOSX/Resources/volumetrack.png \
245         extras/MacOSX/Resources/about_bg.png \
246         extras/MacOSX/Resources/vlc.scriptSuite \
247         extras/MacOSX/Resources/vlc.scriptTerminology \
248         extras/MacOSX/Resources/README \
249         extras/MacOSX/vlc.pbproj/project.pbxproj \
250         extras/MacOSX/macosx-dmg \
251         \
252         extras/Makefile \
253         extras/zsh.cpp \
254         $(NULL)
255
256 ###############################################################################
257 # MS Visual Studio and eMbedded Visual Studio projects
258 ###############################################################################
259
260 EXTRA_DIST += \
261         msvc/vlc.dsw \
262         msvc/libvlc.dsp.in \
263         msvc/plugins.dsp.in \
264         msvc/vlc.dsp.in \
265         msvc/config.h.in \
266         msvc/modules_builtin_msvc.h \
267         evc/vlc.vcw \
268         evc/libvlc.vcp.in \
269         evc/vlc.vcp.in \
270         evc/plugins.vcp.in \
271         evc/errno.h \
272         evc/config.h.in \
273         evc/modules_builtin_evc.h \
274         $(NULL)
275
276 dist-hook:
277         cd $(distdir) && srcdir=. $(SHELL) ./toolbox --update-vc
278         distdir=$(distdir) srcdir=$(srcdir) $(SHELL) $(srcdir)/toolbox --dist-contrib
279
280 ###############################################################################
281 # Building libvlc
282 ###############################################################################
283
284 bin_SCRIPTS = vlc-config
285 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
286         $(SHELL) ./config.status --file=vlc-config
287         chmod 0755 vlc-config
288
289 vlc-config.in: vlc-config.in.in
290         ./config.status --recheck
291
292 MOSTLYCLEANFILES = $(DATA_noinst_libvlc)
293 CLEANFILES = $(BUILT_SOURCES_clean) stamp-builtin
294 DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in
295
296 if HAVE_WIN32
297 lib_LIBRARIES = lib/libvlc.a
298 else
299 if BUILD_SHARED
300 lib_LIBRARIES = lib/libvlc_pic.a
301 else
302 lib_LIBRARIES = lib/libvlc.a
303 if BUILD_MOZILLA
304 lib_LIBRARIES += lib/libvlc_pic.a
305 endif
306 endif
307 endif
308
309 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
310 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
311 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
312 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
313
314 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
315 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
316 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
317 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
318
319 if HAVE_BEOS
320 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
321 endif
322 if HAVE_DARWIN
323 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
324 endif
325 if HAVE_WIN32
326 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
327 endif
328 if HAVE_WINCE
329 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
330 endif
331 if BUILD_DIRENT
332 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
333 endif
334 if BUILD_GETOPT
335 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
336 endif
337
338 # Build libvlc as a shared library
339 if BUILD_SHARED
340 DATA_noinst_libvlc = libvlc$(LIBEXT)
341 if HAVE_WIN32
342 OBJECTS_libvlc_so = $(lib_libvlc_a_OBJECTS)
343 else
344 OBJECTS_libvlc_so = $(lib_libvlc_pic_a_OBJECTS)
345 endif
346 endif
347
348 libvlc$(LIBEXT): $(OBJECTS_libvlc_so)
349         @ldfl="`$(VLC_CONFIG) --libs plugin vlc $(pic) builtin`" ; \
350         case `$(VLC_CONFIG) --linkage vlc` in \
351           c++)  ld="$(CXXLINK)" ;; \
352           objc) ld="$(OBJCLINK)" ;; \
353           c|*)  ld="$(LINK)" ;; \
354         esac ; \
355         echo $$ld $(OBJECTS_libvlc_so) $$ldfl ; \
356         $$ld $(OBJECTS_libvlc_so) $$ldfl
357
358 EXTRA_DIST += \
359         $(SOURCES_libvlc_beos) \
360         $(SOURCES_libvlc_darwin) \
361         $(SOURCES_libvlc_win32) \
362         $(SOURCES_libvlc_dirent) \
363         $(SOURCES_libvlc_getopt) \
364         $(NULL)
365
366 SOURCES_libvlc_beos = \
367         src/misc/beos_specific.cpp \
368         $(NULL)
369
370 SOURCES_libvlc_darwin = \
371         src/misc/darwin_specific.m \
372         $(NULL)
373
374 SOURCES_libvlc_win32 = \
375         src/misc/win32_specific.c \
376         $(NULL)
377
378 SOURCES_libvlc_dirent = \
379         src/extras/dirent.c \
380         $(NULL)
381
382 SOURCES_libvlc_getopt = \
383         src/extras/getopt.c \
384         src/extras/getopt.h \
385         src/extras/getopt1.c \
386         $(NULL)
387
388 SOURCES_libvlc_common = \
389         src/libvlc.c \
390         src/libvlc.h \
391         src/interface/interface.c \
392         src/interface/intf_eject.c \
393         src/playlist/playlist.c \
394         src/playlist/sort.c \
395         src/playlist/loadsave.c \
396         src/playlist/view.c \
397         src/playlist/item.c \
398         src/playlist/item-ext.c \
399         src/playlist/services_discovery.c \
400         src/input/access.c \
401         src/input/clock.c \
402         src/input/control.c \
403         src/input/decoder.c \
404         src/input/demux.c \
405         src/input/es_out.c \
406         src/input/input.c \
407         src/input/input_internal.h \
408         src/input/stream.c \
409         src/input/mem_stream.c \
410         src/input/subtitles.c \
411         src/input/var.c \
412         src/video_output/video_output.c \
413         src/video_output/vout_pictures.c \
414         src/video_output/vout_pictures.h \
415         src/video_output/video_text.c \
416         src/video_output/video_widgets.c \
417         src/video_output/vout_subpictures.c \
418         src/video_output/vout_synchro.c \
419         src/video_output/vout_intf.c \
420         src/audio_output/common.c \
421         src/audio_output/dec.c \
422         src/audio_output/filters.c \
423         src/audio_output/input.c \
424         src/audio_output/mixer.c \
425         src/audio_output/output.c \
426         src/audio_output/intf.c \
427         src/stream_output/stream_output.c \
428         src/stream_output/announce.c \
429         src/stream_output/sap.c \
430         src/stream_output/acl.c \
431         src/osd/osd.c \
432         src/osd/osd_parser.c \
433         src/osd/osd_text.c \
434         src/osd/osd_widgets.c \
435         src/misc/charset.c \
436         src/misc/httpd.c \
437         src/misc/tls.c \
438         src/misc/md5.c \
439         src/misc/mtime.c \
440         src/misc/block.c \
441         src/misc/modules.c \
442         src/misc/threads.c \
443         src/misc/unicode.c \
444         src/misc/cpu.c \
445         src/misc/configuration.c \
446         src/misc/image.c \
447         src/misc/iso_lang.c \
448         src/misc/iso-639_def.h \
449         src/misc/messages.c \
450         src/misc/objects.c \
451         src/misc/variables.c \
452         src/misc/error.c \
453         src/misc/net.c \
454         src/misc/getaddrinfo.c \
455         src/misc/vlm.c \
456         src/misc/xml.c \
457         src/misc/version.c \
458         src/extras/libc.c \
459         src/control/core.c \
460         src/control/util.c \
461         src/control/audio_video.c \
462         $(NULL)
463
464 SOURCES_libvlc = \
465         $(SOURCES_libvlc_common) \
466         $(OPT_SOURCES_libvlc_beos) \
467         $(OPT_SOURCES_libvlc_darwin) \
468         $(OPT_SOURCES_libvlc_win32) \
469         $(OPT_SOURCES_libvlc_dirent) \
470         $(OPT_SOURCES_libvlc_getopt) \
471         $(NULL)
472
473 ###############################################################################
474 # Building vlc
475 ###############################################################################
476
477 bin_PROGRAMS = vlc
478
479 vlc_SOURCES = src/vlc.c
480
481 # Work around a bug in the arm-wince-pe linker
482 if HAVE_WINCE
483 vlc_WORKAROUNDLDFLAGS = $(LIB_libvlc)
484 endif
485
486 if BUILD_SHARED
487 ### libvlc.so cannot be created into lib/
488 LIB_libvlc = libvlc$(LIBEXT)
489 LDFLAGS_libvlc =
490 #-Wl,-rpath $(libdir)
491 else
492 LIB_libvlc = lib/libvlc.a
493 LDFLAGS_libvlc = `$(VLC_CONFIG) --libs vlc builtin` 
494 endif
495
496 vlc_LDFLAGS = $(LDFLAGS_libvlc) $(vlc_WORKAROUNDLDFLAGS)
497 vlc_LDADD = $(LIB_libvlc) $(DATA_win32_rc) $(LIB_intl)
498 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
499
500 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
501 # old automake-1.5 bug (automake/279).
502 DEPENDENCIES_vlc = $(LIB_libvlc) $(DATA_win32_rc) $(LIB_intl)
503
504 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
505         @rm -f vlc$(EXEEXT)
506         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
507           c++) cmd="$(CXXLINK)" ;; \
508           objc) cmd="$(OBJCLINK)" ;; \
509           c|*) cmd="$(LINK)" ;; \
510         esac ; \
511         cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS)" ; \
512         echo $$cmd ; \
513         eval $$cmd
514
515 if HAVE_BEOS
516 DATA_noinst_beos = vlc-bundle
517 vlc-bundle: vlc
518         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
519         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
520         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
521         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
522           if test -n "$$i" ; then \
523             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
524             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
525           fi ; \
526         done
527         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
528           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
529           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
530             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
531           done ; \
532         fi
533         for i in $(ALL_LINGUAS); do \
534           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
535           cp "$(top_builddir)/po/$$i.gmo" \
536             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
537         done
538         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
539 endif
540
541 # Install the symlinks and shared libvlc
542 install-exec-local:
543         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
544           rm -f "$(DESTDIR)$(bindir)/$$i" && \
545           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
546         fi ; done
547         test -z "$(DATA_noinst_libvlc)" || $(INSTALL_PROGRAM) "$(DATA_noinst_libvlc)" "$(DESTDIR)$(libdir)"
548
549 # the opposite of install-{data,exec}-local
550 uninstall-local:
551         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
552           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
553         fi ; done
554         test -z "$(DATA_noinst_libvlc)" || rm -f "$(DESTDIR)$(libdir)/$(DATA_noinst_libvlc)"
555
556 if HAVE_DARWIN
557 # Create the MacOS X app
558 vlc_app_DATA = VLC.app
559 vlc_appdir = $(bindir)
560 # VLC-release.app is the old VLC.app target
561 VLC-release.app: vlc
562         @if test -e "$(top_builddir)/tmp"; then \
563           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
564           false; \
565         else \
566           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
567         fi
568         rm -Rf $(top_builddir)/VLC-release.app
569         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
570         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
571           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
572         done
573         mkdir -p $(top_builddir)/tmp/modules/audio_output
574         cp $(srcdir)/modules/audio_output/coreaudio.c \
575            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
576         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
577         for i in \
578             about.h \
579             about.m \
580             applescript.h \
581             applescript.m \
582             controls.h \
583             controls.m \
584             equalizer.h \
585             equalizer.m \
586             intf.h \
587             intf.m \
588             macosx.m \
589             misc.h \
590             misc.m \
591             open.h \
592             open.m \
593             output.h \
594             output.m \
595             playlist.h \
596             playlist.m \
597             playlistinfo.h \
598             playlistinfo.m \
599             prefs_widgets.h \
600             prefs_widgets.m \
601             prefs.h \
602             prefs.m \
603             vout.h \
604             voutqt.m \
605             voutgl.m \
606             wizard.h \
607             wizard.m \
608             extended.h \
609             extended.m \
610             bookmarks.h \
611             bookmarks.m \
612             vout.m; do \
613           cp "$(srcdir)/modules/gui/macosx/$$i" \
614              $(top_builddir)/tmp/modules/gui/macosx; \
615         done
616         case $(target_triplet) in \
617           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
618             cd ../../../; \
619             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
620                   $(top_builddir)/VLC-release.app;; \
621           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
622             cd ../../../; \
623             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
624                   $(top_builddir)/VLC-release.app;; \
625           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
626             cd ../../../; \
627             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
628                   $(top_builddir)/VLC-release.app;; \
629         esac
630         rm -Rf $(top_builddir)/tmp
631         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
632         $(INSTALL) $(top_builddir)/vlc \
633                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
634         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
635         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
636         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
637           if test -n "$$i" ; \
638             then $(INSTALL) "$$i$(LIBEXT)" \
639                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
640           fi ; done
641         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
642           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
643           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
644             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
645           done ; \
646         fi
647         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
648         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
649         for i in $(srcdir)/share/http/* ; do \
650           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
651         done ; \
652         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
653         for i in $(srcdir)/share/http/vlm/* ; do \
654           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
655         done ; \
656         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
657         for i in $(srcdir)/share/http/admin/* ; do \
658           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
659         done ; \
660         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
661         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
662         for i in $(ALL_LINGUAS); do \
663           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
664           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
665           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
666           ln -sf ../English.lproj/InfoPlist.strings \
667               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
668           ln -sf ../English.lproj/MainMenu.nib \
669               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
670           ln -sf ../English.lproj/vlc.scriptTerminology \
671               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
672         done
673         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
674
675 VLC.app: vlc
676         @if test -e "$(top_builddir)/tmp"; then \
677           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
678           false; \
679         else \
680           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
681         fi
682         rm -Rf $(top_builddir)/VLC.app
683         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
684         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
685           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
686         done
687         mkdir -p $(top_builddir)/tmp/modules/audio_output
688         cp $(srcdir)/modules/audio_output/coreaudio.c \
689            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
690         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
691         for i in \
692             about.h \
693             about.m \
694             applescript.h \
695             applescript.m \
696             controls.h \
697             controls.m \
698             equalizer.h \
699             equalizer.m \
700             intf.h \
701             intf.m \
702             macosx.m \
703             misc.h \
704             misc.m \
705             open.h \
706             open.m \
707             output.h \
708             output.m \
709             playlist.h \
710             playlist.m \
711             playlistinfo.h \
712             playlistinfo.m \
713             prefs_widgets.h \
714             prefs_widgets.m \
715             prefs.h \
716             prefs.m \
717             vout.h \
718             voutqt.m \
719             voutgl.m \
720             wizard.h \
721             wizard.m \
722             extended.h \
723             extended.m \
724             bookmarks.h \
725             bookmarks.m \
726             vout.m; do \
727           cp "$(srcdir)/modules/gui/macosx/$$i" \
728              $(top_builddir)/tmp/modules/gui/macosx; \
729         done
730         case $(target_triplet) in \
731           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
732             cd ../../../; \
733             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
734                   $(top_builddir)/VLC.app;; \
735           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
736             cd ../../../; \
737             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
738                   $(top_builddir)/VLC.app;; \
739           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
740             cd ../../../; \
741             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
742                   $(top_builddir)/VLC.app;; \
743         esac
744         rm -Rf $(top_builddir)/tmp
745         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
746         $(INSTALL) $(top_builddir)/vlc \
747                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
748         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
749         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
750         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
751           if test -n "$$i" ; \
752             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
753                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
754           fi ; done
755         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
756           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
757           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
758             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
759           done ; \
760         fi
761         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
762         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
763         for i in $(ALL_LINGUAS); do \
764           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
765           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
766           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
767           ln -sf ../English.lproj/InfoPlist.strings \
768               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
769           ln -sf ../English.lproj/MainMenu.nib \
770               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
771         done
772         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
773 endif
774
775 if HAVE_WIN32
776 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
777 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
778 noinst_share_vlc_win32_rcdir = $(libdir)
779 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
780         $(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 $@
781 endif
782
783
784 ###############################################################################
785 # Building specific source packages
786 ###############################################################################
787
788 dist-woody: distdir
789         $(remove_distdir_woody)
790         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
791         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
792         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
793           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
794         $(remove_distdir_woody)
795
796 remove_distdir_woody = \
797   { test ! -d $(PACKAGE)-woody-$(VERSION) \
798     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
799            -exec chmod u+w {} ';' \
800          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
801
802 ###############################################################################
803 # Building architecture-specific binary packages
804 ###############################################################################
805
806 # XXX: this rule is probably only useful to you if you have exactly
807 # the same setup as me. Contact sam@zoy.org if you need to use it.
808 #
809 package-win32-base:
810 # Check that tmp isn't in the way
811         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
812           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
813           false; \
814         else \
815           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
816         fi
817
818 # Copy relevant files
819         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
820         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
821         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
822         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
823
824         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
825           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
826           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
827
828         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
829         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
830           if test -n "$$i" ; then \
831             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
832             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
833           fi ; done
834
835         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
836           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
837
838         mkdir $(top_builddir)/vlc-${VERSION}/locale
839         for i in $(ALL_LINGUAS); do \
840           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
841           cp "$(srcdir)/po/$${i}.gmo" \
842             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
843             || true ; \
844         done
845
846         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
847         for i in $(srcdir)/share/skins2/fonts/*.*; do \
848           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
849         done
850         for i in $(srcdir)/share/skins2/*.*; do \
851           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
852         done
853
854         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu"
855         cp $(srcdir)/share/osdmenu/*.* "$(top_builddir)/vlc-${VERSION}/osdmenu"
856         for dir in dvd dvd/selected dvd/unselect dvd/selection dvd/volume default default/selected default/selection default/volume;do \
857                 mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/$$dir"; \
858                 for file in $(srcdir)/share/osdmenu/$${dir}/*.*;do \
859                          cp $$file "$(top_builddir)/vlc-${VERSION}/osdmenu/$$dir" || true; \
860                 done; \
861         done
862         unix2dos $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg;
863         sed -i 's%share/osdmenu%osdmenu%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg
864         sed -i 's%/%\\%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg 
865
866         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
867         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
868         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
869         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;:
870         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
871         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
872         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
873         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
874         cp $(srcdir)/share/http/admin/*.html \
875            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
876         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
877         cp $(srcdir)/share/http/admin/dboxfiles.html \
878            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
879         cp $(srcdir)/share/http/admin/.access \
880            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
881         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
882         cp $(srcdir)/share/http/vlm/*.html \
883            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
884         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
885
886         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
887
888         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
889 if BUILD_MOZILLA
890         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
891         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
892         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
893 endif
894
895         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
896 if BUILD_ACTIVEX
897         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
898         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
899         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
900
901         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
902         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
903 endif
904 # Rebase all those DLLs to speed up loading (need cygwin rebase)
905         if [ -x rebase ]; then \
906                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
907         fi
908
909 package-win32-base-exe:
910 # Create package
911         wine C:/Program\ Files/NSIS/makensis.exe \
912              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
913
914 package-win32-base-exe-cygwin:
915 # Create package
916         C:/Program\ Files/NSIS/makensis.exe \
917              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
918
919 package-win32-base-exe-linux:
920 # Create package
921         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
922
923 package-win32-base-zip:
924 # Create package 
925         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
926
927 package-win32-exe: package-win32-base package-win32-base-exe
928 # Clean up
929         rm -Rf $(top_builddir)/vlc-${VERSION}
930
931 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
932 # Clean up
933         rm -Rf $(top_builddir)/vlc-${VERSION}
934
935 package-win32-zip: package-win32-base package-win32-base-zip
936 # Clean up
937         rm -Rf $(top_builddir)/vlc-${VERSION}
938
939 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
940 # Clean up
941         rm -Rf $(top_builddir)/vlc-${VERSION}
942
943 package-wince-base:
944 # Check that tmp isn't in the way
945         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
946           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
947           false; \
948         else \
949           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
950         fi
951
952 # Copy relevant files
953         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
954         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
955         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
956
957         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
958           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
959           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
960
961         mkdir $(top_builddir)/vlc-${VERSION}/locale
962         for i in $(ALL_LINGUAS); do \
963           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
964           cp "$(srcdir)/po/$${i}.gmo" \
965             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
966             || true ; \
967         done
968
969
970         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
971         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
972         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
973         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
974         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
975         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
976         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
977         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
978         cp $(srcdir)/share/http/admin/*.html \
979            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
980         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
981         cp $(srcdir)/share/http/admin/dboxfiles.html \
982            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
983         cp $(srcdir)/share/http/admin/.access \
984            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
985         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
986         cp $(srcdir)/share/http/vlm/*.html \
987            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
988         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
989
990         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
991
992 if BUILD_MOZILLA
993         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
994         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
995         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
996         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
997 endif
998
999 if BUILD_ACTIVEX
1000         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
1001         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
1002         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
1003         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
1004
1005         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
1006         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
1007 endif
1008 # Rebase all those DLLs to speed up loading (need cygwin rebase)
1009         if [ -x rebase ]; then \
1010                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
1011         fi
1012
1013 package-wince-base-zip:
1014 # Create package 
1015         zip -r vlc-${VERSION}-wince.zip vlc-${VERSION}
1016
1017 package-wince: package-wince-base  package-wince-base-zip
1018 # Clean up
1019         rm -Rf $(top_builddir)/vlc-${VERSION}
1020
1021
1022 package-beos:
1023 # Check that tmp isn't in the way
1024         @if test -e $(srcdir)/tmp; then \
1025           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
1026           false ; \
1027         else \
1028           echo "OK." ; mkdir $(srcdir)/tmp ; \
1029         fi
1030
1031 # Copy relevant files
1032         mkdir -p $(srcdir)/tmp/vlc ;
1033         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
1034           THANKS NEWS tmp/vlc/ ;
1035
1036 # Create debug package
1037         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
1038         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
1039         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
1040         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
1041         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
1042         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
1043
1044 # Create normal package
1045         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
1046         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
1047           --strip-debug --strip-unneeded "{}" \; ;
1048         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
1049         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
1050         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
1051         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
1052         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
1053
1054 # Clean up
1055         rm -Rf $(srcdir)/tmp ;
1056
1057 package-macosx:
1058 # Check that tmp isn't in the way
1059         @if test -e "$(top_builddir)/tmp"; then \
1060           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
1061           false; \
1062         else \
1063           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
1064         fi
1065
1066 # Copy relevant files 
1067         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
1068         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/ && cp -r extras/MacOSX/Delete\ Preferences.app $(top_builddir)/tmp/
1069
1070 # Create disk image 
1071         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
1072
1073 # Clean up
1074         rm -Rf $(top_builddir)/tmp
1075
1076 package-translations:
1077         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
1078           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
1079           false; \
1080         else \
1081           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
1082         fi
1083 # Copy translations
1084         for i in $(ALL_LINGUAS); do \
1085           cp "$(srcdir)/po/$${i}.po" \
1086             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
1087             || true ; \
1088         done
1089         cp "$(srcdir)/doc/translations.txt" \
1090           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
1091
1092         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1093         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1094         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1095         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1096         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1097         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1098         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1099         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1100
1101         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1102           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1103
1104 ###############################################################################
1105 # PO translation files update
1106 ###############################################################################
1107 .PHONY: update-po
1108
1109 update-po:
1110         rm -f $(top_srcdir)/po/POTFILES.in
1111         { \
1112           cd $(top_srcdir) ; \
1113           echo "# automatically created by make update-po" ; \
1114           echo "" ; \
1115           echo "# main sources" ; \
1116           find include src -name '*.[chm]' -o -name '*.[ch]pp' \
1117             | grep -v '\(vlc_symbols\|misc/modules_\)' \
1118             | sort ; \
1119           echo "" ; \
1120           echo "# modules" ; \
1121           find modules -name '*.[chm]' -o -name '*.[ch]pp' \
1122             | grep -v '\(\.moc\.\|gui/gtk2/\)' \
1123             | sort ; \
1124         } > $(top_srcdir)/po/POTFILES.in
1125         rm -f $(top_srcdir)/po/vlc.pot
1126         cd po && $(MAKE) POTFILES vlc.pot update-po
1127
1128 #cd po && $(MAKE) update-po
1129
1130 ###############################################################################
1131 # Stamp rules
1132 ###############################################################################
1133 stamp-builtin: FORCE
1134         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
1135           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
1136             rm -f $@; \
1137             break; \
1138           fi; \
1139         done
1140         @if test ! -f $@; then printf "" > $@; fi
1141
1142 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl
1143         ( cd $(srcdir) && cat $(HEADERS_include) ) | \
1144           top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
1145         touch stamp-api
1146
1147 ###############################################################################
1148 # Force rule
1149 ###############################################################################
1150 FORCE: