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:
parent
f8c8bc8ee6
commit
529f3fb278
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user