prodos-drivers/textcolors/Makefile
Joshua Bell 7bbc96924b Add SETUP.SYSTEM and build .SETUP files
This is an alternate approach proposed by Sean Nolan in 1987 which
allows placing the driver files in a subdirectory of the root volume
to avoid clutter and file ordering issues. Only a SETUP.SYSTEM file is
needed at the top level, and the drivers go into a SETUPS/ directory.

All drivers here (except QUIT.SYSTEM and SETUP.SYSTEM itself) have
alternate forms built into the /DRIVERS/SETUPS/ directory as XYZ.SETUP
instead of XYZ.SYSTEM. If you choose to use SETUP.SYSTEM, place these
.SETUP files in your SETUPS/ directory. The naming doesn't matter -
any SYS or BIN file can be used - but this convention makes
distribution easier. These .SETUP files do **NOT** chain to the next
file - that's handled by SETUP.SYSTEM itself.

Resolves #16
2024-01-30 21:16:32 -08:00

54 lines
1.2 KiB
Makefile

CAFLAGS = --target apple2enh --list-bytes 0
LDFLAGS = --config apple2-asm.cfg
OUTDIR = ../out
HEADERS = $(wildcard *.inc) $(wildcard ../inc/*.inc)
TARGETS = \
$(OUTDIR)/a2green.system.SYS \
$(OUTDIR)/a2green.setup.SYS \
$(OUTDIR)/bw.system.SYS \
$(OUTDIR)/bw.setup.SYS \
$(OUTDIR)/deepblue.system.SYS \
$(OUTDIR)/deepblue.setup.SYS \
$(OUTDIR)/gray.system.SYS \
$(OUTDIR)/gray.setup.SYS \
$(OUTDIR)/gsblue.system.SYS \
$(OUTDIR)/gsblue.setup.SYS \
$(OUTDIR)/mint.system.SYS \
$(OUTDIR)/mint.setup.SYS \
$(OUTDIR)/pink.system.SYS \
$(OUTDIR)/pink.setup.SYS \
$(OUTDIR)/wb.system.SYS \
$(OUTDIR)/wb.setup.SYS
# For timestamps
MM = $(shell date "+%-m")
DD = $(shell date "+%-d")
YY = $(shell date "+%-y")
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY)
XATTR := $(shell command -v xattr 2> /dev/null)
.PHONY: clean all
all: $(OUTDIR) $(TARGETS)
$(OUTDIR):
mkdir -p $(OUTDIR)
clean:
rm -f $(OUTDIR)/*.o
rm -f $(OUTDIR)/*.list
rm -f $(TARGETS)
$(OUTDIR)/%.o: %.s $(HEADERS)
ca65 $(CAFLAGS) $(DEFINES) --listing $(basename $@).list -o $@ $<
$(OUTDIR)/%.setup.o: %.system.s $(HEADERS)
ca65 $(CAFLAGS) $(DEFINES) -D BUILD_SETUP_FILE --listing $(basename $@).list -o $@ $<
$(OUTDIR)/%.BIN $(OUTDIR)/%.SYS: $(OUTDIR)/%.o
ld65 $(LDFLAGS) -o $@ $<