prodos-drivers/Makefile

43 lines
830 B
Makefile
Raw Normal View History

2017-11-24 23:47:28 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-09-23 04:32:33 +00:00
LDFLAGS = --config apple2-asm.cfg
2017-11-24 23:47:28 +00:00
2018-04-30 03:04:06 +00:00
OUTDIR = out
TARGETS = \
$(OUTDIR)/prodos.mod.BIN \
$(OUTDIR)/ns.clock.system.SYS \
$(OUTDIR)/cricket.system.SYS \
$(OUTDIR)/test.BIN \
$(OUTDIR)/date.BIN \
$(OUTDIR)/set.time.BIN \
$(OUTDIR)/set.date.BIN
2017-11-24 23:47:28 +00:00
2017-12-02 04:17:14 +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)
2017-11-24 23:47:28 +00:00
.PHONY: clean all
2018-04-30 04:45:53 +00:00
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
2017-11-24 23:47:28 +00:00
HEADERS = $(wildcard *.inc)
clean:
2018-04-30 03:04:06 +00:00
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(OUTDIR)/$(TARGETS)
2019-09-23 04:32:33 +00:00
2017-11-24 23:47:28 +00:00
2018-04-30 03:04:06 +00:00
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-09-23 04:32:33 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2017-11-24 23:47:28 +00:00
2018-04-30 03:04:06 +00:00
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-09-23 04:32:33 +00:00
ld65 $(LDFLAGS) -o $@ $<
2018-04-11 03:38:45 +00:00
xattr -wx prodos.AuxType '00 20' $@