This commit is contained in:
2021-02-16 13:14:49 +01:00
parent 5d8567a206
commit 901b2fbea4
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,9 @@ ifndef NETWORK
$(error NETWORK is not set)
endif
VERSION := $(shell git rev-parse --short=8 HEAD)
######################################
# target
######################################
@ -178,7 +181,7 @@ endif
# compile gcc flags
ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -Werror -fdata-sections -ffunction-sections
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK=$(NETWORK) -Wall -Werror -fdata-sections -ffunction-sections
CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -DNETWORK=$(NETWORK) -DVERSION="\"$(VERSION)\"" -Wall -Werror -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2