diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-18 05:37:55 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-21 01:00:07 +0100 |
commit | f5303636391623f844b84187ec286abdc461026a (patch) | |
tree | 7e343c3f97402cc24938bd08f2c1f0775d95dad9 /src/Makefile | |
parent | chacha20poly1305: sse/ymm should be implicit (diff) | |
download | wireguard-monolithic-historical-f5303636391623f844b84187ec286abdc461026a.tar.xz wireguard-monolithic-historical-f5303636391623f844b84187ec286abdc461026a.zip |
main: add version to dmesg
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 2ca55ec..20947ac 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,10 +4,17 @@ PWD := $(shell pwd) all: module tools debug: module-debug tools -module: +version.h: + @export GIT_CEILING_DIRECTORIES="$$(readlink -f ../..)" && \ + ver="#define WIREGUARD_VERSION \"$$(git describe --dirty 2>/dev/null)\"" && \ + [ "$$(cat version.h 2>/dev/null)" != "$$ver" ] && \ + echo "$$ver" > version.h && \ + git update-index --assume-unchanged version.h || true + +module: version.h $(MAKE) -C $(KERNELDIR) M=$(PWD) modules -module-debug: +module-debug: version.h $(MAKE) -C $(KERNELDIR) M=$(PWD) V=1 CONFIG_WIREGUARD_DEBUG=y modules clean: @@ -31,4 +38,4 @@ cloc: clean include tests/debug.mk -.PHONY: all module module-debug tools install clean core-cloc check +.PHONY: all module module-debug tools install clean core-cloc check version.h |