-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (48 loc) · 1.2 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
SANITIZE= #-fsanitize=address -fno-omit-frame-pointer
CC=g++
CFLAGS=-g
OPT=-O3 -ffast-math -march=native
CXXFLAGS = -fmessage-length=72 \
-std=c++0x -g -Wall $(OPT) $(SANITIZE)
LDFLAGS= -Lceres-solver-1.8.0/BUILD/lib $(SANITIZE)
CPPFLAGS= -Iceres-solver-1.8.0/include -I./eigen-eigen-ffa86ffb5570 -I/usr/include/libusb-1.0
OBJS = slam.o \
localmap.o \
planner.o \
histogram.o \
matcher.o \
vehicle.o \
video.o
TESTS = region grid histogram descriptor
LDLIBS = -lceres \
-lopencv_highgui \
-lopencv_core \
-lopencv_imgproc \
-lpthread \
-lgomp \
-lblas \
-llapack \
-lcholmod \
-lm \
-lglog \
-lprotobuf \
-lgflags \
-lusb-1.0
TARGET = slam
DEPS = make.deps
all: $(DEPS) $(TARGET)
test: $(DEPS) $(TESTS:=_run)
$(TARGET): $(OBJS) main.o
stop: vehicle.o stop.o
%_test: %_test.o $(OBJS)
$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lgtest
%_run: %_test $(OBJS)
./$(@:%_run=%_test)
push:
git commit -a && git push
pull:
git fetch upstream
git merge upstream/master
$(DEPS): $(wildcard *.cpp) $(wildcard *.h) Makefile
$(CXX) $(CXXFLAGS) -MM $(wildcard *.cpp) > $(DEPS)
-include $(DEPS)