From 98730b96b5bf813d414a07f525ff67282d56f7af Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 2 Jun 2015 10:35:07 +1000 Subject: [PATCH] Add axTLS version.h file, embed git revision in version --- axtls/include/version.h | 10 ++++++++++ common.mk | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 axtls/include/version.h diff --git a/axtls/include/version.h b/axtls/include/version.h new file mode 100644 index 0000000..43c7194 --- /dev/null +++ b/axtls/include/version.h @@ -0,0 +1,10 @@ +/* axTLS version header + + We need this because we're using axTLS from source repo, not from a release. +*/ + +#ifndef _VERSION_H + +#define AXTLS_VERSION "esp-open-rtos axTLS "GITSHORTREV + +#endif diff --git a/common.mk b/common.mk index 70309b9..fa8082f 100644 --- a/common.mk +++ b/common.mk @@ -70,7 +70,7 @@ ifeq ($(FLAVOR),debug) CFLAGS += -g -O0 LDFLAGS += -g -O0 else - CFLAGS += -g -O2 + CFLAGS += -g -O2 -DGITSHORTREV=$(GITSHORTREV) LDFLAGS += -g -O2 endif @@ -164,6 +164,7 @@ COMPONENT_ARS += $$($(1)_AR) -include $$($(1)_OBJ_FILES:.o=.d) endef +GITSHORTREV=\"$(shell cd $(ROOT); git rev-parse --short -q HEAD)\" ## Linking rules for SDK libraries ## SDK libraries are preprocessed to: