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