Determine version based on git tag or pwd (fixes #92)

This commit is contained in:
Arnout Engelen
2016-07-12 08:15:24 +02:00
parent a1efe5b023
commit 9defe58674
5 changed files with 13 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
LIBRARY=libnethogs.so
LIBNAME=$(LIBRARY).$(LIBVERSION).$(LIBSUBVERSION).$(LIBMINORVERSION)
LIBVERSION=$(VERSION)
LIBNAME=$(LIBRARY).$(LIBVERSION)
SO_NAME=$(LIBRARY).$(LIBVERSION)
libdir := $(PREFIX)/lib
@@ -38,8 +39,6 @@ OBJS=$(addprefix $(ODIR)/,$(OBJ_NAMES))
#$(info $(OBJS))
.PHONY: tgz
.PHONY: uninstall
install: $(LIBNAME)
@@ -102,7 +101,7 @@ $(ODIR)/devices.o: devices.cpp devices.h
$(ODIR)/libnethogs.o: libnethogs.cpp libnethogs.h
@mkdir -p $(ODIR)
$(CXX) $(CXXFLAGS) -o $@ -c libnethogs.cpp -DVERSION=\"$(LIBVERSION)\" -DSUBVERSION=\"$(LIBSUBVERSION)\" -DMINORVERSION=\"$(LIBMINORVERSION)\"
$(CXX) $(CXXFLAGS) -o $@ -c libnethogs.cpp -DVERSION=\"$(LIBVERSION)\"
.PHONY: clean
clean: