mirror of
https://github.com/a2stuff/prodos-drivers.git
synced 2025-01-01 10:30:08 +00:00
7bbc96924b
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
58 lines
1.3 KiB
Makefile
58 lines
1.3 KiB
Makefile
|
|
CAFLAGS = --target apple2enh --list-bytes 0
|
|
LDFLAGS = --config apple2-asm.cfg
|
|
|
|
OUTDIR = ../../out
|
|
UTILDIR = $(OUTDIR)/cricket.util
|
|
|
|
HEADERS = $(wildcard *.inc) $(wildcard ../../inc/*.inc)
|
|
|
|
TARGETS = \
|
|
$(UTILDIR)/prodos.mod.BIN \
|
|
$(OUTDIR)/cricket.system.SYS \
|
|
$(OUTDIR)/cricket.setup.SYS \
|
|
$(UTILDIR)/test.BIN \
|
|
$(UTILDIR)/set.datetime.BIN \
|
|
$(UTILDIR)/set.time.BIN \
|
|
$(UTILDIR)/set.date.BIN
|
|
|
|
LOG_SUCCESS=1
|
|
LOG_FAILURE=1
|
|
|
|
# For timestamps
|
|
MM = $(shell date "+%-m")
|
|
DD = $(shell date "+%-d")
|
|
YY = $(shell date "+%-y")
|
|
DEFINES = -D DD=$(DD) -D MM=$(MM) -D YY=$(YY) \
|
|
-D LOG_SUCCESS=$(LOG_SUCCESS) -D LOG_FAILURE=$(LOG_FAILURE)
|
|
|
|
XATTR := $(shell command -v xattr 2> /dev/null)
|
|
|
|
.PHONY: clean all
|
|
all: $(OUTDIR) $(UTILDIR) $(TARGETS)
|
|
|
|
$(OUTDIR) $(UTILDIR):
|
|
mkdir -p $@
|
|
|
|
clean:
|
|
rm -f $(OUTDIR)/*.o
|
|
rm -f $(OUTDIR)/*.list
|
|
rm -f $(UTILDIR)/*.o
|
|
rm -f $(UTILDIR)/*.list
|
|
rm -f $(TARGETS)
|
|
|
|
$(OUTDIR)/%.o $(UTILDIR)/%.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)/%.SYS: $(OUTDIR)/%.o
|
|
ld65 $(LDFLAGS) -o $@ $<
|
|
|
|
$(UTILDIR)/%.BIN: $(UTILDIR)/%.o
|
|
ld65 $(LDFLAGS) -o $@ $<
|
|
ifdef XATTR
|
|
xattr -wx prodos.AuxType '00 20' $@
|
|
endif
|