forked from batchenRothenberg/SMTSampler
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·45 lines (34 loc) · 1.22 KB
/
Makefile
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
.PHONY: all clean tidy
BINARY=megasampler
SRC=$(wildcard *.cpp) $(wildcard *.h) $(wildcard *.c++) $(wildcard *.c)
OBJS=sampler.o megasampler.o smtsampler.o interval.o intervalmap.o \
model.o strengthener.o z3_utils.o main.o
DEPS=$(OBJS:%.o=%.d)
PYVER=$(shell python --version | cut -d. -f1-2 | cut -d' ' -f2)
all: $(BINARY)
CXXFLAGS=-Wall -Wextra -Wnon-virtual-dtor -pedantic -ggdb \
-std=gnu++17 -march=native -pipe -O3 -flto -DNDEBUG
Z3DIR=../z3
Z3FLAGS=-isystem $(Z3DIR)/src/api -isystem ../z3/src/api/c++
Z3LINKFLAGS=-L ../z3/build -lz3
LDFLAGS=$(Z3LINKFLAGS) -ldl -rdynamic -ljsoncpp -lpthread
clean:
rm -f $(BINARY) $(OBJS) $(DEPS) testmodel strengthener
tidy:
clang-tidy *.cpp -- $(CXXFLAGS) $(Z3FLAGS)
%.o: %.cpp
$(CC) $(CFLAGS) $(CXXFLAGS) $(Z3FLAGS) -MMD -c $<
-include $(DEPS)
$(BINARY): $(OBJS)
g++ $(CXXFLAGS) -o $(BINARY) \
$(OBJS) \
$(LDFLAGS)
strip $(BINARY)
testmodel: test_model.cpp model.cpp model.h
g++ $(CXXFLAGS) -o testmodel \
test_model.cpp model.cpp \
$(Z3FLAGS)
strengthener: strengthener.cpp strengthener.h interval.cpp interval.h z3_utils.cpp z3_utils.h test_strengthener.cpp
g++ $(CXXFLAGS) -o strengthener \
strengthener.cpp interval.cpp z3_utils.cpp test_strengthener.cpp \
$(Z3FLAGS)