Start to separate KERNEL out of libwine.

diff --git a/Make.rules.in b/Make.rules.in
index 9db59aa..2f1b344 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -104,6 +104,7 @@
 	imagehlp \
 	imm32 \
 	joystick.drv \
+	kernel32 \
 	lz32 \
 	mcianim.drv \
 	mciavi.drv \
diff --git a/Makefile.in b/Makefile.in
index 901f06e..c173c9e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,6 +31,7 @@
 	dlls/advapi32 \
 	dlls/crtdll \
 	dlls/display \
+	dlls/kernel \
 	dlls/mouse \
 	dlls/ntdll \
 	files \
diff --git a/configure b/configure
index 25f92a5..2b81ad0 100755
--- a/configure
+++ b/configure
@@ -6207,6 +6207,7 @@
 dlls/icmp/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
+dlls/kernel/Makefile
 dlls/lzexpand/Makefile
 dlls/mouse/Makefile
 dlls/mpr/Makefile
@@ -6441,6 +6442,7 @@
 dlls/icmp/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
+dlls/kernel/Makefile
 dlls/lzexpand/Makefile
 dlls/mouse/Makefile
 dlls/mpr/Makefile
diff --git a/configure.in b/configure.in
index 8a7829d..61f46a3 100644
--- a/configure.in
+++ b/configure.in
@@ -1001,6 +1001,7 @@
 dlls/icmp/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
+dlls/kernel/Makefile
 dlls/lzexpand/Makefile
 dlls/mouse/Makefile
 dlls/mpr/Makefile
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index ef95561..7ebd27a 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -24,6 +24,7 @@
 	icmp/libicmp.@LIBEXT@ \
 	imagehlp/libimagehlp.@LIBEXT@ \
 	imm32/libimm32.@LIBEXT@ \
+	kernel/libkernel32.@LIBEXT@ \
 	lzexpand/liblz32.@LIBEXT@ \
 	mpr/libmpr.@LIBEXT@ \
 	msacm/libmsacm.@LIBEXT@ \
@@ -72,11 +73,14 @@
 # extra names for dlls containing multiple spec files
 EXTRADLLNAMES = \
 	avifile \
+	comm \
 	commdlg \
 	compobj \
 	ddeml \
+	dispdib \
 	dplay \
 	gdi \
+	kernel \
 	keyboard \
 	lzexpand \
 	mmsystem \
@@ -93,13 +97,17 @@
 	shell \
 	shlwapi \
 	storage \
+	system \
+	toolhelp \
 	typelib \
 	user \
 	ver \
 	w32sys \
 	win32s16 \
 	winaspi \
-	winsock
+	winsock \
+	wow32 \
+	wprocs
 
 SUBDIRS = \
 	avifil32 \
@@ -114,6 +122,7 @@
 	icmp \
 	imagehlp \
 	imm32 \
+	kernel \
 	lzexpand \
 	mpr \
 	msacm \
@@ -182,7 +191,7 @@
 libdsound.@LIBEXT@: dsound/libdsound.@LIBEXT@
 	$(RM) $@ && $(LN_S) dsound/libdsound.@LIBEXT@ $@
 
-libgdi32.@LIBEXT@ libgdi.@LIBEXT@: gdi/libgdi32.@LIBEXT@
+libgdi32.@LIBEXT@ libgdi.@LIBEXT@ libdispdib.@LIBEXT@: gdi/libgdi32.@LIBEXT@
 	$(RM) $@ && $(LN_S) gdi/libgdi32.@LIBEXT@ $@
 
 libicmp.@LIBEXT@: icmp/libicmp.@LIBEXT@
@@ -194,6 +203,9 @@
 libimm32.@LIBEXT@: imm32/libimm32.@LIBEXT@
 	$(RM) $@ && $(LN_S) imm32/libimm32.@LIBEXT@ $@
 
+libkernel32.@LIBEXT@ libwow32.@LIBEXT@ libcomm.@LIBEXT@ libkernel.@LIBEXT@ libsystem.@LIBEXT@ libtoolhelp.@LIBEXT@ libwprocs.@LIBEXT@: kernel/libkernel32.@LIBEXT@
+	$(RM) $@ && $(LN_S) kernel/libkernel32.@LIBEXT@ $@
+
 libjoystick.drv.@LIBEXT@: winmm/joystick/libjoystick.drv.@LIBEXT@
 	$(RM) $@ && $(LN_S) winmm/joystick/libjoystick.drv.@LIBEXT@ $@
 
diff --git a/dlls/kernel/.cvsignore b/dlls/kernel/.cvsignore
new file mode 100644
index 0000000..8ac6011
--- /dev/null
+++ b/dlls/kernel/.cvsignore
@@ -0,0 +1,9 @@
+Makefile
+comm.spec.c
+kernel.spec.c
+kernel32.spec.c
+libkernel32.so.1.0
+system.spec.c
+toolhelp.spec.c
+wow32.spec.c
+wprocs.spec.c
diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in
new file mode 100644
index 0000000..2503882
--- /dev/null
+++ b/dlls/kernel/Makefile.in
@@ -0,0 +1,20 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = kernel32
+SOVERSION = 1.0
+ALTNAMES  = wow32 comm kernel system toolhelp wprocs
+
+SPEC_SRCS = \
+	kernel32.spec \
+	wow32.spec \
+	comm.spec \
+	kernel.spec \
+	system.spec \
+	toolhelp.spec \
+	wprocs.spec
+
+@MAKE_DLL_RULES@
+
+### Dependencies:
diff --git a/if1632/comm.spec b/dlls/kernel/comm.spec
similarity index 100%
rename from if1632/comm.spec
rename to dlls/kernel/comm.spec
diff --git a/if1632/kernel.spec b/dlls/kernel/kernel.spec
similarity index 100%
rename from if1632/kernel.spec
rename to dlls/kernel/kernel.spec
diff --git a/relay32/kernel32.spec b/dlls/kernel/kernel32.spec
similarity index 100%
rename from relay32/kernel32.spec
rename to dlls/kernel/kernel32.spec
diff --git a/if1632/system.spec b/dlls/kernel/system.spec
similarity index 100%
rename from if1632/system.spec
rename to dlls/kernel/system.spec
diff --git a/if1632/toolhelp.spec b/dlls/kernel/toolhelp.spec
similarity index 100%
rename from if1632/toolhelp.spec
rename to dlls/kernel/toolhelp.spec
diff --git a/relay32/wow32.spec b/dlls/kernel/wow32.spec
similarity index 100%
rename from relay32/wow32.spec
rename to dlls/kernel/wow32.spec
diff --git a/if1632/wprocs.spec b/dlls/kernel/wprocs.spec
similarity index 100%
rename from if1632/wprocs.spec
rename to dlls/kernel/wprocs.spec
diff --git a/if1632/.cvsignore b/if1632/.cvsignore
index 9da227f..ef696a1 100644
--- a/if1632/.cvsignore
+++ b/if1632/.cvsignore
@@ -1,4 +1,3 @@
-*.spec.c
 Makefile
 call16.s
 thunk.glue.c
diff --git a/if1632/Makefile.in b/if1632/Makefile.in
index b1d82f2..2dac7bb 100644
--- a/if1632/Makefile.in
+++ b/if1632/Makefile.in
@@ -5,14 +5,6 @@
 VPATH     = @srcdir@
 MODULE    = if1632
 
-SPEC_SRCS = \
-	comm.spec \
-	dispdib.spec \
-	kernel.spec \
-	system.spec \
-	toolhelp.spec \
-	wprocs.spec
-
 C_SRCS = \
 	builtin.c \
 	dummy.c \
diff --git a/relay32/.cvsignore b/relay32/.cvsignore
index 7d594e1..b2b6f46 100644
--- a/relay32/.cvsignore
+++ b/relay32/.cvsignore
@@ -1,4 +1,2 @@
 Makefile
 call32.s
-kernel32.spec.c
-wow32.spec.c
diff --git a/relay32/Makefile.in b/relay32/Makefile.in
index 34ebc47..9ac4a76 100644
--- a/relay32/Makefile.in
+++ b/relay32/Makefile.in
@@ -5,10 +5,6 @@
 VPATH     = @srcdir@
 MODULE    = relay32
 
-SPEC_SRCS = \
-	kernel32.spec \
-	wow32.spec
-
 C_SRCS = \
 	builtin32.c \
 	relay386.c \