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