feat: add header dependency tracking for programs
This commit is contained in:
@@ -84,7 +84,10 @@ $(TARGET): $(OBJDIR)/main.o $(LIBS) $(LINK_LD) Makefile
|
||||
|
||||
$(OBJDIR)/main.o: main.cpp Makefile
|
||||
mkdir -p $(OBJDIR)
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
$(CXX) $(CXXFLAGS) -MMD -MP -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR) $(TARGET)
|
||||
|
||||
# Auto-generated header dependency tracking (-MMD -MP).
|
||||
-include $(OBJDIR)/main.d
|
||||
|
||||
Reference in New Issue
Block a user