prodos-drivers/selectors/Makefile

46 lines
1023 B
Makefile
Raw Permalink Normal View History

2017-11-12 04:44:15 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-09-23 04:34:47 +00:00
LDFLAGS = --config apple2-asm.cfg
2017-11-12 04:44:15 +00:00
2023-11-13 00:42:11 +00:00
OUTDIR = ../out
2019-10-05 01:10:01 +00:00
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
TARGETS = \
$(OUTDIR)/selector.system.SYS \
$(OUTDIR)/selector.setup.SYS \
$(OUTDIR)/bye.system.SYS \
$(OUTDIR)/bye.setup.SYS \
2020-12-22 05:37:48 +00:00
$(OUTDIR)/bbb.system.SYS \
$(OUTDIR)/bbb.setup.SYS \
$(OUTDIR)/buhbye.system.SYS \
$(OUTDIR)/buhbye.setup.SYS
2017-11-12 04:44:15 +00:00
2019-10-02 05:08:21 +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)
2021-03-08 00:35:52 +00:00
XATTR := $(shell command -v xattr 2> /dev/null)
2017-11-12 04:44:15 +00:00
.PHONY: clean all
2019-10-05 01:10:01 +00:00
all: $(OUTDIR) $(TARGETS)
2017-11-12 04:44:15 +00:00
2019-10-05 01:10:01 +00:00
$(OUTDIR):
mkdir -p $(OUTDIR)
2017-11-12 04:44:15 +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)
2017-11-12 04:44:15 +00:00
2019-10-05 01:10:01 +00:00
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-10-02 05:08:21 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2017-11-12 04:44:15 +00:00
$(OUTDIR)/%.setup.o: %.system.s $(HEADERS)
ca65 $(CAFLAGS) $(DEFINES) -D BUILD_SETUP_FILE --listing $(basename $@).list -o $@ $<
2019-10-05 01:10:01 +00:00
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-09-23 04:34:47 +00:00
ld65 $(LDFLAGS) -o $@ $<