Skip to content

Commit

Permalink
Fix compiling multiple backend
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-goel committed Aug 25, 2024
1 parent 93651cf commit fac9c3b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
11 changes: 3 additions & 8 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
#ENABLE_Y2 := 0
#ENABLE_M5 := 0
#ENABLE_BT := 0
#ENABLE_Z3 := 0

REA_LOC = reach
DPA_LOC = dpa
VWN_LOC = vwn

all:
$(MAKE) vw
$(MAKE) da
ENABLE_Y2=1 $(MAKE) re
ENABLE_BT=1 $(MAKE) re
# ENABLE_M5=1 $(MAKE) re
CONFIG_Y2=1 $(MAKE) re
CONFIG_BT=1 $(MAKE) re
CONFIG_M5=1 $(MAKE) re

clean:
$(MAKE) vwc
Expand Down
5 changes: 5 additions & 0 deletions src/makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ STATIC_MODE := 0
ENABLE_VMT := 1
ENABLE_BTOR2 := 1

ENABLE_Y2 := 1
ENABLE_BT := 1
ENABLE_M5 := 1
ENABLE_Z3 := 0

CURR_DIR = $(shell pwd)
BIN_DIR = $(CURR_DIR)/../../build/bin
DEPS = $(CURR_DIR)/../../deps
Expand Down
40 changes: 23 additions & 17 deletions src/reach/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,40 @@ else
LINK_FLAGS += -pthread -lgmpxx -lgmp -lrt -ldl
endif

Y2_DIR = $(DEPS)/yices2
Y2_LIB = $(Y2_DIR)/build/x86_64-pc-linux-gnu-release/dist/lib/libyices.a
INCLUDE += -I$(Y2_DIR)/build/x86_64-pc-linux-gnu-release/dist/include
LINKLIBS += $(Y2_LIB)
CFLAGS += -D_Y2
ifeq ($(ENABLE_Y2), 1)
Y2_DIR = $(DEPS)/yices2
Y2_LIB = $(Y2_DIR)/build/x86_64-pc-linux-gnu-release/dist/lib/libyices.a
INCLUDE += -I$(Y2_DIR)/build/x86_64-pc-linux-gnu-release/dist/include
LINKLIBS += $(Y2_LIB)
CFLAGS += -D_Y2
endif
ifeq ($(CONFIG_Y2), 1)
CFLAGS += -DBACKEND_Y2
REACH_SUFFIX = y2
endif

ifeq ($(ENABLE_BT), 1)
BT_DIR = $(DEPS)/boolector
BT_LIB = $(BT_DIR)/build/lib/libboolector.a
BT_LIB += $(BT_DIR)/deps/btor2tools/build/lib/libbtor2parser.a
BT_LIB += $(BT_DIR)/deps/cadical/build/libcadical.a
INCLUDE += -I$(BT_DIR)/src
LINKLIBS += $(BT_LIB)
CFLAGS += -D_BT
BT_DIR = $(DEPS)/boolector
BT_LIB = $(BT_DIR)/build/lib/libboolector.a
BT_LIB += $(BT_DIR)/deps/btor2tools/build/lib/libbtor2parser.a
BT_LIB += $(BT_DIR)/deps/cadical/build/libcadical.a
INCLUDE += -I$(BT_DIR)/src
LINKLIBS += $(BT_LIB)
CFLAGS += -D_BT
endif
ifeq ($(CONFIG_BT), 1)
CFLAGS += -DBACKEND_BT
REACH_SUFFIX = bt
endif

ifeq ($(ENABLE_M5), 1)
MSAT_DIR = $(DEPS)/mathsat
MSAT_LIB = $(MSAT_DIR)/lib/libmathsat.a $(STATIC_GMPXX) $(STATIC_GMP)
INCLUDE += -I$(MSAT_DIR)/include
LINKLIBS += $(MSAT_LIB)
CFLAGS += -D_M5
MSAT_DIR = $(DEPS)/mathsat
MSAT_LIB = $(MSAT_DIR)/lib/libmathsat.a # $(STATIC_GMPXX) $(STATIC_GMP)
INCLUDE += -I$(MSAT_DIR)/include
LINKLIBS += $(MSAT_LIB)
CFLAGS += -D_M5
endif
ifeq ($(CONFIG_M5), 1)
CFLAGS += -DBACKEND_M5
REACH_SUFFIX = m5
endif
Expand Down

0 comments on commit fac9c3b

Please sign in to comment.