summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMartin Miller2017-03-25 18:32:57 -0500
committerMartin Miller2017-03-25 18:32:57 -0500
commit7c0b1419c76aaaf3f2f4de73bdf1be331e741926 (patch)
tree182efdfe5d01fd75983fbb9160b27a2f5f7ca191 /Makefile
parent3fa684a8773b8c992656b5ef59b480a24b03a65e (diff)
downloadrefslam-7c0b1419c76aaaf3f2f4de73bdf1be331e741926.zip
refslam-7c0b1419c76aaaf3f2f4de73bdf1be331e741926.tar.gz
Add .h dependency to Makefile
This only corresponds foo.cpp to foo.h, nothing more than that.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9ca3b7d..f65de67 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
OBJECT=src/main.o src/body.o src/state.o src/feature.o src/camera.o src/ourerr.o
+SRCS=$(patsubst %.o,%.cpp,$(OBJECT))
CXXFLAGS+=-O2 -march=native -std=c++11 -pedantic-errors
CXXFLAGS+=-g
CXXFLAGS+=$(shell pkg-config --cflags eigen3 yaml-cpp)
@@ -6,10 +7,13 @@ CXXFLAGS+=$(shell pkg-config --cflags eigen3 yaml-cpp)
LIBS+=$(shell pkg-config --libs eigen3 yaml-cpp)
#LIBS+=$(shell pkg-config --libs opencv)
+
slam: ${OBJECT}
$(CXX) -o $@ $^ $(CXXFLAGS) ${LIBS}
-.cpp.o:
+
+#.cpp.o:
+%.o: %.cpp %.h
$(CXX) $(CXXFLAGS) ${LIBS} -c $< -o $@
.PHONY: clean