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