basys33/Makefile

36 lines
592 B
Makefile

CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg
OUTDIR = out
HEADERS = $(wildcard *.inc)
TARGETS = \
$(OUTDIR)/basis.system.SYS
XATTR := $(shell command -v xattr 2> /dev/null)
.PHONY: clean all package
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(TARGETS)
package:
./package.sh
$(OUTDIR)/%.o: %.s $(HEADERS)
ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
ld65 $(LDFLAGS) -o $@ $<
ifdef XATTR
xattr -wx prodos.AuxType '00 20' $@
endif