2017-11-24 15:47:28 -08:00
|
|
|
|
|
|
|
CAFLAGS = --target apple2enh --list-bytes 0
|
2019-09-22 21:32:33 -07:00
|
|
|
LDFLAGS = --config apple2-asm.cfg
|
2017-11-24 15:47:28 -08:00
|
|
|
|
2018-04-29 20:04:06 -07:00
|
|
|
OUTDIR = out
|
|
|
|
|
2023-11-12 13:56:52 -08:00
|
|
|
HEADERS = $(wildcard *.inc) $(wildcard ../../inc/*.inc)
|
2019-09-30 20:34:26 -07:00
|
|
|
|
2018-04-29 20:04:06 -07:00
|
|
|
TARGETS = \
|
|
|
|
$(OUTDIR)/prodos.mod.BIN \
|
|
|
|
$(OUTDIR)/cricket.system.SYS \
|
|
|
|
$(OUTDIR)/test.BIN \
|
2023-06-25 11:46:35 -07:00
|
|
|
$(OUTDIR)/set.datetime.BIN \
|
2018-04-29 20:04:06 -07:00
|
|
|
$(OUTDIR)/set.time.BIN \
|
|
|
|
$(OUTDIR)/set.date.BIN
|
2017-11-24 15:47:28 -08:00
|
|
|
|
2023-05-01 19:47:10 -07:00
|
|
|
LOG_SUCCESS=1
|
|
|
|
LOG_FAILURE=1
|
|
|
|
|
2017-12-01 20:17:14 -08:00
|
|
|
# For timestamps
|
2019-09-29 12:15:37 -07:00
|
|
|
MM = $(shell date "+%-m")
|
|
|
|
DD = $(shell date "+%-d")
|
|
|
|
YY = $(shell date "+%-y")
|
2023-05-01 19:47:10 -07:00
|
|
|
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) \
|
|
|
|
-D LOG_SUCCESS=$(LOG_SUCCESS) -D LOG_FAILURE=$(LOG_FAILURE)
|
2017-12-01 20:17:14 -08:00
|
|
|
|
2021-03-07 16:35:52 -08:00
|
|
|
XATTR := $(shell command -v xattr 2> /dev/null)
|
|
|
|
|
2017-11-24 15:47:28 -08:00
|
|
|
.PHONY: clean all
|
2018-04-29 21:45:53 -07:00
|
|
|
all: $(OUTDIR) $(TARGETS)
|
|
|
|
|
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
2017-11-24 15:47:28 -08:00
|
|
|
|
|
|
|
clean:
|
2018-04-29 20:04:06 -07:00
|
|
|
rm -f $(OUTDIR)/*.o
|
|
|
|
rm -f $(OUTDIR)/*.list
|
2020-03-12 20:15:18 -07:00
|
|
|
rm -f $(TARGETS)
|
2019-09-22 21:32:33 -07:00
|
|
|
|
2018-04-29 20:04:06 -07:00
|
|
|
$(OUTDIR)/%.o: %.s $(HEADERS)
|
2019-09-22 21:32:33 -07:00
|
|
|
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
|
2017-11-24 15:47:28 -08:00
|
|
|
|
2018-04-29 20:04:06 -07:00
|
|
|
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
2019-09-22 21:32:33 -07:00
|
|
|
ld65 $(LDFLAGS) -o $@ $<
|
2021-03-07 16:35:52 -08:00
|
|
|
ifdef XATTR
|
|
|
|
xattr -wx prodos.AuxType '00 20' $@
|
|
|
|
endif
|