166cfa5353228865d799ed892887bb37ec00aa34
[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 share m4 doc
15 DIST_SUBDIRS = $(SUBDIRS) src debian ipkg lib autotools
16
17 EXTRA_DIST = \
18         HACKING \
19         INSTALL.win32 \
20         MAINTAINERS \
21         README.MacOSX.rtf \
22         bootstrap \
23         install-win32 \
24         src/extras/COPYING \
25         toolbox \
26         vlc-config.in.in \
27         vlc.ebuild \
28         vlc.spec \
29         vlc.spec.mdk \
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/configuration.h \
71         include/darwin_specific.h \
72         include/charset.h \
73         include/codecs.h \
74         include/ninput.h \
75         include/input_ext-dec.h \
76         include/input_ext-intf.h \
77         include/input_ext-plugins.h \
78         include/intf_eject.h \
79         include/iso_lang.h \
80         include/httpd.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/os_specific.h \
88         include/stream_control.h \
89         include/stream_output.h \
90         include/variables.h \
91         include/video_output.h \
92         include/vlc_block.h \
93         include/vlc_block_helper.h \
94         include/vlc_codec.h \
95         include/vlc_common.h \
96         include/vlc_config.h \
97         include/vlc_cpu.h \
98         include/vlc_error.h \
99         include/vlc_help.h \
100         include/vlc_interface.h \
101         include/vlc_keys.h \
102         include/vlc_messages.h \
103         include/vlc_objects.h \
104         include/vlc_playlist.h \
105         include/vlc_threads.h \
106         include/vlc_threads_funcs.h \
107         include/vlc_video.h \
108         include/vout_synchro.h \
109         include/win32_specific.h \
110         include/osd.h \
111         $(NULL)
112
113 HEADERS_include_built = \
114         include/vlc_symbols.h \
115         $(NULL)
116
117 include/vlc_symbols.h: Makefile $(HEADERS_include)
118         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
119
120 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
121         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
122
123 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
124         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
125
126 # These dependencies are mandatory
127 $(SOURCES): include/vlc_symbols.h
128 $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl)
129
130 ###############################################################################
131 # Optional libintl - FIXME, bad dependencies
132 ###############################################################################
133
134 intl/libintl.a: FORCE
135         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
136
137 if BUILD_INTL
138 LIB_intl = intl/libintl.a
139 endif
140
141 ###############################################################################
142 # MacOS X project
143 ###############################################################################
144
145 EXTRA_DIST += \
146         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
147         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
148         extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
149         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
150         extras/MacOSX/Resources/English.lproj/vlc.scriptTerminology \
151         extras/MacOSX/Resources/a52.icns \
152         extras/MacOSX/Resources/aac.icns \
153         extras/MacOSX/Resources/asf.icns \
154         extras/MacOSX/Resources/asx.icns \
155         extras/MacOSX/Resources/avi.icns \
156         extras/MacOSX/Resources/bin.icns \
157         extras/MacOSX/Resources/cue.icns \
158         extras/MacOSX/Resources/dat.icns \
159         extras/MacOSX/Resources/divx.icns \
160         extras/MacOSX/Resources/dv.icns \
161         extras/MacOSX/Resources/generic.icns \
162         extras/MacOSX/Resources/m3u.icns \
163         extras/MacOSX/Resources/mov.icns \
164         extras/MacOSX/Resources/mp3.icns \
165         extras/MacOSX/Resources/mp4.icns \
166         extras/MacOSX/Resources/mpeg.icns \
167         extras/MacOSX/Resources/mpeg1.icns \
168         extras/MacOSX/Resources/mpeg2.icns \
169         extras/MacOSX/Resources/mpeg4.icns \
170         extras/MacOSX/Resources/mpg.icns \
171         extras/MacOSX/Resources/ogg.icns \
172         extras/MacOSX/Resources/ogm.icns \
173         extras/MacOSX/Resources/pls.icns \
174         extras/MacOSX/Resources/srt.icns \
175         extras/MacOSX/Resources/sub.icns \
176         extras/MacOSX/Resources/vlc.icns \
177         extras/MacOSX/Resources/vob.icns \
178         extras/MacOSX/Resources/wma.icns \
179         extras/MacOSX/Resources/wmv.icns \
180         extras/MacOSX/Resources/pause.png \
181         extras/MacOSX/Resources/pause_blue.png \
182         extras/MacOSX/Resources/play.png \
183         extras/MacOSX/Resources/play_blue.png \
184         extras/MacOSX/Resources/stop.png \
185         extras/MacOSX/Resources/stop_blue.png \
186         extras/MacOSX/Resources/display.png \
187         extras/MacOSX/Resources/display_slider.png \
188         extras/MacOSX/Resources/display_track.png \
189         extras/MacOSX/Resources/fullscreen_active.png \
190         extras/MacOSX/Resources/fullscreen_blue.png \
191         extras/MacOSX/Resources/next_active.png \
192         extras/MacOSX/Resources/next_blue.png \
193         extras/MacOSX/Resources/playlistdrawer_active.png \
194         extras/MacOSX/Resources/playlistdrawer_blue.png \
195         extras/MacOSX/Resources/previous_active.png \
196         extras/MacOSX/Resources/previous_blue.png \
197         extras/MacOSX/Resources/skip_forward_active.png \
198         extras/MacOSX/Resources/skip_forward_blue.png \
199         extras/MacOSX/Resources/skip_previous_active.png \
200         extras/MacOSX/Resources/skip_previous_blue.png \
201         extras/MacOSX/Resources/volume_high.png \
202         extras/MacOSX/Resources/volume_low.png \
203         extras/MacOSX/Resources/volumeslider_blue.png \
204         extras/MacOSX/Resources/volumeslider_normal.png \
205         extras/MacOSX/Resources/volumetrack.png \
206         extras/MacOSX/Resources/about_bg.png \
207         extras/MacOSX/Resources/vlc.scriptSuite \
208         extras/MacOSX/Resources/README \
209         extras/MacOSX/vlc.pbproj/project.pbxproj \
210         extras/MacOSX/macosx-dmg \
211         $(NULL)
212
213 ###############################################################################
214 # MS Visual Studio and eMbedded Visual Studio projects
215 ###############################################################################
216
217 EXTRA_DIST += \
218         msvc/vlc.dsw \
219         msvc/libvlc.dsp.in \
220         msvc/plugins.dsp.in \
221         msvc/vlc.dsp.in \
222         msvc/config.h.in \
223         msvc/modules_builtin_msvc.h \
224         evc/vlc.vcw \
225         evc/libvlc.vcp.in \
226         evc/vlc.vcp.in \
227         evc/plugins.vcp.in \
228         evc/vlc.c \
229         evc/config.h.in \
230         evc/modules_builtin_evc.h \
231         $(NULL)
232
233 dist-hook:
234         mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
235         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
236
237 ###############################################################################
238 # Building libvlc
239 ###############################################################################
240
241 bin_SCRIPTS = vlc-config
242
243 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
244
245 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
246 dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h
247 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
248 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
249 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
250
251 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
252 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
253 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
254 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
255
256 if HAVE_BEOS
257 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
258 endif
259 if HAVE_DARWIN
260 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
261 endif
262 if HAVE_WIN32
263 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
264 endif
265 if BUILD_DIRENT
266 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
267 endif
268 if BUILD_GETOPT
269 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
270 endif
271 if BUILD_MOZILLA
272 if !HAVE_WIN32
273 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
274 endif
275 endif
276
277 EXTRA_DIST += \
278         $(SOURCES_libvlc_beos) \
279         $(SOURCES_libvlc_darwin) \
280         $(SOURCES_libvlc_win32) \
281         $(SOURCES_libvlc_dirent) \
282         $(SOURCES_libvlc_getopt) \
283         $(NULL)
284
285 SOURCES_libvlc_beos = \
286         src/misc/beos_specific.cpp \
287         $(NULL)
288
289 SOURCES_libvlc_darwin = \
290         src/misc/darwin_specific.m \
291         $(NULL)
292
293 SOURCES_libvlc_win32 = \
294         src/misc/win32_specific.c \
295         $(NULL)
296
297 SOURCES_libvlc_dirent = \
298         src/extras/dirent.c \
299         src/extras/dirent.h \
300         $(NULL)
301
302 SOURCES_libvlc_getopt = \
303         src/extras/getopt.c \
304         src/extras/getopt.h \
305         src/extras/getopt1.c \
306         $(NULL)
307
308 SOURCES_libvlc_common = \
309         src/libvlc.c \
310         src/libvlc.h \
311         src/interface/interface.c \
312         src/interface/intf_eject.c \
313         src/playlist/playlist.c \
314         src/playlist/sort.c \
315         src/playlist/loadsave.c \
316         src/playlist/group.c \
317         src/playlist/item.c \
318         src/input/input.c \
319         src/input/stream.c \
320         src/input/demux.c \
321         src/input/subtitles.c \
322         src/input/input_ext-plugins.c \
323         src/input/input_ext-dec.c \
324         src/input/input_ext-intf.c \
325         src/input/input_dec.c \
326         src/input/input_programs.c \
327         src/input/input_clock.c \
328         src/input/input_info.c \
329         src/video_output/video_output.c \
330         src/video_output/vout_pictures.c \
331         src/video_output/vout_pictures.h \
332         src/video_output/video_text.c \
333         src/video_output/vout_subpictures.c \
334         src/video_output/vout_synchro.c \
335         src/audio_output/common.c \
336         src/audio_output/dec.c \
337         src/audio_output/filters.c \
338         src/audio_output/input.c \
339         src/audio_output/mixer.c \
340         src/audio_output/output.c \
341         src/audio_output/intf.c \
342         src/stream_output/stream_output.c \
343         src/misc/charset.c \
344         src/misc/mtime.c \
345         src/misc/block.c \
346         src/misc/modules.c \
347         src/misc/threads.c \
348         src/misc/cpu.c \
349         src/misc/configuration.c \
350         src/misc/iso_lang.c \
351         src/misc/iso-639_def.h \
352         src/misc/messages.c \
353         src/misc/objects.c \
354         src/misc/variables.c \
355         src/misc/error.c \
356         src/extras/libc.c \
357         $(NULL)
358
359 SOURCES_libvlc = \
360         $(SOURCES_libvlc_common) \
361         $(OPT_SOURCES_libvlc_beos) \
362         $(OPT_SOURCES_libvlc_darwin) \
363         $(OPT_SOURCES_libvlc_win32) \
364         $(OPT_SOURCES_libvlc_dirent) \
365         $(OPT_SOURCES_libvlc_getopt) \
366         $(NULL)
367
368 ###############################################################################
369 # Building vlc
370 ###############################################################################
371
372 bin_PROGRAMS = vlc
373
374 vlc_SOURCES = src/vlc.c
375
376 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin`
377 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
378 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
379
380 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
381 # old automake-1.5 bug (automake/279).
382 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
383
384 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
385         @rm -f $(top_builddir)/vlc$(EXEEXT)
386         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
387           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
388           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
389           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
390         esac
391
392 if HAVE_BEOS
393         xres -o $@ $(srcdir)/share/vlc_beos.rsrc
394         mimeset -f $@
395         rm -Rf $(srcdir)/locale ; mkdir -p "$(srcdir)/locale"
396         for i in $(ALL_LINGUAS); do \
397           mkdir -p "$(srcdir)/locale/$${i}/LC_MESSAGES" ; \
398           cp "$(srcdir)/po/$${i}.gmo" \
399             "$(srcdir)/locale/$${i}/LC_MESSAGES/vlc.mo" || true ; \
400         done
401 endif
402
403 # Install the modules and the symlinks
404 install-exec-local:
405         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
406           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
407           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
408         fi ; done
409         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
410           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
411           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
412         fi ; done
413 if BUILD_MOZILLA
414         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
415           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
416           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
417         fi ; done
418 endif
419         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
420           rm -f "$(DESTDIR)$(bindir)/$$i" && \
421           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
422         fi ; done
423
424 if HAVE_DARWIN
425 # Create the MacOS X app
426 vlc_app_DATA = VLC.app
427 vlc_appdir = $(bindir)
428 VLC.app: vlc
429         @if test -e "$(top_builddir)/tmp"; then \
430           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
431           false; \
432         else \
433           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
434         fi
435         rm -Rf $(top_builddir)/VLC.app
436         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
437         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
438           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
439         done
440         mkdir -p $(top_builddir)/tmp/modules/audio_output
441         cp $(srcdir)/modules/audio_output/coreaudio.c \
442            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
443         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
444         for i in \
445             about.h \
446             about.m \
447             applescript.h \
448             applescript.m \
449             controls.h \
450             controls.m \
451             info.h \
452             info.m \
453             intf.h \
454             intf.m \
455             macosx.m \
456             misc.h \
457             misc.m \
458             open.h \
459             open.m \
460             output.h \
461             output.m \
462             playlist.h \
463             playlist.m \
464             prefs.h \
465             prefs.m \
466             vout.h \
467             vout.m; do \
468           cp "$(srcdir)/modules/gui/macosx/$$i" \
469              $(top_builddir)/tmp/modules/gui/macosx; \
470         done
471         cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'
472         cp -r $(top_builddir)/tmp/extras/MacOSX/build/vlc.bundle \
473               $(top_builddir)/VLC.app
474         rm -Rf $(top_builddir)/tmp
475         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
476         $(INSTALL) $(top_builddir)/vlc \
477                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
478         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
479         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
480           if test -n "$$i" ; \
481             then $(INSTALL) "$$i$(LIBEXT)" \
482                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
483           fi ; done
484         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
485           cp -R $(top_builddir)/extras/contrib/vlc-lib \
486             $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
487         fi
488         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/share
489         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/share/http
490         $(INSTALL) -m 644 $(srcdir)/share/http/*.html \
491             $(top_builddir)/VLC.app/Contents/MacOS/share/http
492         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/share/http/admin
493         $(INSTALL) -m 644 $(srcdir)/share/http/admin/*.html \
494             $(top_builddir)/VLC.app/Contents/MacOS/share/http/admin
495         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
496         for i in $(ALL_LINGUAS); do \
497           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
498           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
499           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
500           ln -sf ../English.lproj/InfoPlist.strings \
501               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
502           ln -sf ../English.lproj/MainMenu.nib \
503               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
504           ln -sf ../English.lproj/vlc.scriptTerminology \
505               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
506         done
507         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
508 endif
509
510 if HAVE_WIN32
511 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
512 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
513 noinst_share_vlc_win32_rcdir = $(libdir)
514 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
515         $(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 $@
516 endif
517
518 ###############################################################################
519 # Building specific source packages
520 ###############################################################################
521
522 dist-woody: distdir
523         $(remove_distdir_woody)
524         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
525         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
526         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
527           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
528         $(remove_distdir_woody)
529
530 remove_distdir_woody = \
531   { test ! -d $(PACKAGE)-woody-$(VERSION) \
532     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
533            -exec chmod u+w {} ';' \
534          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
535
536 ###############################################################################
537 # Building architecture-specific binary packages
538 ###############################################################################
539
540 # XXX: this rule is probably only useful to you if you have exactly
541 # the same setup as me. Contact sam@zoy.org if you need to use it.
542 #
543 # Check that tmp isn't in the way
544 package-win32-base:
545         @if test -e "$(srcdir)/vlc-${VERSION}"; then \
546           echo "Error: please remove $(srcdir)/vlc-${VERSION}, it is in the way"; \
547           false; \
548         else \
549           echo "OK."; mkdir -p "$(srcdir)/vlc-${VERSION}"; \
550         fi
551 # Create installation script
552         cp "$(srcdir)/install-win32" "$(srcdir)/vlc-${VERSION}/nsi"
553 # Copy relevant files
554         cp "$(top_builddir)/vlc$(EXEEXT)" "$(srcdir)/vlc-${VERSION}/"
555         $(STRIP) "$(srcdir)/vlc-${VERSION}/vlc$(EXEEXT)"
556         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
557           do cp "$(srcdir)/$$file" "$(srcdir)/vlc-${VERSION}/$${file}.txt" ; \
558           unix2dos "$(srcdir)/vlc-${VERSION}/$${file}.txt" ; done
559
560         mkdir -p "$(srcdir)/vlc-${VERSION}/plugins"
561         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
562           if test -n "$$i" ; then \
563             $(INSTALL) "$(srcdir)/$$i$(LIBEXT)" \
564             "$(srcdir)/vlc-${VERSION}/plugins/" ; \
565           fi ; done
566
567         for i in "" $(srcdir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
568           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
569
570         mkdir $(srcdir)/vlc-${VERSION}/locale
571         for i in $(ALL_LINGUAS); do \
572           mkdir -p "$(srcdir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
573           cp "$(srcdir)/po/$${i}.gmo" \
574             "$(srcdir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
575             || true ; \
576         done
577
578         mkdir -p $(srcdir)/vlc-${VERSION}/skins/default
579         for i in $(srcdir)/share/skins/default/*.*; do \
580           cp $$i $(srcdir)/vlc-${VERSION}/skins/default/ || true ; \
581         done
582         for i in $(srcdir)/doc/skins/*.txt; do \
583           cp $$i $(srcdir)/vlc-${VERSION}/skins/ || true ; \
584         done
585
586         mkdir -p "$(srcdir)/vlc-${VERSION}/http/admin"
587         cp $(srcdir)/share/http/*.html $(srcdir)/vlc-${VERSION}/http/ ;
588         cp $(srcdir)/share/http/*.css $(srcdir)/vlc-${VERSION}/http/ ;
589         cp $(srcdir)/share/http/admin/*.html \
590            $(srcdir)/vlc-${VERSION}/http/admin/ ;
591         cp $(srcdir)/share/http/admin/.access \
592            $(srcdir)/vlc-${VERSION}/http/admin/ ;
593
594         mkdir -p "$(srcdir)/vlc-${VERSION}/mozilla"
595 if BUILD_MOZILLA
596         cp $(srcdir)/mozilla/*$(LIBEXT) $(srcdir)/vlc-${VERSION}/mozilla/ ;
597         $(STRIP) $(srcdir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
598         cp $(srcdir)/mozilla/vlcintf.xpt  $(srcdir)/vlc-${VERSION}/mozilla/ ;
599 endif
600
601 package-win32-base-exe:
602 # Create package 
603         wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe \
604              -- /DVERSION=${VERSION} $(srcdir)/vlc-${VERSION}/nsi
605
606 package-win32-base-zip:
607 # Create package 
608         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
609
610 package-win32-exe: package-win32-base package-win32-base-exe
611 # Clean up
612         rm -Rf $(srcdir)/vlc-${VERSION}
613
614 package-win32-zip: package-win32-base package-win32-base-zip
615 # Clean up
616         rm -Rf $(srcdir)/vlc-${VERSION}
617
618 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
619 # Clean up
620         rm -Rf $(srcdir)/vlc-${VERSION}
621
622 package-beos:
623 # Check that tmp isn't in the way
624         @if test -e $(srcdir)/tmp; then \
625           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
626           false; \
627         else \
628           echo "OK."; mkdir $(srcdir)/tmp; \
629         fi
630
631 # Copy relevant files
632         mkdir -p $(srcdir)/tmp/vlc
633         cd $(srcdir) && \
634           cp vlc AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
635 # We cannot use ${PLUGIN_FILES} as it looks like it is too "long" for the BeOS shell...
636         if [ `find $(srcdir)/modules -name "lib*_plugin.so" | wc -l` -gt 0 ]; then \
637           mkdir -p $(srcdir)/tmp/vlc/plugins; \
638           find $(srcdir)/modules -name "lib*_plugin.so" | xargs -i{} cp {} $(srcdir)/tmp/vlc/plugins/; \
639         fi
640         for i in $(ALL_LINGUAS); do \
641           mkdir -p $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES ; \
642           cp $(srcdir)/po/$${i}.gmo $(srcdir)/tmp/vlc/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
643         done
644
645 # Create package with debug symbols
646         mimeset -f $(srcdir)/tmp/vlc/* $(srcdir)/tmp/vlc/*/*
647         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION}
648         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
649         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/
650
651 # Create package without debug symbols
652         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc
653         strip $(srcdir)/tmp/vlc/vlc
654         if [ -d $(srcdir)/tmp/vlc/plugins ]; then \
655           strip $(srcdir)/tmp/vlc/plugins/lib*_plugin.so; \
656         fi
657         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc
658         mimeset -f $(srcdir)/tmp/vlc/* $(srcdir)/tmp/vlc/*/*
659         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION}
660         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
661         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/
662
663 # Clean up
664         rm -Rf $(srcdir)/tmp
665
666 package-macosx:
667 # Check that tmp isn't in the way
668         @if test -e "$(top_builddir)/tmp"; then \
669           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
670           false; \
671         else \
672           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
673         fi
674
675 # Copy relevant files 
676         cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/tmp/"
677         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
678
679 # Create disk image 
680         $(srcdir)/extras/MacOSX/macosx-dmg 25 "vlc-${VERSION}" $(top_builddir)/tmp/* 
681
682 # Clean up
683         rm -Rf $(top_builddir)/tmp
684
685 ###############################################################################
686 # Stamp rules
687 ###############################################################################
688 clean: clean-stamp
689 clean-stamp:
690         rm -f stamp-builtin
691
692 stamp-builtin: FORCE
693         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
694           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
695             rm -f $@; \
696             break; \
697           fi; \
698         done
699         @if test ! -f $@; then printf "" > $@; fi
700
701 ###############################################################################
702 # Force rule
703 ###############################################################################
704 FORCE: