Skip to content

Commit

Permalink
build: added default linker flag in case pkg-config doesn't have z3 i…
Browse files Browse the repository at this point in the history
…n its database, such as in NIX; fixes opp_env issue #24 (omnetpp/opp_env#24)
  • Loading branch information
adamgeorge309 committed Sep 27, 2024
1 parent c1daa45 commit 06a0ffe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ endif
WITH_Z3 := $(shell (cd .. && $(FEATURETOOL) -q isenabled Z3GateSchedulingConfigurator && echo enabled) )
ifeq ($(WITH_Z3), enabled)
ifeq ($(HAVE_PKGCFG), yes)
HAVE_Z3 := $(shell $(PKGCFG) --exists z3 && echo yes || echo no)
ifeq ($(HAVE_Z3), yes)
LIBS += $(shell $(PKGCFG) --libs z3)
CFLAGS += $(shell $(PKGCFG) --cflags z3) -DHAVE_Z3
endif
Z3_LIBS := $(shell $(PKGCFG) --libs z3)
Z3_LIBS ?= -lz3 # default in case pkg-config doesn't have z3 in its database (such as in NIX)
LIBS += $(Z3_LIBS)
CFLAGS += $(shell $(PKGCFG) --cflags z3) -DHAVE_Z3
endif
endif

Expand Down

0 comments on commit 06a0ffe

Please sign in to comment.