diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | sircbot.c | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,8 @@ +VERSION=0.1 +GIT_VERSION := $(shell [ -d .git ] && echo "-$$(git describe --always)") CFLAGS ?= -g +CFLAGS += -DVERSION=\"$(VERSION)$(GIT_VERSION)\" all: sircbot @@ -11,4 +14,5 @@ sircbot: $(sircbot_OBJ) .c.o: $(CC) $(CFLAGS) -c $^ - +clean: + rm -rf sircbot $(sircbot_OBJ) @@ -398,7 +398,7 @@ void sighandler(int signal) static void usage_exit(int exitcode) { - printf("usage: sircbot [-f] [-n nick] [-r flushrate] [-s server] [-p port] CHANNEL\n"); + printf("sircbot " VERSION "\nusage: sircbot [-f] [-n nick] [-r flushrate] [-s server] [-p port] CHANNEL\n"); exit(exitcode); } |