prodos-drivers/ram.drv/Makefile

35 lines
692 B
Makefile
Raw Normal View History

2019-02-25 04:03:51 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-09-23 04:33:54 +00:00
LDFLAGS = --config apple2-asm.cfg
2019-02-25 04:03:51 +00:00
OUTDIR = out
2019-10-04 04:23:00 +00:00
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
2019-02-25 04:03:51 +00:00
2019-06-18 03:45:00 +00:00
TARGETS = $(OUTDIR)/ram.drv.system.SYS
2019-02-25 04:03:51 +00:00
2019-10-01 03:34:17 +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)
2019-02-25 04:03:51 +00:00
.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)
2019-10-01 03:34:17 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2019-02-25 04:03:51 +00:00
# System Files .SYS
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-09-23 04:33:54 +00:00
ld65 $(LDFLAGS) -o '$@' $<
2019-02-25 04:03:51 +00:00
xattr -wx prodos.AuxType '00 20' $@