diff --git a/.gitignore b/.gitignore index ba6c86e..e89354a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ Log.o # for test test test.o -*.log \ No newline at end of file +*.log + +#dependecy files +*.d \ No newline at end of file diff --git a/Makefile b/Makefile index 4a631da..33962be 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,10 @@ test: $(TARGET) $(TEST).o $(CXX) -o test $^ %.o: %.cpp + $(CXX) $(INCLUDES) $^ -MM -MT $@ > $*.d $(CXX) -c -o $@ $(CFLAGS) $^ clean: $(RM) $(TARGET) $(TEST) $(TEST).o *.log + +include *.d \ No newline at end of file