From 796457e54cb5eab73b2917ab9bc948bc55e68136 Mon Sep 17 00:00:00 2001 From: Wolfvak Date: Fri, 19 Apr 2019 15:19:37 -0300 Subject: [PATCH] Restored autodependency generation --- .gitignore | 2 ++ Makefile | 2 +- arm11/Makefile | 2 ++ arm9/Makefile | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 61ebe92..78ec503 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Object files +*.d *.o *.ko *.obj @@ -39,6 +40,7 @@ desktop.ini *.sublime-* # Build directories +/build /output /release diff --git a/Makefile b/Makefile index f7bb4b4..a7cf50d 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ export INCLUDE := -I"$(shell pwd)/common" export ASFLAGS := -g -x assembler-with-cpp $(INCLUDE) export CFLAGS := -DDBUILTS="\"$(DBUILTS)\"" -DDBUILTL="\"$(DBUILTL)\"" -DVERSION="\"$(VERSION)\"" -DFLAVOR="\"$(FLAVOR)\"" \ -g -O2 -Wall -Wextra -Wpedantic -Wcast-align -Wformat=2 -Wno-main \ - -fomit-frame-pointer -ffast-math -std=gnu11 \ + -fomit-frame-pointer -ffast-math -std=gnu11 -MMD -MP \ -Wno-unused-function -Wno-format-truncation $(INCLUDE) -ffunction-sections -fdata-sections export LDFLAGS := -Tlink.ld -nostartfiles -Wl,--gc-sections,-z,max-page-size=512 ELF := arm9/arm9.elf arm11/arm11.elf diff --git a/arm11/Makefile b/arm11/Makefile index a41b0f2..a47d520 100644 --- a/arm11/Makefile +++ b/arm11/Makefile @@ -39,3 +39,5 @@ $(BUILD)/%.o: $(SOURCE)/%.s @mkdir -p "$(@D)" @echo "[$(PROCESSOR)] $<" @$(CC) -c $(ASFLAGS) -o $@ $< + +include $(call rwildcard, $(BUILD), *.d) diff --git a/arm9/Makefile b/arm9/Makefile index f180deb..ea19d7d 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -39,3 +39,5 @@ $(BUILD)/%.o: $(SOURCE)/%.s @mkdir -p "$(@D)" @echo "[$(PROCESSOR)] $<" @$(CC) -c $(ASFLAGS) -o $@ $< + +include $(call rwildcard, $(BUILD), *.d)