diff --git a/Makefile b/Makefile index a29314c..8489f6a 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ ifneq ($(KERNEL), Linux) $(error only support Linux now.) endif -VERSION = $(shell git describe --tags) +VERSION = $(shell git describe --tags --always) debug = 0 @@ -36,7 +36,7 @@ else endif ifeq ($(shell echo $(VERSION) | head -c 1), v) - CFLAGS += -DVERSION=$(VERSION) + CFLAGS += -DVERSION=\"$(VERSION)\" endif SRC := $(wildcard *.c) diff --git a/main.c b/main.c index 2561e14..120653a 100644 --- a/main.c +++ b/main.c @@ -394,7 +394,7 @@ int main(int argc, char **argv) {0, 0, 0, 0} }; - while ((opt = getopt_long(argc, argv, "+ha:p:f:b:w:n", long_opts, + while ((opt = getopt_long(argc, argv, "+Vha:p:f:b:w:n", long_opts, &index)) != -1) { switch (opt) { case 'a':