add git version as compile flag
This commit is contained in:
parent
7898864b24
commit
7ac857686d
@ -1,5 +1,9 @@
|
|||||||
#include <tomcrypt_test.h>
|
#include <tomcrypt_test.h>
|
||||||
|
|
||||||
|
#ifndef GIT_VERSION
|
||||||
|
#define GIT_VERSION "Undefined version"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LTC_TEST_FN(f) { f, #f }
|
#define LTC_TEST_FN(f) { f, #f }
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
@ -37,7 +41,7 @@ int main(int argc, char **argv)
|
|||||||
long delta, dur = 0;
|
long delta, dur = 0;
|
||||||
reg_algs();
|
reg_algs();
|
||||||
|
|
||||||
printf("build == \n%s\n", crypt_build_settings);
|
printf("build == %s\n%s\n", GIT_VERSION, crypt_build_settings);
|
||||||
|
|
||||||
#ifdef USE_LTM
|
#ifdef USE_LTM
|
||||||
ltc_mp = ltm_desc;
|
ltc_mp = ltm_desc;
|
||||||
|
@ -78,6 +78,12 @@ CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
GIT_VERSION := $(shell [ -e .git ] && { echo -n git- ; git describe --tags --always --dirty ; } || echo $(VERSION))
|
||||||
|
ifneq ($(GIT_VERSION),)
|
||||||
|
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
HASH=hashsum
|
HASH=hashsum
|
||||||
CRYPT=encrypt
|
CRYPT=encrypt
|
||||||
SMALL=small
|
SMALL=small
|
||||||
|
Loading…
x
Reference in New Issue
Block a user