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