feat: add header dependency tracking for programs
This commit is contained in:
@@ -71,7 +71,10 @@ $(TARGET): $(OBJS) $(LINK_LD) Makefile $(LIBS)
|
||||
|
||||
$(OBJDIR)/%.o: %.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 $(OBJS:.o=.d)
|
||||
|
||||
Reference in New Issue
Block a user