/
umud/DOC/
umud/DOC/U/
umud/DOC/U/U-examples/
umud/DOC/internals/
umud/DOC/wizard/
umud/MISC/
umud/MISC/dbchk/
umud/RWHO/rwhod/
#compiler-only flags
#CC = gcc
#FLAGS= -g -O -I/usr/local/include
FLAGS= -g

#the value of FLAGS is passed to CFLAGS (incl. in subdirs)
CFLAGS= $(FLAGS)

#LIBS may be defined to be any other system libraries you may require
#old dbm not in libc requires -ldbm
#LIBS= -ldbm
#LIBS = -L/usr/local/lib -lgdbm

# Make flags passed down
MFLAGS = CC="$(CC)" FLAGS="$(FLAGS)" LIBS="$(LIBS)"

#SCO UNIX requires the following:
#LIBS= -ldbm -lsocket

#HP/UX requires the following: (ndbm dbm-chunked database)
#LIBS=-lndbm -lPW -lBSD

#if building without RWHO support, change this:
#RWHO=
RWHO=	librwho.a

#if building with combat, include this
#COMBAT=
COMBAT=combat.o

HDR=	\
	config.h \
	mud.h \
	comp.h \
	vars.h \
	look.h \
	match.h \
	cmd.h \
	sbuf.h \
	trans.h \
	sym.h \
	xact.h

# this link order is hand tailored for your comfort.
OBJ=	\
	mud.o \
	$(COMBAT) \
	cron.o \
	net.o \
	login.o \
	trans.o \
	version.o \
	run.o \
	sym.o \
	activ.o \
	vars.o \
	cmd.o \
	xact.o \
	xmit.o \
	do_go.o \
	do_look.o \
	cache.o \
	bool.o \
	util.o \
	match.o \
	obj.o \
	sbuf.o \
	list.o \
	rot.o \
	alloc.o \
	errors.o \
	misc2.o \
	misc.o

SRC=	\
	mud.c \
	combat.c \
	cron.c \
	net.c \
	do_go.c \
	do_look.c \
	login.c \
	trans.c \
	version.c \
	run.c \
	sym.c \
	activ.c \
	vars.c \
	cmd.c \
	xact.c \
	xmit.c \
	cache.c \
	bool.c \
	util.c \
	match.c \
	obj.c \
	sbuf.c \
	list.c \
	rot.c \
	alloc.c \
	errors.c \
	misc2.c \
	misc.c

CMD=	libcmd.a
DB=	libdb.a
ULIB=	libu.a


MUD=	mud

$(MUD):	$(OBJ) $(CMD) $(DB) $(RWHO) $(ULIB)
	$(CC) $(LDFLAGS) -o $@ $(OBJ) $(ULIB) $(CMD) $(DB) $(RWHO) $(LIBS)
	rm -f libu.a

$(CMD):
	cd CMD; make $(MFLAGS)

$(DB):
	cd DB; make $(MFLAGS)

librwho.a:
	cd RWHO; make $(MFLAGS)

libu.a:
	cd U; make $(MFLAGS)

clean:
	cd CMD; make clean
	cd DB; make clean
	cd RWHO; make clean
	cd U; make clean
	rm -f $(MUD) $(OBJ) $(CMD) $(DB) $(ULIB) rot core tags hash/core

depend:
	cd CMD; make depend
	cd DB; make depend
	cd RWHO; make depend
	cd U; make depend
	makedepend $(SRC)

tags:
	ctags *.c CMD/*.c U/*.c DB/*.c RWHO/*.c

ci:
	cd CMD; make ci
	cd DB; make ci
	cd RWHO; make ci
	cd U; make ci
	ci -u -t/dev/null -m" " $(SRC) Makefile $(HDR) README CHANGES < /dev/null