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