2019-01-07 00:44:54 +00:00
|
|
|
|
|
|
|
CAFLAGS = --target apple2enh --list-bytes 0
|
2019-09-23 04:34:34 +00:00
|
|
|
LDFLAGS = --config apple2-asm.cfg
|
2019-01-07 00:44:54 +00:00
|
|
|
|
|
|
|
OUTDIR = out
|
|
|
|
|
2019-01-09 02:36:52 +00:00
|
|
|
TARGETS = $(OUTDIR)/path.BIN \
|
|
|
|
$(OUTDIR)/bell.CMD $(OUTDIR)/hello.CMD $(OUTDIR)/echo.CMD
|
2019-01-07 00:44:54 +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:08:54 +00:00
|
|
|
rm -f $(TARGETS)
|
2019-01-07 00:44:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
$(OUTDIR)/%.o: %.s $(HEADERS)
|
2019-09-23 04:34:34 +00:00
|
|
|
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
|
2019-01-07 00:44:54 +00:00
|
|
|
|
|
|
|
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
2019-09-23 04:34:34 +00:00
|
|
|
ld65 $(LDFLAGS) -o $@ $<
|
2019-01-07 00:44:54 +00:00
|
|
|
xattr -wx prodos.AuxType '00 20' $@
|
2019-01-07 01:23:56 +00:00
|
|
|
|
2019-01-08 16:08:54 +00:00
|
|
|
$(OUTDIR)/%.CMD: $(OUTDIR)/%.cmd.o
|
2019-09-23 04:34:34 +00:00
|
|
|
ld65 $(LDFLAGS) -o $@ $<
|