Index: Makefile
===================================================================
--- Makefile	(revision 211bd8a593ab9a674c86257aa01586e9e1d366ba)
+++ Makefile	(revision 4a5abddd63e395f649ff50fece86fc4c8c4672a0)
@@ -27,28 +27,37 @@
 #
 
-## Make some default assumptions
+## Include configuration
 #
 
-ifndef ARCH
-	ARCH = ia32
-endif
+-include Makefile.config
 
-SOURCES = \
+DIRS = \
 	libc \
 	init \
 	softfloat
 
-CLEANS := $(addsuffix .clean,$(SOURCES))
+BUILDS := $(addsuffix .build,$(DIRS))
+CLEANS := $(addsuffix .clean,$(DIRS))
 
-.PHONY: all $(SOURCES) $(CLEANS) clean
+.PHONY: all config build $(BUILDS) $(CLEANS) clean distclean
 
-all: $(SOURCES)
+all:
+	tools/config.py default $(ARCH)
+	$(MAKE) -C . build
+
+config:
+	tools/config.py
+
+build: $(BUILDS)
 
 clean: $(CLEANS)
 	find $(SOURCES) -name '*.o' -follow -exec rm \{\} \;
 
+distclean: clean
+	-rm Makefile.config
+
 $(CLEANS):
 	$(MAKE) -C $(basename $@) clean ARCH=$(ARCH)
 
-$(SOURCES):
-	$(MAKE) -C $@ all ARCH=$(ARCH)
+$(BUILDS):
+	$(MAKE) -C $(basename $@) all ARCH=$(ARCH)
