#
# Makefile for GC
# 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.
#

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

PROGNAME=	gc
PRODNAME=	gc
NONPRODNAME=	gctest
DEBUG=		-ds
SWAPTIONS=	-mh65535
OOPTIONS=	-s -mp32000 -ml 32000
OPTIONS=	$(OOPTIONS) $(SWAPTIONS) $(DEBUG)

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

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

HEADERS= adv.t std.t classes.t verbs.t npc.t game.t tavern.t messages.t people.t testverbs.t

$(PROGNAME).gam: makefile $(NONPRODNAME).t $(HEADERS)
	$(TC) $(OPTIONS) $(NONPRODNAME).t
	cp $(NONPRODNAME).gam $(PROGNAME).gam

production: makefile $(PRODNAME).t $(HEADERS)
	$(TC) $(POPTIONS) $(PRODNAME).t
	cp $(PRODNAME).gam $(PROGNAME).gam
