prodos-drivers/quit/Makefile

35 lines
713 B
Makefile
Raw Normal View History

2019-10-04 04:55:36 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg
2019-10-05 01:10:01 +00:00
OUTDIR = out
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
TARGETS = \
$(OUTDIR)/quit.system.SYS
2019-10-04 04:55:36 +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)
.PHONY: clean all
2019-10-05 01:10:01 +00:00
all: $(OUTDIR) $(TARGETS)
2019-10-04 04:55:36 +00:00
2019-10-05 01:10:01 +00:00
$(OUTDIR):
mkdir -p $(OUTDIR)
2019-10-04 04:55:36 +00:00
clean:
2019-10-05 01:10:01 +00:00
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
2020-03-13 03:15:18 +00:00
rm -f $(TARGETS)
2019-10-04 04:55:36 +00:00
2019-10-05 01:10:01 +00:00
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-10-04 04:55:36 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2019-10-05 01:10:01 +00:00
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-10-04 04:55:36 +00:00
ld65 $(LDFLAGS) -o $@ $<
2021-03-08 00:05:31 +00:00
if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi