-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (73 loc) · 2.8 KB
/
Makefile
File metadata and controls
90 lines (73 loc) · 2.8 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Compiler and flags
CXX = g++
CXXFLAGS = -std=c++17 -w \
-Icpp/glucose \
-Icpp/glucose/core \
-Icpp/glucose/mtl \
-Icpp/glucose/simp
LDFLAGS = -lboost_graph -lz # Boost Graph Library
# Directories
SRC_DIR = cpp
BIN_DIR = bin
DATA_DIR = data
PYTHON_DIR = python
# Executable name
TARGET = $(BIN_DIR)/program
# Source files
SRCS = cpp/main.cpp \
cpp/candidateBuilder.cpp \
cpp/biplanarTester.cpp \
cpp/biplanarSAT.cpp \
cpp/helperFunctions.cpp \
cpp/glucose/core/Solver.cc \
cpp/glucose/core/lcm.cc \
cpp/glucose/parallel/ClausesBuffer.cc \
cpp/glucose/parallel/MultiSolvers.cc \
cpp/glucose/parallel/ParallelSolver.cc \
cpp/glucose/parallel/SharedCompanion.cc \
cpp/glucose/parallel/SolverCompanion.cc \
cpp/glucose/parallel/SolverConfiguration.cc \
cpp/glucose/simp/SimpSolver.cc \
cpp/glucose/utils/Options.cc \
cpp/glucose/utils/System.cc
# Default rule: Compile everything
all: $(TARGET)
# Compile the program
$(TARGET): $(SRCS)
mkdir -p $(BIN_DIR) # Ensure bin/ exists
$(CXX) $(CXXFLAGS) $(SRCS) -o $(TARGET) $(LDFLAGS)
# Run the compiled program
run: all
./$(TARGET)
# Run the Python script to draw the two partitions
drawPart:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/partitionsColored.py $(filter-out $@,$(MAKECMDGOALS))
# Run the Python script to draw the two partitions separately as plane graphs
plane:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/planePartitions.py $(filter-out $@,$(MAKECMDGOALS))
# Run the Python script to draw a graph
draw:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/drawGraph.py $(filter-out $@,$(MAKECMDGOALS))
# Run the Python script to draw a plane graph
drawPlane:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/drawPlaneGraph.py $(filter-out $@,$(MAKECMDGOALS))
# Run the Python script to draw the two partitions with colors in same blow-up colored the same.
drawPartBlowUp:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/partitionsColoredBlowUp.py $(filter-out $@,$(MAKECMDGOALS))
# Run the Python script to draw a graph with colors in same blow-up colored the same.
drawBlowUp:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/vis/drawGraphBlowUp.py $(filter-out $@,$(MAKECMDGOALS))
# Run the ILP solver
ilp:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/ilp/biplanarILP.py $(filter-out $@,$(MAKECMDGOALS))
# Run the SAT solver
sat:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/sat/biplanarSAT.py $(filter-out $@,$(MAKECMDGOALS))
# Run the SAT solver for blown-up graphs
sat2:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/sat/biplanarBlowupSAT.py $(filter-out $@,$(MAKECMDGOALS))
satC:
PYTHONPATH=$(PYTHON_DIR) python $(PYTHON_DIR)/sat/blowUpExtendedSAT.py $(filter-out $@,$(MAKECMDGOALS))
# Clean compiled files
clean:
rm -rf $(BIN_DIR) $(SRC_DIR)/*.o