IIcSystemClock/Makefile

35 lines
669 B
Makefile
Raw Normal View History

2019-04-20 22:54:40 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-12-08 23:58:24 +00:00
LDFLAGS = --config apple2-asm.cfg
2019-04-20 22:54:40 +00:00
OUTDIR = out
TARGETS = \
$(OUTDIR)/clock.system.SYS
# 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
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
HEADERS = $(wildcard *.inc)
clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(OUTDIR)/$(TARGETS)
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-12-08 23:58:24 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2019-04-20 22:54:40 +00:00
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-12-08 23:58:24 +00:00
ld65 $(LDFLAGS) -o $@ $<
2019-04-20 22:54:40 +00:00
xattr -wx prodos.AuxType '00 20' $@