diff options
author | Mike Ryan <mikeryan@isecpartners.com> | 2013-08-19 21:02:02 -0700 |
---|---|---|
committer | Mike Ryan <mikeryan@isecpartners.com> | 2013-08-19 21:02:02 -0700 |
commit | 7e8eac11633fe5c1663ddce4024a1bb30aaa9458 (patch) | |
tree | 34173be3bc426ab62acb9414e10af2e88263befb /firmware/common.mk | |
parent | 4298514f3d99a25ec3e7502b19180d96690f5418 (diff) |
firmware, host: compile info command
This new command (ubertooth-util -V, UBERTOOTH_GET_COMPILE_INFO) embeds
the git revision, name@host of compiler, and a build timestamp into the
firmware.
Diffstat (limited to 'firmware/common.mk')
-rw-r--r-- | firmware/common.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/common.mk b/firmware/common.mk index 094e8a0..f99f509 100644 --- a/firmware/common.mk +++ b/firmware/common.mk @@ -53,6 +53,11 @@ UBERTOOTH_OPTS += -DTX_ENABLE # automatic git version when working out of git GIT_REVISION ?= -D'GIT_REVISION="git-$(shell git log --pretty=format:'%h' -n 1)"' +# compile info +COMPILE_BY ?= -D'COMPILE_BY="$(shell whoami)"' +COMPILE_HOST ?= -D'COMPILE_HOST="$(shell hostname -s)"' +TIMESTAMP ?= -D'TIMESTAMP="$(shell date)"' + # CPU architecture CPU = cortex-m3 @@ -161,6 +166,9 @@ CFLAGS += -Wa,-alhms=$(<:%.c=$(OBJDIR)/%.lst) CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) CFLAGS += $(CSTANDARD) CFLAGS += $(GIT_REVISION) +CFLAGS += $(COMPILE_BY) +CFLAGS += $(COMPILE_HOST) +CFLAGS += $(TIMESTAMP) #---------------- Compiler Options C++ ---------------- # -g*: generate debugging information |