2019-01-07 00:44:54 +00:00
|
|
|
|
2021-03-08 03:26:19 +00:00
|
|
|
CAFLAGS := --target apple2enh --list-bytes 0
|
|
|
|
LDFLAGS := --config apple2-asm.cfg
|
2019-01-07 00:44:54 +00:00
|
|
|
|
2021-03-08 03:26:19 +00:00
|
|
|
OUTDIR := out
|
2019-01-07 00:44:54 +00:00
|
|
|
|
2021-03-08 03:26:19 +00:00
|
|
|
TARGETS := $(OUTDIR)/path.BIN \
|
2021-03-07 23:29:51 +00:00
|
|
|
$(OUTDIR)/chtype.CMD $(OUTDIR)/chtime.CMD \
|
2021-04-13 03:43:49 +00:00
|
|
|
$(OUTDIR)/copy.CMD \
|
2020-06-07 15:02:08 +00:00
|
|
|
$(OUTDIR)/bell.CMD $(OUTDIR)/hello.CMD $(OUTDIR)/echo.CMD $(OUTDIR)/online.CMD
|
2019-01-07 00:44:54 +00:00
|
|
|
|
2021-03-08 00:31:54 +00:00
|
|
|
XATTR := $(shell command -v xattr 2> /dev/null)
|
|
|
|
|
2020-06-07 15:02:08 +00:00
|
|
|
.PHONY: clean all package
|
2019-01-07 00:44:54 +00:00
|
|
|
all: $(OUTDIR) $(TARGETS)
|
|
|
|
|
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
|
|
|
|
2021-03-08 03:26:19 +00:00
|
|
|
HEADERS := $(wildcard *.inc)
|
2019-01-07 00:44:54 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2020-06-07 15:02:08 +00:00
|
|
|
package:
|
|
|
|
./package.sh
|
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 $@ $<
|
2021-03-08 00:31:54 +00:00
|
|
|
ifdef XATTR
|
|
|
|
xattr -wx prodos.AuxType '00 20' $@
|
|
|
|
endif
|
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 $@ $<
|