1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

include version string

This commit is contained in:
Oleg Hahm 2013-11-23 17:22:27 +01:00
parent f8c8bc8ee6
commit 529f3fb278
2 changed files with 9 additions and 1 deletions

View File

@ -9,6 +9,14 @@ endif
OBJ = $(SRC:%.c=$(BINDIR)%.o)
DEP = $(SRC:%.c=$(BINDIR)%.d)
GIT_STRING := $(shell git describe --abbrev=4 --dirty=-`hostname`)
GIT_STRING += $(shell git rev-parse --abbrev-ref HEAD)
GIT_VERSION = $(shell echo $(GIT_STRING) | sed 's/ /-/')
ifeq ($(strip $(GIT_VERSION)),)
GIT_VERSION := "UNKNOWN"
endif
export CFLAGS += -DVERSION=\"$(GIT_VERSION)\"
.PHONY: clean
include $(RIOTCPU)/Makefile.base

View File

@ -64,7 +64,7 @@ static char idle_stack[KERNEL_CONF_STACKSIZE_IDLE];
void kernel_init(void)
{
dINT();
printf("kernel_init(): This is RIOT!\n");
printf("kernel_init(): This is RIOT! (Version: %s)\n", VERSION);
sched_init();