]> git.sesse.net Git - vlc/blob - Makefile.am
- experimental disabled-by-default shared libvlc build.
[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_LDFLAGS) $(vlc_LDADD) $(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
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
537 # the opposite of install-{data,exec}-local
538 uninstall-local:
539         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
540           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
541         fi ; done
542
543 if HAVE_DARWIN
544 # Create the MacOS X app
545 vlc_app_DATA = VLC.app
546 vlc_appdir = $(bindir)
547 # VLC-release.app is the old VLC.app target
548 VLC-release.app: vlc
549         @if test -e "$(top_builddir)/tmp"; then \
550           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
551           false; \
552         else \
553           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
554         fi
555         rm -Rf $(top_builddir)/VLC-release.app
556         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
557         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
558           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
559         done
560         mkdir -p $(top_builddir)/tmp/modules/audio_output
561         cp $(srcdir)/modules/audio_output/coreaudio.c \
562            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
563         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
564         for i in \
565             about.h \
566             about.m \
567             applescript.h \
568             applescript.m \
569             controls.h \
570             controls.m \
571             equalizer.h \
572             equalizer.m \
573             intf.h \
574             intf.m \
575             macosx.m \
576             misc.h \
577             misc.m \
578             open.h \
579             open.m \
580             output.h \
581             output.m \
582             playlist.h \
583             playlist.m \
584             playlistinfo.h \
585             playlistinfo.m \
586             prefs_widgets.h \
587             prefs_widgets.m \
588             prefs.h \
589             prefs.m \
590             vout.h \
591             voutqt.m \
592             voutgl.m \
593             wizard.h \
594             wizard.m \
595             extended.h \
596             extended.m \
597         bookmarks.h \
598         bookmarks.m \
599             vout.m; do \
600           cp "$(srcdir)/modules/gui/macosx/$$i" \
601              $(top_builddir)/tmp/modules/gui/macosx; \
602         done
603         case $(target_triplet) in \
604           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
605             cd ../../../; \
606             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
607                   $(top_builddir)/VLC-release.app;; \
608           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
609             cd ../../../; \
610             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
611                   $(top_builddir)/VLC-release.app;; \
612           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
613             cd ../../../; \
614             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
615                   $(top_builddir)/VLC-release.app;; \
616         esac
617         rm -Rf $(top_builddir)/tmp
618         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
619         $(INSTALL) $(top_builddir)/vlc \
620                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
621         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
622         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
623         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
624           if test -n "$$i" ; \
625             then $(INSTALL) "$$i$(LIBEXT)" \
626                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
627           fi ; done
628         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
629           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
630           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
631             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
632           done ; \
633         fi
634         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
635         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
636         for i in $(srcdir)/share/http/* ; do \
637           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
638         done ; \
639         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
640         for i in $(srcdir)/share/http/vlm/* ; do \
641           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
642         done ; \
643         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
644         for i in $(srcdir)/share/http/admin/* ; do \
645           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
646         done ; \
647         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
648         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
649         for i in $(ALL_LINGUAS); do \
650           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
651           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
652           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
653           ln -sf ../English.lproj/InfoPlist.strings \
654               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
655           ln -sf ../English.lproj/MainMenu.nib \
656               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
657           ln -sf ../English.lproj/vlc.scriptTerminology \
658               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
659         done
660         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
661
662 VLC.app: vlc
663         @if test -e "$(top_builddir)/tmp"; then \
664           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
665           false; \
666         else \
667           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
668         fi
669         rm -Rf $(top_builddir)/VLC.app
670         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
671         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
672           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
673         done
674         mkdir -p $(top_builddir)/tmp/modules/audio_output
675         cp $(srcdir)/modules/audio_output/coreaudio.c \
676            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
677         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
678         for i in \
679             about.h \
680             about.m \
681             applescript.h \
682             applescript.m \
683             controls.h \
684             controls.m \
685             equalizer.h \
686             equalizer.m \
687             intf.h \
688             intf.m \
689             macosx.m \
690             misc.h \
691             misc.m \
692             open.h \
693             open.m \
694             output.h \
695             output.m \
696             playlist.h \
697             playlist.m \
698             playlistinfo.h \
699             playlistinfo.m \
700             prefs_widgets.h \
701             prefs_widgets.m \
702             prefs.h \
703             prefs.m \
704             vout.h \
705             voutqt.m \
706             voutgl.m \
707             wizard.h \
708             wizard.m \
709             extended.h \
710             extended.m \
711         bookmarks.h \
712         bookmarks.m \
713             vout.m; do \
714           cp "$(srcdir)/modules/gui/macosx/$$i" \
715              $(top_builddir)/tmp/modules/gui/macosx; \
716         done
717         case $(target_triplet) in \
718           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
719             cd ../../../; \
720             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
721                   $(top_builddir)/VLC.app;; \
722           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
723             cd ../../../; \
724             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
725                   $(top_builddir)/VLC.app;; \
726           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
727             cd ../../../; \
728             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
729                   $(top_builddir)/VLC.app;; \
730         esac
731         rm -Rf $(top_builddir)/tmp
732         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
733         $(INSTALL) $(top_builddir)/vlc \
734                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
735         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
736         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
737         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
738           if test -n "$$i" ; \
739             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
740                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
741           fi ; done
742         if test -d $(srcdir)/extras/contrib/vlc-lib; then \
743           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
744           for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
745             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
746           done ; \
747         fi
748         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
749         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
750         for i in $(ALL_LINGUAS); do \
751           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
752           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
753           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
754           ln -sf ../English.lproj/InfoPlist.strings \
755               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
756           ln -sf ../English.lproj/MainMenu.nib \
757               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
758         done
759         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
760 endif
761
762 if HAVE_WIN32
763 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
764 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
765 noinst_share_vlc_win32_rcdir = $(libdir)
766 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
767         $(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 $@
768 endif
769
770
771 ###############################################################################
772 # Building specific source packages
773 ###############################################################################
774
775 dist-woody: distdir
776         $(remove_distdir_woody)
777         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
778         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
779         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
780           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
781         $(remove_distdir_woody)
782
783 remove_distdir_woody = \
784   { test ! -d $(PACKAGE)-woody-$(VERSION) \
785     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
786            -exec chmod u+w {} ';' \
787          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
788
789 ###############################################################################
790 # Building architecture-specific binary packages
791 ###############################################################################
792
793 # XXX: this rule is probably only useful to you if you have exactly
794 # the same setup as me. Contact sam@zoy.org if you need to use it.
795 #
796 package-win32-base:
797 # Check that tmp isn't in the way
798         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
799           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
800           false; \
801         else \
802           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
803         fi
804
805 # Copy relevant files
806         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
807         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
808         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
809         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
810
811         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
812           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
813           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
814
815         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
816         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
817           if test -n "$$i" ; then \
818             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
819             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
820           fi ; done
821
822         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
823           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
824
825         mkdir $(top_builddir)/vlc-${VERSION}/locale
826         for i in $(ALL_LINGUAS); do \
827           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
828           cp "$(srcdir)/po/$${i}.gmo" \
829             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
830             || true ; \
831         done
832
833         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
834         for i in $(srcdir)/share/skins2/fonts/*.*; do \
835           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
836         done
837         for i in $(srcdir)/share/skins2/*.*; do \
838           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
839         done
840
841         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu"
842         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/dvd"
843         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/dvd/selected"
844         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/dvd/unselect"
845         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/dvd/selection"
846         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/dvd/volume"
847         for i in $(srcdir)/share/osdmenu/*.*; do \
848           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/ || true ; \
849           unix2dos $(top_builddir)/vlc-${VERSION}/osdmenu/`basename $$i` ; \
850         done
851         for i in $(srcdir)/share/osdmenu/dvd/*.*; do \
852           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/dvd || true ; \
853         done
854         for i in $(srcdir)/share/osdmenu/dvd/unselect/*.*; do \
855           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/dvd/unselect || true ; \
856         done
857         for i in $(srcdir)/share/osdmenu/dvd/selected/*.*; do \
858           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/dvd/selected/ || true ; \
859         done
860         for i in $(srcdir)/share/osdmenu/dvd/selection/*.*; do \
861           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/dvd/selection/ || true ; \
862         done
863         for i in $(srcdir)/share/osdmenu/dvd/volume/*.*; do \
864           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/dvd/volume/ || true ; \
865         done
866
867         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/default"
868         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/default/selected"
869         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/default/selection"
870         mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu/default/volume"
871         for i in $(srcdir)/share/osdmenu/default/*.*; do \
872           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/default || true ; \
873         done
874         for i in $(srcdir)/share/osdmenu/default/selected/*.*; do \
875           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/default/selected/ || true ; \
876         done
877         for i in $(srcdir)/share/osdmenu/default/selection/*.*; do \
878           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/default/selection/ || true ; \
879         done
880         for i in $(srcdir)/share/osdmenu/default/volume/*.*; do \
881           cp $$i $(top_builddir)/vlc-${VERSION}/osdmenu/default/volume/ || true ; \
882         done
883
884         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
885         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
886         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
887         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
888         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
889         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
890         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
891         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
892         cp $(srcdir)/share/http/admin/*.html \
893            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
894         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
895         cp $(srcdir)/share/http/admin/dboxfiles.html \
896            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
897         cp $(srcdir)/share/http/admin/.access \
898            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
899         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
900         cp $(srcdir)/share/http/vlm/*.html \
901            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
902         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
903
904         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
905
906         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
907 if BUILD_MOZILLA
908         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
909         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
910         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
911 endif
912
913         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
914 if BUILD_ACTIVEX
915         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
916         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
917         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
918
919         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
920         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
921 endif
922 # Rebase all those DLLs to speed up loading (need cygwin rebase)
923         if [ -x rebase ]; then \
924                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
925         fi
926
927 package-win32-base-exe:
928 # Create package
929         wine C:/Program\ Files/NSIS/makensis.exe \
930              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
931
932 package-win32-base-exe-cygwin:
933 # Create package
934         C:/Program\ Files/NSIS/makensis.exe \
935              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
936
937 package-win32-base-exe-linux:
938 # Create package
939         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
940
941 package-win32-base-zip:
942 # Create package 
943         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
944
945 package-win32-exe: package-win32-base package-win32-base-exe
946 # Clean up
947         rm -Rf $(top_builddir)/vlc-${VERSION}
948
949 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
950 # Clean up
951         rm -Rf $(top_builddir)/vlc-${VERSION}
952
953 package-win32-zip: package-win32-base package-win32-base-zip
954 # Clean up
955         rm -Rf $(top_builddir)/vlc-${VERSION}
956
957 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
958 # Clean up
959         rm -Rf $(top_builddir)/vlc-${VERSION}
960
961 package-beos:
962 # Check that tmp isn't in the way
963         @if test -e $(srcdir)/tmp; then \
964           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
965           false ; \
966         else \
967           echo "OK." ; mkdir $(srcdir)/tmp ; \
968         fi
969
970 # Copy relevant files
971         mkdir -p $(srcdir)/tmp/vlc ;
972         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
973           THANKS NEWS tmp/vlc/ ;
974
975 # Create debug package
976         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
977         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
978         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
979         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
980         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
981         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
982
983 # Create normal package
984         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
985         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
986           --strip-debug --strip-unneeded "{}" \; ;
987         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
988         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
989         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
990         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
991         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
992
993 # Clean up
994         rm -Rf $(srcdir)/tmp ;
995
996 package-macosx:
997 # Check that tmp isn't in the way
998         @if test -e "$(top_builddir)/tmp"; then \
999           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
1000           false; \
1001         else \
1002           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
1003         fi
1004
1005 # Copy relevant files 
1006         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
1007         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
1008
1009 # Create disk image 
1010         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
1011
1012 # Clean up
1013         rm -Rf $(top_builddir)/tmp
1014
1015 package-translations:
1016         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
1017           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
1018           false; \
1019         else \
1020           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
1021         fi
1022 # Copy translations
1023         for i in $(ALL_LINGUAS); do \
1024           cp "$(srcdir)/po/$${i}.po" \
1025             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
1026             || true ; \
1027         done
1028         cp "$(srcdir)/doc/translations.txt" \
1029           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
1030
1031         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1032         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1033         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1034         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1035         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1036         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1037         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1038         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
1039
1040         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
1041           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
1042
1043 ###############################################################################
1044 # PO translation files update
1045 ###############################################################################
1046 .PHONY: update-po
1047
1048 update-po:
1049         rm -f $(top_srcdir)/po/POTFILES.in
1050         { \
1051           cd $(top_srcdir) ; \
1052           echo "# automatically created by make update-po" ; \
1053           echo "" ; \
1054           echo "# main sources" ; \
1055           find include src -name '*.[chm]' -o -name '*.[ch]pp' \
1056             | grep -v '\(vlc_symbols\|misc/modules_\)' \
1057             | sort ; \
1058           echo "" ; \
1059           echo "# modules" ; \
1060           find modules -name '*.[chm]' -o -name '*.[ch]pp' \
1061             | grep -v '\(\.moc\.\|gui/gtk2/\)' \
1062             | sort ; \
1063         } > $(top_srcdir)/po/POTFILES.in
1064         rm -f $(top_srcdir)/po/vlc.pot
1065         cd po && $(MAKE) POTFILES $(top_srcdir)/../po/vlc.pot update-po
1066
1067 #cd po && $(MAKE) update-po
1068
1069 ###############################################################################
1070 # Stamp rules
1071 ###############################################################################
1072 stamp-builtin: FORCE
1073         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
1074           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
1075             rm -f $@; \
1076             break; \
1077           fi; \
1078         done
1079         @if test ! -f $@; then printf "" > $@; fi
1080
1081 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl
1082         ( cd $(srcdir) && cat $(HEADERS_include) ) | \
1083           top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
1084         touch stamp-api
1085
1086 ###############################################################################
1087 # Force rule
1088 ###############################################################################
1089 FORCE: