Added --disable-win16 configure option.

diff --git a/Make.rules.in b/Make.rules.in
index ccbecb8..fec8f11 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -8,9 +8,7 @@
 #
 # Each individual makefile may define the following additional variables:
 # C_SRCS       : C sources for the module
-# ASM_SRCS     : assembly sources
-# GEN_C_SRCS   : generated C files
-# GEN_ASM_SRCS : generated assembly sources
+# C_SRCS16     : 16-bit C sources for the module
 # RC_SRCS      : resource source files
 # SPEC_SRCS    : interface definition files
 # EXTRA_SRCS   : extra source files for make depend
@@ -100,7 +98,7 @@
 CLEAN_FILES     = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
                   *.flc *.spec.c *.spec.def *.glue.c *.dbg.c y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c core
 
-OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
+OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS)
 
 RCOBJS = $(RC_SRCS:.rc=.res.o)
 LINTS  = $(C_SRCS:.c=.ln)
@@ -118,9 +116,6 @@
 .s.o:
 	$(AS) -o $@ $<
 
-.S.o:
-	$(CC) -c -o $@ $<
-
 .mc.mc.rc:
 	$(LDPATH) $(WMC) -i -H /dev/null -o $@ $<
 
@@ -156,13 +151,8 @@
 
 # Rule for main module debug channels
 
-$(MODULE).dbg.c: $(C_SRCS) $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS)
-
-# Rule for 16-bit glue
-
-$(MODULE).glue.c: $(C_SRCS) $(WINEBUILD)
-	$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS)
+$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD)
+	$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
 
 # Rule to rebuild the tools
 
@@ -217,7 +207,7 @@
 	cd `dirname $@` && $(MAKE) depend
 
 depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
-	$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS)
+	$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS)
 
 .PHONY: depend $(SUBDIRS:%=%/__depend__)
 
@@ -235,7 +225,7 @@
 testclean:: $(SUBDIRS:%=%/__testclean__)
 
 clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
-	$(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS)
+	$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS)
 
 .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__)
 
diff --git a/configure b/configure
index 845d573..a4a1088 100755
--- a/configure
+++ b/configure
@@ -832,6 +832,7 @@
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-win16         do not include Win16 support
   --disable-debug         compile out all debugging messages
   --disable-trace         compile out TRACE messages
   --enable-opengl         force usage of OpenGL even if the latter is
@@ -1244,6 +1245,11 @@
 LIBEXT="so"
 
 
+# Check whether --enable-win16 or --disable-win16 was given.
+if test "${enable_win16+set}" = set; then
+  enableval="$enable_win16"
+
+fi;
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -1273,6 +1279,15 @@
 fi;
 
 
+WIN16_FILES="\$(WIN16_FILES)"
+
+WIN16_INSTALL="\$(WIN16_INSTALL)"
+
+if test "x$enable_win16" = "xno"
+then
+  WIN16_FILES=""
+  WIN16_INSTALL=""
+fi
 if test "x$enable_debug" = "xno"
 then
 
@@ -14940,6 +14955,8 @@
 s,@LIBS@,$LIBS,;t t
 s,@LIBEXT@,$LIBEXT,;t t
 s,@OPTIONS@,$OPTIONS,;t t
+s,@WIN16_FILES@,$WIN16_FILES,;t t
+s,@WIN16_INSTALL@,$WIN16_INSTALL,;t t
 s,@build@,$build,;t t
 s,@build_cpu@,$build_cpu,;t t
 s,@build_vendor@,$build_vendor,;t t
diff --git a/configure.ac b/configure.ac
index ef92aeb..b117e9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@
 dnl Library type .so or .a
 AC_SUBST(LIBEXT,"so")
 
+AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support]))
 AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages]))
 AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages]))
 AC_ARG_ENABLE(opengl,AC_HELP_STRING([--enable-opengl],[force usage of OpenGL even if the latter is thread-safe via pthread]))
@@ -22,6 +23,13 @@
 AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=<dir>],[use Wine tools from directory <dir>]))
 
 AC_SUBST(OPTIONS)
+AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)")
+AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)")
+if test "x$enable_win16" = "xno"
+then
+  WIN16_FILES=""
+  WIN16_INSTALL=""
+fi
 if test "x$enable_debug" = "xno"
 then
     AC_DEFINE(NO_DEBUG_MSGS,1,[Define to disable all debug messages.])
diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in
index 6d75fc7..ed55fb4 100644
--- a/dlls/Makedll.rules.in
+++ b/dlls/Makedll.rules.in
@@ -14,7 +14,8 @@
 SPEC_SRCS   = $(ALTSPECS:%=%.spec)
 MAINSPEC    = $(MODULE:%.dll=%).spec
 SPEC_DEF    = $(MAINSPEC).def
-ALL_OBJS    = $(SPEC_SRCS:.spec=.spec.o) $(OBJS) $(MODULE).dbg.o
+WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16)
+ALL_OBJS    = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o
 ALL_LIBS    = $(LIBWINE) $(EXTRALIBS) $(LIBS)
 
 all: $(MODULE)$(DLLEXT)
@@ -33,6 +34,11 @@
 	$(LDCOMBINE) $(ALL_OBJS) -o $@
 	-$(STRIP) --strip-unneeded $@
 
+# Rule for 16-bit glue
+
+$(MODULE).glue.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD)
+	$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
+
 # Rules for .dll files
 
 $(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in
@@ -46,6 +52,7 @@
 
 checklink:: $(MODULE)$(DLLEXT) $(SUBDIRS:%=%/__checklink__)
 	$(CC) -o checklink $(CHECKLINK_RPATH:%=-Wl,-rpath,$(TOPOBJDIR)/%) $(TOPSRCDIR)/library/checklink.c $(MODULE)$(DLLEXT) && $(RM) checklink
+	$(CC) -o checklink $(CHECKLINK_RPATH:%=-Wl,-rpath,$(TOPOBJDIR)/%) $(TOPSRCDIR)/library/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(ALL_LIBS) && $(RM) checklink
 
 # Rules for testing
 
@@ -63,7 +70,9 @@
 
 # Rules for installation
 
-.PHONY: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT))
+WIN16_INSTALL = $(ALTNAMES:%=_install_/%$(DLLEXT))
+
+.PHONY: install_lib $(WIN16_INSTALL)
 
 $(ALTNAMES:%=_install_/%$(DLLEXT)): install_lib
 	cd $(dlldir) && $(RM) `basename $@` && $(LN_S) $(MODULE)$(DLLEXT) `basename $@`
@@ -72,7 +81,7 @@
 	$(MKINSTALLDIRS) $(dlldir)
 	$(INSTALL_PROGRAM) $(MODULE)$(DLLEXT) $(dlldir)/$(MODULE)$(DLLEXT)
 
-install:: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT))
+install:: install_lib @WIN16_INSTALL@
 
 uninstall::
 	$(RM) $(dlldir)/$(MODULE)$(DLLEXT) $(ALTNAMES:%=$(dlldir)/%$(DLLEXT))
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 1055266..e83e549 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -123,43 +123,79 @@
 
 @MAKE_RULES@
 
-all: \
-	$(EXTRADIRS:%=%.dll$(DLLEXT)) \
-	advapi32.dll$(DLLEXT) \
-	avicap32.dll$(DLLEXT) \
-	avifil32.dll$(DLLEXT) \
+WIN16_FILES = \
 	avifile.dll$(DLLEXT) \
-	comcat.dll$(DLLEXT) \
-	comctl32.dll$(DLLEXT) \
-	comdlg32.dll$(DLLEXT) \
 	comm.dll$(DLLEXT) \
 	commdlg.dll$(DLLEXT) \
 	compobj.dll$(DLLEXT) \
+	ddeml.dll$(DLLEXT) \
+	dispdib.dll$(DLLEXT) \
+	display.dll$(DLLEXT) \
+	gdi.exe$(DLLEXT) \
+	imm.dll$(DLLEXT) \
+	keyboard.dll$(DLLEXT) \
+	krnl386.exe$(DLLEXT) \
+	lzexpand.dll$(DLLEXT) \
+	mmsystem.dll$(DLLEXT) \
+	mouse.dll$(DLLEXT) \
+	msacm.dll$(DLLEXT) \
+	msvideo.dll$(DLLEXT) \
+	ole2.dll$(DLLEXT) \
+	ole2conv.dll$(DLLEXT) \
+	ole2disp.dll$(DLLEXT) \
+	ole2nls.dll$(DLLEXT) \
+	ole2prox.dll$(DLLEXT) \
+	ole2thk.dll$(DLLEXT) \
+	olecli.dll$(DLLEXT) \
+	olesvr.dll$(DLLEXT) \
+	rasapi16.dll$(DLLEXT) \
+	setupx.dll$(DLLEXT) \
+	shell.dll$(DLLEXT) \
+	sound.dll$(DLLEXT) \
+	storage.dll$(DLLEXT) \
+	stress.dll$(DLLEXT) \
+	system.dll$(DLLEXT) \
+	toolhelp.dll$(DLLEXT) \
+	typelib.dll$(DLLEXT) \
+	user.exe$(DLLEXT) \
+	ver.dll$(DLLEXT) \
+	w32sys.dll$(DLLEXT) \
+	win32s16.dll$(DLLEXT) \
+	win87em.dll$(DLLEXT) \
+	winaspi.dll$(DLLEXT) \
+	windebug.dll$(DLLEXT) \
+	wineps16.dll$(DLLEXT) \
+	wing.dll$(DLLEXT) \
+	winnls.dll$(DLLEXT) \
+	winsock.dll$(DLLEXT) \
+	wprocs.dll$(DLLEXT)
+
+all: \
+	$(EXTRADIRS:%=%.dll$(DLLEXT)) \
+	@WIN16_FILES@ \
+	advapi32.dll$(DLLEXT) \
+	avicap32.dll$(DLLEXT) \
+	avifil32.dll$(DLLEXT) \
+	comcat.dll$(DLLEXT) \
+	comctl32.dll$(DLLEXT) \
+	comdlg32.dll$(DLLEXT) \
 	crtdll.dll$(DLLEXT) \
 	crypt32.dll$(DLLEXT) \
 	dciman32.dll$(DLLEXT) \
-	ddeml.dll$(DLLEXT) \
 	devenum.dll$(DLLEXT) \
 	dinput.dll$(DLLEXT) \
 	dinput8.dll$(DLLEXT) \
-	dispdib.dll$(DLLEXT) \
-	display.dll$(DLLEXT) \
 	dplay.dll$(DLLEXT) \
 	dplayx.dll$(DLLEXT) \
 	dsound.dll$(DLLEXT) \
-	gdi.exe$(DLLEXT) \
 	gdi32.dll$(DLLEXT) \
 	icmp.dll$(DLLEXT) \
 	imaadp32.acm$(DLLEXT) \
 	imagehlp.dll$(DLLEXT) \
-	imm.dll$(DLLEXT) \
 	imm32.dll$(DLLEXT) \
 	joystick.drv$(DLLEXT) \
 	kernel32.dll$(DLLEXT) \
-	keyboard.dll$(DLLEXT) \
-	krnl386.exe$(DLLEXT) \
 	lz32.dll$(DLLEXT) \
-	lzexpand.dll$(DLLEXT) \
 	mapi32.dll$(DLLEXT) \
 	mcianim.drv$(DLLEXT) \
 	mciavi.drv$(DLLEXT) \
@@ -167,10 +203,7 @@
 	mciseq.drv$(DLLEXT) \
 	mciwave.drv$(DLLEXT) \
 	midimap.drv$(DLLEXT) \
-	mmsystem.dll$(DLLEXT) \
-	mouse.dll$(DLLEXT) \
 	mpr.dll$(DLLEXT) \
-	msacm.dll$(DLLEXT) \
 	msacm.drv$(DLLEXT) \
 	msacm32.dll$(DLLEXT) \
 	msadp32.acm$(DLLEXT) \
@@ -183,62 +216,37 @@
 	msvcrt.dll$(DLLEXT) \
 	msvcrt20.dll$(DLLEXT) \
 	msvfw32.dll$(DLLEXT) \
-	msvideo.dll$(DLLEXT) \
 	netapi32.dll$(DLLEXT) \
 	ntdll.dll$(DLLEXT) \
 	odbc32.dll$(DLLEXT) \
-	ole2.dll$(DLLEXT) \
-	ole2conv.dll$(DLLEXT) \
-	ole2disp.dll$(DLLEXT) \
-	ole2nls.dll$(DLLEXT) \
-	ole2prox.dll$(DLLEXT) \
-	ole2thk.dll$(DLLEXT) \
 	ole32.dll$(DLLEXT) \
 	oleaut32.dll$(DLLEXT) \
-	olecli.dll$(DLLEXT) \
 	olecli32.dll$(DLLEXT) \
 	oledlg.dll$(DLLEXT) \
 	olepro32.dll$(DLLEXT) \
-	olesvr.dll$(DLLEXT) \
 	olesvr32.dll$(DLLEXT) \
 	psapi.dll$(DLLEXT) \
 	qcap.dll$(DLLEXT) \
 	quartz.dll$(DLLEXT) \
-	rasapi16.dll$(DLLEXT) \
 	rasapi32.dll$(DLLEXT) \
 	riched32.dll$(DLLEXT) \
 	rpcrt4.dll$(DLLEXT) \
 	serialui.dll$(DLLEXT) \
 	setupapi.dll$(DLLEXT) \
-	setupx.dll$(DLLEXT) \
 	shdocvw.dll$(DLLEXT) \
-	shell.dll$(DLLEXT) \
 	shell32.dll$(DLLEXT) \
 	shfolder.dll$(DLLEXT) \
 	shlwapi.dll$(DLLEXT) \
 	snmpapi.dll$(DLLEXT) \
-	sound.dll$(DLLEXT) \
 	sti.dll$(DLLEXT) \
-	storage.dll$(DLLEXT) \
-	stress.dll$(DLLEXT) \
-	system.dll$(DLLEXT) \
 	tapi32.dll$(DLLEXT) \
-	toolhelp.dll$(DLLEXT) \
 	ttydrv.dll$(DLLEXT) \
 	twain_32.dll$(DLLEXT) \
-	typelib.dll$(DLLEXT) \
 	url.dll$(DLLEXT) \
 	urlmon.dll$(DLLEXT) \
-	user.exe$(DLLEXT) \
 	user32.dll$(DLLEXT) \
-	ver.dll$(DLLEXT) \
 	version.dll$(DLLEXT) \
 	w32skrnl.dll$(DLLEXT) \
-	w32sys.dll$(DLLEXT) \
-	win32s16.dll$(DLLEXT) \
-	win87em.dll$(DLLEXT) \
-	winaspi.dll$(DLLEXT) \
-	windebug.dll$(DLLEXT) \
 	winealsa.drv$(DLLEXT) \
 	winearts.drv$(DLLEXT) \
 	wineaudioio.drv$(DLLEXT) \
@@ -247,18 +255,13 @@
 	winenas.drv$(DLLEXT) \
 	wineoss.drv$(DLLEXT) \
 	wineps.dll$(DLLEXT) \
-	wineps16.dll$(DLLEXT) \
-	wing.dll$(DLLEXT) \
 	wininet.dll$(DLLEXT) \
 	winmm.dll$(DLLEXT) \
-	winnls.dll$(DLLEXT) \
 	winnls32.dll$(DLLEXT) \
-	winsock.dll$(DLLEXT) \
 	winspool.drv$(DLLEXT) \
 	wintrust.dll$(DLLEXT) \
 	wnaspi32.dll$(DLLEXT) \
 	wow32.dll$(DLLEXT) \
-	wprocs.dll$(DLLEXT) \
 	ws2_32.dll$(DLLEXT) \
 	wsock32.dll$(DLLEXT)
 
diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in
index 98ed326..8495c7a 100644
--- a/dlls/Maketest.rules.in
+++ b/dlls/Maketest.rules.in
@@ -20,13 +20,12 @@
 RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM)
 
 C_SRCS       = $(CTESTS)
-GEN_C_SRCS   = $(TESTLIST)
-EXTRA_OBJS   = $(TESTMAIN)
+EXTRA_OBJS   = $(TESTMAIN) $(TESTLIST:.c=.o)
 ALL_LIBS     = $(LIBWINE) $(EXTRALIBS) $(LIBS)
 
 CROSSTEST    = $(TESTDLL:%.dll=%)_crosstest.exe
 CROSSTESTMAIN= $(TOPOBJDIR)/programs/winetest/wtmain.cross.o
-CROSSOBJS    = $(C_SRCS:.c=.cross.o) $(GEN_C_SRCS:.c=.cross.o) $(CROSSTESTMAIN)
+CROSSOBJS    = $(C_SRCS:.c=.cross.o) $(TESTLIST:.c=.cross.o) $(CROSSTESTMAIN)
 
 @MAKE_RULES@
 
diff --git a/dlls/gdi/Makefile.in b/dlls/gdi/Makefile.in
index ad57a85..b128225 100644
--- a/dlls/gdi/Makefile.in
+++ b/dlls/gdi/Makefile.in
@@ -36,7 +36,6 @@
 	$(TOPOBJDIR)/objects/pen.c \
 	$(TOPOBJDIR)/objects/region.c \
 	$(TOPOBJDIR)/objects/text.c \
-	bidi16.c \
 	driver.c \
 	enhmfdrv/bitblt.c \
 	enhmfdrv/dc.c \
@@ -63,6 +62,9 @@
 	win16drv/text.c \
 	wing.c
 
+C_SRCS16 = \
+	bidi16.c
+
 RC_SRCS = version.rc
 RC_SRCS16 = version16.rc
 
diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in
index 2144866..18f42a5 100644
--- a/dlls/kernel/Makefile.in
+++ b/dlls/kernel/Makefile.in
@@ -16,7 +16,6 @@
 	format_msg.c \
 	kernel_main.c \
 	locale.c \
-	registry16.c \
 	stress.c \
 	string.c \
 	sync.c \
@@ -28,6 +27,9 @@
 	windebug.c \
 	wowthunk.c
 
+C_SRCS16 = \
+	registry16.c
+
 RC_SRCS = kernel.rc
 
 RC_SRCS16 = \
diff --git a/dlls/lzexpand/Makefile.in b/dlls/lzexpand/Makefile.in
index f8dd7d0..8ab3892 100644
--- a/dlls/lzexpand/Makefile.in
+++ b/dlls/lzexpand/Makefile.in
@@ -10,9 +10,8 @@
 LDDLLFLAGS = @LDDLLFLAGS@
 SYMBOLFILE = $(MODULE).tmp.o
 
-C_SRCS = \
-	lzexpand16.c \
-	lzexpand_main.c
+C_SRCS   = lzexpand_main.c
+C_SRCS16 = lzexpand16.c
 
 @MAKE_DLL_RULES@
 
diff --git a/dlls/make_dlls b/dlls/make_dlls
index 515bdc3..2d46231 100755
--- a/dlls/make_dlls
+++ b/dlls/make_dlls
@@ -145,6 +145,7 @@
 # output the all: target
 
 my %targets = ();  # use a hash to get rid of duplicate target names
+my %targets16 = ();
 foreach my $mod (sort keys %directories)
 {
     next if defined($special_dlls{$directories{$mod}});  # skip special dlls
@@ -152,7 +153,7 @@
     next unless defined $altnames{$mod};
     foreach my $i (sort @{$altnames{$mod}})
     {
-        $targets{sprintf("%s\$(DLLEXT)",$i)} = 1;
+        $targets16{sprintf("%s\$(DLLEXT)",$i)} = 1;
     }
 }
 print NEWMAKE <<EOF;
@@ -161,8 +162,15 @@
 
 \@MAKE_RULES\@
 
+WIN16_FILES = \\
+EOF
+printf NEWMAKE "\t%s\n", join( " \\\n\t", sort keys %targets16 );
+
+print NEWMAKE <<EOF;
+
 all: \\
 	\$(EXTRADIRS:%=%.dll\$(DLLEXT)) \\
+	\@WIN16_FILES\@ \\
 EOF
 printf NEWMAKE "\t%s\n", join( " \\\n\t", sort keys %targets );
 
diff --git a/dlls/msvideo/Makefile.in b/dlls/msvideo/Makefile.in
index d032a2e..c133a37 100644
--- a/dlls/msvideo/Makefile.in
+++ b/dlls/msvideo/Makefile.in
@@ -12,9 +12,11 @@
 C_SRCS = \
 	mciwnd.c \
 	msvideo_main.c \
-	msvideo16.c \
 	drawdib.c
 
+C_SRCS16 = \
+	msvideo16.c
+
 EXTRA_OBJS = $(MODULE).glue.o
 
 @MAKE_DLL_RULES@
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index b52124e..8ece8d4 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -115,11 +115,11 @@
 	time.c \
 	wcstring.c
 
-GEN_ASM_SRCS = \
+ASM_SRCS = \
 	relay16.s \
 	relay32.s
 
-EXTRA_OBJS = $(MODULE).glue.o
+EXTRA_OBJS = $(ASM_SRCS:.s=.o) $(MODULE).glue.o
 
 SUBDIRS = tests
 
@@ -143,4 +143,7 @@
 relay32.s: $(WINEBUILD)
 	$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay32
 
+clean::
+	$(RM) $(ASM_SRCS)
+
 ### Dependencies:
diff --git a/dlls/user/Makefile.in b/dlls/user/Makefile.in
index 566f562..8ff5b7d 100644
--- a/dlls/user/Makefile.in
+++ b/dlls/user/Makefile.in
@@ -55,7 +55,6 @@
 	$(TOPOBJDIR)/windows/winhelp.c \
 	$(TOPOBJDIR)/windows/winpos.c \
 	$(TOPOBJDIR)/windows/winproc.c \
-	bidi16.c \
 	cache.c \
 	comm16.c \
 	dde/client.c \
@@ -74,11 +73,14 @@
 	property.c \
 	resource.c \
 	text.c \
-	user16.c \
 	user_main.c \
 	wnd16.c \
 	wsprintf.c
 
+C_SRCS16 = \
+	bidi16.c \
+	user16.c
+
 RC_SRCS = resources/user32.rc
 
 RC_SRCS16 = \
diff --git a/dlls/version/Makefile.in b/dlls/version/Makefile.in
index 1ff064c..6239f14 100644
--- a/dlls/version/Makefile.in
+++ b/dlls/version/Makefile.in
@@ -13,7 +13,9 @@
 C_SRCS = \
 	info.c \
 	install.c \
-	resource.c \
+	resource.c
+
+C_SRCS16 = \
 	ver16.c
 
 @MAKE_DLL_RULES@
diff --git a/dlls/win32s/Makefile.in b/dlls/win32s/Makefile.in
index cde474d..1af2b43 100644
--- a/dlls/win32s/Makefile.in
+++ b/dlls/win32s/Makefile.in
@@ -11,10 +11,11 @@
 
 C_SRCS = \
 	w32skernel.c \
-	w32sys.c \
+	w32sys.c
+
+C_SRCS16 = \
 	win32s16.c
 
 @MAKE_DLL_RULES@
 
 ### Dependencies:
-
diff --git a/dlls/winaspi/Makefile.in b/dlls/winaspi/Makefile.in
index c4849e4..b2af056 100644
--- a/dlls/winaspi/Makefile.in
+++ b/dlls/winaspi/Makefile.in
@@ -11,10 +11,12 @@
 
 C_SRCS = \
 	aspi.c \
-	winaspi16.c \
 	winaspi32.c
 
-EXTRA_OBJS = $(MODULE).glue.o
+C_SRCS16 = \
+	winaspi16.c
+
+EXTRA_OBJS16 = $(MODULE).glue.o
 
 @MAKE_DLL_RULES@
 
diff --git a/dlls/winmm/Makefile.in b/dlls/winmm/Makefile.in
index 6563010..0bab071 100644
--- a/dlls/winmm/Makefile.in
+++ b/dlls/winmm/Makefile.in
@@ -17,9 +17,11 @@
 	mci.c \
 	mmio.c \
 	mmsystem.c \
-	sound16.c \
 	time.c
 
+C_SRCS16 = \
+	sound16.c
+
 RC_SRCS = winmm_res.rc
 
 EXTRA_OBJS = $(MODULE).glue.o