Skip to content

Commit

Permalink
Makefile: add YOSYS_VER and friends to CXXFLAGS for plugin compat che…
Browse files Browse the repository at this point in the history
…ck fallback
  • Loading branch information
widlarizer committed Nov 19, 2024
1 parent b89bd02 commit 9142bb2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ CXXFLAGS += -D_DEFAULT_SOURCE
endif

YOSYS_VER := 0.47+86
YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1)
YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1)
YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2)
CXXFLAGS += -DYOSYS_VER=\\"$(YOSYS_VER)\\" \
-DYOSYS_MAJOR=$(YOSYS_MAJOR) \
-DYOSYS_MINOR=$(YOSYS_MINOR) \
-DYOSYS_COMMIT=$(YOSYS_COMMIT)

# Note: We arrange for .gitcommit to contain the (short) commit hash in
# tarballs generated with git-archive(1) using .gitattributes. The git repo
Expand Down

0 comments on commit 9142bb2

Please sign in to comment.