forked from yujiali/pygco
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
executable file
·72 lines (60 loc) · 2.05 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
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
CXX=g++
CFLAGS=-fPIC
INC=-Isrc/gco_cpp -Isrc/gco
all: libcgco.so test_wrapper
libcgco.so: \
src/gco_cpp/LinkedBlockList.o src/gco_cpp/graph.o src/gco_cpp/maxflow.o \
src/gco_cpp/GCoptimization.o cgco.o
$(CXX) -shared $(CFLAGS) \
src/gco_cpp/LinkedBlockList.o \
src/gco_cpp/graph.o \
src/gco_cpp/maxflow.o \
src/gco_cpp/GCoptimization.o \
cgco.o \
-o libcgco.so
gco.so: \
src/gco_cpp/LinkedBlockList.o src/gco_cpp/graph.o src/gco_cpp/maxflow.o \
src/gco_cpp/GCoptimization.o
$(CXX) -shared $(CFLAGS) src/gco_cpp/LinkedBlockList.o \
src/gco_cpp/graph.o \
src/gco_cpp/maxflow.o \
src/gco_cpp/GCoptimization.o -o gco.so
src/gco_cpp/LinkedBlockList.o: \
src/gco_cpp/LinkedBlockList.cpp \
src/gco_cpp/LinkedBlockList.h
$(CXX) $(CFLAGS) $(INC) \
-c src/gco_cpp/LinkedBlockList.cpp \
-o src/gco_cpp/LinkedBlockList.o
src/gco_cpp/graph.o: \
src/gco_cpp/graph.cpp src/gco_cpp/graph.h src/gco_cpp/block.h
$(CXX) $(CFLAGS) $(INC) \
-c -x c++ src/gco_cpp/graph.cpp \
-o src/gco_cpp/graph.o
src/gco_cpp/maxflow.o: \
src/gco_cpp/block.h src/gco_cpp/graph.h src/gco_cpp/maxflow.cpp
$(CXX) $(CFLAGS) $(INC) \
-c -x c++ src/gco_cpp/maxflow.cpp \
-o src/gco_cpp/maxflow.o
src/gco_cpp/GCoptimization.o: \
src/gco_cpp/GCoptimization.cpp src/gco_cpp/GCoptimization.h \
src/gco_cpp/LinkedBlockList.h src/gco_cpp/energy.h src/gco_cpp/graph.h \
src/gco_cpp/graph.o src/gco_cpp/maxflow.o
$(CXX) $(CFLAGS) $(INC) \
-c src/gco_cpp/GCoptimization.cpp \
-o src/gco_cpp/GCoptimization.o
cgco.o: \
src/gco/cgco.cpp src/gco_cpp/GCoptimization.h
$(CXX) $(CFLAGS) $(INC) \
-c src/gco/cgco.cpp \
-o cgco.o
test_wrapper: \
tests/test_wrapper.cpp
$(CXX) $(INC) -L. tests/test_wrapper.cpp \
-o test_wrapper -Wl,-rpath,. -lcgco
clean:
rm -f *.o src/gco_cpp/*.o test_wrapper
rm:
rm -f *.o *.so src/gco_cpp/*.o *.zip test_wrapper
download:
wget -N -O gco-v3.0.zip http://vision.csd.uwo.ca/code/gco-v3.0.zip
unzip -o gco-v3.0.zip -d ./src/gco_cpp