Add axTLS version.h file, embed git revision in version

This commit is contained in:
Angus Gratton 2015-06-02 10:35:07 +10:00
parent 6e44ce3d11
commit 98730b96b5
2 changed files with 12 additions and 1 deletions

10
axtls/include/version.h Normal file
View file

@ -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

View file

@ -70,7 +70,7 @@ ifeq ($(FLAVOR),debug)
CFLAGS += -g -O0 CFLAGS += -g -O0
LDFLAGS += -g -O0 LDFLAGS += -g -O0
else else
CFLAGS += -g -O2 CFLAGS += -g -O2 -DGITSHORTREV=$(GITSHORTREV)
LDFLAGS += -g -O2 LDFLAGS += -g -O2
endif endif
@ -164,6 +164,7 @@ COMPONENT_ARS += $$($(1)_AR)
-include $$($(1)_OBJ_FILES:.o=.d) -include $$($(1)_OBJ_FILES:.o=.d)
endef endef
GITSHORTREV=\"$(shell cd $(ROOT); git rev-parse --short -q HEAD)\"
## Linking rules for SDK libraries ## Linking rules for SDK libraries
## SDK libraries are preprocessed to: ## SDK libraries are preprocessed to: