2017-11-11 20:44:15 -08:00
|
|
|
|
|
|
|
CAFLAGS = --target apple2enh --list-bytes 0
|
2019-09-22 21:34:47 -07:00
|
|
|
LDFLAGS = --config apple2-asm.cfg
|
2017-11-11 20:44:15 -08:00
|
|
|
|
2019-10-04 18:10:01 -07:00
|
|
|
OUTDIR = out
|
|
|
|
|
|
|
|
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
|
|
|
|
|
|
|
|
TARGETS = \
|
2020-12-23 14:35:08 -08:00
|
|
|
$(OUTDIR)/selector.system.SYS \
|
|
|
|
$(OUTDIR)/bye.system.SYS \
|
2020-12-21 21:37:48 -08:00
|
|
|
$(OUTDIR)/bbb.system.SYS \
|
2019-10-04 18:10:01 -07:00
|
|
|
$(OUTDIR)/buhbye.system.SYS
|
2017-11-11 20:44:15 -08:00
|
|
|
|
2019-10-01 22:08:21 -07: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)
|
|
|
|
|
2021-03-07 16:35:52 -08:00
|
|
|
XATTR := $(shell command -v xattr 2> /dev/null)
|
|
|
|
|
2017-11-11 20:44:15 -08:00
|
|
|
.PHONY: clean all
|
2019-10-04 18:10:01 -07:00
|
|
|
all: $(OUTDIR) $(TARGETS)
|
2017-11-11 20:44:15 -08:00
|
|
|
|
2019-10-04 18:10:01 -07:00
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
2017-11-11 20:44:15 -08:00
|
|
|
|
|
|
|
clean:
|
2019-10-04 18:10:01 -07:00
|
|
|
rm -f $(OUTDIR)/*.o
|
|
|
|
rm -f $(OUTDIR)/*.list
|
2020-03-12 20:15:18 -07:00
|
|
|
rm -f $(TARGETS)
|
2017-11-11 20:44:15 -08:00
|
|
|
|
2019-10-04 18:10:01 -07:00
|
|
|
$(OUTDIR)/%.o: %.s $(HEADERS)
|
2019-10-01 22:08:21 -07:00
|
|
|
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
|
2017-11-11 20:44:15 -08:00
|
|
|
|
2019-10-04 18:10:01 -07:00
|
|
|
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
2019-09-22 21:34:47 -07:00
|
|
|
ld65 $(LDFLAGS) -o $@ $<
|
2021-03-07 16:35:52 -08:00
|
|
|
ifdef XATTR
|
|
|
|
xattr -wx prodos.AuxType '00 20' $@
|
|
|
|
endif
|