aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-04-06 09:04:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-04-06 09:10:09 +0000
commit586eec61ad4692cc4c78e0e8d35091a83e027d8b (patch)
treeebc51a5354a1f4351d6fe04e31239b0e55ff1eae
parentcb50bbd1174720509b868a7ad08cbf88faf3f838 (diff)
downloadsircbot-586eec61ad4692cc4c78e0e8d35091a83e027d8b.tar.bz2
sircbot-586eec61ad4692cc4c78e0e8d35091a83e027d8b.tar.xz
version 0.1v0.1
we include version number in binary
-rw-r--r--Makefile6
-rw-r--r--sircbot.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a6c516a..62c42db 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/sircbot.c b/sircbot.c
index 1a681d2..9c072d6 100644
--- a/sircbot.c
+++ b/sircbot.c
@@ -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);
}