DISK525A_OBJS = menu config DISK525B_OBJS = menu DISK525C_OBJS = menu fontmgr DISK525D_OBJS = menu fontmgr DISK35_OBJS = menu config fontmgr FONT_OBJS = 01.us.une.cf 02.clintonv1.cf 03.reactive.cf 04.danpaymar.cf \ 05.blippo.cf 06.byte.cf 07.colossal.cf 08.count.cf \ 09.flow.cf 0a.gothic.cf 0b.outline.cf 0c.pigfont.cf \ 0d.pinocchio.cf 0e.slant.cf 0f.stop.cf 10.euro.une.cf \ 11.euro.enh.cf 12.clintonv2.cf 13.germanenh.cf 14.germanune.cf \ 15.frenchenh.cf 16.frenchune.cf 17.hebrewenh.cf 18.hebrewune.cf \ 19.plus.enh.cf 1a.plus.une.cf 1b.katakana.cf 1c.cyrillic.cf \ 1d.greek.cf 1e.esperanto.cf 1f.videx.cf 20.plus.une.cf \ 21.us.enh.cf 22.us.enh.cf 23.cyrillic.cf 24.pcbold.cf SYSTEM_TARGETS = menu BASE_TARGETS = menu config fontmgr ENH_TARGETS = menu config fontmgr DISK_TARGETS = disk35 disk525a disk525b disk525c disk525d # For this one see https://applecommander.github.io/ AC ?= tools/ac.jar ACX ?= tools/acx.jar DEFLATE ?= tools/deflater # Just the usual way to find out if we're # using cmd.exe to execute make rules. ifneq ($(shell echo),) CMD_EXE = 1 endif ifdef CMD_EXE NULLDEV = nul: DEL = -del /f RMDIR = rmdir /s /q else NULLDEV = /dev/null DEL = $(RM) RMDIR = $(RM) -r endif ifdef CC65_HOME AS = $(CC65_HOME)/bin/ca65 CC = $(CC65_HOME)/bin/cc65 CL = $(CC65_HOME)/bin/cl65 LD = $(CC65_HOME)/bin/ld65 else AS := $(if $(wildcard ../../bin/ca65*),../../bin/ca65,ca65) CC := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65) CL := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif ENFORCESIZE = @(FILESIZE=`stat -c%s $1` ; \ if [ $2 -gt 0 ]; then \ if [ $$FILESIZE -gt $2 ] ; then \ echo "ERROR: File $1 exceeds size limit ($$FILESIZE > $2)" ; \ exit 1 ; \ fi ; \ fi ) OBJDIR = obj SRCDIR = src all: binaries disks binaries: fonts systems bases enhs fonts: $(addprefix $(OBJDIR)/,$(FONT_OBJS)) systems: fonts $(addprefix $(OBJDIR)/,$(addsuffix .system,$(SYSTEM_TARGETS))) bases: $(addprefix $(OBJDIR)/,$(addsuffix .base,$(BASE_TARGETS))) enhs: $(addprefix $(OBJDIR)/,$(addsuffix .enh,$(ENH_TARGETS))) disks: $(addprefix $(OBJDIR)/,$(addsuffix .po,$(DISK_TARGETS))) .PHONY: binaries fonts systems bases enhs disks $(SYSTEM_TARGETS) $(OBJDIR)/%.xf: fonts/00.us.enh.pf fonts/%.pf tools/xorfont US.ENH....00.PF $^ $@ $(OBJDIR)/%.cf: $(OBJDIR)/%.xf tools/rlefont $< $@ $(OBJDIR)/%.base: $(SRCDIR)/%.c $(CL) -O -t apple2 -C apple2-system.cfg -m $@.map -o $@.AppleSingle $^ @~/applesingle/applesingle -r < $@.AppleSingle > $@ 2>$(NULLDEV) @echo $@"\r\t\t\t" `wc -c $@ | cut -d ' ' -f 1` $(OBJDIR)/%.enh: $(SRCDIR)/%.c $(CL) -O -t apple2enh -C apple2-system.cfg -m $@.map -o $@.AppleSingle $^ @~/applesingle/applesingle -r < $@.AppleSingle > $@ 2>$(NULLDEV) @echo $@"\r\t\t\t" `wc -c $@ | cut -d ' ' -f 1` $(OBJDIR)/%.system: $(SRCDIR)/loader.c $(CL) -O -t apple2 -DNEXTNAME=\"`echo $(notdir $(basename $@)) | tr a-z A-Z`\" -C apple2-system.cfg -m $@.map -o $@.AppleSingle $(SRCDIR)/loader.c @~/applesingle/applesingle -r < $@.AppleSingle > $@ 2>$(NULLDEV) @echo $@"\r\t\t\t" `wc -c $@ | cut -d ' ' -f 1` $(OBJDIR)/disk525a.po: $(OBJDIR)/menu.system $(addprefix $(OBJDIR)/,$(addsuffix .base,$(DISK525A_OBJS))) $(addprefix $(OBJDIR)/,$(addsuffix .enh,$(DISK525A_OBJS))) @cp prodos/pd525.po $@ java -jar $(AC) -n $@ V2A.SIDEA java -jar $(AC) -p $@ MENU.SYSTEM SYS 0x2000 <$(OBJDIR)/menu.system java -jar $(AC) -p $@ MENU.BASE SYS 0x2000 <$(OBJDIR)/menu.base java -jar $(AC) -p $@ MENU.ENH SYS 0x2000 <$(OBJDIR)/menu.enh java -jar $(AC) -p $@ CONFIG.BASE SYS 0x2000 <$(OBJDIR)/config.base java -jar $(AC) -p $@ CONFIG.ENH SYS 0x2000 <$(OBJDIR)/config.enh java -jar $(AC) -p $@ BASIC.SYSTEM SYS 0x2000 $(NULLDEV)