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