diff --git a/.gitattributes b/.gitattributes
index 8aae49e33cad7bb07948fb571ffbf00e1c41e318..ae498e7a08c5584771489c76a722acb5056f02e1 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -14,6 +14,7 @@ testfont binary
 # Files containing CVS ids follow.
 # Remove the corresponding line before committing
 # changes to these files.
+/Makefile foreign_ident
 /NT/tools/install-sh foreign_ident
 /bin/export.pike foreign_ident
 /bin/htmlify_docs.pike foreign_ident
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..057adfc92340ee7fbbf5869d981015b3cb9f4e82
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,83 @@
+#
+# $Id: Makefile,v 1.1 1999/02/05 05:22:48 mast Exp $
+#
+# Meta Makefile
+#
+
+VPATH=.
+MAKE=make
+prefix=/usr/local
+OS=`uname -srm|sed -e 's/ /-/g'|tr '[A-Z]' '[a-z]'|tr '/' '_'`
+BUILDDIR=build/$(OS)
+METATARGET=
+
+all: compile
+
+src/configure: src/configure.in
+	cd src && ./run_autoconfig . 2>&1 | grep -v warning
+	-@(cd "$(BUILDDIR)" && rm -f Makefile .prefix-h)
+
+configure: src/configure
+	@builddir="$(BUILDDIR)"; \
+	srcdir=`pwd`/src; \
+	( \
+	  IFS='/'; dir=""; \
+	  for d in $$builddir; do \
+	    dir="$$dir$$d"; \
+	    test -z "$$dir" -o -d "$$dir" || mkdir "$$dir" || exit 1; \
+	    dir="$$dir/"; \
+	  done \
+	) && \
+	cd "$$builddir" && \
+	if test -f Makefile -a -f .prefix-h && test "`cat .prefix-h`" = "$(prefix)"; then :; else \
+	  echo Running "$$srcdir"/configure in "$$builddir"; \
+	  CONFIG_SITE=x "$$srcdir"/configure --prefix=$(prefix) $(CONFIGFLAGS) && \
+	  ( echo "$(prefix)" > .prefix-h; rm -f main.o; :; ) \
+	fi
+
+compile: configure
+	@builddir="$(BUILDDIR)"; \
+	metatarget="$(METATARGET)"; \
+	test -f "$$builddir"/pike || metatarget="new_peep_engine pike $$metatarget"; \
+	cd "$$builddir" && ( \
+	  echo Making in "$$builddir" $$metatarget; \
+	  rm -f remake; \
+	  $(MAKE) all $$metatarget || ( test -f remake && $(MAKE) all $$metatarget ) \
+	)
+
+install:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=install" compile
+
+verify:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=verify" compile
+
+verify_installed:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=verify_installed" compile
+
+check: verify
+
+sure: verify
+
+verbose_verify:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=verbose_verify" compile
+
+gdb_verify:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=gdb_verify" compile
+
+run_hilfe:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=run_hilfe" compile
+
+feature_list:
+	@$(MAKE) "MAKE=$(MAKE)" "prefix=$(prefix)" "BUILDDIR=$(BUILDDIR)" "METATARGET=feature_list" compile
+
+clean:
+	-cd "$(BUILDDIR)" && $(MAKE) clean
+
+spotless:
+	-cd "$(BUILDDIR)" && $(MAKE) spotless
+
+distclean:
+	-rm -rf build
+
+cvsclean: distclean
+	for d in `find src -type d -print`; do if test -f "$$d/.cvsignore"; then (cd "$$d" && rm -f `cat ".cvsignore"`); else :; fi; done