diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -43,7 +43,11 @@ TMPDIR = /tmp ### The version number of VDR (taken from VDR's "config.h"): -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') +VDRVERSION = $(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h) +APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h) +ifeq ($(APIVERSION),) + APIVERSION = $(VDRVERSION) +endif ### The name of the distribution archive: @@ -126,9 +130,9 @@ all: libvdr-$(PLUGIN).so libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION) + @cp $@ $(LIBDIR)/$@.$(APIVERSION) ifndef DEBUG - strip $(LIBDIR)/$@.$(VDRVERSION) + strip $(LIBDIR)/$@.$(APIVERSION) endif dist: clean |