#
# Makefile for Colossal Cave Revisited
# Requires TADS compiler 2.1.0 or greater.
#
# Note that some of the Unix versions of the compilers return error
# codes when everything's actually fine.
#
# Note on the use of the DOS version of the compiler
# --------------------------------------------------
#
# Polyadv now seems to be too large to compile under the DOS version of
# the TADS 2 compiler.   You are advised to use the Windows version instead.
#

#
# Set TC and TR to point to your TADS compiler and run-time.
#
TC=             tadsc
TR=             tadsr

PROGNAME=       polyadv
DEBUG=		-ds
SWAPTIONS=
OOPTIONS=	-s -mp32000
OPTIONS=	$(OOPTIONS) $(SWAPTIONS) $(DEBUG)

# Production version options
POPTIONS=	$(OOPTIONS) $(SWAPTIONS)

# Wizard-mode version without debug mode
WOPTIONS=       -DWIZARD -o wizard.gam

.PRECIOUS=	$(PROGNAME).gam		# do not delete game file on errors

HEADERS= adv255.t advmods.t ccr-std.t ccr-fun.t
ROOMS=   ccr-room.t ccr-rm1.t ccr-rm2.t ccr-rm7.t ccr-rm11.t ccr-rm15.t \
         ccr-endg.t
OBJECTS= ccr-item.t ccr-itm1.t ccr-itm2.t ccr-itm7.t ccr-it11.t ccr-it15.t
MISC=    ccr-verb.t format.t ccr-help.t ccr-npc.t ccr-npc1.t ccr-npc2.t \
         ccr-npc7.t ccr-np11.t ccr-np15.t preparse.t ccr-thx.t ccr-hint.t

production: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(POPTIONS) $(PROGNAME).t

production701: makefile polyadv701.t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(POPTIONS) polyadv701.t

wizard: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(POPTIONS) $(WOPTIONS) -o wizard.gam $(PROGNAME).t

debug: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(OPTIONS) -o debug.gam $(PROGNAME).t

# These are debug versions with a changed default game mode (to save time)

debug550: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(OPTIONS) -DDEFVER=2 -o debug550.gam $(PROGNAME).t

debug580: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(OPTIONS) -DDEFVER=7 -o debug580.gam $(PROGNAME).t

debug701: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(OPTIONS) -DDEFVER=15 -o debug701.gam $(PROGNAME).t

debug701+: makefile $(PROGNAME).t $(HEADERS) $(ROOMS) $(OBJECTS) $(MISC)
	$(TC) $(OPTIONS) -DDEFVER=11 -o debug701+.gam $(PROGNAME).t



