mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-11-04 23:05:30 +00:00
22 lines
414 B
Makefile
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))
|