Commit c847680c authored by Federico Vaga's avatar Federico Vaga

sw:lib: export version

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 0e6c2aae
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
REPO_PARENT ?= ../.. REPO_PARENT ?= ../..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
GIT_VERSION := $(shell git describe --dirty --long --tags)
TRTL ?= ../.. TRTL ?= ../..
TRTL_SW = $(TRTL)/software TRTL_SW = $(TRTL)/software
...@@ -17,7 +18,9 @@ LOBJ := libmockturtle.o ...@@ -17,7 +18,9 @@ LOBJ := libmockturtle.o
LOBJ += libmockturtle-rt-msg.o LOBJ += libmockturtle-rt-msg.o
CFLAGS += -Wall -Werror -fPIC CFLAGS += -Wall -Werror -fPIC
CFLAGS += -I. -I$(TRTL_SW)/include $(EXTRACFLAGS) CFLAGS += -I. -I$(TRTL_SW)/include
CFLAGS += -DVERSION="\"$(GIT_VERSION)\""
CFLAGS += $(EXTRACFLAGS)
ARFLAGS = rcv ARFLAGS = rcv
modules all: $(LIB) $(LIBS) modules all: $(LIB) $(LIBS)
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
*/ */
#define TRTL_SYSFS_READ_LEN 32 #define TRTL_SYSFS_READ_LEN 32
static const char libmockturtle_version[] __attribute__((unused));
static const char libmockturtle_version[] = "libmockturtle version: "VERSION;
/** /**
* The default timeout when communicating with the * The default timeout when communicating with the
* driver: HMQ * driver: HMQ
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment