diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-10-03 10:05:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-10-03 10:05:50 +0200 |
commit | eab9f4d6846eefb0bf791162705c7a559793da1c (patch) | |
tree | ff9d45b63ffe9a26ef291b69785042accee4c09a /Makefile | |
parent | 09b916cff7b5daf9cc9e39f67156198f4fbf4836 (diff) | |
download | ghdl-yosys-plugin-eab9f4d6846eefb0bf791162705c7a559793da1c.tar.gz ghdl-yosys-plugin-eab9f4d6846eefb0bf791162705c7a559793da1c.tar.bz2 ghdl-yosys-plugin-eab9f4d6846eefb0bf791162705c7a559793da1c.zip |
ghdl.cc: display compile date and git hash
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -15,13 +15,15 @@ ALL_LDFLAGS=$(LIBGHDL_LIB) -Wl,-rpath,$(dir $(LIBGHDL_LIB)) $(LDFLAGS) ALL_CFLAGS=-fPIC -DYOSYS_ENABLE_GHDL -I$(LIBGHDL_INC) $(CFLAGS) +VER_HASH=$(shell git rev-parse --short HEAD || echo "unknown") + all: ghdl.$(SOEXT) ghdl.$(SOEXT): ghdl.o $(YOSYS_CONFIG) --build $@ $< -shared $(ALL_LDFLAGS) ghdl.o: src/ghdl.cc - $(YOSYS_CONFIG) --exec --cxx -c --cxxflags -o $@ $< $(ALL_CFLAGS) + $(YOSYS_CONFIG) --exec --cxx -c --cxxflags -o $@ $< $(ALL_CFLAGS) -DGHDL_VER_HASH="\"$(VER_HASH)\"" clean: force $(RM) -f ghdl.$(SOEXT) ghdl.o |