-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (44 loc) · 1.41 KB
/
Makefile
File metadata and controls
46 lines (44 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Define which solver to use as backend, this can be a name of a file in the
# solvers directory.
SOLVER ?= glucose4.1
#
# The following values should be defined in the included file:
# VERSION = core or simp
# SOLVERNAME = name of the SAT solver
# SOLVERDIR = subdirectory of the SAT solver
# NSPACE = namespace of the SAT solver
#
include $(PWD)/solvers/$(SOLVER).mk
# THE REMAINING OF THE MAKEFILE SHOULD BE LEFT UNCHANGED
EXEC = open-wbo
DEPDIR += mtl utils core
DEPDIR += ../../encodings ../../algorithms ../../graph ../../classifier
MROOT ?= $(PWD)/solvers/$(SOLVERDIR)
LFLAGS += -lgmpxx -lgmp
CFLAGS += -Wall -Wno-parentheses -std=c++11 -DNSPACE=$(NSPACE) -DSOLVERNAME=$(SOLVERNAME) -DVERSION=$(VERSION)
ifeq ($(SANITIZER),asan)
CFLAGS += -fsanitize=address
LFLAGS += -fsanitize=address
LFLAGS += -fuse-ld=gold
endif
ifeq ($(SANITIZER),undef)
CFLAGS += -fsanitize=undefined -fsanitize-undefined-trap-on-error
LFLAGS += -fsanitize=undefined
LFLAGS += -fuse-ld=gold
endif
ifeq ($(VERSION),simp)
DEPDIR += simp
CFLAGS += -DSIMP=1
ifeq ($(SOLVERDIR),glucored)
LFLAGS += -pthread
CFLAGS += -DGLUCORED
DEPDIR += reducer glucored
endif
endif
# Some solvers do not have a template.mk file any more
# E.g.: Minisat or Riss
ifeq ($(SOLVERDIR),$(filter $(SOLVERDIR),minisat riss))
include $(PWD)/mtl/template.mk
else
include $(MROOT)/mtl/template.mk
endif