-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (27 loc) · 1.46 KB
/
Makefile
File metadata and controls
44 lines (27 loc) · 1.46 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
CPPFLAGS=-g -I src/ -I examples/ -lscip
LDFLAGS=-g -L/usr/local/lib -lscip
LDLIBS=-L/usr/local/lib -lscip
ODIR=obj
BINDIR=bin
SRCS=$(ODIR)/scip_wrapper.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
milp = chromatic_number dependency_knapsack independent_set longest_path_catan max_clique min_cost_flow min_team_matching \
n_queens_completion rectangle_packing three_partition trivial_examples tsp vertex_cover weighted_max_cut
milp_obj_files = chromatic_number.o dependency_knapsack.o independent_set.o longest_path_catan.o max_clique.o min_cost_flow.o min_team_matching.o \
n_queens_completion.o rectangle_packing.o three_partition.o trivial_examples.o tsp.o vertex_cover.o weighted_max_cut.o
qubo = qubo_vertex_cover qubo_chromatic_number
qubo_obj_files = qubo_vertex_cover.o qubo_chromatic_number.o
all: $(milp) $(qubo)
clean:
rm bin/*
rm obj/*
$(milp): %: %.o scip_wrapper.o
g++ $(LDFLAGS) -o $(BINDIR)/$@ $(ODIR)/$@.o $(OBJS) $(LDLIBS)
$(filter %.o,$(milp_obj_files)): %.o: examples/milp_examples/%.cpp scip_wrapper.o
g++ $(CPPFLAGS) -c examples/milp_examples/$(basename $@).cpp -o $(ODIR)/$@
$(qubo): %: %.o scip_wrapper.o
g++ $(LDFLAGS) -o $(BINDIR)/$@ $(ODIR)/$@.o $(OBJS) $(LDLIBS)
$(filter %.o,$(qubo_obj_files)): %.o: examples/qubo_examples/%.cpp scip_wrapper.o
g++ $(CPPFLAGS) -c examples/qubo_examples/$(basename $@).cpp -o $(ODIR)/$@
scip_wrapper.o: src/scip_wrapper.cpp src/scip_wrapper.hpp
g++ $(CPPFLAGS) -c src/scip_wrapper.cpp -o $(ODIR)/scip_wrapper.o