Index: Makefile
===================================================================
--- Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -27,14 +27,22 @@
 #
 
-## Include configuration
-#
-
 CSCOPE = cscope
 CONFIG = tools/config.py
 AUTOTOOL = tools/autotool.py
+SANDBOX = autotool
+
+CONFIG_RULES = HelenOS.config
+
+COMMON_MAKEFILE = Makefile.common
+COMMON_HEADER = common.h
+COMMON_HEADER_PREV = $(COMMON_HEADER).prev
+
+CONFIG_MAKEFILE = Makefile.config
+CONFIG_HEADER = config.h
 
 .PHONY: all precheck cscope autotool config_default config distclean clean
 
-all: Makefile.common Makefile.config config.h config.defs
+all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
+	cp -a $(COMMON_HEADER) $(COMMON_HEADER_PREV)
 	$(MAKE) -C kernel PRECHECK=$(PRECHECK)
 	$(MAKE) -C uspace PRECHECK=$(PRECHECK)
@@ -47,25 +55,25 @@
 	find kernel boot uspace -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE).out
 
-Makefile.common: autotool
+$(COMMON_MAKEFILE): autotool
+$(COMMON_HEADER): autotool
 
-autotool: Makefile.config
+autotool: $(CONFIG_MAKEFILE)
 	$(AUTOTOOL)
+	-[ -f $(COMMON_HEADER_PREV) ] && diff -q $(COMMON_HEADER_PREV) $(COMMON_HEADER) && mv -f $(COMMON_HEADER_PREV) $(COMMON_HEADER)
 
-Makefile.config: config_default
+$(CONFIG_MAKEFILE): config_default
+$(CONFIG_HEADER): config_default
 
-config.h: config_default
+config_default: $(CONFIG_RULES)
+	$(CONFIG) $< default
 
-config.defs: config_default
-
-config_default: HelenOS.config
-	$(CONFIG) HelenOS.config default
-
-config: HelenOS.config
-	$(CONFIG) HelenOS.config
+config: $(CONFIG_RULES)
+	$(CONFIG) $<
 
 distclean: clean
-	rm -f $(CSCOPE).out Makefile.common Makefile.config config.h config.defs tools/*.pyc tools/checkers/*.pyc
+	rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc
 
 clean:
+	rm -fr $(SANDBOX)
 	$(MAKE) -C kernel clean
 	$(MAKE) -C uspace clean
Index: boot/Makefile
===================================================================
--- boot/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,4 @@
 -include ../Makefile.common
 -include ../Makefile.config
--include ../config.defs
 
 ## Paths
@@ -43,5 +42,5 @@
 .PHONY: all build clean generic_clean
 
-all: ../Makefile.common ../Makefile.config ../config.h ../config.defs build
+all: ../Makefile.common ../Makefile.config ../config.h build
 
 -include arch/$(BARCH)/Makefile.inc
Index: boot/arch/arm32/loader/Makefile
===================================================================
--- boot/arch/arm32/loader/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/arm32/loader/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h ../../../../config.defs
+all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: boot/arch/arm32/loader/Makefile.build
===================================================================
--- boot/arch/arm32/loader/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/arm32/loader/Makefile.build	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,4 @@
 include ../../../../Makefile.common
 include ../../../../Makefile.config
-include ../../../../config.defs
 include Makefile.common
 include Makefile.toolchain
Index: boot/arch/ia64/loader/Makefile
===================================================================
--- boot/arch/ia64/loader/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/ia64/loader/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,5 @@
 .PHONY: all clean
 
-all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h ../../../../config.defs
+all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: boot/arch/ia64/loader/Makefile.build
===================================================================
--- boot/arch/ia64/loader/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/ia64/loader/Makefile.build	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,4 @@
 include ../../../../Makefile.common
 include ../../../../Makefile.config
-include ../../../../config.defs
 include Makefile.common
 include Makefile.toolchain
Index: boot/arch/mips32/loader/Makefile
===================================================================
--- boot/arch/mips32/loader/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/mips32/loader/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h ../../../../config.defs
+all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: boot/arch/mips32/loader/Makefile.build
===================================================================
--- boot/arch/mips32/loader/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/mips32/loader/Makefile.build	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,4 @@
 include ../../../../Makefile.common
 include ../../../../Makefile.config
-include ../../../../config.defs
 include Makefile.common
 include Makefile.toolchain
Index: boot/arch/ppc32/loader/Makefile
===================================================================
--- boot/arch/ppc32/loader/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/ppc32/loader/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h ../../../../config.defs
+all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: boot/arch/ppc32/loader/Makefile.build
===================================================================
--- boot/arch/ppc32/loader/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/ppc32/loader/Makefile.build	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,4 @@
 include ../../../../Makefile.common
 include ../../../../Makefile.config
-include ../../../../config.defs
 include Makefile.common
 include Makefile.toolchain
Index: boot/arch/sparc64/loader/Makefile
===================================================================
--- boot/arch/sparc64/loader/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/sparc64/loader/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h ../../../../config.defs
+all: ../../../../version ../../../../Makefile.common ../../../../Makefile.config ../../../../config.h
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: boot/arch/sparc64/loader/Makefile.build
===================================================================
--- boot/arch/sparc64/loader/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ boot/arch/sparc64/loader/Makefile.build	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,5 +34,4 @@
 include ../../../../Makefile.common
 include ../../../../Makefile.config
-include ../../../../config.defs
 include Makefile.common
 include Makefile.toolchain
Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ kernel/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -27,13 +27,398 @@
 #
 
-include Makefile.common
+## Configuration
+#
+
+ROOT_PATH = ..
+
+VERSION_DEF = $(ROOT_PATH)/version
+
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+COMMON_HEADER = $(ROOT_PATH)/common.h
+COMMON_HEADER_ARCH = arch/$(KARCH)/include/common.h
+
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
+CONFIG_HEADER = $(ROOT_PATH)/config.h
+
+-include $(VERSION_DEF)
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
+
+## Common names
+#
+
+DEPEND = Makefile.depend
+DEPEND_PREV = $(DEPEND).prev
+RAW = kernel.raw
+BIN = kernel.bin
+MAP = kernel.map
+JOB = kernel.job
+MAP_PREV = $(MAP).prev
+DISASM = kernel.disasm
+DUMP = kernel.dump
+REAL_MAP = generic/src/debug/real_map
+
+ARCH_INCLUDE = generic/include/arch
+GENARCH_INCLUDE = generic/include/genarch
+
+GENMAP = tools/genmap.py
+JOBFILE = $(ROOT_PATH)/tools/jobfile.py
+
+LINK = arch/$(KARCH)/_link.ld
+EMPTY_MAP = generic/src/debug/empty_map.o
+SIZEOK_MAP = generic/src/debug/sizeok_map.o
+
+INCLUDES = generic/include
+OPTIMIZATION = 3
 
 .PHONY: all clean
 
-all: ../version ../Makefile.common ../Makefile.config ../config.h ../config.defs
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
+all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BIN) $(DISASM)
+	-[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
 
 clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* $(ARCH_INCLUDE) $(GENARCH_INCLUDE) arch/*/_link.ld
+	rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* $(ARCH_INCLUDE) $(GENARCH_INCLUDE) arch/*/_link.ld arch/*/include/common.h
 	find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
+
+## Common compiler flags
+#
+
+DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
+
+GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-Werror -pipe
+
+ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+	-ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Werror -wd170
+
+SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \
+	-xnolib -xc99=all -features=extensions \
+	-erroff=E_ZERO_SIZED_STRUCT_UNION
+
+CLANG_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-pipe -arch $(CLANG_ARCH)
+
+LFLAGS = -M
+AFLAGS =
+
+-include arch/$(KARCH)/Makefile.inc
+-include genarch/Makefile.inc
+-include $(DEPEND)
+
+## The at-sign
+#
+# The $(ATSIGN) variable holds the ASCII character representing the at-sign
+# ('@') used in various $(AS) constructs (e.g. @progbits). On architectures that
+# don't use '@' for starting a comment, $(ATSIGN) is merely '@'. However, on
+# those that do use it for starting a comment (e.g. arm32), $(ATSIGN) must be
+# defined as the percentile-sign ('%') in the architecture-dependent
+# Makefile.inc.
+#
+
+ATSIGN ?= @
+
+## Cross-platform assembly to start a symtab.data section
+#
+
+SYMTAB_SECTION = ".section symtab.data, \"a\", $(ATSIGN)progbits;"
+
+## Compilation options
+#
+
+ifeq ($(COMPILER),gcc_native)
+	CFLAGS = $(GCC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),gcc_cross)
+	CFLAGS = $(GCC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),icc)
+	CFLAGS = $(ICC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),suncc)
+	CFLAGS = $(SUNCC_CFLAGS)
+	DEFS += $(CONFIG_DEFS)
+	DEPEND_DEFS = $(DEFS)
+endif
+
+ifeq ($(COMPILER),clang)
+	CFLAGS = $(CLANG_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+## Generic kernel sources
+#
+
+GENERIC_SOURCES = \
+	generic/src/adt/avl.c \
+	generic/src/adt/bitmap.c \
+	generic/src/adt/btree.c \
+	generic/src/adt/hash_table.c \
+	generic/src/adt/list.c \
+	generic/src/console/chardev.c \
+	generic/src/console/console.c \
+	generic/src/cpu/cpu.c \
+	generic/src/ddi/ddi.c \
+	generic/src/ddi/irq.c \
+	generic/src/ddi/device.c \
+	generic/src/debug/symtab.c \
+	generic/src/debug/stacktrace.c \
+	generic/src/interrupt/interrupt.c \
+	generic/src/main/main.c \
+	generic/src/main/kinit.c \
+	generic/src/main/uinit.c \
+	generic/src/main/version.c \
+	generic/src/main/shutdown.c \
+	generic/src/proc/program.c \
+	generic/src/proc/scheduler.c \
+	generic/src/proc/thread.c \
+	generic/src/proc/task.c \
+	generic/src/proc/the.c \
+	generic/src/proc/tasklet.c \
+	generic/src/syscall/syscall.c \
+	generic/src/syscall/copy.c \
+	generic/src/mm/buddy.c \
+	generic/src/mm/frame.c \
+	generic/src/mm/page.c \
+	generic/src/mm/tlb.c \
+	generic/src/mm/as.c \
+	generic/src/mm/backend_anon.c \
+	generic/src/mm/backend_elf.c \
+	generic/src/mm/backend_phys.c \
+	generic/src/mm/slab.c \
+	generic/src/lib/func.c \
+	generic/src/lib/memstr.c \
+	generic/src/lib/sort.c \
+	generic/src/lib/string.c \
+	generic/src/lib/elf.c \
+	generic/src/lib/rd.c \
+	generic/src/printf/printf_core.c \
+	generic/src/printf/printf.c \
+	generic/src/printf/snprintf.c \
+	generic/src/printf/vprintf.c \
+	generic/src/printf/vsnprintf.c \
+	generic/src/time/clock.c \
+	generic/src/time/timeout.c \
+	generic/src/time/delay.c \
+	generic/src/preempt/preemption.c \
+	generic/src/synch/spinlock.c \
+	generic/src/synch/condvar.c \
+	generic/src/synch/rwlock.c \
+	generic/src/synch/mutex.c \
+	generic/src/synch/semaphore.c \
+	generic/src/synch/smc.c \
+	generic/src/synch/waitq.c \
+	generic/src/synch/futex.c \
+	generic/src/smp/ipi.c \
+	generic/src/smp/smp.c \
+	generic/src/ipc/ipc.c \
+	generic/src/ipc/sysipc.c \
+	generic/src/ipc/ipcrsc.c \
+	generic/src/ipc/irq.c \
+	generic/src/ipc/event.c \
+	generic/src/security/cap.c \
+	generic/src/sysinfo/sysinfo.c
+
+## Kernel console support
+#
+
+ifeq ($(CONFIG_KCONSOLE),y)
+GENERIC_SOURCES += \
+	generic/src/console/kconsole.c \
+	generic/src/console/cmd.c
+endif
+
+## Udebug interface sources
+#
+
+ifeq ($(CONFIG_UDEBUG),y)
+GENERIC_SOURCES += \
+	generic/src/ipc/kbox.c \
+	generic/src/udebug/udebug.c \
+	generic/src/udebug/udebug_ops.c \
+	generic/src/udebug/udebug_ipc.c
+endif
+
+## Test sources
+#
+
+ifeq ($(CONFIG_TEST),y)
+	CFLAGS += -Itest/
+	GENERIC_SOURCES += \
+		test/test.c \
+		test/atomic/atomic1.c \
+		test/btree/btree1.c \
+		test/avltree/avltree1.c \
+		test/fault/fault1.c \
+		test/mm/falloc1.c \
+		test/mm/falloc2.c \
+		test/mm/mapping1.c \
+		test/mm/slab1.c \
+		test/mm/slab2.c \
+		test/synch/rwlock1.c \
+		test/synch/rwlock2.c \
+		test/synch/rwlock3.c \
+		test/synch/rwlock4.c \
+		test/synch/rwlock5.c \
+		test/synch/semaphore1.c \
+		test/synch/semaphore2.c \
+		test/print/print1.c \
+		test/print/print2.c \
+		test/print/print3.c \
+		test/print/print4.c \
+		test/thread/thread1.c \
+		test/sysinfo/sysinfo1.c
+	
+	ifeq ($(KARCH),mips32)
+		GENERIC_SOURCES += test/debug/mips1.c
+	else
+		GENERIC_SOURCES += test/debug/mips1_skip.c
+	endif
+	
+	ifeq ($(KARCH),ia64)
+		GENERIC_SOURCES += test/mm/purge1.c
+	else
+		GENERIC_SOURCES += test/mm/purge1_skip.c
+	endif
+	
+	ifeq ($(CONFIG_FPU),y)
+		ifeq ($(KARCH),ia32)
+			TEST_FPU1 = y
+			TEST_SSE1 = y
+			GENERIC_SOURCES += test/fpu/fpu1_x86.c
+		endif
+		
+		ifeq ($(KARCH),amd64)
+			TEST_FPU1 = y
+			TEST_SSE1 = y
+			GENERIC_SOURCES += test/fpu/fpu1_x86.c
+		endif
+		
+		ifeq ($(KARCH),ia64)
+			TEST_FPU1 = y
+			GENERIC_SOURCES += test/fpu/fpu1_ia64.c
+		endif
+		
+		ifeq ($(KARCH),mips32)
+			TEST_MIPS2 = y
+		endif
+	endif
+	
+	ifneq ($(TEST_FPU1),y)
+		GENERIC_SOURCES += test/fpu/fpu1_skip.c
+	endif
+	
+	ifeq ($(TEST_SSE1),y)
+		GENERIC_SOURCES += test/fpu/sse1.c
+	else
+		GENERIC_SOURCES += test/fpu/sse1_skip.c
+	endif
+	
+	ifeq ($(TEST_MIPS2),y)
+		GENERIC_SOURCES += test/fpu/mips2.c
+	else
+		GENERIC_SOURCES += test/fpu/mips2_skip.c
+	endif
+	
+endif
+
+GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
+ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
+GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
+
+ifeq ($(CONFIG_SYMTAB),y)
+	SYMTAB_OBJECTS := generic/src/debug/real_map.o
+else
+	SYMTAB_OBJECTS :=
+endif
+
+
+
+$(BIN): $(RAW)
+	$(OBJCOPY) -O $(BFD) $< $@
+
+$(DISASM): $(RAW)
+	$(OBJDUMP) -d $< > $@
+
+$(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS)
+	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) -o $@ -Map $(MAP)
+
+$(LINK): $(LINK).in $(DEPEND)
+	$(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
+
+%.o: %.S $(DEPEND)
+	$(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(GCC_CFLAGS) -D__ASM__
+endif
+
+%.o: %.s $(DEPEND)
+	$(AS) $(AFLAGS) $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
+endif
+
+#
+# The FPU tests are the only objects for which we allow the compiler to generate
+# FPU instructions.
+#
+
+test/fpu/%.o: test/fpu/%.c $(DEPEND)
+	$(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ cc test $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
+endif
+
+#
+# Ordinary objects.
+#
+
+%.o: %.c $(DEPEND)
+	$(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
+endif
+
+$(REAL_MAP).o: $(REAL_MAP).bin
+	echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@
+
+$(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
+	echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o $(EMPTY_MAP)
+	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) -o $@ -Map $(MAP_PREV)
+	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
+	$(GENMAP) $(MAP_PREV) $(DUMP) $@
+	
+	# Do it once again, this time to get correct even the symbols
+	# on architectures that have bss after symtab
+	
+	echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o $(SIZEOK_MAP)
+	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) -o $@ -Map $(MAP_PREV)
+	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
+	$(GENMAP) $(MAP_PREV) $(DUMP) $@
+
+$(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH)
+	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null
+	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
+
+$(ARCH_INCLUDE): arch/$(KARCH)/include/
+	ln -sfn ../../$< $@
+
+$(GENARCH_INCLUDE): genarch/include/
+	ln -sfn ../../$< $@
+
+$(COMMON_HEADER_ARCH): $(COMMON_HEADER)
+	ln -sfn ../../../$< $@
Index: rnel/Makefile.build
===================================================================
--- kernel/Makefile.build	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ 	(revision )
@@ -1,386 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-
-## Include configuration
-#
-
-include Makefile.common
-include ../version
-include ../Makefile.common
-include ../Makefile.config
-include ../config.defs
-
-LINK = arch/$(KARCH)/_link.ld
-EMPTY_MAP = generic/src/debug/empty_map.o
-SIZEOK_MAP = generic/src/debug/sizeok_map.o
-
-INCLUDES = generic/include
-OPTIMIZATION = 3
-
-## Common compiler flags
-#
-
-DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
-
-GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
-	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
-	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Wwrite-strings \
-	-Werror -pipe
-
-ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
-	-ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Werror -wd170
-
-SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \
-	-xnolib -xc99=all -features=extensions \
-	-erroff=E_ZERO_SIZED_STRUCT_UNION
-
-CLANG_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
-	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
-	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Wwrite-strings \
-	-pipe -arch $(CLANG_ARCH)
-
-LFLAGS = -M
-AFLAGS =
-
--include arch/$(KARCH)/Makefile.inc
--include genarch/Makefile.inc
-
-## The at-sign
-#
-# The $(ATSIGN) variable holds the ASCII character representing the at-sign
-# ('@') used in various $(AS) constructs (e.g. @progbits). On architectures that
-# don't use '@' for starting a comment, $(ATSIGN) is merely '@'. However, on
-# those that do use it for starting a comment (e.g. arm32), $(ATSIGN) must be
-# defined as the percentile-sign ('%') in the architecture-dependent
-# Makefile.inc.
-#
-
-ATSIGN ?= @
-
-## Cross-platform assembly to start a symtab.data section
-#
-
-SYMTAB_SECTION = ".section symtab.data, \"a\", $(ATSIGN)progbits;"
-
-## Compilation options
-#
-
-ifeq ($(COMPILER),gcc_native)
-	CFLAGS = $(GCC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),gcc_cross)
-	CFLAGS = $(GCC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),icc)
-	CFLAGS = $(ICC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),suncc)
-	CFLAGS = $(SUNCC_CFLAGS)
-	DEFS += $(CONFIG_DEFS)
-	DEPEND_DEFS = $(DEFS)
-endif
-
-ifeq ($(COMPILER),clang)
-	CFLAGS = $(CLANG_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-
-## Generic kernel sources
-#
-
-GENERIC_SOURCES = \
-	generic/src/adt/avl.c \
-	generic/src/adt/bitmap.c \
-	generic/src/adt/btree.c \
-	generic/src/adt/hash_table.c \
-	generic/src/adt/list.c \
-	generic/src/console/chardev.c \
-	generic/src/console/console.c \
-	generic/src/cpu/cpu.c \
-	generic/src/ddi/ddi.c \
-	generic/src/ddi/irq.c \
-	generic/src/ddi/device.c \
-	generic/src/debug/symtab.c \
-	generic/src/debug/stacktrace.c \
-	generic/src/interrupt/interrupt.c \
-	generic/src/main/main.c \
-	generic/src/main/kinit.c \
-	generic/src/main/uinit.c \
-	generic/src/main/version.c \
-	generic/src/main/shutdown.c \
-	generic/src/proc/program.c \
-	generic/src/proc/scheduler.c \
-	generic/src/proc/thread.c \
-	generic/src/proc/task.c \
-	generic/src/proc/the.c \
-	generic/src/proc/tasklet.c \
-	generic/src/syscall/syscall.c \
-	generic/src/syscall/copy.c \
-	generic/src/mm/buddy.c \
-	generic/src/mm/frame.c \
-	generic/src/mm/page.c \
-	generic/src/mm/tlb.c \
-	generic/src/mm/as.c \
-	generic/src/mm/backend_anon.c \
-	generic/src/mm/backend_elf.c \
-	generic/src/mm/backend_phys.c \
-	generic/src/mm/slab.c \
-	generic/src/lib/func.c \
-	generic/src/lib/memstr.c \
-	generic/src/lib/sort.c \
-	generic/src/lib/string.c \
-	generic/src/lib/elf.c \
-	generic/src/lib/rd.c \
-	generic/src/printf/printf_core.c \
-	generic/src/printf/printf.c \
-	generic/src/printf/snprintf.c \
-	generic/src/printf/vprintf.c \
-	generic/src/printf/vsnprintf.c \
-	generic/src/time/clock.c \
-	generic/src/time/timeout.c \
-	generic/src/time/delay.c \
-	generic/src/preempt/preemption.c \
-	generic/src/synch/spinlock.c \
-	generic/src/synch/condvar.c \
-	generic/src/synch/rwlock.c \
-	generic/src/synch/mutex.c \
-	generic/src/synch/semaphore.c \
-	generic/src/synch/smc.c \
-	generic/src/synch/waitq.c \
-	generic/src/synch/futex.c \
-	generic/src/smp/ipi.c \
-	generic/src/smp/smp.c \
-	generic/src/ipc/ipc.c \
-	generic/src/ipc/sysipc.c \
-	generic/src/ipc/ipcrsc.c \
-	generic/src/ipc/irq.c \
-	generic/src/ipc/event.c \
-	generic/src/security/cap.c \
-	generic/src/sysinfo/sysinfo.c
-
-## Kernel console support
-#
-
-ifeq ($(CONFIG_KCONSOLE),y)
-GENERIC_SOURCES += \
-	generic/src/console/kconsole.c \
-	generic/src/console/cmd.c
-endif
-
-## Udebug interface sources
-#
-
-ifeq ($(CONFIG_UDEBUG),y)
-GENERIC_SOURCES += \
-	generic/src/ipc/kbox.c \
-	generic/src/udebug/udebug.c \
-	generic/src/udebug/udebug_ops.c \
-	generic/src/udebug/udebug_ipc.c
-endif
-
-## Test sources
-#
-
-ifeq ($(CONFIG_TEST),y)
-	CFLAGS += -Itest/
-	GENERIC_SOURCES += \
-		test/test.c \
-		test/atomic/atomic1.c \
-		test/btree/btree1.c \
-		test/avltree/avltree1.c \
-		test/fault/fault1.c \
-		test/mm/falloc1.c \
-		test/mm/falloc2.c \
-		test/mm/mapping1.c \
-		test/mm/slab1.c \
-		test/mm/slab2.c \
-		test/synch/rwlock1.c \
-		test/synch/rwlock2.c \
-		test/synch/rwlock3.c \
-		test/synch/rwlock4.c \
-		test/synch/rwlock5.c \
-		test/synch/semaphore1.c \
-		test/synch/semaphore2.c \
-		test/print/print1.c \
-		test/print/print2.c \
-		test/print/print3.c \
-		test/print/print4.c \
-		test/thread/thread1.c \
-		test/sysinfo/sysinfo1.c
-	
-	ifeq ($(KARCH),mips32)
-		GENERIC_SOURCES += test/debug/mips1.c
-	else
-		GENERIC_SOURCES += test/debug/mips1_skip.c
-	endif
-	
-	ifeq ($(KARCH),ia64)
-		GENERIC_SOURCES += test/mm/purge1.c
-	else
-		GENERIC_SOURCES += test/mm/purge1_skip.c
-	endif
-	
-	ifeq ($(CONFIG_FPU),y)
-		ifeq ($(KARCH),ia32)
-			TEST_FPU1 = y
-			TEST_SSE1 = y
-			GENERIC_SOURCES += test/fpu/fpu1_x86.c
-		endif
-		
-		ifeq ($(KARCH),amd64)
-			TEST_FPU1 = y
-			TEST_SSE1 = y
-			GENERIC_SOURCES += test/fpu/fpu1_x86.c
-		endif
-		
-		ifeq ($(KARCH),ia64)
-			TEST_FPU1 = y
-			GENERIC_SOURCES += test/fpu/fpu1_ia64.c
-		endif
-		
-		ifeq ($(KARCH),mips32)
-			TEST_MIPS2 = y
-		endif
-	endif
-	
-	ifneq ($(TEST_FPU1),y)
-		GENERIC_SOURCES += test/fpu/fpu1_skip.c
-	endif
-	
-	ifeq ($(TEST_SSE1),y)
-		GENERIC_SOURCES += test/fpu/sse1.c
-	else
-		GENERIC_SOURCES += test/fpu/sse1_skip.c
-	endif
-	
-	ifeq ($(TEST_MIPS2),y)
-		GENERIC_SOURCES += test/fpu/mips2.c
-	else
-		GENERIC_SOURCES += test/fpu/mips2_skip.c
-	endif
-	
-endif
-
-GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
-ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
-GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
-
-ifeq ($(CONFIG_SYMTAB),y)
-	SYMTAB_OBJECTS := generic/src/debug/real_map.o
-else
-	SYMTAB_OBJECTS :=
-endif
-
-.PHONY: all
-
-all: $(BIN) $(DISASM)
-
--include $(DEPEND)
-
-$(BIN): $(RAW)
-	$(OBJCOPY) -O $(BFD) $< $@
-
-$(DISASM): $(RAW)
-	$(OBJDUMP) -d $< > $@
-
-$(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) -o $@ -Map $(MAP)
-
-$(LINK): $(LINK).in $(DEPEND)
-	$(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
-
-%.o: %.S $(DEPEND)
-	$(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(GCC_CFLAGS) -D__ASM__
-endif
-
-%.o: %.s $(DEPEND)
-	$(AS) $(AFLAGS) $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
-endif
-
-#
-# The FPU tests are the only objects for which we allow the compiler to generate
-# FPU instructions.
-#
-test/fpu/%.o: test/fpu/%.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc test $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
-endif
-
-#
-# Ordinary objects.
-#
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
-endif
-
-$(REAL_MAP).o: $(REAL_MAP).bin
-	echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@
-
-$(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
-	echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o $(EMPTY_MAP)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) -o $@ -Map $(MAP_PREV)
-	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
-	$(GENMAP) $(MAP_PREV) $(DUMP) $@
-	
-	# Do it once again, this time to get correct even the symbols
-	# on architectures that have bss after symtab
-	
-	echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o $(SIZEOK_MAP)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) -o $@ -Map $(MAP_PREV)
-	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
-	$(GENMAP) $(MAP_PREV) $(DUMP) $@
-
-$(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE)
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
-
-$(ARCH_INCLUDE): arch/$(KARCH)/include/
-	ln -sfn ../../$< $@
-
-$(GENARCH_INCLUDE): genarch/include/
-	ln -sfn ../../$< $@
Index: rnel/Makefile.common
===================================================================
--- kernel/Makefile.common	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-
-## Common names
-#
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-RAW = kernel.raw
-BIN = kernel.bin
-MAP = kernel.map
-JOB = kernel.job
-MAP_PREV = $(MAP).prev
-DISASM = kernel.disasm
-DUMP = kernel.dump
-REAL_MAP = generic/src/debug/real_map
-
-ARCH_INCLUDE = generic/include/arch
-GENARCH_INCLUDE = generic/include/genarch
-
-GENMAP = tools/genmap.py
-JOBFILE = ../tools/jobfile.py
Index: kernel/arch/ia32/Makefile.inc
===================================================================
--- kernel/arch/ia32/Makefile.inc	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ kernel/arch/ia32/Makefile.inc	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -48,16 +48,20 @@
 	SUNCC_CFLAGS += -xarch=ssea
 endif
+
 ifeq ($(PROCESSOR),athlon_mp)
 	CMN2 = -march=athlon-mp
 	SUNCC_CFLAGS += xarch=ssea
 endif
+
 ifeq ($(PROCESSOR),pentium3)
 	CMN2 = -march=pentium3
 	SUNCC_CFLAGS += -xarch=sse
 endif
+
 ifeq ($(PROCESSOR),pentium4)
 	CMN2 = -march=pentium4
 	SUNCC_CFLAGS += -xarch=sse2
 endif
+
 ifeq ($(PROCESSOR),core)
 	CMN2 = -march=prescott
Index: kernel/arch/ia32/include/types.h
===================================================================
--- kernel/arch/ia32/include/types.h	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ kernel/arch/ia32/include/types.h	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32	
+/** @addtogroup ia32
  * @{
  */
@@ -36,13 +36,5 @@
 #define KERN_ia32_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed long int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-typedef unsigned long long uint64_t;
+#include <arch/common.h>
 
 typedef uint32_t size_t;
Index: kernel/tools/genmap.py
===================================================================
--- kernel/tools/genmap.py	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ kernel/tools/genmap.py	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -79,5 +79,5 @@
 			continue
 	
-	return {'text' : funcs, 'bss' : bss, 'data' : data }
+	return {'text' : funcs, 'bss' : bss, 'data' : data}
 
 def generate(kmapf, obmapf, out):
Index: tools/autotool.py
===================================================================
--- tools/autotool.py	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ tools/autotool.py	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -34,14 +34,41 @@
 import sys
 import os
+import shutil
 import re
 import time
 import subprocess
 
-MAKEFILE = 'Makefile.config'
-COMMON = 'Makefile.common'
+SANDBOX = 'autotool'
+CONFIG = 'Makefile.config'
+MAKEFILE = 'Makefile.common'
+HEADER = 'common.h'
+GUARD = 'AUTOTOOL_COMMON_H_'
+
+PROBE_SOURCE = 'probe.c'
+PROBE_OUTPUT = 'probe.s'
 
 PACKAGE_BINUTILS = "usually part of binutils"
 PACKAGE_GCC = "preferably version 4.4.3 or newer"
 PACKAGE_CROSS = "use tools/toolchain.sh to build the cross-compiler toolchain"
+
+COMPILER_FAIL = "The compiler is probably not capable to compile HelenOS."
+
+PROBE_HEAD = """#define AUTOTOOL_DECLARE(category, subcategory, name, value) \\
+	asm volatile ( \\
+		"AUTOTOOL_DECLARE\\t" category "\\t" subcategory "\\t" name "\\t%[val]\\n" \\
+		: \\
+		: [val] "n" (value) \\
+	)
+
+#define DECLARE_INTSIZE(type) \\
+	AUTOTOOL_DECLARE("intsize", "unsigned", #type, sizeof(unsigned type)); \\
+	AUTOTOOL_DECLARE("intsize", "signed", #type, sizeof(signed type))
+
+int main(int argc, char *argv[])
+{
+"""
+
+PROBE_TAIL = """}
+"""
 
 def read_config(fname, config):
@@ -70,4 +97,32 @@
 	sys.exit(1)
 
+def sandbox_enter():
+	"Create a temporal sandbox directory for running tests"
+	
+	if (os.path.exists(SANDBOX)):
+		if (os.path.isdir(SANDBOX)):
+			try:
+				shutil.rmtree(SANDBOX)
+			except:
+				print_error(["Unable to cleanup the directory \"%s\"." % SANDBOX])
+		else:
+			print_error(["Please inspect and remove unexpected directory,",
+			             "entry \"%s\"." % SANDBOX])
+	
+	try:
+		os.mkdir(SANDBOX)
+	except:
+		print_error(["Unable to create sandbox directory \"%s\"." % SANDBOX])
+	
+	owd = os.getcwd()
+	os.chdir(SANDBOX)
+	
+	return owd
+
+def sandbox_leave(owd):
+	"Leave the temporal sandbox directory"
+	
+	os.chdir(owd)
+
 def check_config(config, key):
 	"Check whether the configuration key exists"
@@ -77,4 +132,11 @@
 		             "Try running \"make config\" again.",
 		             "If the problem persists, please contact the developers of HelenOS."])
+
+def check_common(common, key):
+	"Check whether the common key exists"
+	
+	if (not key in common):
+		print_error(["Failed to determine the value %s." % key,
+		             "Please contact the developers of HelenOS."])
 
 def check_app(args, name, details):
@@ -122,17 +184,151 @@
 	check_app([common['OBJDUMP'], "--version"], "GNU Objdump utility", details)
 
-def create_output(cmname, common):
-	"Create common parameters output"
-	
-	outcm = file(cmname, 'w')
-	
-	outcm.write('#########################################\n')
-	outcm.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n')
-	outcm.write('#########################################\n\n')
+def probe_compiler(common, sizes):
+	"Generate, compile and parse probing source"
+	
+	check_common(common, "CC")
+	
+	outf = file(PROBE_SOURCE, 'w')
+	outf.write(PROBE_HEAD)
+	
+	for typedef in sizes:
+		outf.write("\tDECLARE_INTSIZE(%s);\n" % typedef)
+	
+	outf.write(PROBE_TAIL)
+	outf.close()
+	
+	args = [common['CC'], "-S", "-o", PROBE_OUTPUT, PROBE_SOURCE]
+	
+	try:
+		sys.stderr.write("Checking compiler properties ... ")
+		output = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.PIPE).communicate()
+	except:
+		sys.stderr.write("failed\n")
+		print_error(["Error executing \"%s\"." % " ".join(args),
+		             "Make sure that the compiler works properly."])
+	
+	if (not os.path.isfile(PROBE_OUTPUT)):
+		sys.stderr.write("failed\n")
+		print output[1]
+		print_error(["Error executing \"%s\"." % " ".join(args),
+		             "The compiler did not produce the output file \"%s\"." % PROBE_OUTPUT,
+		             "",
+		             output[0],
+		             output[1]])
+	
+	sys.stderr.write("ok\n")
+	
+	inf = file(PROBE_OUTPUT, 'r')
+	lines = inf.readlines()
+	inf.close()
+	
+	unsigned_sizes = {}
+	signed_sizes = {}
+	
+	for j in range(len(lines)):
+		tokens = lines[j].strip().split("\t")
+		
+		if (len(tokens) > 0):
+			if (tokens[0] == "AUTOTOOL_DECLARE"):
+				if (len(tokens) < 5):
+					print_error(["Malformed declaration in \"%s\" on line %s." % (PROBE_OUTPUT, j), COMPILER_FAIL])
+				
+				category = tokens[1]
+				subcategory = tokens[2]
+				name = tokens[3]
+				value = tokens[4]
+				
+				if (category == "intsize"):
+					base = 10
+					
+					if ((value.startswith('$')) or (value.startswith('#'))):
+						value = value[1:]
+					
+					if (value.startswith('0x')):
+						value = value[2:]
+						base = 16
+					
+					try:
+						value_int = int(value, base)
+					except:
+						print_error(["Integer value expected in \"%s\" on line %s." % (PROBE_OUTPUT, j), COMPILER_FAIL])
+					
+					if (subcategory == "unsigned"):
+						unsigned_sizes[name] = value_int
+					elif (subcategory == "signed"):
+						signed_sizes[name] = value_int
+					else:
+						print_error(["Unexpected keyword \"%s\" in \"%s\" on line %s." % (subcategory, PROBE_OUTPUT, j), COMPILER_FAIL])
+	
+	return {'unsigned_sizes' : unsigned_sizes, 'signed_sizes' : signed_sizes}
+
+def detect_uints(unsigned_sizes, signed_sizes, bytes):
+	"Detect correct types for fixed-size integer types"
+	
+	typedefs = []
+	
+	for b in bytes:
+		fnd = False
+		newtype = "uint%s_t" % (b * 8)
+		
+		for name, value in unsigned_sizes.items():
+			if (value == b):
+				oldtype = "unsigned %s" % name
+				typedefs.append({'oldtype' : oldtype, 'newtype' : newtype})
+				fnd = True
+				break
+		
+		if (not fnd):
+			print_error(['Unable to find appropriate integer type for %s' % newtype,
+			             COMPILER_FAIL])
+		
+		
+		fnd = False
+		newtype = "int%s_t" % (b * 8)
+		
+		for name, value in signed_sizes.items():
+			if (value == b):
+				oldtype = "signed %s" % name
+				typedefs.append({'oldtype' : oldtype, 'newtype' : newtype})
+				fnd = True
+				break
+		
+		if (not fnd):
+			print_error(['Unable to find appropriate integer type for %s' % newtype,
+			             COMPILER_FAIL])
+	
+	return typedefs
+
+def create_makefile(mkname, common):
+	"Create makefile output"
+	
+	outmk = file(mkname, 'w')
+	
+	outmk.write('#########################################\n')
+	outmk.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n')
+	outmk.write('#########################################\n\n')
 	
 	for key, value in common.items():
-		outcm.write('%s = %s\n' % (key, value))
-	
-	outcm.close()
+		outmk.write('%s = %s\n' % (key, value))
+	
+	outmk.close()
+
+def create_header(hdname, typedefs):
+	"Create header output"
+	
+	outhd = file(hdname, 'w')
+	
+	outhd.write('/***************************************\n')
+	outhd.write(' * AUTO-GENERATED FILE, DO NOT EDIT!!! *\n')
+	outhd.write(' ***************************************/\n\n')
+	
+	outhd.write('#ifndef %s\n' % GUARD)
+	outhd.write('#define %s\n\n' % GUARD)
+	
+	for typedef in typedefs:
+		outhd.write('typedef %s %s;\n' % (typedef['oldtype'], typedef['newtype']))
+	
+	outhd.write('\n#endif\n')
+	outhd.close()
 
 def main():
@@ -141,8 +337,8 @@
 	
 	# Read and check configuration
-	if os.path.exists(MAKEFILE):
-		read_config(MAKEFILE, config)
+	if os.path.exists(CONFIG):
+		read_config(CONFIG, config)
 	else:
-		print_error(["Configuration file %s not found! Make sure that the" % MAKEFILE,
+		print_error(["Configuration file %s not found! Make sure that the" % CONFIG,
 		             "configuration phase of HelenOS build went OK. Try running",
 		             "\"make config\" again."])
@@ -164,99 +360,122 @@
 		binutils_prefix = ""
 	
-	# Common utilities
-	check_app(["ln", "--version"], "Symlink utility", "usually part of coreutils")
-	check_app(["rm", "--version"], "File remove utility", "usually part of coreutils")
-	check_app(["mkdir", "--version"], "Directory creation utility", "usually part of coreutils")
-	check_app(["cp", "--version"], "Copy utility", "usually part of coreutils")
-	check_app(["find", "--version"], "Find utility", "usually part of findutils")
-	check_app(["diff", "--version"], "Diff utility", "usually part of diffutils")
-	check_app(["make", "--version"], "Make utility", "preferably GNU Make")
-	check_app(["makedepend", "-f", "-"], "Makedepend utility", "usually part of imake or xutils")
-	
-	# Compiler
-	if (config['COMPILER'] == "gcc_cross"):
-		if (config['PLATFORM'] == "abs32le"):
-			check_config(config, "CROSS_TARGET")
-			target = config['CROSS_TARGET']
-			
-			if (config['CROSS_TARGET'] == "arm32"):
+	owd = sandbox_enter()
+	
+	try:
+		# Common utilities
+		check_app(["ln", "--version"], "Symlink utility", "usually part of coreutils")
+		check_app(["rm", "--version"], "File remove utility", "usually part of coreutils")
+		check_app(["mkdir", "--version"], "Directory creation utility", "usually part of coreutils")
+		check_app(["cp", "--version"], "Copy utility", "usually part of coreutils")
+		check_app(["find", "--version"], "Find utility", "usually part of findutils")
+		check_app(["diff", "--version"], "Diff utility", "usually part of diffutils")
+		check_app(["make", "--version"], "Make utility", "preferably GNU Make")
+		check_app(["makedepend", "-f", "-"], "Makedepend utility", "usually part of imake or xutils")
+		
+		# Compiler
+		if (config['COMPILER'] == "gcc_cross"):
+			if (config['PLATFORM'] == "abs32le"):
+				check_config(config, "CROSS_TARGET")
+				target = config['CROSS_TARGET']
+				
+				if (config['CROSS_TARGET'] == "arm32"):
+					gnu_target = "arm-linux-gnu"
+				
+				if (config['CROSS_TARGET'] == "ia32"):
+					gnu_target = "i686-pc-linux-gnu"
+				
+				if (config['CROSS_TARGET'] == "mips32"):
+					gnu_target = "mipsel-linux-gnu"
+			
+			if (config['PLATFORM'] == "amd64"):
+				target = config['PLATFORM']
+				gnu_target = "amd64-linux-gnu"
+			
+			if (config['PLATFORM'] == "arm32"):
+				target = config['PLATFORM']
 				gnu_target = "arm-linux-gnu"
 			
-			if (config['CROSS_TARGET'] == "ia32"):
+			if (config['PLATFORM'] == "ia32"):
+				target = config['PLATFORM']
 				gnu_target = "i686-pc-linux-gnu"
 			
-			if (config['CROSS_TARGET'] == "mips32"):
-				gnu_target = "mipsel-linux-gnu"
-		
-		if (config['PLATFORM'] == "amd64"):
-			target = config['PLATFORM']
-			gnu_target = "amd64-linux-gnu"
-		
-		if (config['PLATFORM'] == "arm32"):
-			target = config['PLATFORM']
-			gnu_target = "arm-linux-gnu"
-		
-		if (config['PLATFORM'] == "ia32"):
-			target = config['PLATFORM']
-			gnu_target = "i686-pc-linux-gnu"
-		
-		if (config['PLATFORM'] == "ia64"):
-			target = config['PLATFORM']
-			gnu_target = "ia64-pc-linux-gnu"
-		
-		if (config['PLATFORM'] == "mips32"):
-			check_config(config, "MACHINE")
-			
-			if ((config['MACHINE'] == "lgxemul") or (config['MACHINE'] == "msim")):
-				target = config['PLATFORM']
-				gnu_target = "mipsel-linux-gnu"
-			
-			if (config['MACHINE'] == "bgxemul"):
-				target = "mips32eb"
-				gnu_target = "mips-linux-gnu"
-		
-		if (config['PLATFORM'] == "ppc32"):
-			target = config['PLATFORM']
-			gnu_target = "ppc-linux-gnu"
-		
-		if (config['PLATFORM'] == "sparc64"):
-			target = config['PLATFORM']
-			gnu_target = "sparc64-linux-gnu"
-		
-		path = "%s/%s/bin" % (cross_prefix, target)
-		prefix = "%s-" % gnu_target
-		
-		check_gcc(path, prefix, common, PACKAGE_CROSS)
-		check_binutils(path, prefix, common, PACKAGE_CROSS)
-		common['CC'] = common['GCC']
-	
-	if (config['COMPILER'] == "gcc_native"):
-		check_gcc(None, "", common, PACKAGE_GCC)
-		check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
-		common['CC'] = common['GCC']
-	
-	if (config['COMPILER'] == "icc"):
-		common['CC'] = "icc"
-		check_app([common['CC'], "-V"], "Intel C++ Compiler", "support is experimental")
-		check_gcc(None, "", common, PACKAGE_GCC)
-		check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
-	
-	if (config['COMPILER'] == "suncc"):
-		common['CC'] = "suncc"
-		check_app([common['CC'], "-V"], "Sun Studio Compiler", "support is experimental")
-		check_gcc(None, "", common, PACKAGE_GCC)
-		check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
-	
-	if (config['COMPILER'] == "clang"):
-		common['CC'] = "clang"
-		check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer")
-		check_gcc(None, "", common, PACKAGE_GCC)
-		check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
-	
-	# Platform-specific utilities
-	if ((config['BARCH'] == "amd64") or (config['BARCH'] == "ia32") or (config['BARCH'] == "ppc32") or (config['BARCH'] == "sparc64")):
-		check_app(["mkisofs", "--version"], "ISO 9660 creation utility", "usually part of genisoimage")
-	
-	create_output(COMMON, common)
+			if (config['PLATFORM'] == "ia64"):
+				target = config['PLATFORM']
+				gnu_target = "ia64-pc-linux-gnu"
+			
+			if (config['PLATFORM'] == "mips32"):
+				check_config(config, "MACHINE")
+				
+				if ((config['MACHINE'] == "lgxemul") or (config['MACHINE'] == "msim")):
+					target = config['PLATFORM']
+					gnu_target = "mipsel-linux-gnu"
+				
+				if (config['MACHINE'] == "bgxemul"):
+					target = "mips32eb"
+					gnu_target = "mips-linux-gnu"
+			
+			if (config['PLATFORM'] == "ppc32"):
+				target = config['PLATFORM']
+				gnu_target = "ppc-linux-gnu"
+			
+			if (config['PLATFORM'] == "sparc64"):
+				target = config['PLATFORM']
+				gnu_target = "sparc64-linux-gnu"
+			
+			path = "%s/%s/bin" % (cross_prefix, target)
+			prefix = "%s-" % gnu_target
+			
+			check_gcc(path, prefix, common, PACKAGE_CROSS)
+			check_binutils(path, prefix, common, PACKAGE_CROSS)
+			
+			check_common(common, "GCC")
+			common['CC'] = common['GCC']
+		
+		if (config['COMPILER'] == "gcc_native"):
+			check_gcc(None, "", common, PACKAGE_GCC)
+			check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
+			
+			check_common(common, "GCC")
+			common['CC'] = common['GCC']
+		
+		if (config['COMPILER'] == "icc"):
+			common['CC'] = "icc"
+			check_app([common['CC'], "-V"], "Intel C++ Compiler", "support is experimental")
+			check_gcc(None, "", common, PACKAGE_GCC)
+			check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
+		
+		if (config['COMPILER'] == "suncc"):
+			common['CC'] = "suncc"
+			check_app([common['CC'], "-V"], "Sun Studio Compiler", "support is experimental")
+			check_gcc(None, "", common, PACKAGE_GCC)
+			check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
+		
+		if (config['COMPILER'] == "clang"):
+			common['CC'] = "clang"
+			check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer")
+			check_gcc(None, "", common, PACKAGE_GCC)
+			check_binutils(None, binutils_prefix, common, PACKAGE_BINUTILS)
+		
+		# Platform-specific utilities
+		if ((config['BARCH'] == "amd64") or (config['BARCH'] == "ia32") or (config['BARCH'] == "ppc32") or (config['BARCH'] == "sparc64")):
+			check_app(["mkisofs", "--version"], "ISO 9660 creation utility", "usually part of genisoimage")
+		
+		probe = probe_compiler(common,
+			[
+				"char",
+				"short int",
+				"int",
+				"long int",
+				"long long int",
+			]
+		)
+		
+		typedefs = detect_uints(probe['unsigned_sizes'], probe['signed_sizes'], [1, 2, 4, 8])
+		
+	finally:
+		sandbox_leave(owd)
+	
+	create_makefile(MAKEFILE, common)
+	create_header(HEADER, typedefs)
 	
 	return 0
Index: tools/config.py
===================================================================
--- tools/config.py	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ tools/config.py	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -43,5 +43,4 @@
 MAKEFILE = 'Makefile.config'
 MACROS = 'config.h'
-DEFS = 'config.defs'
 PRECONF = 'defaults'
 
@@ -225,5 +224,5 @@
 	return True
 
-def create_output(mkname, mcname, dfname, defaults, ask_names):
+def create_output(mkname, mcname, defaults, ask_names):
 	"Create output configuration"
 	
@@ -249,5 +248,4 @@
 	outmk = file(mkname, 'w')
 	outmc = file(mcname, 'w')
-	outdf = file(dfname, 'w')
 	
 	outmk.write('#########################################\n')
@@ -259,8 +257,5 @@
 	outmc.write(' ***************************************/\n\n')
 	
-	outdf.write('#########################################\n')
-	outdf.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n')
-	outdf.write('#########################################\n\n')
-	outdf.write('CONFIG_DEFS =')
+	defs = 'CONFIG_DEFS ='
 	
 	for varname, vartype, name, choices, cond in ask_names:
@@ -280,21 +275,22 @@
 			if (default == "y"):
 				outmc.write('/* %s */\n#define %s\n\n' % (name, varname))
-				outdf.write(' -D%s' % varname)
+				defs += ' -D%s' % varname
 		else:
 			outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, default, varname, default))
-			outdf.write(' -D%s=%s -D%s_%s' % (varname, default, varname, default))
+			defs += ' -D%s=%s -D%s_%s' % (varname, default, varname, default)
 	
 	if (revision is not None):
 		outmk.write('REVISION = %s\n' % revision)
 		outmc.write('#define REVISION %s\n' % revision)
-		outdf.write(' "-DREVISION=%s"' % revision)
+		defs += ' "-DREVISION=%s"' % revision
 	
 	outmk.write('TIMESTAMP = %s\n' % timestamp)
 	outmc.write('#define TIMESTAMP %s\n' % timestamp)
-	outdf.write(' "-DTIMESTAMP=%s"\n' % timestamp)
+	defs += ' "-DTIMESTAMP=%s"\n' % timestamp
+	
+	outmk.write(defs)
 	
 	outmk.close()
 	outmc.close()
-	outdf.close()
 
 def sorted_dir(root):
@@ -355,5 +351,5 @@
 	if ((len(sys.argv) >= 3) and (sys.argv[2] == 'default')):
 		if (check_choices(defaults, ask_names)):
-			create_output(MAKEFILE, MACROS, DEFS, defaults, ask_names)
+			create_output(MAKEFILE, MACROS, defaults, ask_names)
 			return 0
 	
@@ -473,5 +469,5 @@
 		xtui.screen_done(screen)
 	
-	create_output(MAKEFILE, MACROS, DEFS, defaults, ask_names)
+	create_output(MAKEFILE, MACROS, defaults, ask_names)
 	return 0
 
Index: uspace/app/Makefile.common
===================================================================
--- uspace/app/Makefile.common	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/app/Makefile.common	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -63,5 +63,4 @@
     $(LIBC_PREFIX)/../../../Makefile.config \
     $(LIBC_PREFIX)/../../../config.h \
-    $(LIBC_PREFIX)/../../../config.defs \
     $(LIBS) \
     \
Index: uspace/lib/Makefile.common
===================================================================
--- uspace/lib/Makefile.common	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/lib/Makefile.common	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -63,5 +63,4 @@
     $(LIBC_PREFIX)/../../../Makefile.config \
     $(LIBC_PREFIX)/../../../config.h \
-    $(LIBC_PREFIX)/../../../config.defs \
     $(LIBS) \
     \
Index: uspace/lib/libc/Makefile.toolchain
===================================================================
--- uspace/lib/libc/Makefile.toolchain	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/lib/libc/Makefile.toolchain	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -58,5 +58,4 @@
 -include $(LIBC_PREFIX)/../../../Makefile.common
 -include $(LIBC_PREFIX)/../../../Makefile.config
--include $(LIBC_PREFIX)/../../../config.defs
 -include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
 
Index: uspace/srv/Makefile.common
===================================================================
--- uspace/srv/Makefile.common	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/srv/Makefile.common	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -67,5 +67,4 @@
     $(LIBC_PREFIX)/../../../Makefile.config \
     $(LIBC_PREFIX)/../../../config.h \
-    $(LIBC_PREFIX)/../../../config.defs \
     $(LIBS) \
     \
@@ -78,5 +77,5 @@
 	find . -name '*.o' -follow -exec rm \{\} \;
 
-build: 
+build:
 
 -include $(DEPEND)
Index: uspace/srv/hid/console/Makefile
===================================================================
--- uspace/srv/hid/console/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/srv/hid/console/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
+all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: uspace/srv/hid/fb/Makefile
===================================================================
--- uspace/srv/hid/fb/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/srv/hid/fb/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
+all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
Index: uspace/srv/hid/kbd/Makefile
===================================================================
--- uspace/srv/hid/kbd/Makefile	(revision 3c80f2ba924af168dfc3e3a650b8f57db0fe8c00)
+++ uspace/srv/hid/kbd/Makefile	(revision 4e9aaf55e64f360630cc088883c7493ac073deef)
@@ -32,5 +32,5 @@
 .PHONY: all clean
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
+all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
 	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
 	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
