ldmud-3.2.9/doc/
ldmud-3.2.9/doc/efun/
ldmud-3.2.9/mud/
ldmud-3.2.9/mud/heaven7/
ldmud-3.2.9/mud/heaven7/lib/
ldmud-3.2.9/mud/lp-245/
ldmud-3.2.9/mud/lp-245/banish/
ldmud-3.2.9/mud/lp-245/doc/
ldmud-3.2.9/mud/lp-245/doc/examples/
ldmud-3.2.9/mud/lp-245/doc/sefun/
ldmud-3.2.9/mud/lp-245/log/
ldmud-3.2.9/mud/lp-245/obj/Go/
ldmud-3.2.9/mud/lp-245/players/lars/
ldmud-3.2.9/mud/lp-245/room/death/
ldmud-3.2.9/mud/lp-245/room/maze1/
ldmud-3.2.9/mud/lp-245/room/sub/
ldmud-3.2.9/mud/lp-245/secure/
ldmud-3.2.9/mud/morgengrauen/
ldmud-3.2.9/mud/morgengrauen/lib/
ldmud-3.2.9/mud/sticklib/
ldmud-3.2.9/mud/sticklib/src/
ldmud-3.2.9/mudlib/uni-crasher/
ldmud-3.2.9/pkg/
ldmud-3.2.9/pkg/debugger/
ldmud-3.2.9/pkg/diff/
ldmud-3.2.9/pkg/misc/
ldmud-3.2.9/src/autoconf/
ldmud-3.2.9/src/bugs/
ldmud-3.2.9/src/bugs/MudCompress/
ldmud-3.2.9/src/bugs/b-020916-files/
ldmud-3.2.9/src/bugs/doomdark/
ldmud-3.2.9/src/bugs/ferrycode/ferry/
ldmud-3.2.9/src/bugs/ferrycode/obj/
ldmud-3.2.9/src/bugs/psql/
ldmud-3.2.9/src/done/
ldmud-3.2.9/src/done/order_alist/
ldmud-3.2.9/src/done/order_alist/obj/
ldmud-3.2.9/src/done/order_alist/room/
ldmud-3.2.9/src/gcc/
ldmud-3.2.9/src/gcc/2.7.0/
ldmud-3.2.9/src/gcc/2.7.1/
ldmud-3.2.9/src/hosts/
ldmud-3.2.9/src/hosts/GnuWin32/
ldmud-3.2.9/src/hosts/amiga/NetIncl/
ldmud-3.2.9/src/hosts/amiga/NetIncl/netinet/
ldmud-3.2.9/src/hosts/amiga/NetIncl/sys/
ldmud-3.2.9/src/hosts/i386/
ldmud-3.2.9/src/hosts/msdos/byacc/
ldmud-3.2.9/src/hosts/msdos/doc/
ldmud-3.2.9/src/hosts/os2/
ldmud-3.2.9/src/hosts/win32/
ldmud-3.2.9/src/util/
ldmud-3.2.9/src/util/erq/
ldmud-3.2.9/src/util/indent/hosts/next/
ldmud-3.2.9/src/util/xerq/
ldmud-3.2.9/src/util/xerq/lpc/
ldmud-3.2.9/src/util/xerq/lpc/www/
# The following is for easier adaptation on your machine. See also README.Amiga .
# It is a derivate of the original 'Makefile' adapted for SAS' own smake.
#
# I (Reinhard) used SAS/C 6.55 to compile the driver with the smake utility
# and a port of BYacc.
# SAS/C supports a generic startup with common macro definitions, so for me
# the following macros are defined automatically:
#
# Note that SMake does not support conditional makes, thus explicite
# out-commenting has been used instead.

CC = sc:c/sc
LD = sc:c/sc link
AS = sc:c/sc asm
CFLAGS=
SCFLAGS=

YTAB= y.tab
CP= c:copy
RM= c:delete
MV= c:rename

#
# The original makefile had 'CC= gcc' in it...
# The CFLAGS- and YFLAGS-values are modified for Mud-Stuff below.
# There is also a section below where you can add your own pet compiler.
#-----------------------------------------------------------------------------

# What type of net package do we use? Known by this Makefile are:
#   AS225  : Commodores AS225 software
#   AMITCP : The AmiTCP package from hut.fi, version < 3.0
#   AMITCP3: The AmiTCP package from hut.fi, version >= 3.0
#
# Leave it empty for the simulation (the default).

NETTYPE= AMITCP3

# DMake's default-yacc 'Bison' won't work with Amylaars lang.y,
# but byacc will.

YACC= c:byacc
YFLAGS=

# Unix has an option '-f' for it's 'rm' - not the Amiga, so I define
#   RMF= $(RM) -f
# and modify it for Amiga as:

RMF= $(RM)

# Compiling on a plain Amiga is slow, so keep some intermediate files:

# PREC= .PRECIOUS

# -- Compiler specifics --
#
# Set CCOPTS to any options you need to compile LPMud, what includes
# warning- and optimization options!
#
# If your compiler doesn't define the cpp-symbol AMIGA, it's a good idea
# to add it here.
# If your compiler doesn't have own code for float maths, you must
# define _NO_OWN_FLOATS so OS 1.3-versions will compile properly.
#
# interpret.c and parser.c need lots of RAM to compile, thus it might be wise
# to put the temporaries somewhere else than into T: in RAM:.
# Use these macros to insert the needed compiler-options, including any
# non-standard code-model options.
#   LOPT: The options for parser.c
#   IOPT: The options for interpret.c
#
# To compile the hosts/amiga/signal, your compiler must be able to
# generate C-Code with registerized parameters. If it needs a special
# option to do this, put it into ROPT.
#
# If your compiler needs additional sources, put them into XSRC, and
# the object files to generate into XOBJ.
# If your compiler doesn't have alloca(), add alloca.c/alloca.o to
# the additional sources.

# afp tells SAS/C to generate 32-bit references to functions
# Data=FAR tells SAS/C to use 32-bit references (no force)
# Code=FAR tells SAS/C to use 32-bit references to functions not declared in current file
# lib=scmffpnb.lib tells SAS/C to generate code to call the FFP shared library
# SAS/C uses the OS' math libraries
# AMIGA is defined automatically

CCOPTS = def=_NO_OWN_FLOATS afp Data=FAR Code=FAR math=ffp ign=55+100+154+161

LOPT=
IOPT=

# option for SAS/C registered parameters

ROPT= parms=registers

# -- Net specifics --
#
# Set NETDEF to define the appropriate symbol selecting the special
# interface code.
# Set NETLIB to specify any additionally needed linker library.
#
# Default first...

# NETDEF=
# NETLIB=

# .IF $(NETTYPE) == AS225
# NETDEF= def=AMIGA_TCP def=AMITCP
# NETLIB= lib=lib:netnb.lib
# NETDEF= def=DAMIGA_TCP def=AS255
# NETLIB= lib=lib:socket.lib
# .END

# .IF $(NETTYPE) == AMITCP
# NETDEF= def=AMIGA_TCP def=AMITCP="2"
# NETLIB= lib=lib:netnb.lib
# .END

# .IF $(NETTYPE) == AMITCP
NETDEF= def=AMIGA_TCP def=AMITCP=3
NETLIB= lib=lib:netnb.lib
# .END

# ---------------- Now for the real, the Mud stuff ----------------------

# Set MUD_LIB to the directory which contains the mud data.

MUD_LIB = mudlib:

#
# Set BINDIR to the directory where you want to install the executables.

BINDIR = mudbin:

#
# Set ERQDIR to where executables are stored which ERQ may start.

ERQDIR = mudbin:erq

# Profiling is mostly useless for us, except for the options available
# in config.h .

PROFIL=

# Debugging options:
#   Debugging options should be set in config.h to guarantee a clean
#   recompile.
DEBUG = DEBUG=symbolflush

# Extra object files and libraries.


XOBJ = hosts/amiga/signal.o hosts/amiga/signal_rr.o\
hosts/amiga/socket.o hosts/amiga/amiga.o alloca.o ixfile.o
XSRC =	hosts/amiga/signal.c hosts/amiga/signal_rr.c\
hosts/amiga/socket.c hosts/amiga/amiga.c alloca.c

LIBS= $(NETLIB) lib=lib:scmffpnb.lib

# ----------------------- The Rules -------------------------------------

MPATH=def=MUD_LIB="\"$(MUD_LIB)\"" def=BINDIR="\"$(BINDIR)\" def=ERQ_DIR="\"$(ERQDIR)\""
LDFLAGS= afp Data=FAR Code=FAR link
DEFINES= $(DEBUG) $(PROFIL) $(MPATH) $(NETDEF)
CFLAGS= -Dlint $(CCOPTS) $(DEFINES)
YFLAGS= -d

SRC=lex.c main.c interpret.c simulate.c object.c backend.c array.c\
    comm.c ed.c regexp.c mapping.c wiz_list.c swap.c xalloc.c\
    call_out.c otable.c dumpstat.c stralloc.c hash.c port.c\
    ptrtable.c heartbeat.c actions.c mempools.c \
    access_check.c parse_old.c parse.c prolang.y rxcache.c\
    simul_efun.c strfuns.c sprintf.c gcollect.c closure.c random.c \
    pkg-mysql.c efuns.c stdstrings.c md5.c $(XSRC)
OBJ=parser.o lex.o main.o interpret.o simulate.o object.o backend.o array.o\
comm.o ed.o regexp.o mapping.o wiz_list.o swap.o xalloc.o\
call_out.o otable.o dumpstat.o stralloc.o hash.o port.o\
ptrtable.o pkg-mysql.o heartbeat.o actions.o mempools.o md5.o\
access_check.o parse_old.o parse.o simul_efun.o strfuns.o sprintf.o\
rxcache.o efuns.o gcollect.o closure.o random.o stdstrings.o $(XOBJ)

ldmud: $(OBJ)
	$(CC) $(LDFLAGS) $(LIBS) $(OBJ) to=$@

# Utils and auto installation are not supported
# install: driver
#	 install csrc=$? $(BINDIR)/ldmud
#
# install.utils:
#	 (cd util; $(MAKE) $(MFLAGS) install)
#
# utils:
#	  (cd util; $(MAKE) $(MFLAGS))

clean:
	-$(RMF) *.o *.a lang.c lang.h lang.y instrs.h efun_defs.c y.output
	-$(RMF) stdstrings.c stdstrings.h
	-$(RMF) make_func.c make_func ldmud PlayMud

tags: $(SRC)
	ctags $(SRC)

TAGS: $(SRC)
	etags $(SRC)

make_func.c: make_func.y
	$(YACC) $(YFLAGS) make_func.y
	-$(RM) make_func.c
	$(MV) $(YTAB).c make_func.c

make_func.o : make_func_main.c make_func.c hash.h ixfile.h exec.h
	$(CC) $(CFLAGS) make_func_main.o to=make_func.o

make_func: make_func.o hash.o ixfile.o alloca.o exec.h
	$(CC) $(LDFLAGS) alloca.o make_func.o hash.o ixfile.o to=make_func $(LIBS)

# was:	./make_func > efun_defs.c
# Byacc will warn a 'shift/reduce' conflict.
# This is a known wart in the C-grammar.
#
# lang.y efun_defs.c instrs.h:
#  Separate rule deleted to avoid double compiling with SAS/C
#  Always after an Compiler-Error smake starts right here and
#  so compiles lang.c, interpret.c and lex.c :-(, so I changed it.
#  inserted right here (and so changed the dependencies !)

lang.c lang.h: make_func prolang.y config.h
	-$(RMF) lang.y
	make_func lang
	$(YACC) $(YFLAGS) -v lang.y
	-$(RMF) lang.c
	-$(RMF) lang.h
	$(MV) $(YTAB).c lang.c
	$(MV) $(YTAB).h lang.h

efun_defs.c instrs.h: func_spec make_func config.h
	-$(RMF) efun_defs.c
	-$(RMF) instrs.h
	make_func instrs

stdstrings.c stdstrings.h: string_spec make_func config.h
	$(RM) stdstrings.c
	$(RM) stdstrings.h
	./make_func strings

#--------------------------------------------------------
# Dependencies, manual and automatic.

access_check.o : instrs.h

actions.o : instrs.h

array.o : instrs.h

backend.o : instrs.h stdstrings.h

call_out.o : instrs.h

closure.o : instrs.h lang.h stdstrings.h

comm.o : instrs.h stdstrings.h

dumpstat.o : instrs.h

ed.o : instrs.h stdstrings.h

efuns.o : instrs.h stdstrings.h

gcollect.o : instrs.h stdstrings.h

heartbeat.o : instrs.h

interpret.o : instrs.h stdstrings.h

lang.o : driver.h config.h machine.h lex.h interpret.h object.h \
    instrs.h port.h switch.h stralloc.h stdstrings.h

lex.o : instrs.h lang.h efun_defs.c stdstrings.h

main.o : instrs.h stdstrings.h

mapping.o : instrs.h

object.o : instrs.h stdstrings.h

otable.o : instrs.h

parse.o : instrs.h stdstrings.h

parse_old.o : instrs.h stdstrings.h

ptrtable.o : instrs.h

xalloc.o : instrs.h

simul_efun.o : instrs.h stdstrings.h

simulate.o : instrs.h stdstrings.h

sprintf.o : instrs.h stdstrings.h

stdstrings.o : stdstrings.h stralloc.h driver.h

stralloc.o : instrs.h

strfuns.o : instrs.h

swap.o : instrs.h

wiz_list.o : stdstrings.h

#--------------------------------------------------------------------
# Rules for extra object files.
#
#   PlayMud  : a simple client to access the running mud.
#   netclean : removes all object files containing communication-specific code.
#   osclean  : removes all object files which contain OS-specific code.
#   amiga.o  : some amiga specific routines.
#   signal.o : timers and interruption. It uses interrupt code and therefore
#	       needs fully registered args.
#   socket.o : includes the appropriate socket-code.

PlayMud: hosts/amiga/mudmsgs.h
PlayMud: hosts/amiga/PlayMud.c
	$(CC) $< to=$@

netclean:
	-$(RM) access_check.o comm.o main.o swap.o socket.o amiga.o

osclean:
	-$(RM) $(XOBJ)
	-$(RM) backend.o interpret.o object.o otable.o simulate.o stralloc.o
	-$(RM) PlayMud ldmud

amiga.o : hosts/amiga/amiga.c
	$(CC) $(CFLAGS) idir=hosts/amiga csrc=$< to=$@

ixfile.o: hosts/amiga/ixfile.c
   $(CC) $(CFLAGS) idir=hosts/amiga csrc=$< to=$@

signal.o : hosts/amiga/signal.c
	$(CC) $(CFLAGS) idir=hosts/amiga csrc=$< to=$@

signal_rr.o : hosts/amiga/signal_rr.c
	$(CC) $(CFLAGS) $(ROPT) idir=hosts/amiga csrc=$< to=$@

socket.o : hosts/amiga/socket.c
	$(CC) $(CFLAGS) idir=hosts/amiga csrc=$< to=$@