2023-10-11 20:07:04 +00:00
|
|
|
PROJECT := demo
|
|
|
|
|
2023-10-08 19:38:15 +00:00
|
|
|
SRC = \
|
2023-10-13 07:08:22 +00:00
|
|
|
src/ceda_print_a.asm \
|
|
|
|
src/ceda_print_c.c \
|
2023-10-15 13:09:36 +00:00
|
|
|
src/cursor.c \
|
|
|
|
src/delay.asm \
|
2023-10-08 19:38:15 +00:00
|
|
|
src/main.c \
|
2023-10-13 07:44:39 +00:00
|
|
|
src/io_a.c \
|
2023-10-08 19:38:15 +00:00
|
|
|
\
|
|
|
|
|
|
|
|
OBJ = $(patsubst %, %.o, $(basename $(SRC)))
|
|
|
|
|
|
|
|
ECHO := @echo
|
|
|
|
QUIET := @
|
|
|
|
OUTDIR := build
|
|
|
|
|
2023-10-11 20:07:04 +00:00
|
|
|
$(OUTDIR)/$(PROJECT).prg: $(OUTDIR)/$(PROJECT)_code_compiler.bin
|
|
|
|
echo -n -e '\x00\x10' > $@
|
|
|
|
cat $< >> $@
|
2023-10-08 19:38:15 +00:00
|
|
|
|
2023-10-11 20:07:04 +00:00
|
|
|
$(OUTDIR)/$(PROJECT)_code_compiler.bin: $(OBJ) | $(OUTDIR)
|
|
|
|
zcc +conf.cfg \
|
|
|
|
-crt0=src/crt.asm \
|
2023-10-15 13:08:25 +00:00
|
|
|
-m -o $(OUTDIR)/$(PROJECT) $(OBJ)
|
2023-10-08 19:38:15 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
zcc +z80 -c -o $@ $<
|
|
|
|
|
|
|
|
%.o: %.asm
|
|
|
|
zcc +z80 -c -o $@ $<
|
|
|
|
|
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJ)
|
|
|
|
$(RM) -r $(OUTDIR)
|
|
|
|
|