summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoMew <SatoMew@users.noreply.github.com>2018-11-15 00:37:45 +0000
committerSatoMew <SatoMew@users.noreply.github.com>2018-11-15 00:37:45 +0000
commit24375aa1c933ef9e2c2765a94818b7b26cf60ce7 (patch)
treede2391b9d1ddee390fcf6bccdd482e5763eeac55
parentbe4624024c16293356c3e10f61ea301d5c86d9ed (diff)
Fix dependency scanning
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 0b83cb5c5..d231c09d5 100644
--- a/Makefile
+++ b/Makefile
@@ -123,10 +123,10 @@ $(C_BUILDDIR)/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc
$(C_BUILDDIR)/isagbprn.o: CC1 := tools/agbcc/bin/old_agbcc
$(C_BUILDDIR)/isagbprn.o: CFLAGS := -mthumb-interwork
-ifeq ($(NODEP),)
-$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
-else
+ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_dep :=
+else
+$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
endif
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
@@ -135,19 +135,19 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
@echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
-ifeq ($(NODEP),)
-$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s)
-else
+ifeq ($(NODEP),1)
$(ASM_BUILDDIR)/%.o: asm_dep :=
+else
+$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s)
endif
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
$(AS) $(ASFLAGS) -o $@ $<
-ifeq ($(NODEP),)
-$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s)
-else
+ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
+else
+$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s)
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep)