From 39bd26a83749aaf5167de6af89161a3f8ef0c36b Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 24 May 2022 07:22:45 +0100 Subject: Explain how OBJs work and the crt0 exception --- game/src/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'game') diff --git a/game/src/Makefile b/game/src/Makefile index f0a8dae..fef5f24 100644 --- a/game/src/Makefile +++ b/game/src/Makefile @@ -8,8 +8,13 @@ DATA := 0xc0de OUTDIR := ../../bin TMPDIR := ../build + +# will automatically include (and compile) any .c or .z80 file OBJS := $(patsubst %.c,$(TMPDIR)/%.rel,$(wildcard *.c)) $(patsubst %.z80,$(TMPDIR)/%.rel,$(wildcard *.z80)) +# crt0.z80 is compiled as requirement of the targets and MUST be linked first, +# so we exlude it from the list of user-provided source OBJS := $(filter-out $(TMPDIR)/crt0.rel,$(OBJS)) + UBOX_LIBS := $(wildcard ../../lib/*.lib) LIBS := -lubox -lspman -lmplayer -lap -- cgit v1.2.3