2022-01-06 08:08:54 +00:00
|
|
|
|
|
|
|
CAFLAGS = --target apple2enh --list-bytes 0
|
|
|
|
LDFLAGS = --config apple2-asm.cfg
|
|
|
|
|
2023-11-13 00:42:11 +00:00
|
|
|
OUTDIR = ../out
|
2022-01-06 08:08:54 +00:00
|
|
|
|
|
|
|
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
|
|
|
|
|
|
|
|
TARGETS = \
|
|
|
|
$(OUTDIR)/a2green.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/a2green.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/bw.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/bw.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/deepblue.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/deepblue.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/gray.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/gray.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/gsblue.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/gsblue.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/mint.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/mint.setup.SYS \
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/pink.system.SYS \
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/pink.setup.SYS \
|
|
|
|
$(OUTDIR)/wb.system.SYS \
|
|
|
|
$(OUTDIR)/wb.setup.SYS
|
|
|
|
|
2022-01-06 08:08:54 +00:00
|
|
|
# For timestamps
|
|
|
|
MM = $(shell date "+%-m")
|
|
|
|
DD = $(shell date "+%-d")
|
|
|
|
YY = $(shell date "+%-y")
|
|
|
|
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY)
|
|
|
|
|
|
|
|
XATTR := $(shell command -v xattr 2> /dev/null)
|
|
|
|
|
|
|
|
.PHONY: clean all
|
|
|
|
all: $(OUTDIR) $(TARGETS)
|
|
|
|
|
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OUTDIR)/*.o
|
|
|
|
rm -f $(OUTDIR)/*.list
|
|
|
|
rm -f $(TARGETS)
|
|
|
|
|
|
|
|
$(OUTDIR)/%.o: %.s $(HEADERS)
|
|
|
|
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
|
|
|
|
|
2024-01-31 05:16:32 +00:00
|
|
|
$(OUTDIR)/%.setup.o: %.system.s $(HEADERS)
|
|
|
|
ca65 $(CAFLAGS) $(DEFINES) -D BUILD_SETUP_FILE --listing $(basename $@).list -o $@ $<
|
|
|
|
|
2022-01-06 08:08:54 +00:00
|
|
|
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
|
|
|
ld65 $(LDFLAGS) -o $@ $<
|