diff --git a/ldb/Makefile.orig b/ldb/Makefile.orig
index c859f11fe4a713f6d7050c332e0af35532c96501..24e4860de06f98ddb15256d928be4b8708d81e98 100644
--- a/ldb/Makefile.orig
+++ b/ldb/Makefile.orig
@@ -1,8 +1,8 @@
-/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/Makefile.orig,v 1.19 1991/03/14 22:01:13 wlott Exp $ */
+/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/Makefile.orig,v 1.20 1991/05/24 17:25:00 wlott Exp $ */
 INCLS = -I.
 
 OBJS = ldb.o egets.o coreparse.o alloc.o monitor.o print.o \
-	os.o vars.o assem.o parse.o interrupt.o test.o \
+	os.o os-common.o arch.o vars.o assem.o parse.o interrupt.o test.o \
 	search.o validate.o gc.o globals.o dynbind.o breakpoint.o \
 	regnames.o backtrace.o bitbash.o save.o purify.o socket.o
 
@@ -10,16 +10,35 @@ OBJS = ldb.o egets.o coreparse.o alloc.o monitor.o print.o \
 CFLAGS = -O ${INCLS}
 UNDEFSYMPATTERN=&
 ASSEMFILE='mips-assem.s'
+ARCH_SRC="mips-arch.c"
 #endif
+
 #ifdef ibmrt
 CFLAGS = -g ${INCLS}
 UNDEFSYMPATTERN=_&
 ASSEMFILE='rt-assem.s'
+ARCH_SRC="rt-arch.c"
 #endif
+
 #ifdef sparc
 CFLAGS = -g ${INCLS}
 UNDEFSYMPATTERN=_&
 ASSEMFILE='sparc-assem.s'
+ARCH_SRC="sparc-arch.c"
+#endif
+
+#ifdef MACH
+OS_SRC=mach-os.c
+OS_LINK_FLAGS=
+OS_OBJS=
+OS_LIBS=-lmach
+#else
+#ifdef sun
+OS_SRC=sunos-os.c
+OS_LINK_FLAGS=-Bstatic
+OS_OBJS=fake-mach.o
+OS_LIBS=
+#endif
 #endif
 
 all: ldb.map
@@ -30,11 +49,13 @@ ldb.map: ldb
 	nm -gp ldb >> ldb.map
 
 
-ldb: ${OBJS} version undefineds
+ldb: ${OBJS} ${OS_OBJS} version undefineds
 	echo -n '1 + ' | cat - version | bc > ,version
 	mv ,version version
 	cc ${CFLAGS} -DVERSION=`cat version` -c version.c
-	cc `cat undefineds` -o ,ldb ${OBJS} version.o -lmach -lm -lc
+	cc ${OS_LINK_FLAGS} `cat undefineds` -o ,ldb \
+		${OBJS} ${OS_OBJS} version.o \
+		${OS_LIBS} -lm -lc
 	mv -f ,ldb ldb
 
 version:
@@ -47,8 +68,16 @@ undefineds: undefineds.src
 	mv ,undefineds undefineds
 
 assem.s:
+	rm -f assem.s
 	ln -s ${ASSEMFILE} assem.s
 
+os.c:
+	rm -f os.c
+	ln -s ${OS_SRC} os.c
+
+arch.c:
+	rm -f arch.c
+	ln -s ${ARCH_SRC} arch.c
 
 #ifdef mips
 
@@ -58,8 +87,10 @@ assem.s:
 /* is trash.  Therefore, we can't use the GP relative addressing */
 /* mode in the interrupt handlers. */
 
+arch.o: arch.c
+	cc ${CFLAGS} -G 0 -c arch.c
 interrupt.o: interrupt.c
-	cc ${CFLAGS} -G 0 -c interrupt.c
+	cc ${CFLAGS} -G 0 -c interrupt.o
 
 assem.o: assem.s lisp.h lispregs.h globals.h
 	as -G 0 -o $@ assem.s