# 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 = \
vlc-config.in.in \
vlc.ebuild \
vlc.spec \
- vlc.spec.redhat \
+ vlc.spec.mdk \
$(NULL)
BUILT_SOURCES =
$(NULL)
include/vlc_symbols.h: Makefile $(HEADERS_include)
- $(srcdir)/toolbox --update-includes
+ srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
- $(srcdir)/toolbox --update-includes
+ srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
- $(srcdir)/toolbox --update-includes
+ srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
# These dependencies are mandatory
$(SOURCES): include/vlc_symbols.h
dist-hook:
mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
- cd $(distdir) && $(srcdir)/toolbox --update-vc
+ cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
###############################################################################
# Building libvlc
# Install the modules and the symlinks
install-exec-local:
for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
- echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`" ; \
- $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`" ; \
+ echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
+ $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
fi ; done
- for i in "" `$(VLC_CONFIG) --target builtin` `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
+ for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
$(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
fi ; done
+if BUILD_MOZILLA
+ for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
+ echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
+ $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
+ fi ; done
+endif
for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
rm -f "$(DESTDIR)$(bindir)/$$i" && \
ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
noinst_share_vlc_win32_rcdir = $(libdir)
share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
- $(WINDRES) --include-dir $(srcdir)/share -i $< -o $@
+ $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir)/share -i $< -o $@
endif
###############################################################################
# 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 -m typelib \
- -o mozilla/vlcintf $(srcdir)/mozilla/vlcintf.idl
-
-mozilla/vlcintf.h: mozilla/vlcintf.idl
- $(XPIDL) -I/usr/share/idl/mozilla -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
###############################################################################
-clean: clean-stamps
+clean: clean-stamp
clean-stamp:
- rm -f stamp-builtin stamp-pic
+ rm -f stamp-builtin
stamp-builtin: FORCE
@for dep in "" `$(VLC_CONFIG) --target builtin`; do \
done
@if test ! -f $@; then printf "" > $@; fi
-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
###############################################################################