prodos-path/Makefile

36 lines
773 B
Makefile
Raw Normal View History

2019-01-06 16:44:54 -08:00
CAFLAGS = --target apple2enh --list-bytes 0
2019-09-22 21:34:34 -07:00
LDFLAGS = --config apple2-asm.cfg
2019-01-06 16:44:54 -08:00
OUTDIR = out
TARGETS = $(OUTDIR)/path.BIN \
2021-03-07 15:29:51 -08:00
$(OUTDIR)/chtype.CMD $(OUTDIR)/chtime.CMD \
2020-06-07 08:02:08 -07:00
$(OUTDIR)/bell.CMD $(OUTDIR)/hello.CMD $(OUTDIR)/echo.CMD $(OUTDIR)/online.CMD
2019-01-06 16:44:54 -08:00
2020-06-07 08:02:08 -07:00
.PHONY: clean all package
2019-01-06 16:44:54 -08:00
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
HEADERS = $(wildcard *.inc)
clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(TARGETS)
2019-01-06 16:44:54 -08:00
2020-06-07 08:02:08 -07:00
package:
./package.sh
2019-01-06 16:44:54 -08:00
$(OUTDIR)/%.o: %.s $(HEADERS)
2019-09-22 21:34:34 -07:00
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
2019-01-06 16:44:54 -08:00
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
2019-09-22 21:34:34 -07:00
ld65 $(LDFLAGS) -o $@ $<
2021-03-07 16:05:55 -08:00
if command -v xattr &> /dev/null; then xattr -wx prodos.AuxType '00 20' $@; fi
2019-01-06 17:23:56 -08:00
$(OUTDIR)/%.CMD: $(OUTDIR)/%.cmd.o
2019-09-22 21:34:34 -07:00
ld65 $(LDFLAGS) -o $@ $<