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