]> git.sesse.net Git - vlc/blob - Makefile.am
* modules/gui/wxwindows/*: misc small improvements and fixes.
[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 SUBDIRS = po intl m4 share
11 DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib autotools
12
13 EXTRA_DIST = \
14         HACKING \
15         INSTALL.win32 \
16         MAINTAINERS \
17         Modules.am \
18         README.MacOSX.rtf \
19         bootstrap \
20         configure.ac.in \
21         install-win32 \
22         src/extras/COPYING \
23         toolbox \
24         vlc.spec \
25         $(NULL)
26
27 MOSTLYCLEANFILES =
28 BUILT_SOURCES =
29 SUFFIXES = 
30
31 # List of programs, libraries and headers that need to be built and/or
32 # distributed. Initialized to empty because we'll use += later.
33 bin_PROGRAMS =
34
35 lib_LIBRARIES = 
36 libvlc_LIBRARIES =
37 noinst_LIBRARIES =
38
39 noinst_HEADERS =
40
41 # Tell aclocal to use -I m4. Wonder if it really works.
42 ACLOCAL_AMFLAGS = -I m4
43
44 # XXX: these flags could be set in configure.ac.in, but we set them here
45 # because old versions of automake don't support them in configure.ac.
46 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
47
48 ###############################################################################
49 # Compilation flags for debug mode, profiling, and others
50 ###############################################################################
51
52 # Standard flags used everywhere to build things in the distribution. Some
53 # of them are empty but might be extended later in the Makefile. *_default
54 # is the default flag list for all files in the distribution, for instance
55 # the vlc code. *_pic is for PIC code, such as the Mozilla plugin. *_plugin
56 # is for plugin code, *_builtin is for builtin code, and *_builtin_pic is
57 # for PIC builtin code, for instance builtin modules in the mozilla plugin.
58
59 CPPFLAGS_default = -I$(top_srcdir)/include
60 CFLAGS_default = 
61 CXXFLAGS_default = 
62 OBJCFLAGS_default = 
63 LDFLAGS_default =
64
65 CPPFLAGS_pic = $(CPPFLAGS_default)
66 CFLAGS_pic = $(CFLAGS_default) @CFLAGS_pics@
67 CXXFLAGS_pic = $(CXXFLAGS_default) @CFLAGS_pics@
68 OBJCFLAGS_pic = $(OBJCFLAGS_default) @CFLAGS_pics@
69 LDFLAGS_pic = $(LDFLAGS_default)
70
71 CPPFLAGS_plugin = $(CPPFLAGS_default) -D__VLC__ -D__PLUGIN__
72 CFLAGS_plugin = $(CFLAGS_default) @CFLAGS_plugins@
73 CXXFLAGS_plugin = $(CXXFLAGS_default) @CFLAGS_plugins@
74 OBJCFLAGS_plugin = $(OBJCFLAGS_default) @CFLAGS_plugins@
75 LDFLAGS_plugin = @LDFLAGS_plugins@
76
77 CPPFLAGS_builtin = $(CPPFLAGS_default) -D__VLC__ -D__BUILTIN__
78 CFLAGS_builtin = $(CFLAGS_default) @CFLAGS_builtins@
79 CXXFLAGS_builtin = $(CXXFLAGS_default) @CFLAGS_builtins@
80 OBJCFLAGS_builtin = $(OBJCFLAGS_default) @CFLAGS_builtins@
81 LDFLAGS_builtin =
82 L_builtin =
83
84 CPPFLAGS_builtin_pic = $(CPPFLAGS_builtin) $(CPPFLAGS_pic)
85 CFLAGS_builtin_pic = $(CFLAGS_builtin) $(CFLAGS_pic)
86 CXXFLAGS_builtin_pic = $(CXXFLAGS_builtin) $(CXXFLAGS_pic)
87 OBJCFLAGS_builtin_pic = $(OBJCFLAGS_builtin) $(OBJCFLAGS_pic)
88 LDFLAGS_builtin_pic = $(LDFLAGS_builtin) $(LDFLAGS_pic)
89 L_builtin_pic = $(L_builtin) $(L_pic)
90
91 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
92 CPPFLAGS_default += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
93 CPPFLAGS_default += -D_REENTRANT -D_THREAD_SAFE
94 CPPFLAGS_default += -D_GNU_SOURCE
95
96 # Gettext support
97 CPPFLAGS_default += -DLOCALEDIR=\"$(datadir)/locale\"
98
99 # Data and plugin location
100 CPPFLAGS_default += -DDATA_PATH=\"@prefix@/share/vlc\"
101 CPPFLAGS_default += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
102
103 # Conditional flags that get added to *FLAGS_default
104 if RELEASE
105 CPPFLAGS_release = -DHAVE_RELEASE
106 endif
107 if DEBUG
108 CPPFLAGS_debug = -DDEBUG
109 CFLAGS_debug = -g
110 endif
111 if GPROF
112 CPPFLAGS_gprof = -DGPROF
113 CFLAGS_gprof = -finstrument-functions
114 endif
115 if CPROF
116 CPPFLAGS_cprof = -DCPROF
117 CFLAGS_cprof = -pg
118 endif
119 if OPTIM
120 CFLAGS_optim = @CFLAGS_OPTIM@ @CFLAGS_TUNING@
121 if DEBUG
122 else
123 if GPROF
124 else
125 if CPROF
126 else
127 CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
128 endif
129 endif
130 endif
131 else
132 # !OPTIM
133 CFLAGS_optim = @CFLAGS_NOOPTIM@
134 endif
135
136 CPPFLAGS_default += $(CPPFLAGS_release) \
137                 $(CPPFLAGS_debug) $(CPPFLAGS_gprof) $(CPPFLAGS_cprof)
138 CFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
139                 $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
140 CXXFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
141                 $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
142 OBJCFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
143                 $(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
144
145 ###############################################################################
146 # Headers
147 ###############################################################################
148
149 BUILT_SOURCES += \
150         include/vlc_symbols.h \
151         src/misc/modules_builtin.h \
152         src/misc/modules_plugin.h \
153         $(NULL)
154
155 pkgincludedir = $(includedir)/vlc
156
157 dist_pkginclude_HEADERS = \
158         include/vlc/vlc.h \
159         include/vlc/aout.h \
160         include/vlc/vout.h \
161         include/vlc/sout.h \
162         include/vlc/decoder.h \
163         include/vlc/input.h \
164         include/vlc/intf.h \
165         $(NULL)
166
167 noinst_HEADERS += $(HEADERS_include) $(HEADERS_include_built)
168
169 HEADERS_include = \
170         include/aout_internal.h \
171         include/audio_output.h \
172         include/beos_specific.h \
173         include/configuration.h \
174         include/darwin_specific.h \
175         include/codecs.h \
176         include/error.h \
177         include/encoder.h \
178         include/input_ext-dec.h \
179         include/input_ext-intf.h \
180         include/input_ext-plugins.h \
181         include/interface.h \
182         include/intf_eject.h \
183         include/iso_lang.h \
184         include/httpd.h \
185         include/main.h \
186         include/mmx.h \
187         include/modules.h \
188         include/modules_inner.h \
189         include/mtime.h \
190         include/netutils.h \
191         include/network.h \
192         include/os_specific.h \
193         include/stream_control.h \
194         include/stream_output.h \
195         include/variables.h \
196         include/video.h \
197         include/video_output.h \
198         include/vlc_common.h \
199         include/vlc_config.h \
200         include/vlc_cpu.h \
201         include/vlc_messages.h \
202         include/vlc_objects.h \
203         include/vlc_playlist.h \
204         include/vlc_threads.h \
205         include/vlc_threads_funcs.h \
206         include/win32_specific.h \
207         include/osd.h \
208         $(NULL)
209
210 HEADERS_include_built = \
211         include/vlc_symbols.h \
212         $(NULL)
213
214 include/vlc_symbols.h: Makefile $(HEADERS_include)
215         ./toolbox --update-includes $(BUILTINS)
216
217 src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
218         ./toolbox --update-includes $(BUILTINS)
219
220 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
221         ./toolbox --update-includes $(BUILTINS)
222
223 # These dependencies are mandatory
224 $(SOURCES): include/vlc_symbols.h
225 $(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl)
226
227 ###############################################################################
228 # Optional libintl - FIXME, bad dependencies
229 ###############################################################################
230
231 intl/libintl.a: FORCE
232         cd intl && $(MAKE)
233
234 if BUILD_INTL
235 LIB_intl = intl/libintl.a
236 endif
237
238 ###############################################################################
239 # MacOS X project
240 ###############################################################################
241
242 EXTRA_DIST += \
243         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
244         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
245         extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib \
246         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
247         extras/MacOSX/Resources/divx.icns \
248         extras/MacOSX/Resources/generic.icns \
249         extras/MacOSX/Resources/mpeg.icns \
250         extras/MacOSX/Resources/mpeg1.icns \
251         extras/MacOSX/Resources/mpeg2.icns \
252         extras/MacOSX/Resources/mpeg4.icns \
253         extras/MacOSX/Resources/vlc.icns \
254         extras/MacOSX/Resources/back.png \
255         extras/MacOSX/Resources/begin.png \
256         extras/MacOSX/Resources/end.png \
257         extras/MacOSX/Resources/forw.png \
258         extras/MacOSX/Resources/list.png \
259         extras/MacOSX/Resources/pause.png \
260         extras/MacOSX/Resources/play.png \
261         extras/MacOSX/Resources/prefs.png \
262         extras/MacOSX/Resources/slow.png \
263         extras/MacOSX/Resources/stop.png \
264         extras/MacOSX/Resources/vlc_hg.png \
265         extras/MacOSX/Resources/vlc.scriptSuite \
266         extras/MacOSX/Resources/English.lproj/vlc.scriptTerminology \
267         extras/MacOSX/vlc.pbproj/project.pbxproj \
268         extras/MacOSX/macosx-dmg \
269         $(NULL)
270
271 ###############################################################################
272 # MS Visual Studio and eMbedded Visual Studio projects
273 ###############################################################################
274
275 EXTRA_DIST += \
276         msvc/vlc.dsw \
277         msvc/libvlc.dsp.in \
278         msvc/plugins.dsp.in \
279         msvc/vlc.dsp.in \
280         msvc/config.h.in \
281         msvc/modules_builtin_msvc.h \
282         evc/vlc.vcw \
283         evc/libvlc.vcp.in \
284         evc/vlc.vcp.in \
285         evc/plugins.vcp.in \
286         evc/vlc.c \
287         evc/config.h.in \
288         evc/modules_builtin_evc.h \
289         $(NULL)
290
291 show-libvlc-sources: FORCE
292         @echo X: $(SOURCES_libvlc_common) $(SOURCES_libvlc_win32) $(SOURCES_libvlc_dirent) $(SOURCES_libvlc_getopt)
293
294 show-libvlc-headers: FORCE
295         @echo X: $(HEADERS_include) $(HEADERS_include_built)
296
297 show-libvlc-pkg-headers: FORCE
298         @echo X: $(dist_pkginclude_HEADERS)
299
300 ###############################################################################
301 # Building libvlc
302 ###############################################################################
303
304 bin_SCRIPTS = vlc-config
305
306 lib_LIBRARIES += lib/libvlc.a $(LIBRARIES_libvlc_pic)
307
308 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
309 lib_libvlc_a_CFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CFLAGS_default) @CFLAGS_vlc@
310 lib_libvlc_a_CXXFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CXXFLAGS_default)
311 lib_libvlc_a_OBJCFLAGS = $(CPPFLAGS_default) -D__VLC__ $(OBJCFLAGS_default)
312
313 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
314 lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
315 lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
316 lib_libvlc_pic_a_OBJCFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(OBJCFLAGS_pic)
317
318 if HAVE_BEOS
319 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
320 endif
321 if HAVE_DARWIN
322 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
323 endif
324 if HAVE_WIN32
325 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
326 endif
327 if BUILD_DIRENT
328 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
329 endif
330 if BUILD_GETOPT
331 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
332 endif
333 if BUILD_MOZILLA
334 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
335 endif
336
337 EXTRA_DIST += \
338         $(SOURCES_libvlc_beos) \
339         $(SOURCES_libvlc_darwin) \
340         $(SOURCES_libvlc_win32) \
341         $(SOURCES_libvlc_dirent) \
342         $(SOURCES_libvlc_getopt) \
343         $(NULL)
344
345 SOURCES_libvlc_beos = \
346         src/misc/beos_specific.cpp \
347         $(NULL)
348
349 SOURCES_libvlc_darwin = \
350         src/misc/darwin_specific.m \
351         $(NULL)
352
353 SOURCES_libvlc_win32 = \
354         src/misc/win32_specific.c \
355         $(NULL)
356
357 SOURCES_libvlc_dirent = \
358         src/extras/dirent.c \
359         src/extras/dirent.h \
360         $(NULL)
361
362 SOURCES_libvlc_getopt = \
363         src/extras/getopt.c \
364         src/extras/getopt.h \
365         src/extras/getopt1.c \
366         $(NULL)
367
368 SOURCES_libvlc_common = \
369         src/libvlc.c \
370         src/libvlc.h \
371         src/interface/interface.c \
372         src/interface/intf_eject.c \
373         src/playlist/playlist.c \
374         src/input/input.c \
375         src/input/input_ext-plugins.c \
376         src/input/input_ext-dec.c \
377         src/input/input_ext-intf.c \
378         src/input/input_dec.c \
379         src/input/input_programs.c \
380         src/input/input_clock.c \
381         src/input/input_info.c \
382         src/video_output/video_output.c \
383         src/video_output/vout_pictures.c \
384         src/video_output/vout_pictures.h \
385         src/video_output/video_text.c \
386         src/video_output/video_text.h \
387         src/video_output/vout_subpictures.c \
388         src/audio_output/common.c \
389         src/audio_output/dec.c \
390         src/audio_output/filters.c \
391         src/audio_output/input.c \
392         src/audio_output/mixer.c \
393         src/audio_output/output.c \
394         src/audio_output/intf.c \
395         src/stream_output/stream_output.c \
396         src/misc/mtime.c \
397         src/misc/modules.c \
398         src/misc/threads.c \
399         src/misc/cpu.c \
400         src/misc/configuration.c \
401         src/misc/netutils.c \
402         src/misc/iso_lang.c \
403         src/misc/iso-639_def.h \
404         src/misc/messages.c \
405         src/misc/objects.c \
406         src/misc/variables.c \
407         src/misc/error.c \
408         src/extras/libc.c \
409         $(NULL)
410
411 SOURCES_libvlc = \
412         $(SOURCES_libvlc_common) \
413         $(OPT_SOURCES_libvlc_beos) \
414         $(OPT_SOURCES_libvlc_darwin) \
415         $(OPT_SOURCES_libvlc_win32) \
416         $(OPT_SOURCES_libvlc_dirent) \
417         $(OPT_SOURCES_libvlc_getopt) \
418         $(NULL)
419
420 ###############################################################################
421 # Building vlc
422 ###############################################################################
423
424 bin_PROGRAMS += vlc
425
426 vlc_SOURCES = src/vlc.c
427
428 # @AUTOMAKE_SUCKS@ gets expanded to $(L_builtin) $(LDFLAGS_builtin)
429 # but we don't write it directly, otherwise automake will go amok and eat all
430 # the memory because of its 2^N crap algorithm. So we fool him. Nuahaha.
431 vlc_LDADD = lib/libvlc.a $(LDFLAGS_vlc) \
432             $(DATA_win32_rc) $(LIB_intl) @AUTOMAKE_SUCKS@
433 vlc_CFLAGS = $(CPPFLAGS_default) $(CFLAGS_default)
434
435 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
436 # old automake-1.5 bug (automake/279).
437 DEPENDENCIES_vlc = lib/libvlc.a $(L_builtin) $(DATA_win32_rc) $(LIB_intl)
438
439 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
440         @rm -f vlc$(EXEEXT)
441         $(LINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS)
442 if HAVE_BEOS
443         xres -o $@ ./share/vlc_beos.rsrc
444         mimeset -f $@
445 endif
446
447 # Install the symlinks
448 install-exec-local:
449         for i in dummy $(ALIASES) ; do if test "x$$i" != "xdummy" ; then \
450                 rm -f $(DESTDIR)$(bindir)/$$i && \
451                 ln -s vlc $(DESTDIR)$(bindir)/$$i ; \
452         fi ; done
453
454 if HAVE_DARWIN
455 # Create the MacOS X app
456 vlc_app_DATA = VLC.app
457 vlc_appdir = $(bindir)
458 VLC.app: vlc $(PLUGIN_FILES)
459         rm -Rf VLC.app
460         cd extras/MacOSX ; pbxbuild | grep -v '^[ \t]' | grep -v "^$$"
461         cp -r extras/MacOSX/build/vlc.bundle ./VLC.app
462         $(INSTALL) -d VLC.app/Contents/MacOS
463         $(INSTALL) vlc VLC.app/Contents/MacOS/VLC
464         $(INSTALL) -d VLC.app/Contents/MacOS/modules
465         for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
466                 $(INSTALL) $$i VLC.app/Contents/MacOS/modules/ ; \
467         fi ; done
468         $(INSTALL) -d VLC.app/Contents/MacOS/share
469         $(INSTALL) -m 644 share/*.psf share/*.rle VLC.app/Contents/MacOS/share
470         $(INSTALL) -d VLC.app/Contents/MacOS/locale
471         for i in $(ALL_LINGUAS); do \
472                 mkdir -p VLC.app/Contents/MacOS/locale/$${i%}/LC_MESSAGES ; \
473                 cp po/$${i}.gmo VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
474         done
475         echo -n "APPLVLC#" >| VLC.app/Contents/PkgInfo
476 endif
477
478 if HAVE_WIN32
479 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
480 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
481 noinst_share_vlc_win32_rcdir = $(libdir)
482 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
483         $(WINDRES) --include-dir share -i $< -o $@
484 endif
485
486 ###############################################################################
487 # Building architecture-specific binary packages
488 ###############################################################################
489
490 # XXX: this rule is probably only useful to you if you have exactly
491 # the same setup as me. Contact sam@zoy.org if you need to use it.
492 #
493 # Check that tmp isn't in the way
494 package-win32:
495         @if test -e tmp; then \
496                 echo "Error: please remove ./tmp, it is in the way"; false; \
497         else \
498                 echo "OK."; mkdir tmp; \
499         fi
500 # Create installation script
501         cp install-win32 tmp/nsi
502 # Copy relevant files
503         cp vlc.exe tmp/ 
504         $(STRIP) tmp/vlc.exe
505         cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
506         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
507                         do cp $$file tmp/$${file}.txt ; \
508                         unix2dos tmp/$${file}.txt ; done
509
510         mkdir tmp/plugins
511         for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
512                 $(INSTALL) $$i tmp/plugins/ ; \
513         fi ; done
514
515         for i in dummy tmp/plugins/*$(LIBEXT) ; \
516                 do if test $$i != tmp/plugins/libwin32_plugin$(LIBEXT) \
517                 -a $$i != dummy ; then $(STRIP) $$i ; fi ; done
518         mkdir tmp/share
519         cp share/*.rle tmp/share/ ;
520
521         mkdir tmp/locale
522         for i in $(ALL_LINGUAS); do \
523                 mkdir -p tmp/locale/$${i}/LC_MESSAGES ; \
524                 cp po/$${i}.gmo tmp/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
525         done
526
527         cd doc/faq ; $(MAKE) html ; cd ../.. ;
528         cp doc/faq/index.html tmp/FAQ.htm ;
529
530 # Create package 
531         wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} tmp/nsi
532 # Clean up
533         rm -Rf tmp
534
535 package-beos:
536 # Check that tmp isn't in the way
537         @if test -e tmp; then \
538                 echo "Error: please remove ./tmp, it is in the way"; false; \
539         else \
540                 echo "OK."; mkdir tmp; \
541         fi
542         
543 # Create dir
544         mkdir -p tmp/vlc/share
545 # Copy relevant files
546         cp vlc tmp/vlc/
547         $(STRIP) tmp/vlc/vlc
548         xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
549         cp AUTHORS COPYING ChangeLog README THANKS NEWS tmp/vlc/
550         for file in default8x16.psf default8x9.psf ; \
551                 do cp share/$$file tmp/vlc/share/ ; done
552         mkdir tmp/vlc/plugins
553         for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \
554                 $(INSTALL) $$i tmp/vlc/plugins/ ; \
555         fi ; done
556         for i in dummy tmp/vlc/plugins/*$(LIBEXT) ; do if test $$i != dummy ; then $(STRIP) $$i ; fi ; done
557 # Create package 
558         mv tmp/vlc tmp/vlc-${VERSION}
559         (cd tmp ; find vlc-${VERSION} | \
560         zip -9 -@ vlc-${VERSION}-BeOS-x86.zip )
561         mv tmp/vlc-${VERSION}-BeOS-x86.zip .
562 # Clean up
563         rm -Rf tmp
564
565 package-macosx:
566 # Check that tmp isn't in the way
567         @if test -e tmp; then \
568                 echo "Error: please remove ./tmp, it is in the way"; false; \
569         else \
570                 echo "OK."; mkdir tmp; \
571         fi
572
573 # Copy relevant files 
574         cp -R VLC.app tmp/
575         cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS tmp/
576
577 # Create disk image 
578         ./extras/MacOSX/macosx-dmg 18 "vlc-${VERSION}" tmp/* 
579
580 # Clean up
581         rm -Rf tmp
582
583 ###############################################################################
584 # Building the Mozilla plugin
585 ###############################################################################
586
587 noinst_LIBRARIES += $(noinst_LIBRARIES_mozilla)
588
589 MOSTLYCLEANFILES += $(LIBRARIES_mozilla)
590
591 EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl
592
593 BUILT_SOURCES += $(BUILT_SOURCES_mozilla)
594
595 SOURCES_mozilla = \
596         mozilla/vlcshell.cpp \
597         mozilla/vlcplugin.cpp \
598         mozilla/vlcplugin.h \
599         mozilla/vlcpeer.cpp \
600         mozilla/vlcpeer.h \
601         mozilla/classinfo.h \
602         $(SOURCES_mozilla_win32) \
603         $(SOURCES_mozilla_unix) \
604         $(NULL)
605
606 # Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
607 # the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
608 # under Win32 and npunix.c under Unix.
609 if HAVE_WIN32
610 LIBRARIES_mozilla = mozilla/npvlc$(LIBEXT)
611 SOURCES_mozilla_win32 = mozilla/npwin.cpp
612 CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
613 else
614 LIBRARIES_mozilla = mozilla/libvlcplugin$(LIBEXT)
615 SOURCES_mozilla_unix = mozilla/npunix.c
616 endif
617
618 if BUILD_MOZILLA
619 if UNTRUE
620 noinst_LIBRARIES_mozilla = mozilla/libplugin.a
621 endif
622
623 mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
624 mozilla_libplugin_a_CFLAGS = $(CPPFLAGS_pic) $(CFLAGS_pic) \
625                              $(CPPFLAGS_mozilla) $(CFLAGS_mozilla) \
626                              $(CPPFLAGS_mozilla_EXTRA)
627 mozilla_libplugin_a_CXXFLAGS = $(CPPFLAGS_pic) $(CXXFLAGS_pic) \
628                                $(CPPFLAGS_mozilla) $(CXXFLAGS_mozilla) \
629                                $(CPPFLAGS_mozilla_EXTRA)
630 mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(L_builtin_pic) $(DATA_npvlc_rc)
631
632 BUILT_SOURCES_mozilla = mozilla/vlcintf.h
633 $(SOURCES_mozilla): mozilla/vlcintf.h
634
635 mozilla_plugin_DATA = $(LIBRARIES_mozilla)
636 mozilla_plugindir = $(libdir)/mozilla/plugins
637 $(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \
638                       $(mozilla_libplugin_a_DEPENDENCIES) \
639                       $(L_builtin_pic)
640         $(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
641                 lib/libvlc_pic.a $(L_builtin_pic) -shared $(LDFLAGS) \
642                 $(LDFLAGS_vlc) $(LDFLAGS_mozilla) $(LDFLAGS_builtin_pic)
643
644 mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
645 mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
646 mozilla/vlcintf.xpt: Makefile mozilla/vlcintf.idl
647         $(XPIDL) -I/usr/share/idl/mozilla -m typelib \
648                 -o mozilla/vlcintf mozilla/vlcintf.idl
649
650 mozilla/vlcintf.h: Makefile mozilla/vlcintf.idl
651         $(XPIDL) -I/usr/share/idl/mozilla -m header \
652                 -o mozilla/vlcintf mozilla/vlcintf.idl
653
654 if HAVE_WIN32
655 DATA_npvlc_rc = $(noinst_mozilla_npvlc_rc_DATA)
656 noinst_mozilla_npvlc_rc_DATA = mozilla/npvlc_rc.$(OBJEXT)
657 noinst_mozilla_npvlc_rcdir = $(libdir)
658 mozilla/npvlc_rc.$(OBJEXT): mozilla/npvlc_rc.rc
659         $(WINDRES) --include-dir mozilla -i $< -o $@
660 endif
661 endif
662
663 ###############################################################################
664 # Modules
665 ###############################################################################
666 MOSTLYCLEANFILES += $(PLUGIN_FILES)
667 PLUGIN_FILES =
668
669 libvlcdir = $(libdir)/vlc
670
671 include Modules.am
672
673 ###############################################################################
674 # Force rule
675 ###############################################################################
676 FORCE: