git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 6cf901ed4738539d4d0937dcf80786fdd0ba8778
parent 7e2f367294a1bb264976872ea89adbefc2110999
Author: Toxa <untoxa@mail.ru>
Date:   Wed,  2 Feb 2022 12:04:45 +0300

smarter Makefile for large_map example

Diffstat:
Mgbdk-lib/examples/cross-platform/large_map/Makefile9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gbdk-lib/examples/cross-platform/large_map/Makefile b/gbdk-lib/examples/cross-platform/large_map/Makefile @@ -25,6 +25,8 @@ LCCFLAGS += -Wl-j -Wm-yoA -Wm-ya4 -autobank -Wb-ext=.rel -Wb-v # MBC + Autobanki # You can set the name of the ROM file here PROJECTNAME = large-map +CFLAGS = -Wf-MMD + # EXT?=gb # Only sets extension to default (game boy .gb) if not populated SRCDIR = src OBJDIR = obj/$(EXT) @@ -35,11 +37,16 @@ MKDIRS = $(OBJDIR) $(BINDIR) # See bottom of Makefile for directory auto-cr BINS = $(OBJDIR)/$(PROJECTNAME).$(EXT) CSOURCES = $(foreach dir,$(SRCDIR),$(notdir $(wildcard $(dir)/*.c))) $(foreach dir,$(RESDIR),$(notdir $(wildcard $(dir)/*.c))) ASMSOURCES = $(foreach dir,$(SRCDIR),$(notdir $(wildcard $(dir)/*.s))) -OBJS = $(CSOURCES:%.c=$(OBJDIR)/%.o) $(ASMSOURCES:%.s=$(OBJDIR)/%.o) +OBJS = $(CSOURCES:%.c=$(OBJDIR)/%.o) $(ASMSOURCES:%.s=$(OBJDIR)/%.o) # Builds all targets sequentially all: $(TARGETS) +# Dependencies +DEPS = $(OBJS:%.o=%.d) + +-include $(DEPS) + # Compile .c files in "src/" to .o object files $(OBJDIR)/%.o: $(SRCDIR)/%.c $(LCC) $(CFLAGS) -c -o $@ $<

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.