32 lines
1.7 KiB
Makefile
32 lines
1.7 KiB
Makefile
# The AGI interpreter, described for JoeyLib's make/programs.mk (which lists
|
|
# what each variable means). Included by the Makefile beside it, on JoeyLib's
|
|
# make/project.mk.
|
|
|
|
AGI_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
|
|
|
PROGRAMS += AGI
|
|
AGI_SRCS := $(addprefix $(AGI_HOME)/,agi.c agiRes.c agiPic.c agiView.c agiGfx.c agiObj.c agiText.c agiFont.c agiInput.c agiSound.c agiSave.c agiVm.c)
|
|
AGI_TITLE := AGI
|
|
AGI_HELP := A Sierra AGI interpreter. The files of the game it plays go in its DATA folder.
|
|
|
|
# IIgs: large overflow segments. --segment-cap bounds the ENTRY bank (which
|
|
# also holds rodata + bss + heap); overflow banks carry text only, so capping
|
|
# them the same way wasted ~50K per bank. With this AGI links 5 bank-aligned
|
|
# segments instead of 19, which matters because it already needs -ramsize 4M.
|
|
# Verified by running KQ3 headless and diffing AGI's own joeylog.txt against
|
|
# the 19-segment build: identical apart from the embedded build timestamp.
|
|
# See JoeyLib's make/support/iigs/clang-build.sh for the measurements.
|
|
AGI_IIGS_OVERFLOW_CAP := 0xF000
|
|
|
|
ifeq ($(PLATFORM),iigs)
|
|
# AGI's bootable IIgs volume needs a game's resources (games/kq3, King's
|
|
# Quest III, by default; AGI_GAME=NAME for games/NAME), which
|
|
# make-agi-iigs-disk.sh lays out, so it cannot use the generic one-program
|
|
# data disk. It also wants a bigger Memory Manager pool: run it with
|
|
# -ramsize 8M.
|
|
AGI_GAME ?= kq3
|
|
.PHONY: iigs-game-disk-agi
|
|
iigs-game-disk-agi: $(call programBin,AGI)
|
|
BINDIR="$(BINDIR)" JOEYLIB="$(REPO_DIR)" $(AGI_HOME)/scripts/make-agi-iigs-disk.sh $(BINDIR)/AGI-data.2mg $(AGI_GAME)
|
|
$(REPO_DIR)/scripts/make-iigs-game-disk.sh $(BINDIR)/AGI.2mg AGI AGI $(BINDIR)/AGI-data.2mg
|
|
endif
|