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