diff options
author | Christian Hesse <mail@eworm.de> | 2013-12-23 16:33:25 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-12-23 16:33:25 +0100 |
commit | b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3 (patch) | |
tree | e332864aad47bd4da41008725e414f8035198c54 /Makefile | |
parent | 5b73c2ebfed7b3e0742db5ab96dcaa71447faf8c (diff) | |
download | nullshell-b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3.tar.gz nullshell-b8b8d7f7ebca5946723c127ff9bee1eeaa9a94e3.tar.zst |
introduce config.h and add some fuzzy output text
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,16 +1,27 @@ # nullshell - do nothing but print asterisks, can be used for login shell PREFIX := /usr +CP := cp CC := gcc MD := markdown INSTALL := install RM := rm CFLAGS += -O2 -Wall -Werror +VERSION := $(shell git describe --tags --long 2>/dev/null) +# this is just a fallback in case you do not use git but downloaded +# a release tarball... +ifeq ($(VERSION),) +VERSION := 0.0.1 +endif all: nullshell README.html -nullshell: nullshell.c - $(CC) $(CFLAGS) $(LDFLAGS) nullshell.c -o nullshell +nullshell: nullshell.c config.h + $(CC) $(CFLAGS) $(LDFLAGS) nullshell.c -o nullshell \ + -DVERSION="\"$(VERSION)\"" + +config.h: + $(CP) config.def.h config.h README.html: README.md $(MD) README.md > README.html |