tmi2_fluffos_v2/
tmi2_fluffos_v2/bin/
tmi2_fluffos_v2/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/ChangeLog.old/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/Win32/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/simuls/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/clone/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/command/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/data/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/master/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/log/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/compiler/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/efuns/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/operators/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/u/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/tmp/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/windows/
tmi2_fluffos_v2/lib/
tmi2_fluffos_v2/lib/adm/
tmi2_fluffos_v2/lib/adm/daemons/languages/
tmi2_fluffos_v2/lib/adm/daemons/network/I3/
tmi2_fluffos_v2/lib/adm/daemons/virtual/
tmi2_fluffos_v2/lib/adm/daemons/virtual/template/
tmi2_fluffos_v2/lib/adm/news/
tmi2_fluffos_v2/lib/adm/obj/
tmi2_fluffos_v2/lib/adm/obj/master/
tmi2_fluffos_v2/lib/adm/priv/
tmi2_fluffos_v2/lib/adm/shell/
tmi2_fluffos_v2/lib/adm/tmp/
tmi2_fluffos_v2/lib/cmds/
tmi2_fluffos_v2/lib/d/
tmi2_fluffos_v2/lib/d/Conf/
tmi2_fluffos_v2/lib/d/Conf/adm/
tmi2_fluffos_v2/lib/d/Conf/boards/
tmi2_fluffos_v2/lib/d/Conf/cmds/
tmi2_fluffos_v2/lib/d/Conf/data/
tmi2_fluffos_v2/lib/d/Conf/logs/
tmi2_fluffos_v2/lib/d/Conf/obj/
tmi2_fluffos_v2/lib/d/Conf/text/help/
tmi2_fluffos_v2/lib/d/Fooland/adm/
tmi2_fluffos_v2/lib/d/Fooland/data/
tmi2_fluffos_v2/lib/d/Fooland/data/attic/
tmi2_fluffos_v2/lib/d/Fooland/items/
tmi2_fluffos_v2/lib/d/TMI/
tmi2_fluffos_v2/lib/d/TMI/adm/
tmi2_fluffos_v2/lib/d/TMI/boards/
tmi2_fluffos_v2/lib/d/TMI/data/
tmi2_fluffos_v2/lib/d/TMI/rooms/
tmi2_fluffos_v2/lib/d/grid/
tmi2_fluffos_v2/lib/d/grid/adm/
tmi2_fluffos_v2/lib/d/grid/data/
tmi2_fluffos_v2/lib/d/std/
tmi2_fluffos_v2/lib/d/std/adm/
tmi2_fluffos_v2/lib/data/adm/
tmi2_fluffos_v2/lib/data/adm/daemons/
tmi2_fluffos_v2/lib/data/adm/daemons/doc_d/
tmi2_fluffos_v2/lib/data/adm/daemons/emoted/
tmi2_fluffos_v2/lib/data/adm/daemons/network/http/
tmi2_fluffos_v2/lib/data/adm/daemons/network/services/mail_q/
tmi2_fluffos_v2/lib/data/adm/daemons/network/smtp/
tmi2_fluffos_v2/lib/data/adm/daemons/news/archives/
tmi2_fluffos_v2/lib/data/attic/connection/
tmi2_fluffos_v2/lib/data/attic/user/
tmi2_fluffos_v2/lib/data/std/connection/b/
tmi2_fluffos_v2/lib/data/std/connection/l/
tmi2_fluffos_v2/lib/data/std/user/a/
tmi2_fluffos_v2/lib/data/std/user/b/
tmi2_fluffos_v2/lib/data/std/user/d/
tmi2_fluffos_v2/lib/data/std/user/f/
tmi2_fluffos_v2/lib/data/std/user/l/
tmi2_fluffos_v2/lib/data/std/user/x/
tmi2_fluffos_v2/lib/data/u/d/dm/working/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/smtp/
tmi2_fluffos_v2/lib/doc/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/interactive/
tmi2_fluffos_v2/lib/doc/driverdoc/concepts/
tmi2_fluffos_v2/lib/doc/driverdoc/driver/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/arrays/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/buffers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/compile/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/ed/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/filesystem/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/floats/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/functions/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/general/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/mappings/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/numbers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/parsing/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/constructs/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/preprocessor/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/types/
tmi2_fluffos_v2/lib/doc/driverdoc/platforms/
tmi2_fluffos_v2/lib/doc/mudlib/
tmi2_fluffos_v2/lib/ftp/
tmi2_fluffos_v2/lib/include/driver/
tmi2_fluffos_v2/lib/log/
tmi2_fluffos_v2/lib/log/driver/
tmi2_fluffos_v2/lib/obj/net/
tmi2_fluffos_v2/lib/obj/shells/
tmi2_fluffos_v2/lib/obj/tools/
tmi2_fluffos_v2/lib/std/adt/
tmi2_fluffos_v2/lib/std/board/
tmi2_fluffos_v2/lib/std/body/
tmi2_fluffos_v2/lib/std/fun/
tmi2_fluffos_v2/lib/std/living/
tmi2_fluffos_v2/lib/std/object/
tmi2_fluffos_v2/lib/std/shop/
tmi2_fluffos_v2/lib/std/socket/
tmi2_fluffos_v2/lib/std/user/
tmi2_fluffos_v2/lib/std/virtual/
tmi2_fluffos_v2/lib/student/
tmi2_fluffos_v2/lib/student/kalypso/
tmi2_fluffos_v2/lib/student/kalypso/armor/
tmi2_fluffos_v2/lib/student/kalypso/rooms/
tmi2_fluffos_v2/lib/student/kalypso/weapons/
tmi2_fluffos_v2/lib/u/l/leto/
tmi2_fluffos_v2/lib/u/l/leto/cmds/
tmi2_fluffos_v2/lib/www/errors/
tmi2_fluffos_v2/lib/www/gateways/
tmi2_fluffos_v2/lib/www/images/
tmi2_fluffos_v2/old/
tmi2_fluffos_v2/win32/
MAKE=gmake
SHELL=/bin/sh
OBJDIR=obj
DRIVER_BIN=driver
PROOF=
STRFUNCS=
INSTALL=install -c
INSTALL_DIR=../bin
OPTIMIZE=-Wall -Wundef -DPEDANTIC -Wmissing-declarations
CPP=gcc -E
CFLAGS=-D__USE_FIXED_PROTOTYPES__ -DHAVE_ZLIB -g -DDEBUG -DDEBUG_MACRO -rdynamic
CC=gcc
YACC=bison -d -y
RANLIB=ranlib
A=a
O=o

# YOU DO NOT NEED TO CONFIGURE ANYTHING IN THIS FILE.
#
# RUN THE SHELL SCRIPT ./build.MudOS to generate the Makefiles, and follow
# its instructions.
#
############################################################################
#
# **** TARGETS AND THEIR CORRECT USAGE ****
#
# COMPILATION TARGETS:
# 
# all:		compile all the files
#
# install:	make all, then move the files to the correct directories
#
# remake: 	remove the object files and generated files, and recompile
# 		     NO reconfiguration is done, etc.
#
# depend:	automatically create dependency info
#
# Makefiles:	update Makefile.in and GNUmakefile.in from Makefile.master
#		(only necessary after making changes to Makefile.master)
#
# 'CLEAN' TARGETS:
#
# neat: 	remove object files and generated files (used by remake)
#
# clean:	in addition to neat, also remove .orig and .rej files,
#		cores, lint files, emacs backups, tag files, yacc debug
#		files, generated Makefiles, generated binaries, and
#		generated dependency info
#
# spotless:	make clean, then remove ALL CONFIGURATION AND CUSTOMIZATION
#		     useful for creating distributions
#
# ---- REALLY COMPLEX OPTIONS YOU PROBABLY DON'T WANT TO TOUCH -----
#
# NeXT: link with MallocDebug if you have a NeXT with NeXTOS 2.1 or later and
# you wish to search for memory leaks (see /NextDeveloper/Apps/MallocDebug).
# Note: linking with MallocDebug will cause the virtual size of the
# driver process to reach appoximately 40MB however the amount of real memory
# used will remain close to normal.
#EXTRALIBS=-lMallocDebug -lsys_s
#
# ---- DO NOT EDIT ANYTHING BELOW HERE UNLESS YOU KNOW ALOT ABOUT HOW
#      MUDOS WORKS INTERNALLY ----

OVERRIDES=$(MAKEOVERRIDES)

# **************************************************************************
# **** NOTE: If you add something here, also add it to the OBJ= rule below,
# **** or non-GNU makes will die
# **************************************************************************
SRC=grammar.tab.c lex.c main.c rc.c interpret.c simulate.c file.c object.c \
  backend.c array.c mapping.c comm.c ed.c regexp.c swap.c buffer.c crc32.c \
  malloc.c mallocwrapper.c class.c efuns_main.c efuns_port.c \
  call_out.c otable.c dumpstat.c stralloc.c hash.c \
  port.c reclaim.c parse.c simul_efun.c sprintf.c program.c \
  compiler.c avltree.c icode.c trees.c generate.c scratchpad.c \
  socket_efuns.c socket_ctrl.c qsort.c eoperators.c socket_err.c md.c \
  disassembler.c binaries.c ualarm.c $(STRFUNCS) \
  replace_program.c ccode.c cfuns.c compile_file.c master.c function.c \
  debug.c crypt.c applies_table.c add_action.c

all: $(OBJDIR) cc.h files main_build

main_build: $(DRIVER_BIN) addr_server portbind

parallel:
	$(MAKE) -k -l -j 6 cc.h files
	$(MAKE) -k -l -j 6 main_build

VPATH = $(OBJDIR)

OBJ=$(addprefix $(OBJDIR)/,$(subst .c,.o,$(SRC)))

$(OBJDIR)/%.o: %.c
	$(CC) $(CFLAGS) $(OPTIMIZE) -o $@ -c $<

$(OBJDIR)/lex.o: lex.c preprocess.c cc.h grammar.tab.c

$(OBJDIR)/grammar.tab.o: grammar.tab.c opcodes.h

$(OBJDIR):
	mkdir -p $(OBJDIR)

which_makefile:
	echo MakeIsGNU

grammar.tab.c: grammar.y
	$(YACC) grammar.y
	-rm -f grammar.tab.*
	sed "s/y.tab.c/grammar.tab.c/g" y.tab.c  > grammar.tab.c
	-mv y.tab.h grammar.tab.h

packages/packages.a: packages/parser.c packages/contrib.c
	$(MAKE) -C packages 'CC=$(CC)' 'CFLAGS=$(CFLAGS) $(OPTIMIZE)' 'OBJDIR=../$(OBJDIR)' 'RANLIB=$(RANLIB)' 'A=$(A)' 'O=$(O)'

mudlib/mudlib.a:
	$(MAKE) -C mudlib 'CC=$(CC)' 'CFLAGS=$(CFLAGS) $(OPTIMIZE)' 'OBJDIR=../$(OBJDIR)' 'RANLIB=$(RANLIB)' 'A=$(A)' 'O=$(O)'
$(DRIVER_BIN): packages/packages.a mudlib/mudlib.a $(OBJ)
	-mv -f $(DRIVER_BIN) $(DRIVER_BIN).old
	$(PROOF) $(CC) $(CFLAGS) $(OPTIMIZE) $(OBJ) -o $(DRIVER_BIN) packages/packages.a mudlib/mudlib.a $(EXTRALIBS) `cat system_libs`

addr_server: files $(OBJDIR)/addr_server.o $(OBJDIR)/socket_ctrl.o $(OBJDIR)/port.o addr_server.h
	$(CC) $(CFLAGS) $(OPTIMIZE) $(OBJDIR)/socket_ctrl.o $(OBJDIR)/addr_server.o $(OBJDIR)/port.o \
	-o addr_server `cat system_libs`

portbind: $(OBJDIR)/portbind.o
	$(CC) $(CFLAGS) $(OPTIMIZE) $(OBJDIR)/portbind.o -o portbind `cat system_libs`


remake: neat all

customize:
	-cp ../local_options .
	-cp ../system_libs .
	-cp ../configure.h .

depend: opcodes.h grammar.tab.c cc.h efunctions.h efun_defs.c configure.h
	-rm tmpdepend
	for i in *.c; do $(CC) -MM -DDEPEND $$i >>tmpdepend; done
	sed -e "s!^[^ ]!$(OBJDIR)/&!" <tmpdepend >Dependencies
	-rm tmpdepend

cc.h: GNUmakefile
	rm -f cc.h
	echo "/* this file automatically generated by the Makefile */" > cc.h
	echo '#define COMPILER "$(CC)"' >> cc.h
	echo '#define OPTIMIZE "$(OPTIMIZE)"' >> cc.h
	echo '#define CFLAGS   "$(CFLAGS) $(OPTIMIZE)"' >> cc.h
	echo '#define OBJDIR   "$(OBJDIR)"' >> cc.h

# the touches here are necessary to fix the modification times; link(2) does
# 'modify' a file
files: edit_source sysmalloc.c smalloc.c bsdmalloc.c debugmalloc.c wrappedmalloc.c options.h op_spec.c func_spec.c mudlib/Makefile.pre mudlib/GNUmakefile.pre packages/Makefile.pre packages/GNUmakefile.pre configure.h grammar.y.pre
	./edit_source -options -malloc -build_func_spec '$(CPP) $(CFLAGS)' \
	              -process grammar.y.pre
	./edit_source -process packages/Makefile.pre
	./edit_source -process packages/GNUmakefile.pre
	./edit_source -process mudlib/Makefile.pre
	./edit_source -process mudlib/GNUmakefile.pre
	./edit_source -build_efuns -build_applies
	touch mallocwrapper.c
	touch malloc.c
	touch files

make_func.tab.c: make_func.y cc.h
	$(YACC) $(YFLAGS) make_func.y
	-rm -f make_func.tab.c
	mv y.tab.c make_func.tab.c

configure.h: edit_source build.MudOS
	-if test \( ! -r configure.h \) -o \( ! -r configuration \); then \
	    rm -f configuration; \
	    touch configuration; \
	fi
	if test "Machine `uname -a` Configure version 5" = "`cat configuration`"; then \
	    echo "Skipping configuration ..."; \
	else \
	    ./edit_source -configure; \
	    echo "Machine `uname -a` Configure version 5" > configuration; \
	fi

$(OBJDIR)/edit_source.o: edit_source.c preprocess.c cc.h

edit_source: $(OBJDIR)/edit_source.o $(OBJDIR)/hash.o $(OBJDIR)/make_func.tab.o
	$(CC) $(CFLAGS) $(OBJDIR)/edit_source.o $(OBJDIR)/hash.o $(OBJDIR)/make_func.tab.o -o edit_source

# don't optimize these two
$(OBJDIR)/edit_source.o: edit_source.c
	$(CC) $(CFLAGS) -o $@ -c $<

$(OBJDIR)/make_func.tab.o: make_func.tab.c
	$(CC) $(CFLAGS) -o $@ -c $<

tags: $(SRC)
	ctags $(SRC)

TAGS: $(SRC)
	etags $(SRC)

install: all
	-mkdir $(INSTALL_DIR)
	$(INSTALL) $(DRIVER_BIN) $(INSTALL_DIR)
	$(INSTALL) addr_server $(INSTALL_DIR)
	$(INSTALL) portbind $(INSTALL_DIR)

Makefiles: Makefile.in GNUmakefile.in NMakefile.in

Makefile.in: edit_source Makefile.in.pre Makefile.master
	./edit_source -process Makefile.in.pre

GNUmakefile.in: edit_source GNUmakefile.in.pre Makefile.master
	./edit_source -process GNUmakefile.in.pre

NMakefile.in: edit_source NMakefile.in.pre Makefile.master
	./edit_source -process NMakefile.in.pre

nothing:

# remove local configuration
spotless: clean
	-rm -f configure.h local_options system_libs configuration
	-rm -f options_incl.h
	-rm -f *.diffs
	-find . -name "*~" -print | xargs rm

# get ready for recompile
neat:
	-(cd packages; $(MAKE) "A=$(A)" "O=$(O)" clean)
	-(cd mudlib; $(MAKE) "A=$(A)" "O=$(O)" clean)
	-rm -rf $(OBJDIR) *.$(O) *.tab.c *.tab.h
	-rm -f efun_defs.c option_defs.c
	-rm -f opcodes.h efunctions.h opc.h efun_protos.h
	-rm -f malloc.c mallocwrapper.c
	-rm -f func_spec.cpp applies.h applies_table.c files
	-rm -f grammar.y comptest* a.out
	-rm -f packages/Makefile packages/GNUmakefile packages/packages

# remove everything except configuration
clean: neat
	-rm -f Makefile.MudOS GNUmakefile.MudOS
	-rm -f cc.h edit_source
	-rm -f core y.output testsuite/core testsuite/tmp/*
	-rm -f testsuite/OPCPROF.* testsuite/opc.*
	-rm -rf testsuite/binaries testsuite/single/swapfile.*
	-rm -f testsuite/OBJ_DUMP* testsuite/test_file testsuite/testfile
	-rm -f testsuite/tmp_eval_file.c testsuite/sf.o testsuite/ed_test
	-rm -f testsuite/log/log testsuite/log/debug.log testsuite/log/compile
	-find . -name "*~" -print | xargs rm
	-find . -name "*.orig" -print | xargs rm
	-find . -name "*.rej" -print | xargs rm
	-rm -f *.ln tags TAGS
	-rm -f $(DRIVER_BIN) $(DRIVER_BIN).old addr_server portbind
	-rm -f Dependencies tmpdepend
	-touch Dependencies

include Dependencies