diff --git a/src/Makefile.in b/src/Makefile.in
index c0f6a50d171e1da6aaebaa79a05167c3643e3f13..b7442ab7a7f9802d1e0e8f8e2e0db4e01d826401 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -167,7 +167,205 @@ verbose_verify: $(TMP_LIBDIR)/testsuite.lpc
 	./ulpc -m $(TMP_LIBDIR)/master.lpc $(TMP_LIBDIR)/testsuite.lpc --verbose
 
 depend: language.c
-	gcc -MM $(PREFLAGS) *.c $(SRCDIR)/*.c | sed 's;$(SRCDIR)/;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies
+	gcc -MM $(PREFLAGS) *.c $(SRCDIR)/*.c >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
 	for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) depend ) ; done
 
-include @srcdir@/dependencies
+add_efun.o: add_efun.c add_efun.h svalue.h types.h machine.h \
+ hashtable.h macros.h memory.h program.h config.h lpc_types.h \
+ stralloc.h interpret.h
+alloca.o: alloca.c
+array.o: array.c global.h config.h machine.h port.h types.h svalue.h \
+ array.h las.h dynamic_buffer.h program.h object.h stralloc.h \
+ interpret.h language.h error.h lpc_types.h fsort.h builtin_efuns.h \
+ memory.h
+backend.o: backend.c global.h config.h machine.h port.h types.h \
+ interpret.h program.h object.h svalue.h error.h call_out.h backend.h \
+ fd_control.h main.h debug.h callback.h array.h las.h dynamic_buffer.h
+builtin_efuns.o: builtin_efuns.c global.h config.h machine.h port.h \
+ types.h interpret.h program.h svalue.h macros.h memory.h object.h \
+ array.h las.h dynamic_buffer.h error.h add_efun.h hashtable.h \
+ mapping.h stralloc.h lex.h list.h lpc_types.h rusage.h operators.h \
+ fsort.h call_out.h callback.h
+call_out.o: call_out.c global.h config.h machine.h port.h types.h \
+ array.h las.h svalue.h dynamic_buffer.h program.h call_out.h object.h \
+ interpret.h error.h builtin_efuns.h memory.h
+callback.o: callback.c macros.h memory.h types.h machine.h callback.h \
+ array.h las.h config.h svalue.h dynamic_buffer.h program.h
+debug.o: debug.c global.h config.h machine.h port.h types.h memory.h
+docode.o: docode.c global.h config.h machine.h port.h types.h las.h \
+ svalue.h dynamic_buffer.h program.h language.h lpc_types.h stralloc.h \
+ interpret.h add_efun.h hashtable.h array.h macros.h memory.h error.h \
+ main.h lex.h builtin_efuns.h
+dynamic_buffer.o: dynamic_buffer.c global.h config.h machine.h port.h \
+ types.h dynamic_buffer.h stralloc.h error.h svalue.h memory.h
+error.o: error.c global.h config.h machine.h port.h types.h macros.h \
+ memory.h error.h svalue.h interpret.h program.h stralloc.h \
+ builtin_efuns.h array.h las.h dynamic_buffer.h object.h
+fd_control.o: fd_control.c fd_control.h global.h config.h machine.h \
+ port.h types.h
+fsort.o: fsort.c global.h config.h machine.h port.h types.h fsort.h
+hashtable.o: hashtable.c hashtable.h types.h machine.h stralloc.h \
+ config.h stuff.h error.h svalue.h
+interpret.o: interpret.c global.h config.h machine.h port.h types.h \
+ interpret.h program.h object.h svalue.h array.h las.h \
+ dynamic_buffer.h mapping.h error.h language.h stralloc.h add_efun.h \
+ hashtable.h macros.h memory.h list.h backend.h operators.h opcodes.h \
+ main.h lex.h builtin_efuns.h
+language.o: language.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./array.h ./las.h ./svalue.h \
+ ./dynamic_buffer.h ./object.h ./stralloc.h ./lex.h ./lpc_types.h \
+ ./add_efun.h ./hashtable.h ./macros.h ./error.h ./docode.h
+las.o: las.c global.h config.h machine.h port.h types.h language.h \
+ interpret.h program.h las.h svalue.h dynamic_buffer.h array.h \
+ object.h stralloc.h lex.h lpc_types.h add_efun.h hashtable.h \
+ mapping.h list.h error.h docode.h main.h memory.h
+lex.o: lex.c global.h config.h machine.h port.h types.h language.h \
+ array.h las.h svalue.h dynamic_buffer.h program.h lex.h stralloc.h \
+ add_efun.h hashtable.h stuff.h memory.h interpret.h error.h object.h \
+ operators.h opcodes.h builtin_efuns.h macros.h
+list.o: list.c global.h config.h machine.h port.h types.h array.h \
+ las.h svalue.h dynamic_buffer.h program.h list.h macros.h memory.h \
+ error.h interpret.h builtin_efuns.h
+lpc_types.o: lpc_types.c global.h config.h machine.h port.h types.h \
+ svalue.h lpc_types.h stralloc.h stuff.h array.h las.h \
+ dynamic_buffer.h program.h add_efun.h hashtable.h object.h list.h \
+ mapping.h macros.h memory.h error.h
+main.o: main.c global.h config.h machine.h port.h types.h backend.h \
+ module.h object.h svalue.h lex.h lpc_types.h builtin_efuns.h array.h \
+ las.h dynamic_buffer.h program.h stralloc.h interpret.h error.h \
+ macros.h memory.h callback.h
+mapping.o: mapping.c global.h config.h machine.h port.h types.h \
+ mapping.h las.h svalue.h dynamic_buffer.h program.h array.h macros.h \
+ memory.h language.h error.h interpret.h
+memory.o: memory.c global.h config.h machine.h port.h types.h memory.h \
+ error.h svalue.h
+module.o: module.c module.h types.h machine.h macros.h memory.h \
+ error.h svalue.h modlist.h
+object.o: object.c global.h config.h machine.h port.h types.h object.h \
+ svalue.h dynamic_buffer.h interpret.h program.h stralloc.h macros.h \
+ memory.h error.h main.h
+opcodes.o: opcodes.c global.h config.h machine.h port.h types.h \
+ interpret.h program.h svalue.h array.h las.h dynamic_buffer.h \
+ stralloc.h mapping.h list.h opcodes.h object.h error.h lpc_types.h
+operators.o: operators.c global.h config.h machine.h port.h types.h \
+ interpret.h program.h svalue.h list.h las.h dynamic_buffer.h \
+ mapping.h array.h stralloc.h opcodes.h operators.h language.h \
+ memory.h error.h
+port.o: port.c global.h config.h machine.h port.h types.h macros.h \
+ memory.h
+program.o: program.c global.h config.h machine.h port.h types.h \
+ program.h object.h svalue.h dynamic_buffer.h lpc_types.h stralloc.h \
+ las.h language.h lex.h macros.h memory.h fsort.h error.h docode.h \
+ interpret.h hashtable.h
+rusage.o: rusage.c global.h config.h machine.h port.h types.h rusage.h
+stralloc.o: stralloc.c global.h config.h machine.h port.h types.h \
+ stralloc.h macros.h memory.h dynamic_buffer.h error.h svalue.h
+stuff.o: stuff.c stuff.h types.h machine.h
+svalue.o: svalue.c global.h config.h machine.h port.h types.h svalue.h \
+ stralloc.h array.h las.h dynamic_buffer.h program.h mapping.h list.h \
+ object.h add_efun.h hashtable.h error.h
+ualarm.o: ualarm.c
+add_efun.o: ./add_efun.c ./add_efun.h ./svalue.h ./types.h ./machine.h \
+ ./hashtable.h ./macros.h ./memory.h ./program.h ./config.h \
+ ./lpc_types.h ./stralloc.h ./interpret.h
+alloca.o: ./alloca.c
+array.o: ./array.c ./global.h ./config.h ./machine.h ./port.h \
+ ./svalue.h ./array.h ./las.h ./dynamic_buffer.h ./program.h \
+ ./object.h ./stralloc.h ./interpret.h ./language.h ./error.h \
+ ./lpc_types.h ./fsort.h ./builtin_efuns.h
+backend.o: ./backend.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./object.h ./svalue.h ./error.h \
+ ./call_out.h ./backend.h ./fd_control.h ./main.h ./debug.h \
+ ./callback.h ./array.h ./las.h ./dynamic_buffer.h
+builtin_efuns.o: ./builtin_efuns.c ./global.h ./config.h ./machine.h \
+ ./port.h ./interpret.h ./program.h ./svalue.h ./macros.h ./object.h \
+ ./array.h ./las.h ./dynamic_buffer.h ./error.h ./add_efun.h \
+ ./hashtable.h ./mapping.h ./stralloc.h ./lex.h ./list.h ./lpc_types.h \
+ ./rusage.h ./operators.h ./fsort.h ./call_out.h ./callback.h
+call_out.o: ./call_out.c ./global.h ./config.h ./machine.h ./port.h \
+ ./array.h ./las.h ./svalue.h ./dynamic_buffer.h ./program.h \
+ ./call_out.h ./object.h ./interpret.h ./error.h ./builtin_efuns.h
+callback.o: ./callback.c ./macros.h ./memory.h ./types.h ./machine.h \
+ ./callback.h ./array.h ./las.h ./config.h ./svalue.h \
+ ./dynamic_buffer.h ./program.h
+debug.o: ./debug.c ./global.h ./config.h ./machine.h ./port.h
+docode.o: ./docode.c ./global.h ./config.h ./machine.h ./port.h \
+ ./las.h ./svalue.h ./dynamic_buffer.h ./program.h ./language.h \
+ ./lpc_types.h ./stralloc.h ./interpret.h ./add_efun.h ./hashtable.h \
+ ./array.h ./macros.h ./error.h ./main.h ./lex.h ./builtin_efuns.h
+dynamic_buffer.o: ./dynamic_buffer.c ./global.h ./config.h ./machine.h \
+ ./port.h ./dynamic_buffer.h ./stralloc.h ./error.h ./svalue.h
+error.o: ./error.c ./global.h ./config.h ./machine.h ./port.h \
+ ./macros.h ./error.h ./svalue.h ./interpret.h ./program.h \
+ ./stralloc.h ./builtin_efuns.h ./array.h ./las.h ./dynamic_buffer.h \
+ ./object.h
+fd_control.o: ./fd_control.c ./fd_control.h ./global.h ./config.h \
+ ./machine.h ./port.h
+fsort.o: ./fsort.c ./global.h ./config.h ./machine.h ./port.h \
+ ./fsort.h
+hashtable.o: ./hashtable.c ./hashtable.h ./types.h ./machine.h \
+ ./stralloc.h ./config.h ./stuff.h ./error.h ./svalue.h
+interpret.o: ./interpret.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./object.h ./svalue.h ./array.h ./las.h \
+ ./dynamic_buffer.h ./mapping.h ./error.h ./language.h ./stralloc.h \
+ ./add_efun.h ./hashtable.h ./macros.h ./list.h ./backend.h \
+ ./operators.h ./opcodes.h ./main.h ./lex.h ./builtin_efuns.h
+language.o: ./language.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./array.h ./las.h ./svalue.h \
+ ./dynamic_buffer.h ./object.h ./stralloc.h ./lex.h ./lpc_types.h \
+ ./add_efun.h ./hashtable.h ./macros.h ./error.h ./docode.h
+las.o: ./las.c ./global.h ./config.h ./machine.h ./port.h ./language.h \
+ ./interpret.h ./program.h ./las.h ./svalue.h ./dynamic_buffer.h \
+ ./array.h ./object.h ./stralloc.h ./lex.h ./lpc_types.h ./add_efun.h \
+ ./hashtable.h ./mapping.h ./list.h ./error.h ./docode.h ./main.h
+lex.o: ./lex.c ./global.h ./config.h ./machine.h ./port.h ./language.h \
+ ./array.h ./las.h ./svalue.h ./dynamic_buffer.h ./program.h ./lex.h \
+ ./stralloc.h ./add_efun.h ./hashtable.h ./stuff.h ./interpret.h \
+ ./error.h ./object.h ./operators.h ./opcodes.h ./builtin_efuns.h \
+ ./macros.h
+list.o: ./list.c ./global.h ./config.h ./machine.h ./port.h ./array.h \
+ ./las.h ./svalue.h ./dynamic_buffer.h ./program.h ./list.h ./macros.h \
+ ./error.h ./interpret.h ./builtin_efuns.h
+lpc_types.o: ./lpc_types.c ./global.h ./config.h ./machine.h ./port.h \
+ ./svalue.h ./lpc_types.h ./stralloc.h ./stuff.h ./array.h ./las.h \
+ ./dynamic_buffer.h ./program.h ./add_efun.h ./hashtable.h ./object.h \
+ ./list.h ./mapping.h ./macros.h ./error.h
+main.o: ./main.c ./global.h ./config.h ./machine.h ./port.h \
+ ./backend.h ./module.h ./object.h ./svalue.h ./lex.h ./lpc_types.h \
+ ./builtin_efuns.h ./array.h ./las.h ./dynamic_buffer.h ./program.h \
+ ./stralloc.h ./interpret.h ./error.h ./macros.h ./callback.h
+mapping.o: ./mapping.c ./global.h ./config.h ./machine.h ./port.h \
+ ./mapping.h ./las.h ./svalue.h ./dynamic_buffer.h ./program.h \
+ ./array.h ./macros.h ./language.h ./error.h ./interpret.h
+memory.o: ./memory.c ./global.h ./config.h ./machine.h ./port.h \
+ ./error.h ./svalue.h
+module.o: ./module.c ./module.h ./types.h ./machine.h ./macros.h \
+ ./memory.h ./error.h ./svalue.h ./modlist.h
+object.o: ./object.c ./global.h ./config.h ./machine.h ./port.h \
+ ./object.h ./svalue.h ./dynamic_buffer.h ./interpret.h ./program.h \
+ ./stralloc.h ./macros.h ./error.h ./main.h
+opcodes.o: ./opcodes.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./svalue.h ./array.h ./las.h \
+ ./dynamic_buffer.h ./stralloc.h ./mapping.h ./list.h ./opcodes.h \
+ ./object.h ./error.h ./lpc_types.h
+operators.o: ./operators.c ./global.h ./config.h ./machine.h ./port.h \
+ ./interpret.h ./program.h ./svalue.h ./list.h ./las.h \
+ ./dynamic_buffer.h ./mapping.h ./array.h ./stralloc.h ./opcodes.h \
+ ./operators.h ./language.h ./error.h
+port.o: ./port.c ./global.h ./config.h ./machine.h ./port.h ./macros.h
+program.o: ./program.c ./global.h ./config.h ./machine.h ./port.h \
+ ./program.h ./object.h ./svalue.h ./dynamic_buffer.h ./lpc_types.h \
+ ./stralloc.h ./las.h ./language.h ./lex.h ./macros.h ./fsort.h \
+ ./error.h ./docode.h ./interpret.h ./hashtable.h
+rusage.o: ./rusage.c ./global.h ./config.h ./machine.h ./port.h \
+ ./rusage.h
+stralloc.o: ./stralloc.c ./global.h ./config.h ./machine.h ./port.h \
+ ./stralloc.h ./macros.h ./dynamic_buffer.h ./error.h ./svalue.h
+stuff.o: ./stuff.c ./stuff.h ./types.h ./machine.h
+svalue.o: ./svalue.c ./global.h ./config.h ./machine.h ./port.h \
+ ./svalue.h ./stralloc.h ./array.h ./las.h ./dynamic_buffer.h \
+ ./program.h ./mapping.h ./list.h ./object.h ./add_efun.h \
+ ./hashtable.h ./error.h
+ualarm.o: ./ualarm.c
diff --git a/src/Makefile.in.src b/src/Makefile.in.src
new file mode 100644
index 0000000000000000000000000000000000000000..bba23fffe73f193cba7f1f78d786f3fdac1604de
--- /dev/null
+++ b/src/Makefile.in.src
@@ -0,0 +1,174 @@
+# This line is needed on some machines.
+@SET_MAKE@
+
+# Don't change this line.  Define EXTRALIBS before this line if you
+# wish to add any libraries.
+LIBS=@LIBS@ $(EXTRALIBS)
+
+# not used yet
+INSTALL=@INSTALL@
+
+SRCDIR=@srcdir@
+VPATH=@srcdir@
+
+# These are used while compiling
+TMP_LIBDIR = @srcdir@/../lib
+TMP_BINDIR = @srcdir@/../bin
+
+prefix = @prefix@
+exec_prefix = $(prefix)/bin
+lib_prefix = $(prefix)/lib/ulpc
+
+#
+# use bison please, yacc doesn't always work good enough.
+#
+YACC=@YACC@
+YFLAGS=-d -v
+
+# If you don't have 'strchr', then add next flag to CFLAGS.
+# -Dstrchr=index -Dstrrchr=rindex
+#
+PROFIL=
+#PROFIL=-pg
+
+#
+#Enable warnings from the compiler, if wanted.
+#
+WARN=@WARN@
+#WARN=-W -Wunused -Wformat
+#WARN -Wunused -Wformat -Wuninitialized
+#WARN= -Wall -Wshadow -Dlint
+
+#add extra defines here
+DEFINES=-DDEFAULT_MASTER=\"$(lib_prefix)/master.lpc\"
+
+# -O should work with all compilers
+OPTIMIZE=@OPTIMIZE@
+
+# Preprocessor flags.
+PREFLAGS=-I. -I$(SRCDIR) $(DEFINES)
+OTHERFLAGS=$(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL)
+CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
+
+CC=@CC@
+CPP=@CPP@
+
+LD=$(CC)
+LDFLAGS=$(CFLAGS)
+
+MAKE_FLAGS = "prefix=$(prefix)" "exex_prefix=$(exex_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)"
+
+# Add alloca.o if you don't have alloca() on your machine.
+# Add ualarm.o if you don't have ualarm() on your machine.
+#
+OBJ=language.o add_efun.o array.o builtin_efuns.o backend.o \
+    call_out.o docode.o dynamic_buffer.o error.o fd_control.o \
+    fsort.o hashtable.o interpret.o lex.o las.o list.o \
+    lpc_types.o main.o mapping.o memory.o module.o object.o \
+    opcodes.o operators.o port.o program.o rusage.o stralloc.o \
+    stuff.o svalue.o debug.o callback.o
+
+#
+MODULES=@subdirs@
+MODULE_OBJS=@MODULE_OBJS@
+
+all: ulpc
+
+module_objects:
+	for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) ) ; done
+
+ulpc: $(OBJ) module_objects
+	-mv ulpc ulpc.old
+	$(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
+
+pure: $(OBJ) module_objects
+	-mv ulpc ulpc.old
+	purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
+
+cover: $(OBJ) module_objects
+	-mv ulpc ulpc.old
+	purecov purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
+
+quant: $(OBJ) module_objects
+	-mv ulpc ulpc.old
+	quantify $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
+
+install:
+	if [ ! -d "$(prefix)" ]; then mkdir "$(prefix)" ; chmod 755 "$(prefix)" ; fi
+	if [ ! -d "$(exec_prefix)" ]; then mkdir "$(exec_prefix)" ; chmod 755 "$(exec_prefix)" ; fi
+	$(INSTALL) ./ulpc $(exec_prefix)
+	if [ ! -d "$(prefix)/lib" ]; then mkdir "$(prefix)/lib" ; chmod 755 "$(prefix)/lib" ; fi
+	if [ ! -d "$(lib_prefix)" ]; then mkdir "$(lib_prefix)" ; chmod 755 "$(lib_prefix)" ; fi
+	$(INSTALL) $(TMP_LIBDIR)/master.lpc $(lib_prefix)
+	$(INSTALL) $(TMP_LIBDIR)/simulate.lpc $(lib_prefix)
+
+
+spinner-install:
+	cp ulpc $(SRCDIR)/../../server/bin/
+
+lint: *.c
+	lint *.c
+
+lang.o: lang.c config.h object.h interpret.h program.h
+
+language.h: language.y
+	@echo "Expect 1 shift/reduce conflict."
+	$(YACC) $(YFLAGS) $(SRCDIR)/language.y
+	mv y.tab.c language.c
+	mv y.tab.h language.h
+
+language.c: language.h
+	touch language.c
+
+module.c: modlist.h
+
+tidy:
+	-rm -f *.o core $(MUD_LIB)/core y.output y.tab.c y.tab.h
+	-rm -f $(TMP_BINDIR)/core *.o *.i *.i~
+
+clean: tidy
+	-for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) clean ) ; done
+	-for a in $(MODULES) ; do rm -f $$a/*.o ; done
+	-rm -f language.h language.c efun_protos.h opc_cost.h
+	-rm -f TAGS tags
+	-rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out
+
+spotless: clean
+	rm -f Makefile machine.h
+	find . -type f '(' -name '*~' -o -name '.*~' -o -name core -o -name '.nfs*' -name '#*#' ')' -print | xargs rm -f
+	-rm -f lexical.c mon.out *.ln config.status
+	-rm -f $(TMP_BINDIR)/driver $(TMP_BINDIR)/*~ $(TMP_BINDIR)/#*#
+	-rm -f .pure driver* l.outa*
+
+tags:
+	ctags *.c
+
+TAGS:
+	etags -t *.h *.c
+
+Makefile: Makefile.in 
+	./config.status
+
+machine.h: stamp-h
+
+stamp-h: machine.h.in 
+	./config.status
+
+modlist.h:
+	./config.status
+
+$(TMP_LIBDIR)/testsuite.lpc: $(TMP_BINDIR)/create_testsuite
+	$(TMP_BINDIR)/create_testsuite >$(TMP_LIBDIR)/testsuite.lpc
+
+verify: $(TMP_LIBDIR)/testsuite.lpc
+	./ulpc -m $(TMP_LIBDIR)/master.lpc $(TMP_LIBDIR)/testsuite.lpc
+
+verbose_verify: $(TMP_LIBDIR)/testsuite.lpc
+	./ulpc -m $(TMP_LIBDIR)/master.lpc $(TMP_LIBDIR)/testsuite.lpc --verbose
+
+depend: language.c
+	gcc -MM $(PREFLAGS) *.c $(SRCDIR)/*.c >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
+	for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) depend ) ; done
+
diff --git a/src/modules/files/Makefile.in b/src/modules/files/Makefile.in
index d0a96f2657fe67a3fa989db70927d4fa5860bba8..6ce8a8296d449ee613a136025ff5cb551fd945ba 100644
--- a/src/modules/files/Makefile.in
+++ b/src/modules/files/Makefile.in
@@ -13,8 +13,21 @@ files.a: $(FILES)
 clean:
 	-rm -f *.o *.a
 
-depend:
-	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;$(SRCDIR)/;;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies
-
-include @srcdir@/dependencies
-
+datagram.o: ./datagram.c
+efuns.o: ./efuns.c ./../../global.h ./../../config.h ./../../machine.h \
+ ./../../port.h ./../../interpret.h ./../../program.h ./../../svalue.h \
+ ./../../stralloc.h ./../../array.h ./../../las.h \
+ ./../../dynamic_buffer.h ./../../mapping.h ./../../macros.h \
+ ./../../fd_control.h ./file_machine.h
+file.o: ./file.c ./../../global.h ./../../config.h ./../../machine.h \
+ ./../../port.h ./../../interpret.h ./../../program.h ./../../svalue.h \
+ ./../../stralloc.h ./../../array.h ./../../las.h \
+ ./../../dynamic_buffer.h ./../../object.h ./../../macros.h \
+ ./../../backend.h ./../../fd_control.h ./file_machine.h ./file.h \
+ ./../../error.h /usr/include/netdb.h
+socket.o: ./socket.c ./../../global.h ./../../config.h \
+ ./../../machine.h ./../../port.h ./../../interpret.h \
+ ./../../program.h ./../../svalue.h ./../../stralloc.h ./../../array.h \
+ ./../../las.h ./../../dynamic_buffer.h ./../../object.h \
+ ./../../macros.h ./../../backend.h ./../../fd_control.h \
+ ./file_machine.h ./file.h
diff --git a/src/modules/files/Makefile.in.src b/src/modules/files/Makefile.in.src
new file mode 100644
index 0000000000000000000000000000000000000000..187530b2b7cb0c1ee903b53f69fcbdef01980118
--- /dev/null
+++ b/src/modules/files/Makefile.in.src
@@ -0,0 +1,15 @@
+SRCDIR=@srcdir@
+VPATH=@srcdir@:@srcdir@/../..:../..
+PREFLAGS=-I. -I$(SRCDIR) -I$(SRCDIR)/../.. -I../..
+CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
+
+FILES=file.o efuns.o socket.o
+
+files.a: $(FILES)
+	-rm -f files.a
+	ar cq files.a $(FILES)
+	-@RANLIB@ files.a
+
+clean:
+	-rm -f *.o *.a
+
diff --git a/src/modules/math/Makefile.in b/src/modules/math/Makefile.in
index 7734461b30a3a7b572230e67d3e587848324cbc7..c8bc844b334887bfb5941097e0af5378f811d83e 100644
--- a/src/modules/math/Makefile.in
+++ b/src/modules/math/Makefile.in
@@ -14,7 +14,10 @@ clean:
 	-rm -f *.o
 
 depend:
-	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;$(SRCDIR)/;;g' | sed 's;\.\./;;g' | sed 's;\./;;g'>$(SRCDIR)/dependencies
-
-include @srcdir@/dependencies
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
 
+math.o: ./math.c ./../../interpret.h ./../../program.h \
+ ./../../config.h ./../../machine.h ./../../types.h ./../../add_efun.h \
+ ./../../svalue.h ./../../hashtable.h
diff --git a/src/modules/math/Makefile.in.src b/src/modules/math/Makefile.in.src
new file mode 100644
index 0000000000000000000000000000000000000000..3a45219c6eab407d0dd76656d9df81af0ae642d5
--- /dev/null
+++ b/src/modules/math/Makefile.in.src
@@ -0,0 +1,20 @@
+SRCDIR=@srcdir@
+VPATH=@srcdir@:@srcdir@/../..:../..
+PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../..
+CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
+
+FILES=math.o
+
+math.a: $(FILES)
+	-rm -f math.a
+	ar cq math.a $(FILES)
+	-@RANLIB@ math.a
+
+clean:
+	-rm -f *.o
+
+depend:
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
+
diff --git a/src/modules/regexp/Makefile.in b/src/modules/regexp/Makefile.in
index fdda577428430b65779a09ac8e2e4171a31a8215..2b584a9d1eaca30d1ee6b28d2dbe38c5bb98954a 100644
--- a/src/modules/regexp/Makefile.in
+++ b/src/modules/regexp/Makefile.in
@@ -14,8 +14,14 @@ clean:
 	-rm -f *.o *.a
 
 depend:
-	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;$(SRCDIR)/;;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies
-
-include @srcdir@/dependencies
-
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
 
+glue.o: ./glue.c ./../../global.h ./../../config.h ./../../machine.h \
+ ./../../port.h ./../../interpret.h ./../../program.h ./../../svalue.h \
+ ./../../stralloc.h ./../../array.h ./../../las.h \
+ ./../../dynamic_buffer.h ./../../object.h ./../../macros.h
+regexp.o: ./regexp.c ./../../global.h ./../../config.h \
+ ./../../machine.h ./../../port.h ./regexp.h ./../../error.h \
+ ./../../svalue.h
diff --git a/src/modules/regexp/Makefile.in.src b/src/modules/regexp/Makefile.in.src
new file mode 100644
index 0000000000000000000000000000000000000000..614165b138447be70a017241fabae3accc78b537
--- /dev/null
+++ b/src/modules/regexp/Makefile.in.src
@@ -0,0 +1,20 @@
+SRCDIR=@srcdir@
+VPATH=@srcdir@:@srcdir@/../..:../..
+PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../..
+CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
+
+FILES=regexp.o glue.o
+
+regexp.a: $(FILES)
+	-rm -f regexp.a
+	ar cq regexp.a $(FILES)
+	-@RANLIB@ regexp.a
+
+clean:
+	-rm -f *.o *.a
+
+depend:
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
+
diff --git a/src/modules/sprintf/Makefile.in b/src/modules/sprintf/Makefile.in
index bfad0de5250105b57132325ffa1ac152f9f210fe..62a4e7949991182968ed482fae8bfba2009e2d73 100644
--- a/src/modules/sprintf/Makefile.in
+++ b/src/modules/sprintf/Makefile.in
@@ -14,8 +14,13 @@ clean:
 	-rm -f *.o *.a
 
 depend:
-	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | sed 's;$(SRCDIR)/;;g' | sed 's;\.\./;;g' | sed 's;\./;;g' >$(SRCDIR)/dependencies
-
-include @srcdir@/dependencies
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
 
 
+sprintf.o: ./sprintf.c ./../../global.h ./../../config.h \
+ ./../../machine.h ./../../port.h ./../../error.h ./../../svalue.h \
+ ./../../array.h ./../../las.h ./../../dynamic_buffer.h \
+ ./../../program.h ./../../stralloc.h ./../../lpc_types.h \
+ ./../../add_efun.h ./../../hashtable.h ./../../interpret.h
diff --git a/src/modules/sprintf/Makefile.in.src b/src/modules/sprintf/Makefile.in.src
new file mode 100644
index 0000000000000000000000000000000000000000..2b683bff05047d45c690880b90c442e8b1045bb3
--- /dev/null
+++ b/src/modules/sprintf/Makefile.in.src
@@ -0,0 +1,21 @@
+SRCDIR=@srcdir@
+VPATH=@srcdir@:@srcdir@/../..:../..
+PREFLAGS=-I$(SRCDIR) -I$(SRCDIR)/../.. -I../..
+CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
+
+FILES=sprintf.o
+
+sprintf.a: $(FILES)
+	-rm -f sprintf.a
+	ar cq sprintf.a $(FILES)
+	-@RANLIB@ sprintf.a
+
+clean:
+	-rm -f *.o *.a
+
+depend:
+	gcc -MM $(PREFLAGS) $(SRCDIR)/*.c  >$(SRCDIR)/dependencies
+	cat $(SRCDIR)/Makefile.in.src $(SRCDIR)/dependencies > $(SRCDIR)/Makefile.in
+	config.status
+
+