summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2019-09-17 00:10:23 -0400
committerGitHub <noreply@github.com>2019-09-17 00:10:23 -0400
commit945d3d3a27f6e5005e5481bb2ad36f1a2a220d3d (patch)
tree7dc8f5a21c6bb7640aad82de03a314b0e919f3b2 /Makefile
parentf4160ded9897f65e5ee7fa7050d195dfaa5bf5b2 (diff)
parent06af24bce58b9285166d27fc371ad3c3dbb63a29 (diff)
Merge branch 'master' into document-eventscripts
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e38869ca6..85d3f6a51 100644
--- a/Makefile
+++ b/Makefile
@@ -121,7 +121,8 @@ else
NODEP := 1
endif
-C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
+C_SRCS_IN := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c)
+C_SRCS := $(foreach src,$(C_SRCS_IN),$(if $(findstring .inc.c,$(src)),,$(src)))
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
C_ASM_SRCS += $(wildcard $(C_SUBDIR)/*.s $(C_SUBDIR)/*/*.s $(C_SUBDIR)/*/*/*.s)
@@ -229,7 +230,7 @@ endif
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_dep :=
else
-$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include -I tools/agbcc/include $(C_SUBDIR)/$*.c)
+$(C_BUILDDIR)/%.o: c_dep = $(shell [[ -f $(C_SUBDIR)/$*.c ]] && $(SCANINC) -I include -I tools/agbcc/include $(C_SUBDIR)/$*.c)
endif
ifeq ($(DINFO),1)
@@ -245,7 +246,7 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_asm_dep :=
else
-$(C_BUILDDIR)/%.o: c_asm_dep = $(shell $(SCANINC) -I "" $(C_SUBDIR)/$*.s)
+$(C_BUILDDIR)/%.o: c_asm_dep = $(shell [[ -f $(C_SUBDIR)/$*.s ]] && $(SCANINC) -I "" $(C_SUBDIR)/$*.s)
endif
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)