Makefile: don't re-set GIT_VERSION

Use := to only set GIT_VERSION once.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-02-28 10:49:02 +08:00
parent 1048cbf999
commit 2ac79e45e9

View File

@ -4,7 +4,7 @@ ADD_CFLAGS = -I$(FOMU_SDK)/include -D__vexriscv__ -march=rv32im -mabi=ilp32
ADD_LFLAGS =
SRC_DIR = src
GIT_VERSION= $(shell git describe --tags)
GIT_VERSION := $(shell git describe --tags)
TRGT ?= riscv64-unknown-elf-
CC = $(TRGT)gcc
CXX = $(TRGT)g++
@ -72,6 +72,10 @@ $(PACKAGE).dfu: $(TARGET)
$(QUIET) $(COPY) $(PACKAGE).bin $@
$(QUIET) dfu-suffix -v 1209 -p 70b1 -a $@
#$(PACKAGE).bit: $(TARGET)
# $(QUIET) echo " BIT $@"
# # $(QUIET) ice40-repack input/top.bin input/mem_1.init ./foboot.bin ./foboot.bit
$(PACKAGE).ihex: $(TARGET)
$(QUIET) echo " IHEX $(PACKAGE).ihex"
$(QUIET) $(OBJCOPY) -O ihex $(TARGET) $@