]> git.sesse.net Git - vlc/commitdiff
* mozilla/Makefile.am: Moved mozilla plugin generation directives here.
authorSam Hocevar <sam@videolan.org>
Thu, 17 Jul 2003 12:06:10 +0000 (12:06 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 17 Jul 2003 12:06:10 +0000 (12:06 +0000)
  * configure.ac: Propagate $(top_srcdir) to the vlc-config call.

Makefile.am
configure.ac
mozilla/.cvsignore
mozilla/Makefile.am [new file with mode: 0644]
vlc-config.in.in

index b1517ddf230730ec7a1d4a23acdb35ac7595bc0b..a5b1ac53d99ced74ffcdb0a76221769745775842 100644 (file)
@@ -7,7 +7,7 @@ NULL =
 # SUBDIRS stores the directories where a "make" is required when building
 # something. DIST_SUBDIRS stores the directories where nothing is built but
 # which have makefiles with distribution information.
-SUBDIRS = intl modules . share po m4
+SUBDIRS = intl modules mozilla . share po m4
 DIST_SUBDIRS = $(SUBDIRS) src debian doc ipkg lib autotools
 
 EXTRA_DIST = \
@@ -565,89 +565,6 @@ package-macosx:
 # Clean up
        rm -Rf $(srcdir)/tmp
 
-###############################################################################
-# Building the Mozilla plugin
-###############################################################################
-
-noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
-
-MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
-
-EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl
-
-BUILT_SOURCES += $(BUILT_SOURCES_mozilla)
-
-SOURCES_mozilla = \
-       mozilla/vlcshell.cpp \
-       mozilla/vlcplugin.cpp \
-       mozilla/vlcplugin.h \
-       mozilla/vlcpeer.cpp \
-       mozilla/vlcpeer.h \
-       mozilla/support/classinfo.h \
-       $(SOURCES_mozilla_win32) \
-       $(SOURCES_mozilla_macosx) \
-       $(SOURCES_mozilla_unix) \
-       $(NULL)
-
-# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
-# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
-# under Win32 and npunix.c under Unix.
-if HAVE_WIN32
-LIBRARIES_mozilla = mozilla/npvlc$(LIBEXT)
-SOURCES_mozilla_win32 = mozilla/support/npwin.cpp
-CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
-else
-if HAVE_DARWIN
-# We don't define LIBRARIES_mozilla because we'll be using project builder
-SOURCES_mozilla_macosx = mozilla/support/npmac.cpp
-else
-LIBRARIES_mozilla = mozilla/libvlcplugin$(LIBEXT)
-SOURCES_mozilla_unix = mozilla/support/npunix.c
-endif
-endif
-
-if BUILD_MOZILLA
-if UNTRUE
-noinst_LIBRARIES_mozilla = mozilla/libplugin.a
-endif
-
-mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
-mozilla_libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
-                             $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
-                               $(CPPFLAGS_mozilla_EXTRA) -Imozilla
-mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(DATA_npvlc_rc)
-
-BUILT_SOURCES_mozilla = mozilla/vlcintf.h
-$(SOURCES_mozilla): mozilla/vlcintf.h
-
-mozilla_plugin_DATA = $(LIBRARIES_mozilla)
-mozilla_plugindir = $(libdir)/mozilla/plugins
-$(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \
-                      $(mozilla_libplugin_a_DEPENDENCIES) stamp-pic
-       $(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
-         lib/libvlc_pic.a -shared \
-         `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
-
-mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
-mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
-mozilla/vlcintf.xpt: mozilla/vlcintf.idl
-       $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
-         -m typelib -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-mozilla/vlcintf.h: mozilla/vlcintf.idl
-       $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
-         -m header -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-if HAVE_WIN32
-DATA_npvlc_rc = $(noinst_mozilla_npvlc_rc_DATA)
-noinst_mozilla_npvlc_rc_DATA = mozilla/npvlc_rc.$(OBJEXT)
-noinst_mozilla_npvlc_rcdir = $(libdir)
-mozilla/npvlc_rc.$(OBJEXT): mozilla/npvlc_rc.rc
-       $(WINDRES) --include-dir $(srcdir)/mozilla -i $< -o $@
-endif
-endif
-
 ###############################################################################
 # Stamp rules
 ###############################################################################
index cbddc503d4922e066cb77992ad187c3743e7a614..b22ca3d7af00730f7278f92215f6b91f31c2b4a4 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.31 2003/07/16 16:06:56 sam Exp $
+dnl $Id: configure.ac,v 1.32 2003/07/17 12:06:10 sam Exp $
 
 AC_INIT(vlc,0.6.0)
 
@@ -3193,7 +3193,7 @@ AC_SUBST(PLUGIN_PATH)
 dnl
 dnl  Handle substvars that use $(top_srcdir)
 dnl
-VLC_CONFIG="\$(top_builddir)/vlc-config"
+VLC_CONFIG="top_srcdir=\"\$(top_srcdir)\" \$(top_builddir)/vlc-config"
 AC_SUBST(VLC_CONFIG)
 CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"
 
@@ -3239,6 +3239,7 @@ AC_OUTPUT([
   ipkg/Makefile
   lib/Makefile
   modules/Makefile
+  mozilla/Makefile
   m4/Makefile
   po/Makefile.in
   share/Makefile
index 2a098b94559112e2344d94cc94a5e5826badd15f..74886422925d3d790b01cc288a9a2d3ecb5a8694 100644 (file)
@@ -1,5 +1,12 @@
+.deps
+.dirstamp
+*.lo
+*.la
 *.dll
+*.dylib
+*.sl
+*.so
+Makefile.in
+Makefile
 vlcintf.h
 vlcintf.xpt
-.deps
-.dirstamp
diff --git a/mozilla/Makefile.am b/mozilla/Makefile.am
new file mode 100644 (file)
index 0000000..7737bf2
--- /dev/null
@@ -0,0 +1,101 @@
+###############################################################################
+# Building the Mozilla plugin
+###############################################################################
+
+noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
+                                            
+MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
+EXTRA_DIST = $(SOURCES_mozilla) vlcintf.idl
+BUILT_SOURCES = $(BUILT_SOURCES_mozilla)
+
+SOURCES_mozilla = \
+       vlcshell.cpp \
+       vlcplugin.cpp \
+       vlcplugin.h \
+       vlcpeer.cpp \
+       vlcpeer.h \
+       support/classinfo.h \
+       $(SOURCES_win32) \
+       $(SOURCES_macosx) \
+       $(SOURCES_unix) \
+       $(NULL)
+
+# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
+# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
+# under Win32 and npunix.c under Unix.
+if HAVE_WIN32
+LIBRARIES_mozilla = npvlc$(LIBEXT)
+SOURCES_win32 = support/npwin.cpp
+CPPFLAGS_mozilla_EXTRA = -DXP_WIN -DXP_WIN32
+else
+if HAVE_DARWIN
+# We don't define LIBRARIES_mozilla because we'll be using project builder
+SOURCES_macosx = support/npmac.cpp
+else
+LIBRARIES_mozilla = libvlcplugin$(LIBEXT)
+SOURCES_unix = support/npunix.c
+endif
+endif
+
+if BUILD_MOZILLA
+if UNTRUE
+noinst_LIBRARIES_mozilla = libplugin.a
+endif
+
+libplugin_a_SOURCES = $(SOURCES_mozilla)
+libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
+                    $(CPPFLAGS_mozilla_EXTRA) -Imozilla
+libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
+                      $(CPPFLAGS_mozilla_EXTRA) -Imozilla
+libplugin_a_DEPENDENCIES = $(DATA_npvlc_rc)
+
+BUILT_SOURCES_mozilla = vlcintf.h
+$(SOURCES_mozilla): vlcintf.h
+
+plugin_DATA = $(LIBRARIES_mozilla)
+plugindir = $(libdir)/mozilla/plugins
+$(LIBRARIES_mozilla): $(libplugin_a_OBJECTS) \
+                     $(libplugin_a_DEPENDENCIES) $(top_builddir)/stamp-pic
+       $(CXXLINK) $(libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
+         $(top_builddir)/lib/libvlc_pic.a -shared \
+         `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
+
+vlcintf_xpt_DATA = vlcintf.xpt
+vlcintf_xptdir = $(libdir)/mozilla/components
+vlcintf.xpt: vlcintf.idl
+       $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
+         -m typelib -o vlcintf $(srcdir)/vlcintf.idl
+
+vlcintf.h: vlcintf.idl
+       $(XPIDL) -I/usr/share/idl/mozilla -I/usr/lib/mozilla/include/idl \
+         -m header -o vlcintf $(srcdir)/vlcintf.idl
+
+if HAVE_WIN32
+DATA_npvlc_rc = $(noinst_npvlc_rc_DATA)
+noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT)
+noinst_npvlc_rcdir = $(libdir)
+npvlc_rc.$(OBJEXT): npvlc_rc.rc
+       $(WINDRES) --include-dir $(srcdir)/mozilla -i $< -o $@
+endif
+endif
+
+###############################################################################
+# Stamp rules
+###############################################################################
+clean: clean-stamp
+clean-stamp:
+       rm -f stamp-pic
+
+stamp-pic: FORCE
+       @for dep in "" `$(VLC_CONFIG) --target builtin pic`; do \
+         if test "$${dep}" -nt "$(LIBRARIES_mozilla)"; then \
+           rm -f $@; \
+           break; \
+         fi; \
+       done
+       @if test ! -f $@; then printf "" > $@; fi
+
+###############################################################################
+# Force rule
+###############################################################################
+FORCE:
index ac1aba49a8d57371bd1437e39f91bd11bcd74f2b..c437224300e1676a43c9071095091c13e0791cf1 100644 (file)
@@ -77,9 +77,12 @@ fi
 #  No need to include the default @*FLAGS@ values here because they are
 #  automatically added when using $(COMPILE), $(CXXCOMPILE) or $(OBJCCOMPILE)
 #
-if test "@includedir@" != /usr/include ; then
+if test "@includedir@" != "/usr/include"; then
   includes="-I@includedir@"
 fi
+if test "${top_srcdir}" != ""; then
+  top_srcdir="${top_srcdir}/"
+fi
 cppflags="${includes}"
 libs="-L@libdir@"
 module=""
@@ -243,7 +246,7 @@ if test "${echo_target}" = yes; then
     for module in `echo "${plugins}"`; do
       register_targets "${module}"
     done
-    for target in `echo "${list}"`; do printf "modules/${target}_plugin "; done
+    for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_plugin "; done
     printf '\n'
   fi
   if test "${echo_builtin}" = yes; then
@@ -251,9 +254,9 @@ if test "${echo_target}" = yes; then
       register_targets "${module}"
     done
     if test "${echo_pic}" = yes; then
-      for target in `echo "${list}"`; do printf "modules/${target}_pic.a "; done
+      for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_pic.a "; done
     else
-      for target in `echo "${list}"`; do printf "modules/${target}.a "; done
+      for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}.a "; done
     fi
     printf '\n'
   fi
@@ -285,9 +288,9 @@ if test "${echo_libs}" = yes; then
       register_flags "${module}"
     done
     if test "${echo_pic}" = yes; then
-      for target in `echo "${list}"`; do printf "modules/${target}_pic.a "; done
+      for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}_pic.a "; done
     else
-      for target in `echo "${list}"`; do printf "modules/${target}.a "; done
+      for target in `echo "${list}"`; do printf "${top_srcdir}modules/${target}.a "; done
     fi
   fi
   echo "${libs} ${ldflags}"