diff options
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 1 insertions, 16 deletions
| @@ -14,19 +14,6 @@ CXXFLAGS := -Wall -Werror -std=c++20 -fPIC -iquote . ${PKG_FLAGS} ${OPTIMIZE} ${ | |||
| 14 | 14 | ||
| 15 | .DEFAULT_GOAL := all | 15 | .DEFAULT_GOAL := all |
| 16 | 16 | ||
| 17 | VERSION := $(shell git describe --always --dirty --long --tags 2> /dev/null) | ||
| 18 | ifndef VERSION | ||
| 19 | VERSION := unknown | ||
| 20 | endif | ||
| 21 | $(info Version ${VERSION}) | ||
| 22 | |||
| 23 | define GITTAGCPP = | ||
| 24 | #include "git-tag.h" | ||
| 25 | |||
| 26 | const char *GIT_TAG = "$(subst ",\",${VERSION})"; | ||
| 27 | endef | ||
| 28 | export GITTAGCPP | ||
| 29 | |||
| 30 | ifneq ($(shell which ${IWYU}),) | 17 | ifneq ($(shell which ${IWYU}),) |
| 31 | iwyu = ${CHRONIC} ${IWYU} -Xiwyu --error -Xiwyu --mapping_file=tools/iwyu.imp -Xiwyu --no_fwd_decls ${CXXFLAGS} $(1) | 18 | iwyu = ${CHRONIC} ${IWYU} -Xiwyu --error -Xiwyu --mapping_file=tools/iwyu.imp -Xiwyu --no_fwd_decls ${CXXFLAGS} $(1) |
| 32 | else | 19 | else |
| @@ -97,8 +84,6 @@ endif | |||
| 97 | MAINOBJS := $(patsubst %.cpp,build/%.o,$(wildcard *.cpp)) | 84 | MAINOBJS := $(patsubst %.cpp,build/%.o,$(wildcard *.cpp)) |
| 98 | MAINOBJS += build/git-tag.o | 85 | MAINOBJS += build/git-tag.o |
| 99 | 86 | ||
| 100 | $(info ) | ||
| 101 | |||
| 102 | all: ${IWYU_CPPS} issim issim-static | 87 | all: ${IWYU_CPPS} issim issim-static |
| 103 | 88 | ||
| 104 | issim: build/issim-dynamic | 89 | issim: build/issim-dynamic |
| @@ -123,7 +108,7 @@ clean: | |||
| 123 | 108 | ||
| 124 | build/git-tag.cpp: | 109 | build/git-tag.cpp: |
| 125 | @mkdir -p $(dir $@) | 110 | @mkdir -p $(dir $@) |
| 126 | @echo "$$GITTAGCPP" > $@ | 111 | @tools/mkgit.rb > $@ |
| 127 | .PHONY: build/git-tag.cpp | 112 | .PHONY: build/git-tag.cpp |
| 128 | 113 | ||
| 129 | build/%.o: %.cpp | 114 | build/%.o: %.cpp |
