unified_retro_keyboard/firmware/asdf/src/Makefile.deps
2019-12-12 14:46:29 -06:00

22 lines
414 B
Makefile

# -*- makefile -*-
DEP_DIR := .deps
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
MAKEDEPEND = $(CPP) $(DEPFLAGS) $(CPPFLAGS) $< \
| sed -n 's,^\# *[0-9][0-9]* *"\([^"<]*\)".*,$@: \1\n\1:,p' \
| sort -u > $*.d
%.d : %.c $(DEP_DIR)/%.d | $(DEPDIR)
@$(MAKEDEPEND)
$(DEP_DIR): ; @mkdir -p $@
DEPFILES := $(SRC_FILES:%.c=$(DEP_DIR)/%.d)
$(DEPFILES):
include $(wildcard $(DEPFILES))