diff options
author | methodus <methodus@web.de> | 2012-10-09 12:29:06 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-09 12:29:06 +0200 |
commit | 44511176d981c985e630d34d5087eeaefa169959 (patch) | |
tree | 76aaad4c9c83eb40c6ec8aab3bd5814ff5fd7ff0 /plugins/profiler | |
parent | 8dd19bbd0112564d76c35ff2b208e0e29d2bf6ac (diff) | |
download | vdr-plugin-upnp-44511176d981c985e630d34d5087eeaefa169959.tar.gz vdr-plugin-upnp-44511176d981c985e630d34d5087eeaefa169959.tar.bz2 |
Made makefile more generic. VDRLIBDIR might be set by environment.
Diffstat (limited to 'plugins/profiler')
-rw-r--r-- | plugins/profiler/vdrDVBProfiler/Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/profiler/vdrDVBProfiler/Makefile b/plugins/profiler/vdrDVBProfiler/Makefile index 78affa5..e779d3d 100644 --- a/plugins/profiler/vdrDVBProfiler/Makefile +++ b/plugins/profiler/vdrDVBProfiler/Makefile @@ -12,20 +12,25 @@ PROFILE = dvb ### The version number of this plugin (taken from the main source file): -VERSION = $(shell grep 'static const char \*VERSION *=' $(PROFILE).cpp | awk '{ print $$6 }' | sed -e 's/[";]//g') +VERSION = $(shell grep 'static const char \*VERSION *=' $(PROFILE)Profiler.cpp | awk '{ print $$6 }' | sed -e 's/[";]//g') ### The C++ compiler and options: -CXX ?= gcc +CXX ?= g++ CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC UPNPDIR ?= ../../.. +VDRLIBDIR = $(UPNPDIR)/../../lib + +APIVERSION = $(shell sed -ne '/define UPNPPLUGIN_VERSION/s/^.*"\(.*\)".*$$/\1/p' $(UPNPDIR)/include/plugin.h) INCLUDES += -I$(UPNPDIR)/include DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -OBJS = $(PROFILE).cpp +OBJS = $(PROFILE)Profiler.o + +LIBS = -L$(VDRLIBDIR) -Wl,-R$(VDRLIBDIR) -lvdr-upnp all: libupnp-$(PROFILE)-profiler.so @@ -45,3 +50,7 @@ $(DEPFILE): Makefile libupnp-$(PROFILE)-provider.so: $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@ + @cp --remove-destination $@ $@.$(APIVERSION) + +clean: + @-rm -f $(OBJS) $(DEPFILE) *.so *.so.$(APIVERSION) core* *~ |