summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 149f397..debe4b5 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,19 @@ CXXFLAGS := -Wall -Werror -std=c++20 -fPIC -iquote . ${OPTIMIZE} ${DEBUG}
8 8
9.DEFAULT: issim 9.DEFAULT: issim
10 10
11VERSION := $(shell git describe --always --dirty --long --tags 2> /dev/null)
12ifndef VERSION
13VERSION := unknown
14endif
15$(info Version ${VERSION})
16
17define GITTAGCPP =
18#include <string>
19
20std::string GIT_TAG = "$(subst ",\",${VERSION})";
21endef
22export GITTAGCPP
23
11libname = $(shell realpath --canonicalize-missing --relative-to . build/$(dir $(1))/lib$(notdir $(1))) 24libname = $(shell realpath --canonicalize-missing --relative-to . build/$(dir $(1))/lib$(notdir $(1)))
12 25
13define mklib = 26define mklib =
@@ -35,7 +48,7 @@ endif
35 48
36endef 49endef
37 50
38PARTS := $(patsubst ./%,%,$(shell find -mindepth 1 -type d -\( -name .\* -prune -o -name build -prune -o -name tools -prune -o -print -\))) 51PARTS := $(patsubst ./%,%,$(shell find -mindepth 1 -type d -\( -name .\* -prune -o -name build -prune -o -print -\)))
39PARTARS := 52PARTARS :=
40PARTSOS := 53PARTSOS :=
41 54
@@ -68,7 +81,7 @@ clean:
68 81
69build/git-tag.cpp: 82build/git-tag.cpp:
70 @mkdir -p $(dir $@) 83 @mkdir -p $(dir $@)
71 tools/get-git-tag > $@ 84 @echo "$$GITTAGCPP" > $@
72.PHONY: build/git-tag.cpp 85.PHONY: build/git-tag.cpp
73 86
74include $(shell find -type f -name \*.d) 87include $(shell find -type f -name \*.d)