diff --git a/src/include/Makefile b/src/include/Makefile
index 45a81015942abedc44931b87cfa9cac8e16f1fbe..9fd49b9da1d56107745a3892993c5e913bf6e77b 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -1,35 +1,9 @@
-#  Makefile for LysKOM
-#
-###############################################################################
-#
-#  SPECIAL CONSIDERATIONS:
-#
-#  -  Requires GNU make.
-#  -  CC, OPTIMIZE-FLAGS and other make variables are passed down 
-#     in the environment.
-#  -  C compiler must be ANSI conformant.
-#
-###############################################################################
-#
-#  SPECIAL TARGETS:
-###############################################################################
-
-# Directories that you might want to override via the environment.
-
-ifndef TOPDIR
 TOPDIR = /usr/lyskom/src
-endif
-
-ifndef SCRIPTDIR
 SCRIPTDIR = $(TOPDIR)/scripts
-endif
-
-TARGET = -DCLIENT
 
 include $(SCRIPTDIR)/import.make
 
-
-# All directories that make should traverse to when doing clean etc.
+TARGET = -DCLIENT
 
 SUBDIRS = ansi server 
 
@@ -39,7 +13,7 @@ all:
 	for i in $(SUBDIRS); \
 	do	\
 		echo making all in directory $$i; \
-		(cd $$i; $(MAKE) all); \
+		(cd $$i; $(MAKE) $(EXPORTS) all); \
 	done
 
 
@@ -51,26 +25,15 @@ install:
 	for i in $(SUBDIRS); \
 	do	\
 		echo making install in directory $$i; \
-		(cd $$i; $(MAKE) install); \
+		(cd $$i; $(MAKE) $(EXPORTS) install); \
 	done
 
 clean:
-	rm -vf ${OBJECTS} *~ core temp-Makefile Distfile *.o
+	$(RM) *~ core temp-Makefile Distfile *.o
 	for i in $(SUBDIRS); \
 	do	\
 		echo making clean in directory $$i; \
-		(cd $$i; $(MAKE) clean); \
+		(cd $$i; $(MAKE) $(EXPORTS) clean); \
 	done
 
-
-depend:
-	for i in $(SUBDIRS); \
-	do	\
-		echo making depend in directory $$i; \
-		(cd $$i; $(MAKE) depend); \
-	done
-	>dependencies
-
-specials:;
-
-include dependencies
+depend:;
\ No newline at end of file
diff --git a/src/include/server/Makefile b/src/include/server/Makefile
index 51573620b14b06f5a9ea6c6df4d83e19cfc601eb..bbdceab7dd5ea26ad13954fdef633a7b107f05c6 100644
--- a/src/include/server/Makefile
+++ b/src/include/server/Makefile
@@ -1,36 +1,9 @@
-#  Makefile for LysKOM
-#
-###############################################################################
-#
-#  SPECIAL CONSIDERATIONS:
-#
-#  -  Requires GNU make.
-#  -  CC, OPTIMIZE-FLAGS and other make variables are passed down 
-#     in the environment.
-#  -  C compiler must be ANSI conformant.
-#
-###############################################################################
-#
-#  SPECIAL TARGETS:
-###############################################################################
-
-# Directories that you might want to override via the environment.
-
-ifndef TOPDIR
 TOPDIR = /usr/lyskom/src
-endif
-
-ifndef SCRIPTDIR
 SCRIPTDIR = $(TOPDIR)/scripts
-endif
-
-TARGET = -DCLIENT
 
 include $(SCRIPTDIR)/import.make
 
-
-# All directories that make should traverse to when doing clean etc.
-
+TARGET = -DCLIENT
 
 INSTALL-HDRS = smalloc.h
 
@@ -46,9 +19,4 @@ install:
 clean:
 	rm -vf ${OBJECTS} *~ core temp-Makefile Distfile *.o
 
-depend:
-	>dependencies
-
-specials:;
-
-include dependencies
+depend:;
diff --git a/src/libraries/Makefile b/src/libraries/Makefile
index d69235845cdf4cbac6e639520c369d354ac0fdde..404bb006a9c0aaad4c0effccbe96ca28a6ccab3f 100644
--- a/src/libraries/Makefile
+++ b/src/libraries/Makefile
@@ -1,3 +1,8 @@
+TOPDIR = /usr/lyskom/src
+SCRIPTDIR = $(TOPDIR)/scripts
+
+include $(SCRIPTDIR)/import.make
+
 # All directories that make should traverse to when doing clean etc.
 # Note that client-support depends on libmisc.
 
@@ -7,7 +12,7 @@ all:
 	for i in $(SUBDIRS) ;	\
 	do	\
 		echo making all in directory $$i; \
-		(cd $$i; $(MAKE) all)	\
+		(cd $$i; $(MAKE) $(EXPORTS) all)	\
 	done
 
 
@@ -15,8 +20,7 @@ depend:
 	for i in $(SUBDIRS) ;	\
 	do	\
 		echo making depend in directory $$i; \
-		(cd $$i; $(MAKE) depend);	\
-		echo make depend in directory $$i ready.; \
+		(cd $$i; $(MAKE) $(EXPORTS) depend);	\
 	done
 
 
@@ -24,7 +28,7 @@ install:
 	for i in $(SUBDIRS) ;	\
 	do	\
 		echo making install in directory $$i; \
-		(cd $$i; $(MAKE) install)	\
+		(cd $$i; $(MAKE) $(EXPORTS) install)	\
 	done
 
 
@@ -32,7 +36,7 @@ install-headers:
 	for i in $(SUBDIRS) ;	\
 	do	\
 		echo making install-headers in directory $$i; \
-		(cd $$i; $(MAKE) install-headers)	\
+		(cd $$i; $(MAKE) $(EXPORTS) install-headers)	\
 	done
 
 
@@ -41,6 +45,6 @@ clean:
 	for i in $(SUBDIRS); \
 	do \
 	   echo making clean in directory $$i; \
-	   (cd $$i; $(MAKE) clean) \
+	   (cd $$i; $(MAKE) $(EXPORTS) clean) \
 	done
 		
diff --git a/src/libraries/libansi/Makefile b/src/libraries/libansi/Makefile
index 3f63c0e258fd92db01169e73919a45c830bb8123..ffa1902418918af936014ece90d625de93be7efb 100644
--- a/src/libraries/libansi/Makefile
+++ b/src/libraries/libansi/Makefile
@@ -1,36 +1,9 @@
-#  Makefile for LysKOM
-#
-###############################################################################
-#
-#  SPECIAL CONSIDERATIONS:
-#
-#  -  Requires GNU make.
-#  -  CC, OPTIMIZE-FLAGS and other make variables are passed down 
-#     in the environment.
-#  -  C compiler must be ANSI conformant.
-#
-###############################################################################
-#
-#  SPECIAL TARGETS:
-###############################################################################
-
-# Directories that you might want to override via the environment.
-
-ifndef TOPDIR
 TOPDIR = /usr/lyskom/src
-endif
-
-ifndef SCRIPTDIR
 SCRIPTDIR = $(TOPDIR)/scripts
-endif
-
-TARGET = -DCLIENT
 
 include $(SCRIPTDIR)/import.make
 
-
-# All directories that make should traverse to when doing clean etc.
-
+TARGET = -DCLIENT
 
 LIBNAME = libansi.a
 
diff --git a/src/libraries/libcommon/Makefile b/src/libraries/libcommon/Makefile
index ea6bd2331a8dbcb10c7cda79ceaa949efb321ebd..89e25a79a128e3845bdf4b586cfa6cf44d8beb4b 100644
--- a/src/libraries/libcommon/Makefile
+++ b/src/libraries/libcommon/Makefile
@@ -1,36 +1,9 @@
-#  Makefile for LysKOM
-#
-###############################################################################
-#
-#  SPECIAL CONSIDERATIONS:
-#
-#  -  Requires GNU make.
-#  -  CC, OPTIMIZE-FLAGS and other make variables are passed down 
-#     in the environment.
-#  -  C compiler must be ANSI conformant.
-#
-###############################################################################
-#
-#  SPECIAL TARGETS:
-###############################################################################
-
-
-# Directories that you might want to override via the environment.
-
-ifndef TOPDIR
 TOPDIR = /usr/lyskom/src
-endif
-
-ifndef SCRIPTDIR
 SCRIPTDIR = $(TOPDIR)/scripts
-endif
-
-TARGET = -DCLIENT
 
 include $(SCRIPTDIR)/import.make
 
-
-# All directories that make should traverse to when doing clean etc.
+TARGET = -DCLIENT
 
 
 LIBOBJS = kom-errno.o misc-parser.o parser.o
@@ -51,7 +24,7 @@ server-dir:
 
 .PHONY: liblyskom-server.a
 liblyskom-server.a: server-dir
-	(cd server-dir; make -f ../Makefile ../$@ TARGET=-DSERVER)
+	(cd server-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DSERVER)
 	ranlib $@
 
 
@@ -60,7 +33,7 @@ liblyskom-server.a: server-dir
 
 .PHONY: liblyskom-client.a
 liblyskom-client.a: client-dir
-	(cd client-dir; make -f ../Makefile ../$@ TARGET=-DCLIENT)
+	(cd client-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DCLIENT)
 	ranlib $@
 
 
@@ -84,11 +57,6 @@ install-headers:
 tags:
 	etags -t $(INCLUDEDIR)/*.h *.[hc]	
 
-#rdist: clean
-#	echo "(/usr/local/src/2kom/common) -> (nanny.lysator.liu.se)" >Distfile
-#	echo "install;"						     >>Distfile
-#	rdist
-
 # Recreate the Makefile from Makefile
 
 include $(SCRIPTDIR)/Parallell-depend.make
diff --git a/src/libraries/libmisc/Makefile b/src/libraries/libmisc/Makefile
index cba454931e4816ba31a4457181930112b07c98c0..212121f2085aa413ed0c22fd5657533100d6ffb1 100644
--- a/src/libraries/libmisc/Makefile
+++ b/src/libraries/libmisc/Makefile
@@ -13,24 +13,12 @@
 #
 #  SPECIAL TARGETS:
 ###############################################################################
-
-# Directories that you might want to override via the environment.
-
-ifndef TOPDIR
 TOPDIR = /usr/lyskom/src
-endif
-
-ifndef SCRIPTDIR
 SCRIPTDIR = $(TOPDIR)/scripts
-endif
-
-TARGET = -DCLIENT
 
 include $(SCRIPTDIR)/import.make
 
-
-# All directories that make should traverse to when doing clean etc.
-
+TARGET = -DCLIENT
 
 LIBNAME = libmisc.a
 
@@ -38,9 +26,6 @@ LIBOBJS = pom.o s-collat-tabs.o s-string.o zmalloc.o
 
 INSTALL-HDRS = pom.h s-collat-tabs.h s-string.h zmalloc.h
 
-#OBJECTS = numlist.o numlist2.o pom.o s-collat-tabs.o s-string.o \
-#	testnumlist.o zmalloc.o 
-
 all:	$(LIBNAME)
 
 $(LIBNAME): $(LIBOBJS)