/
driver3.2@242/autoconf/
driver3.2@242/doc/LPC/
driver3.2@242/hosts/
driver3.2@242/hosts/amiga/NetIncl/
driver3.2@242/hosts/amiga/NetIncl/netinet/
driver3.2@242/hosts/amiga/NetIncl/sys/
driver3.2@242/hosts/atari/
driver3.2@242/hosts/fcrypt/
driver3.2@242/mudlib/
driver3.2@242/mudlib/sys/
driver3.2@242/util/
driver3.2@242/util/indent/hosts/next/
driver3.2@242/util/make_docs/
# This lines are needed on some machines.
MAKE=make
SHELL=/bin/sh
#
CC=@CC@
#
YACC = @YACC@
YACCTAB = y.tab.
#
RM = rm -f
MV = mv
CP = cp
#
# Chose one of these mallocs:
# Satoria's malloc. Uses little memory. With FAST_FIT, it is also one of the
# fastest. Required for garbage collection.
MALLOC=smalloc
# must not #define SBRK_OK without static linking on __RS6000__
# How can static linking be done?
#
# Gnu malloc, fastest but uses most memory.
#MALLOC=gmalloc
#
# Use the standard malloc on your system:
#MALLOC=sysmalloc
#
# Set MUD_LIB to the directory which contains the mud data. Was formerly
# defined in config.h !
MUD_LIB = /user/mud/mudlib
#
# Set BINDIR to the directory where you want to install the executables.
BINDIR = /mud/bin
#
#PROFIL= -DOPCPROF -DVERBOSE_OPCPROF
#PROFIL=-p -DMARK
#PROFIL=-pg
PROFIL=
#Enable warnings from the compiler, if wanted.
WARN= # no warning options - will work with all compilers :-)
#WARN= -Wall -Wshadow -Dlint
#WARN= -Wall -Wshadow -Wno-parentheses # gcc settings
#
# Optimization and source level debugging options.
# adding a -fomit-frame-pointer on the NeXT (gcc version 1.93 (68k, MIT syntax))
# will corrupt the driver.
OPTIMIZE = @OCFLAGS@ # high optimization
#OPTIMIZE= @MCFLAGS@ # for better debugging
#OPTIMIZE= @DCFLAGS@ # no optimization; for frequent recompilations.
#
# debugging options: [-DDEBUG] [-DYYDEBUG|-DYYDEBUG=1] [-DTRACE_CODE]
# -DDEBUG: Enable run time debugging. It will use more time and space.
# When the flag is changed, be sure to recompile everything.
# Simply comment out this line if not wanted.
# If you change anything in the source, you are strongly encouraged to have
# DEBUG defined.
# If you will not change anything, you are still encouraged to have
# it defined, if you want to locate any game driver bugs.
#DEBUG=-DDEBUG -DTRACE_CODE
DEBUG=
#
MPATH=-DMUD_LIB='"$(MUD_LIB)"' -DBINDIR='"$(BINDIR)"'
#
CFLAGS= @EXTRA_CFLAGS@ $(OPTIMIZE) $(DEBUG) -DMALLOC_$(MALLOC) $(WARN) $(MPATH) $(PROFIL)
#
LIBS=@LIBS@
#
LDFLAGS=@LDFLAGS@
#
#Note that, if you use smalloc with SBRK_OK(which is the default), and
#don't link statically, it could happen that the system malloc is linked
#along with the one from smalloc; this combination is bound to cause crashes.
MFLAGS = "BINDIR=$(BINDIR)" "MUD_LIB=$(MUD_LIB)"
#
SRC=lex.c main.c interpret.c simulate.c object.c backend.c array.c\
    comm1.c ed.c regexp.c mapping.c wiz_list.c swap.c $(MALLOC).c\
    call_out.c otable.c dumpstat.c stralloc.c hash.c indentp.c port.c\
    access_check.c clilib.c parse_old.c parse.c prolang.y\
    simul_efun.c sprintf.c gcollect.c closure.c
OBJ=lang.o lex.o main.o interpret.o simulate.o object.o backend.o array.o\
    comm1.o ed.o regexp.o mapping.o wiz_list.o swap.o $(MALLOC).o\
    call_out.o otable.o dumpstat.o stralloc.o hash.o indentp.o port.o\
    access_check.o clilib.o parse_old.o parse.o simul_efun.o sprintf.o\
    gcollect.o closure.o @ALLOCA@

driver: $(OBJ)
	$(CC) @OPTIMIZE_LINKING@ $(LDFLAGS) $(OBJ) -o $@ $(LIBS)

install: driver
	install -c $? $(BINDIR)/parse

install.utils:
	(cd util; $(MAKE) $(MFLAGS) install)

utils: 
	(cd util; $(MAKE) $(MFLAGS))

parse: driver
	-$(MV) parse parse.old
	$(CP) driver parse

lint: *.c
	lint *.c

clean:
	$(RM) $(YACCTAB)h $(YACCTAB)c make_func.c *.o make_func efun_defs.c lang.y
	$(RM) lang.h lang.c y.output tags TAGS
	$(RM) parse core mudlib/core mudlib/debug.log lpmud.log
	(cd util ; echo "Cleaning in util." ; $(MAKE) clean)

distclean: clean
	$(RM) driver config.status machine.h Makefile

tags: $(SRC)
	ctags $(SRC)

TAGS: $(SRC)
	etags $(SRC)

make_func.c: make_func.y
	$(YACC) make_func.y
	@MOVE_YACC_TAB@ make_func.c
	@CLEAN_YACC_TAB@

make_func: make_func.o hash.o
	$(CC) @OPTIMIZE_LINKING@ $(LDFLAGS) make_func.o hash.o -o make_func

lang.y efun_defs.c instrs.h: func_spec make_func prolang.y config.h
	$(RM) efun_defs.c
	$(RM) lang.y
	./make_func > efun_defs.c

lang.c lang.h: lang.y
	$(YACC) -d -v lang.y
	@MOVE_YACC_TAB@ lang.c
	@CLEAN_YACC_TAB@
	$(MV) $(YACCTAB)h lang.h

$(MALLOC).o : $(MALLOC).c lint.h config.h machine.h
	$(RM) smalloc.o
	$(RM) gmalloc.o
	$(RM) sysmalloc.o
	$(RM) malloc.o
	$(CC) $(CFLAGS) -c $(MALLOC).c

access_check.o : access_check.c lint.h config.h machine.h comm.h interpret.h

alloca.o : alloca.c

array.o : array.c config.h machine.h lint.h interpret.h object.h wiz_list.h \
  regexp.h exec.h lang.h instrs.h stralloc.h

backend.o : backend.c lint.h config.h machine.h interpret.h object.h \
  wiz_list.h exec.h comm.h

call_out.o : call_out.c lint.h config.h machine.h interpret.h object.h comm.h \
  stralloc.h exec.h wiz_list.h

clilib.o : clilib.c config.h machine.h

closure.o : closure.c lint.h config.h machine.h lex.h exec.h interpret.h \
  object.h lang.h instrs.h

comm1.o : comm1.c config.h machine.h lint.h interpret.h comm.h object.h \
  sent.h patchlevel.h wiz_list.h

dumpstat.o : dumpstat.c lint.h config.h machine.h interpret.h object.h exec.h \
  smalloc.h lang.h instrs.h

ed.o : ed.c lint.h config.h machine.h regexp.h interpret.h object.h comm.h

gcollect.o : gcollect.c lint.h config.h machine.h interpret.h object.h exec.h \
  sent.h comm.h smalloc.h instrs.h lang.h wiz_list.h stralloc.h

hash.o : hash.c

indentp.o : indentp.c

interpret.o : interpret.c lint.h config.h machine.h interpret.h lang.h exec.h \
  object.h wiz_list.h instrs.h comm.h sent.h switch.h smalloc.h stralloc.h

lang.o : lang.c lint.h config.h machine.h lex.h interpret.h object.h exec.h \
  instrs.h incralloc.h switch.h stralloc.h

lex.o : lex.c lint.h config.h machine.h interpret.h lang.h exec.h lex.h \
  instrs.h patchlevel.h stralloc.h efun_defs.c

main.o : main.c lint.h config.h machine.h interpret.h object.h lex.h \
  patchlevel.h

make_func.o : make_func.c lint.h config.h machine.h
	$(CC) $(CFLAGS) -DYACC='"$(YACC)"' -c make_func.c

mapping.o : mapping.c config.h machine.h lint.h interpret.h lang.h instrs.h \
  object.h wiz_list.h regexp.h stralloc.h smalloc.h

object.o : object.c lint.h config.h machine.h comm.h interpret.h object.h \
  sent.h wiz_list.h exec.h

otable.o : otable.c lint.h config.h machine.h interpret.h object.h

parse.o : parse.c lint.h config.h machine.h interpret.h object.h wiz_list.h

parse_old.o : parse_old.c lint.h config.h machine.h interpret.h object.h \
  wiz_list.h

port.o : port.c lint.h config.h machine.h

regexp.o : regexp.c /usr/include/string.h regexp.h lint.h config.h machine.h

simul_efun.o : simul_efun.c lint.h config.h machine.h interpret.h object.h \
  exec.h lex.h lang.h instrs.h stralloc.h

simulate.o : simulate.c lint.h config.h machine.h interpret.h instrs.h lang.h \
  object.h sent.h wiz_list.h exec.h comm.h stralloc.h

sprintf.o : sprintf.c config.h machine.h lint.h interpret.h lang.h instrs.h \
  exec.h object.h sent.h

stralloc.o : stralloc.c stralloc.h config.h machine.h lint.h

swap.o : swap.c lint.h config.h machine.h interpret.h object.h exec.h

wiz_list.o : wiz_list.c config.h machine.h lint.h interpret.h object.h \
  wiz_list.h stralloc.h lang.h instrs.h