summaryrefslogtreecommitdiff
path: root/Makefile.plugins
diff options
context:
space:
mode:
authormethodus <methodus@web.de>2013-04-19 22:00:56 +0200
committermethodus <methodus@web.de>2013-04-19 22:00:56 +0200
commit5fa0c9d9fab6bca8a44459f1628b60ae89760ffa (patch)
treeca17f29d43c19183ef04d635e124180e90c2ef71 /Makefile.plugins
parentaa99a1555aed836d2a123a1880c55c99801ceacd (diff)
downloadvdr-plugin-upnp-5fa0c9d9fab6bca8a44459f1628b60ae89760ffa.tar.gz
vdr-plugin-upnp-5fa0c9d9fab6bca8a44459f1628b60ae89760ffa.tar.bz2
Applied makefile patch provided by Zoolooc. Thank you\!
Diffstat (limited to 'Makefile.plugins')
-rw-r--r--Makefile.plugins30
1 files changed, 23 insertions, 7 deletions
diff --git a/Makefile.plugins b/Makefile.plugins
index 595acfc..5ccb46d 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -16,6 +16,15 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+#
+# when building locally in the VDR source tree ("LCLBLD=1 make plugins"),
+# we have to divert ROOTBUILDDIR for our subplugins
+ifdef LCLBLD
+SUBPLGDIR = $(LIBDIR)
+else
+SUBPLGDIR = $(ROOTBUILDDIR)
+endif
+
### Includes and Defines
SINCLUDES += -I../../../include
@@ -44,7 +53,7 @@ $(DEPFILE): $(OBJS:%.o=%.cpp) $(wildcard *.h)
LIBUPNP = libupnp-$(shell echo $(TARGET) | awk '{print tolower($$0)}').so
LIBUPNPVER = $(LIBUPNP).$(UPNPAPIVERSION)-$(APIVERSION)
-BUILDTARGETS = $(LIBDIR)/$(LIBUPNPVER)
+BUILDTARGETS = $(SUBPLGDIR)/$(LIBUPNPVER)
_all: $(BUILDTARGETS)
.PHONY: clean dist
@@ -55,14 +64,21 @@ _all: $(BUILDTARGETS)
$(LIBUPNP): $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) $(SHAREDLIBS) -o $@
-$(LIBDIR)/$(LIBUPNPVER): $(LIBUPNP)
+$(SUBPLGDIR)/$(LIBUPNPVER): $(LIBUPNP)
@cp -p $< $@
_clean:
- @-rm -f $(OBJS) $(CLEAN_RM) $(DEPFILE) $(LIBUPNP) $(LIBDIR)/$(LIBUPNPVER) core* *~
+ @-rm -f $(OBJS) $(CLEAN_RM) $(DEPFILE) $(LIBUPNP) $(SUBPLGDIR)/$(LIBUPNPVER) core* *~
+
+_install: all _install-docs
+ install -m 755 -o root -g root $(PRESTRIP) $(SUBPLGDIR)/$(LIBUPNPVER) $(DESTDIR)$(LIBDIR)
+
+_uninstall: _uninstall-docs
+ rm $(DESTDIR)$(LIBDIR)/$(LIBUPNPVER)
-_install: all
- install -m 755 -o root -g root $(PRESTRIP) $(LIBDIR)/$(LIBUPNPVER) $(VDRPLUGINLIBDIR)
+_install-docs:
+ @mkdir -p $(DESTDIR)$(INSDOCDIR)
+ @for doc in $(DOCS); do cp $$doc $(DESTDIR)$(INSDOCDIR)/$$doc.$(TARGET); done
-_uninstall:
- rm $(VDRPLUGINLIBDIR)/$(LIBUPNPVER)
+_uninstall-docs:
+ @for doc in $(DOCS); do rm $(DESTDIR)$(INSDOCDIR)/$$doc.$(TARGET); done