forked from zmoratto/PatchMatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (44 loc) · 2.45 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
VWDIR=$(HOME)/projects/visionworkbench/build
ASPDIR=$(HOME)/projects/StereoPipeline/build
GTEST=$(PWD)/gtest-1.7.0
BDIR=$(HOME)/packages/base_system
CXXFLAGS += -g -Ofast -DNDEBUG -I$(BDIR)/include -I$(BDIR)/include/boost-1_55 -I$(VWDIR)/include -I$(PWD) -I$(ASPDIR)/include -ffast-math -Wall -Wno-unused-local-typedefs -DTRILIBRARY #-DVW_ENABLE_BOUNDS_CHECK=1
CFLAGS += -DTRILIBRARY
LDFLAGS += -L$(BDIR)/lib -lboost_system-mt-1_55 -lboost_thread-mt-1_55 -lboost_filesystem-mt-1_55 -lboost_program_options-mt-1_55 -L$(VWDIR)/lib -lvwCore -lvwMath -lvwFileIO -lvwImage -lvwStereo -lvwInterestPoint -L$(ASPDIR)/lib -laspCore -L$(GTEST)/lib -L$(PWD) -lgtest -lpthread -Wl,-rpath,$(BDIR)/lib -Wl,-rpath,$(VWDIR)/lib
%.o : %.cc
$(CXX) -c -o $@ $(CXXFLAGS) $^
%.o : %.cxx
$(CXX) -c -o $@ $(CXXFLAGS) -I$(GTEST)/include $^
EXECS = TestPatchMatch TestMoc patch_match TestPatchMatchView TestPatchMatchHeise render_disparity_guess tricall TestPatchMatchHeiseNormal draw_normals
all: $(EXECS)
tricall : tricall.o triangle.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
draw_normals : draw_normals.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
render_disparity_guess : render_disparity_guess.o DisparityFromIP.o triangle.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
patch_match : PatchMatch.o patch_match.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
TestPatchMatch : TestPatchMatch.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
TestPatchMatchView : TestPatchMatchView.o PatchMatch.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
TestPatchMatchHeise : TestPatchMatchHeise.o PatchMatchSimple.o TVMin.o triangle.o DisparityFromIP.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
TestPatchMatchHeiseNormal : TestPatchMatchHeiseNormal.o PatchMatchSimple.o TVMin.o triangle.o DisparityFromIP.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
TestMoc : TestMoc.o PatchMatch.o
$(CXX) $^ -o $@ $(CXXFLAGS) $(LDFLAGS)
clean:
rm -f *.o *~ $(EXECS) effect*png my*png *.tif *.xml
checkall: $(EXECS)
./TestPatchMatch
parallel gdal_translate -b 1 -scale -ot Byte {} {.}.b-H.tif ::: *-D.tif
parallel gdal_translate -b 2 -scale -ot Byte {} {.}.b-V.tif ::: *-D.tif
check: $(EXECS)
./TestPatchMatch --gtest_filter=PatchMatch.PatchMatchView
parallel gdal_translate -b 1 -scale -ot Byte {} {.}.b-H.tif ::: *-D.tif
parallel gdal_translate -b 2 -scale -ot Byte {} {.}.b-V.tif ::: *-D.tif
profile:
LD_PRELOAD=/usr/lib/libprofiler.so CPUPROFILE=`pwd`/patchmatch.prof ./TestPatchMatch
google-pprof --pdf $(PWD)/TestPatchMatch patchmatch.prof > patchmatch.pdf