Parallelize depend file generation

This commit is contained in:
Matias N 2020-11-18 13:44:58 -03:00 committed by Alan Carvalho de Assis
parent 2df6547d50
commit d5b6ec450f
35 changed files with 194 additions and 54 deletions

View File

@ -194,12 +194,15 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="$(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))"
$(Q) touch $@
depend: .depend

View File

@ -140,12 +140,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -155,12 +155,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -138,12 +138,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -141,12 +141,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -181,12 +181,15 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="$(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))"
$(Q) touch $@
depend: .depend

View File

@ -149,11 +149,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common"
$(Q) touch $@
depend: .depend

View File

@ -184,12 +184,15 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) > Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="$(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))"
$(Q) touch $@
depend: .depend

View File

@ -330,12 +330,15 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS) nuttx-names.dat
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(HOSTSRCS:.c=.ddh)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board depend ; \
fi
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(ASRCS) $(CSRCS) >Make.dep
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(HOSTCFLAGS) -- $(HOSTSRCS) >>Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -153,12 +153,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -148,12 +148,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -139,12 +139,15 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="--dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR)"
$(Q) touch $@
depend: .depend

View File

@ -68,9 +68,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -80,9 +80,13 @@ $(BINFMT_COBJS): %$(OBJEXT): %.c
$(BIN): $(BINFMT_OBJS)
$(call ARCHIVE, $@, $(BINFMT_OBJS))
makedepfile: $(BINFMT_CSRCS:.c=.ddc) $(BINFMT_ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(BINFMT_SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(BINFMT_SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -98,14 +98,13 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) $(CXXSRCS:.cxx=.ddx)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
ifneq ($(SRCS),)
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
endif
ifneq ($(CXXSRCS),)
$(Q) $(MKDEP) "$(CXX)" -- $(CXXFLAGS) -- $(CXXSRCS) >>Make.dep
endif
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -89,10 +89,14 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(CONFIG_CRYPTO),y)
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
endif
$(Q) touch $@

View File

@ -119,9 +119,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -97,9 +97,13 @@ $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
context::
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -124,8 +124,12 @@ $(BIN): $(OBJS)
mklibgraphics: $(BIN)
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: gensources Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -156,10 +156,18 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, bin/Make.dep, $^)
$(call DELFILE, $^)
makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, kbin/Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
$(Q) $(MAKE) makedepfile
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
$(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
endif
ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
$(Q) $(MAKE) -C zoneinfo depend BIN=$(BIN)

View File

@ -37,7 +37,7 @@ include $(TOPDIR)/Make.defs
all:
.PHONY: clean distclean
# Clean Targets:
clean:

View File

@ -118,8 +118,12 @@ context: .tzbuilt romfs
# Create dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -49,9 +49,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -235,10 +235,18 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, bin/Make.dep, $^)
$(call DELFILE, $^)
makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, kbin/Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile gensources $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
$(Q) $(MAKE) makedepfile
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
$(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
endif
$(Q) touch $@

View File

@ -37,7 +37,7 @@ include $(TOPDIR)/Make.defs
all:
.PHONY: clean distclean
# Clean Targets:
clean:

View File

@ -91,8 +91,12 @@ $(BIN): $(OBJS)
dirlinks::
makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -82,10 +82,18 @@ endif
# Dependencies
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, bin/Make.dep, $^)
$(call DELFILE, $^)
makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, kbin/Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
$(Q) $(MAKE) makedepfile
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
$(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
endif
$(Q) touch $@

View File

@ -91,10 +91,14 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(CONFIG_NET),y)
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
endif
$(Q) touch $@

View File

@ -47,8 +47,12 @@ $(BIN): $(OBJS)
dirlinks::
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -57,9 +57,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -58,9 +58,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -93,9 +93,12 @@ $(BIN3): $(WRAP_OBJS)
$(SYSCALLWRAPS): .context
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile DEPPATH="$(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH)"
$(Q) touch $@
depend: .depend

View File

@ -200,6 +200,23 @@ else
MKDEP ?= $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT)
endif
# Per-file dependency generation rules
%.dds: %.S
$(Q) $(MKDEP) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@
%.ddc: %.c
$(Q) $(MKDEP) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $< > $@
%.ddp: %.cpp
$(Q) $(MKDEP) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $< > $@
%.ddx: %.cxx
$(Q) $(MKDEP) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $< > $@
%.ddh: %.c
$(Q) $(MKDEP) --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(HOSTCFLAGS) -- $< > $@
# INCDIR - Convert a list of directory paths to a list of compiler include
# directories
# Example: CFFLAGS += ${shell $(INCDIR) [options] "compiler" "dir1" "dir2" "dir2" ...}

View File

@ -55,9 +55,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend

View File

@ -60,9 +60,13 @@ $(COBJS): %$(OBJEXT): %.c
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
$(call CATFILE, Make.dep, $^)
$(call DELFILE, $^)
.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MAKE) makedepfile
$(Q) touch $@
depend: .depend