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