X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=projects%2Fmozilla%2FMakefile.am;h=6d1bc6fdce10a76ef4ead034b67177e43c4117eb;hb=23cf54912df16d0742f39ab575505833459266a0;hp=e17431ad082731146466bb6a430bdcdced75e090;hpb=a82cb9cd0e154c9d0846ade9113f65b80683a40f;p=vlc diff --git a/projects/mozilla/Makefile.am b/projects/mozilla/Makefile.am index e17431ad08..6d1bc6fdce 100644 --- a/projects/mozilla/Makefile.am +++ b/projects/mozilla/Makefile.am @@ -4,16 +4,15 @@ MOSTLYCLEANFILES = CLEANFILES = $(BUILT_SOURCES) -EXTRA_DIST = $(DIST_sources) install.js npvlc_rc.rc vlc.r +EXTRA_DIST = $(DIST_sources) npvlc_rc.rc.in COPYING SOURCES_mozilla_common = \ vlcshell.cpp \ + vlcshell.h \ vlcplugin.cpp \ vlcplugin.h \ control/npolibvlc.cpp \ control/npolibvlc.h \ - control/npovlc.cpp \ - control/npovlc.h \ control/nporuntime.cpp \ control/nporuntime.h \ support/classinfo.h @@ -23,8 +22,8 @@ DIST_sources = $(SOURCES_mozilla_common) \ if BUILD_MOZILLA -LIBRARIES_libvlc = $(top_builddir)/src/libvlc-control.la \ - $(top_builddir)/src/libvlc.la +LIBRARIES_libvlc = $(top_builddir)/src/libvlc.la \ + $(top_builddir)/src/libvlccore.la if HAVE_WIN32 @@ -51,9 +50,7 @@ noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT) noinst_npvlc_rcdir = npvlc_rc.$(OBJEXT): npvlc_rc.rc - $(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) -i $< -o $@ + $(WINDRES) --include-dir $(srcdir) -i $< -o $@ else if HAVE_DARWIN @@ -87,14 +84,14 @@ noinst_DATA = npvlc.rsrc VLC\ Plugin.plugin MOSTLYCLEANFILES += npvlc.rsrc CLEANFILES += VLC\ Plugin.plugin -npvlc.rsrc: $(srcdir)/vlc.r +npvlc.rsrc: vlc.r /Developer/Tools/Rez -useDF /Developer/Headers/FlatCarbon/Types.r $< -o $@ # # Plugin uses shared libraries that are located relatively through @executable_path, # which unfortunately references the path of the App using the Plugin, rather than the # Plugin itself. Since this Plugin should always be installed in '/Library/Internet Plug-Ins', -# it is safer to force dylibs to locate dependants through a fixed path +# it is safer to force dylibs to locate dependents through a fixed path # define FIXEXECPATH otool -L "$$dylib" | \ @@ -108,46 +105,15 @@ endef VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES) rm -Rf "$@" - $(INSTALL) -d "$@/Contents/MacOS/lib" - $(INSTALL) ".libs/npvlc.dylib" "$@/Contents/MacOS/VLC Plugin" - $(INSTALL) -d "$(srcdir)/$@/Contents/MacOS/lib"; \ - install_name_tool -change "$(libdir)/libvlc.1.dylib" \ - "@executable_path/lib/libvlc.dylib" \ - "$@/Contents/MacOS/VLC Plugin" - install_name_tool -change "$(libdir)/libvlc-control.1.dylib" \ - "@executable_path/lib/libvlc-control.dylib" \ - "$@/Contents/MacOS/VLC Plugin" - $(INSTALL) "$(top_builddir)/src/.libs/libvlc.1.dylib" \ - "$@/Contents/MacOS/lib/libvlc.dylib" - $(INSTALL) "$(top_builddir)/src/.libs/libvlc-control.1.dylib" \ - "$@/Contents/MacOS/lib/libvlc-control.dylib" - install_name_tool -change "$(libdir)/libvlc.1.dylib" \ - "@executable_path/lib/libvlc.dylib" \ - "$@/Contents/MacOS/lib/libvlc-control.dylib" - dylib="$@/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH) ; - dylib="$@/Contents/MacOS/lib/libvlc.dylib"; $(FIXEXECPATH) ; - dylib="$@/Contents/MacOS/lib/libvlc-control.dylib"; $(FIXEXECPATH) ; - $(INSTALL) -d "$@/Contents/Resources" - $(INSTALL) npvlc.rsrc "$@/Contents/Resources/VLC Plugin.rsrc" - cp -r "$(top_srcdir)/extras/package/macosx/plugin/English.lproj" "$@/Contents/Resources/" - $(INSTALL) "$(top_srcdir)/extras/package/macosx/plugin/Info.plist" "$@/Contents/Info.plist" - $(INSTALL) -d "$@/Contents/MacOS/modules" - for i in "" `$(VLC_CONFIG) --target plugin` ; do \ - if test -n "$$i" ; then \ - dylib="$@/Contents/MacOS/modules/`basename $$i$(LIBEXT)`"; \ - $(INSTALL) "`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" "$$dylib"; \ - install_name_tool -change "$(libdir)/libvlc.1.dylib" \ - "@executable_path/lib/libvlc.dylib" "$$dylib"; \ - $(FIXEXECPATH) ; \ - fi ; \ - done - if test -d $(top_srcdir)/extras/contrib/vlc-lib; then \ - for i in $(top_srcdir)/extras/contrib/vlc-lib/*.dylib ; do \ - dylib="$@/Contents/MacOS/lib/`basename $${i}`" ; \ - $(INSTALL) -m 644 "$${i}" "$$dylib" ; \ - $(FIXEXECPATH); \ - done ; \ - fi + $(INSTALL) -d "VLC-Plugin.plugin/Contents/MacOS/lib" + $(INSTALL) -d "VLC-Plugin.plugin/Contents/Resources" + ACTION="release-makefile" PRODUCT="VLC-Plugin.plugin" src_dir=$(srcdir) build_dir=$(top_builddir) sh "$(top_srcdir)/projects/macosx/framework/Pre-Compile.sh" + $(INSTALL) npvlc.rsrc "VLC-Plugin.plugin/Contents/Resources/VLC Plugin.rsrc" + $(INSTALL) "$(top_builddir)/extras/package/macosx/plugin/Info.plist" "VLC-Plugin.plugin/Contents/Info.plist" + mv "VLC-Plugin.plugin" "VLC Plugin.plugin" + find "VLC Plugin.plugin" -type d -exec chmod ugo+rx '{}' \; + find "VLC Plugin.plugin" -type f -exec chmod ugo+r '{}' \; + # uncomment if dependencies on XPCOM libs is sought # if test -d "$(MOZILLA_SDK_PATH)/lib"; then \ # for i in "$(MOZILLA_SDK_PATH)"/lib/*.dylib ; do \ @@ -163,6 +129,8 @@ else # UNIX/Others platforms # +CPPFLAGS_mozilla_EXTRA = -DDATA_PATH=\"$(pkgdatadir)\" + npvlc_LTLIBRARIES = libvlcplugin.la npvlc = libvlcplugin$(LIBEXT) @@ -170,8 +138,8 @@ npvlcdir = $(libdir)/mozilla/plugins SOURCES_support = support/npunix.c libvlcplugin_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support) -libvlcplugin_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` -libvlcplugin_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` +libvlcplugin_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla` $(CPPFLAGS_mozilla_EXTRA) +libvlcplugin_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla` $(CPPFLAGS_mozilla_EXTRA) libvlcplugin_la_LDFLAGS = `$(VLC_CONFIG) --ldflags mozilla` -module -avoid-version -shrext $(LIBEXT) libvlcplugin_la_LIBADD = $(LIBRARIES_libvlc) `$(VLC_CONFIG) -libs mozilla` # automake gets confused by the ../..