chtype/Makefile

33 lines
600 B
Makefile
Raw Normal View History

2018-12-31 20:21:38 +00:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-09-23 04:33:19 +00:00
LDFLAGS = --config apple2-asm.cfg
2018-12-31 20:21:38 +00:00
OUTDIR = out
2020-03-13 03:39:49 +00:00
TARGETS = $(OUTDIR)/chtype.BIN $(OUTDIR)/chtime.BIN
2018-12-31 20:21:38 +00:00
2021-03-08 00:40:19 +00:00
XATTR := $(shell command -v xattr 2> /dev/null)
2018-12-31 20:21:38 +00:00
.PHONY: clean all
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
HEADERS = $(wildcard *.inc)
clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
2019-01-08 16:09:15 +00:00
rm -f $(TARGETS)
2018-12-31 20:21:38 +00:00
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-09-23 04:33:19 +00:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2018-12-31 20:21:38 +00:00
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-09-23 04:33:19 +00:00
ld65 $(LDFLAGS) -o $@ $<
2021-03-08 00:40:19 +00:00
ifdef XATTR
2018-12-31 20:21:38 +00:00
xattr -wx prodos.AuxType '00 20' $@
2021-03-08 00:40:19 +00:00
endif