+
+# KCROSS is the prefix we use for klibc installations. This is usually
+# the same as CROSS, but may be different, e.g. to install an i386
+# cross-compilation suite on an x86-64 system, using the same gcc/binutils.
+KCROSS ?= $(CROSS)
+
+# Location for installation
+prefix = /usr
+bindir = $(prefix)/bin
+libdir = $(prefix)/lib
+mandir = $(prefix)/man
+INSTALLDIR = $(prefix)/lib/klibc
+INSTALLROOT =
+
+INSTALL_EXEC = install -m 755
+INSTALL_DATA = install -m 644
+
+# Eventually support separate compilation, but we don't have it yet...
+OBJROOT = $(SRCROOT)
+
+# Kernel trees (source and obj) - can potentially be different
+KRNLSRC = $(SRCROOT)/linux
+KRNLOBJ = $(SRCROOT)/linux
+
+# klibc version information
+KLIBCVER = -D__KLIBC__=$(shell cut -d. -f1 < $(SRCROOT)/version) \
+ -D__KLIBC_MINOR__=$(shell cut -d. -f2 < $(SRCROOT)/version)
+
+ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)