chtype/Makefile

35 lines
631 B
Makefile
Raw Permalink 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)
.PHONY: clean all package
2018-12-31 20:21:38 +00:00
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
package:
./package.sh
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