summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--media/pluginManager.cpp4
-rw-r--r--plugins/provider/vdrProvider/Makefile5
3 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cbae582..71adef3 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).h | awk '{ pri
### The C++ compiler and options:
-CXX ?= gcc
+CXX ?= g++
ECPPC ?= ecppc
CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses
diff --git a/media/pluginManager.cpp b/media/pluginManager.cpp
index 9c4cafd..280f0c9 100644
--- a/media/pluginManager.cpp
+++ b/media/pluginManager.cpp
@@ -323,7 +323,7 @@ bool upnp::cPluginManager::DLL::Load(){
if(handle)
return true;
- handle = dlopen(file.c_str(), RTLD_NOW);
+ handle = dlopen(file.c_str(), RTLD_LAZY);
const char* error = dlerror();
if(!error){
@@ -343,7 +343,7 @@ bool upnp::cPluginManager::DLL::Load(){
cerr << error << endl;
}
} else {
- cerr << error << endl;
+ cerr << "Error while opening plugin: " << error << endl;
}
return false;
diff --git a/plugins/provider/vdrProvider/Makefile b/plugins/provider/vdrProvider/Makefile
index 1220a55..7a798d2 100644
--- a/plugins/provider/vdrProvider/Makefile
+++ b/plugins/provider/vdrProvider/Makefile
@@ -16,10 +16,11 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(SCHEMA)Provider.cpp |
### The C++ compiler and options:
-CXX ?= gcc
+CXX ?= g++
CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC
UPNPDIR ?= ../../..
+VDRPLUGINDIR = /usr/lib/vdr/plugins/
APIVERSION = $(shell sed -ne '/define UPNPPLUGIN_VERSION/s/^.*"\(.*\)".*$$/\1/p' $(UPNPDIR)/include/plugin.h)
@@ -29,6 +30,8 @@ DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFIL
OBJS = $(SCHEMA)Provider.o
+LIBS = -L$(VDRPLUGINDIR) -Wl,-R$(VDRPLUGINDIR) -lvdr-upnp
+
all: libupnp-$(SCHEMA)-provider.so
### Implicit rules: