diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-20 14:24:39 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-20 14:24:39 +0200 |
commit | e43c5e6f856ad583579384e1f9509f66e3e0537e (patch) | |
tree | ad87e0aaf095c6b86525dcc5a57f129cd0531c49 /Makefile | |
parent | 41f947b80f1c03d5451988593d2d16ec69e9b653 (diff) |
Add build deps to Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -11,10 +11,15 @@ SRC = \ OBJ = $(patsubst %.cc,%.o,$(SRC)) +DEPFILES := $(patsubst %.cc,%.d,$(SRC)) +$(DEPFILES): + +include $(wildcard $(DEPFILES)) + CXXFLAGS = -g -O3 -std=c++17 -I. %.o: %.cc - g++ $(CXXFLAGS) -c $< -o $@ + g++ -MMD $(CXXFLAGS) -c $< -o $@ libcppbuild.a: $(OBJ) ar rcs $@ $(OBJ) @@ -23,4 +28,4 @@ cppbuild: cppbuild.cc subdir/cppbuild.cc libcppbuild.a g++ $(CXXFLAGS) -pthread cppbuild.cc subdir/cppbuild.cc libcppbuild.a -o $@ clean: - rm -f libcppbuild.a $(OBJ) cppbuild + rm -f libcppbuild.a $(OBJ) cppbuild $(DEPFILES) |