#! /bin/sh
## bootstrap file for the VLC media player
-## $Id: bootstrap,v 1.72 2003/10/07 21:13:01 sam Exp $
+## $Id: bootstrap,v 1.73 2003/10/20 10:37:56 gbazin Exp $
##
## Authors: Sam Hocevar <sam@zoy.org>
libvlcdir = \$(libdir)/vlc/${basedir}
include Modules.am
+if HAVE_WIN32
+# There's no need for pic code on win32 so get rid of this to substantially
+# reduce the compilation time.
+pic = no
+endif
+
clean: clean-local
clean-local:
-rm -f *.a *.so *.dll *.sl *.dylib
LIBRARIES_mozilla = npvlc$(LIBEXT)
SOURCES_win32 = support/npwin.cpp
CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
+LIBRARIES_libvlc = $(top_builddir)/lib/libvlc.a
else
if HAVE_DARWIN
# We don't define LIBRARIES_mozilla because we'll be using project builder, or not...
vlc_moz_FLAGS = `$(VLC_CONFIG) --libs vlc builtin pic mozilla`
moz_CFLAGS = `$(MOZILLA_CONFIG) --cflags plugin java nspr/obsolete nspr oji xpcom xpconnect`
moz_plugin_FLAGS = -I$(srcdir)/../include -c -F/System/Library/Frameworks/CoreFoundation.framework $(moz_CFLAGS) -I/Developer/Headers/FlatCarbon -arch ppc -fno-common -fpascal-strings -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -DXP_MACOSX=1 -DNO_X11=1 -DUSE_SYSTEM_CONSOLE=1 -pipe -fmessage-length=0 -g -include mozilla-config.h
+pic = pic
+LIBRARIES_libvlc = $(top_builddir)/lib/libvlc_pic.a
else
LIBRARIES_mozilla = libvlcplugin$(LIBEXT)
SOURCES_unix = support/npunix.c
+pic = pic
+LIBRARIES_libvlc = $(top_builddir)/lib/libvlc_pic.a
endif
endif
endif
libplugin_a_SOURCES = $(SOURCES_mozilla)
-libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
+libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla $(pic)` \
$(CPPFLAGS_mozilla_EXTRA) -Imozilla
-libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
+libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla $(pic)` \
$(CPPFLAGS_mozilla_EXTRA) -Imozilla
libplugin_a_DEPENDENCIES = $(DATA_npvlc_rc)
$(LIBRARIES_mozilla): $(libplugin_a_OBJECTS) \
$(libplugin_a_DEPENDENCIES) stamp-pic
$(CXXLINK) $(libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
- $(top_builddir)/lib/libvlc_pic.a -shared \
- `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
+ $(LIBRARIES_libvlc) -shared \
+ `$(VLC_CONFIG) --libs vlc mozilla builtin $(pic)`
vlcintf_xpt_DATA = vlcintf.xpt
vlcintf_xptdir = $(libdir)/mozilla/components
/usr/bin/g++3 $(moz_plugin_FLAGS) $(srcdir)/vlcshell.cpp -o $(srcdir)/libplugin_a-vlcshell.o
/usr/bin/g++3 $(moz_plugin_FLAGS) $(srcdir)/vlcpeer.cpp -o $(srcdir)/libplugin_a-vlcpeer.o
/usr/bin/g++3 $(moz_plugin_FLAGS) $(srcdir)/support/npmac.cpp -o $(srcdir)/libplugin_a-npmac.o
- /usr/bin/g++3 $(srcdir)/libplugin_a-vlcplugin.o $(srcdir)/libplugin_a-vlcshell.o $(srcdir)/libplugin_a-vlcpeer.o $(srcdir)/libplugin_a-npmac.o -o $(srcdir)/VLC\ Plugin.plugin/Contents/MacOS/VLC\ Plugin -L/usr/lib -F/System/Library/Frameworks/CoreFoundation.framework -framework CoreFoundation -arch ppc -bundle -read_only_relocs suppress $(top_srcdir)/lib/libvlc_pic.a -dylib $(vlc_moz_FLAGS)
+ /usr/bin/g++3 $(srcdir)/libplugin_a-vlcplugin.o $(srcdir)/libplugin_a-vlcshell.o $(srcdir)/libplugin_a-vlcpeer.o $(srcdir)/libplugin_a-npmac.o -o $(srcdir)/VLC\ Plugin.plugin/Contents/MacOS/VLC\ Plugin -L/usr/lib -F/System/Library/Frameworks/CoreFoundation.framework -framework CoreFoundation -arch ppc -bundle -read_only_relocs suppress $(LIBRARIES_libvlc) -dylib $(vlc_moz_FLAGS)
cp $(top_srcdir)/extras/MacOSX/plugin/Info.plist $(srcdir)/VLC\ Plugin.plugin/Contents/Info.plist
cp $(top_srcdir)/extras/MacOSX/plugin/pbdevelopment.plist $(srcdir)/VLC\ Plugin.plugin/Contents/pbdevelopment.plist
cp -r $(top_srcdir)/extras/MacOSX/plugin/English.lproj $(srcdir)/VLC\ Plugin.plugin/Contents/Resources/
rm -f stamp-pic
stamp-pic: FORCE
- @for dep in "" `$(VLC_CONFIG) --target builtin pic`; do \
+ @for dep in "" `$(VLC_CONFIG) --target builtin $(pic)`; do \
if test "$${dep}" -nt "$(LIBRARIES_mozilla)"; then \
rm -f $@; \
break; \