basys33/Makefile

36 lines
592 B
Makefile
Raw Permalink Normal View History

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