forked from noether/visionloc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (23 loc) · 1.01 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
LIB_OBJECTS = visionloc.o camera.o parser.o
CXXFLAGS = -DLINUX -I/usr/include/opencv -O2 -Wall
CXXFLAGS_SO = $(CXXFLAGS) -fPIC
CXXLIBS = -ldmtx -lpthread -lopencv_core -lopencv_imgproc -lopencv_highgui -ltinyxml2
.PHONY: all clean install
all: libvisionloc.so imagedmtx example_libvisionloc calibrate
%.o: %.cc
$(CXX) $(CXXFLAGS_SO) -c -o $@ $^
libvisionloc.so: $(LIB_OBJECTS)
$(CXX) -shared -Wl,-soname,$@ -o $@ $^ $(CXXLIBS)
imagedmtx: imagedmtx.cc
$(CXX) $(CXXFLAGS) -o $@ imagedmtx.cc $(CXXLIBS)
example_libvisionloc: example_libvisionloc.cc
$(CXX) $(CXXFLAGS) -o $@ $^ -lvisionloc -lopencv_core -lopencv_imgproc -lopencv_highgui
calibrate: calibrate.cc
$(CXX) $(CXXFLAGS) -o $@ $^ -lvisionloc -lopencv_core -lopencv_imgproc -lopencv_highgui
clean:
rm *.o *.so imagedmtx example_libvisionloc calibrate
install:
rm -f /usr/local/lib/libvisionloc.so
ln -s `pwd`/libvisionloc.so /usr/local/lib/libvisionloc.so
rm -f /usr/local/include/visionloc.hh
ln -s `pwd`/visionloc.hh /usr/local/include/visionloc.hh