(translate_char): Accept list of translation tables.
[bpt/emacs.git] / src / makefile.nt
index 621d238..e3d0584 100644 (file)
@@ -1,44 +1,60 @@
-#  Makefile for GNU Emacs on Windows NT
+#  Makefile for GNU Emacs on the Microsoft W32 API.
 #  Copyright (c) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
 #   Tim Fleehart (apollo@online.com)            17-Apr-92
 #   Geoff Voelker (voelker@cs.washington.edu)   11-20-93
 #
 #  This file is part of GNU Emacs.
-#  
+#
 #  GNU Emacs is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
 #  the Free Software Foundation; either version 2, or (at your option)
 #  any later version.
-#  
+#
 #  GNU Emacs is distributed in the hope that it will be useful,
 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #  GNU General Public License for more details.
-#  
+#
 #  You should have received a copy of the GNU General Public License
-#  along with GNU Emacs; see the file COPYING.  If not, write to
-#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+#  along with GNU Emacs; see the file COPYING.  If not, write to the
+#  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+#  Boston, MA 02111-1307, USA.
 #
 
-# 
+#
 # Sets up the system dependent macros.
 #
 !include ..\nt\makefile.def
 
-!IFDEF NTGUI
-SUBSYSTEM=windows
-!ELSE
 SUBSYSTEM=console
-!ENDIF
 
 #
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
 # the emacs source tree.
 #
 LOCAL_FLAGS     = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I..\nt\inc
+!ifdef NTGUI
+LOCAL_FLAGS     = $(LOCAL_FLAGS) -DHAVE_NTGUI=1
+!endif
+!ifdef USE_CRT_DLL
+LOCAL_FLAGS     = $(LOCAL_FLAGS) -DUSE_CRT_DLL=1 -MD
+libc            = msvcrt.lib
+LINK_FLAGS      = -nodefaultlib
+!endif
+
+# From MSVC 5.0 onwards, it seem base relocation information is not included,
+# at least in release builds.  We need to ensure the reloc info is included
+# in order to use the MSVC profiler.
+!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
+EXTRA_LINK      =
+!ELSE
+EXTRA_LINK      = -profile
+!ENDIF
 
 EMACS           = $(BLD)\emacs.exe
 TEMACS          = $(BLD)\temacs.exe
+TEMACS_TMP      = $(BLD)\temacs.bin
+TLIB0           = $(BLD)\temacs0.lib
 TLIB1           = $(BLD)\temacs1.lib
 TLIB2           = $(BLD)\temacs2.lib
 !IFDEF NTGUI
@@ -46,7 +62,7 @@ TLIBW32         = $(BLD)\temacw32.lib
 !ELSE
 TLIBW32                =
 !ENDIF
-TOBJ            = $(BLD)\emacs.obj
+TOBJ            = $(BLD)\firstfile.obj
 !if $(MSVCNT11)
 TRES           = $(BLD)\emacs.res
 !else
@@ -54,15 +70,27 @@ TRES                = $(BLD)\emacs.rbj
 !endif
 TLASTLIB       = $(BLD)\lastfile.lib
 
-LINK_FLAGS      = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:$(SUBSYSTEM) -entry:_start -map:$(BLD)\temacs.map -map
+# see comments in allocate_heap in w32heap.c before changing any of the
+# -stack, -heap, or -base settings.
+!if "$(BUILD_TYPE)" == "spd"
+LINK_FLAGS      = $(LINK_FLAGS) $(ARCH_LDFLAGS) -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -debugtype:both -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) -subsystem:$(SUBSYSTEM) -entry:_start -map:$(BLD)\temacs.map -swaprun:net -swaprun:cd
+!else
+LINK_FLAGS      = $(LINK_FLAGS) $(ARCH_LDFLAGS) -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -debugtype:both -pdb:none -machine:$(ARCH) -subsystem:$(SUBSYSTEM) -entry:_start -map:$(BLD)\temacs.map -swaprun:net -swaprun:cd $(EXTRA_LINK)
+!endif
 
 #
 # Split up the objects into two sets so that we don't run out of
 # command line space when we link them into a library.
 #
+# Put emacs.obj in a separate lib, since we need to have firstfile.obj
+# as the "main" object file when linking.
+#
+OBJ0 =  $(BLD)\emacs.obj
+
 OBJ1 =  $(BLD)\abbrev.obj       \
        $(BLD)\alloc.obj        \
        $(BLD)\alloca.obj       \
+       $(BLD)\atimer.obj       \
        $(BLD)\buffer.obj       \
        $(BLD)\bytecode.obj     \
        $(BLD)\callint.obj      \
@@ -88,14 +116,14 @@ OBJ1 =  $(BLD)\abbrev.obj       \
        $(BLD)\lread.obj        \
        $(BLD)\macros.obj       \
        $(BLD)\marker.obj       \
-       $(BLD)\minibuf.obj      \
-       $(BLD)\mocklisp.obj
-
-OBJ2 =  $(BLD)\nt.obj           \
-       $(BLD)\ntheap.obj       \
-       $(BLD)\ntinevt.obj      \
-       $(BLD)\ntproc.obj       \
-       $(BLD)\ntterm.obj       \
+        $(BLD)\md5.obj          \
+       $(BLD)\minibuf.obj
+
+OBJ2 =  $(BLD)\w32.obj           \
+       $(BLD)\w32heap.obj       \
+       $(BLD)\w32inevt.obj      \
+       $(BLD)\w32proc.obj       \
+       $(BLD)\w32console.obj       \
        $(BLD)\print.obj        \
        $(BLD)\process.obj      \
        $(BLD)\regex.obj        \
@@ -107,7 +135,7 @@ OBJ2 =  $(BLD)\nt.obj           \
        $(BLD)\termcap.obj      \
        $(BLD)\tparam.obj       \
        $(BLD)\undo.obj         \
-       $(BLD)\unexnt.obj       \
+       $(BLD)\unexw32.obj       \
        $(BLD)\window.obj       \
        $(BLD)\xdisp.obj        \
        $(BLD)\casetab.obj      \
@@ -115,21 +143,29 @@ OBJ2 =  $(BLD)\nt.obj           \
        $(BLD)\frame.obj        \
        $(BLD)\gmalloc.obj      \
        $(BLD)\intervals.obj    \
+       $(BLD)\composite.obj    \
        $(BLD)\ralloc.obj       \
        $(BLD)\textprop.obj     \
        $(BLD)\vm-limit.obj     \
        $(BLD)\region-cache.obj \
-       $(BLD)\strftime.obj
+       $(BLD)\strftime.obj     \
+       $(BLD)\charset.obj      \
+       $(BLD)\coding.obj       \
+       $(BLD)\category.obj     \
+       $(BLD)\ccl.obj          \
+       $(BLD)\fontset.obj
 
 WIN32OBJ = $(BLD)\w32term.obj  \
           $(BLD)\w32xfns.obj   \
           $(BLD)\w32fns.obj    \
-          $(BLD)\w32faces.obj  \
+          $(BLD)\xfaces.obj    \
           $(BLD)\w32select.obj \
           $(BLD)\w32menu.obj   \
-          $(BLD)\w32reg.obj
+          $(BLD)\w32reg.obj    \
+          $(BLD)\w32bdf.obj
 
-LIBS =  $(TLIB1)       \
+LIBS =  $(TLIB0)       \
+       $(TLIB1)        \
        $(TLIB2)        \
 !IFDEF NTGUI
        $(TLIBW32)      \
@@ -139,49 +175,82 @@ LIBS =  $(TLIB1)  \
        gdi32.lib       \
        comdlg32.lib    \
 !ENDIF
+#      libcmt.lib      \
        $(BASE_LIBS)    \
        $(ADVAPI32)     \
        user32.lib      \
-       mpr.lib
+       mpr.lib         \
+       shell32.lib     \
+       setargv.obj
 
 #
 # Build the executable and dump it.
 #
-all:            $(BLD) $(EMACS) 
+all:            $(BLD) $(EMACS)
 
 #
 # Headers we would preprocess if we could.
 #
-PREPARED_HEADERS = config.h paths.h
+PREPARED_HEADERS = config.h epaths.h
 config.h:      ..\nt\$(CONFIG_H)
                $(CP) $** $@
-paths.h:       ..\nt\paths.h
+epaths.h:      ..\nt\paths.h
                $(CP) $** $@
 
 #
 # Make sure we have the DOC file in the right place.
 #
-DOC            = obj\etc\DOC-X
-$(DOC):;       cd ..\lib-src 
-               - del DOC-X
-               $(MAKE) -f makefile.nt all
+DOC            = $(OBJDIR)\etc\DOC-X
+$(DOC):;       cd ..\lib-src
+               - $(DEL) DOC-X
+               $(MAKE) $(MFLAGS) -f makefile.nt all
                cd ..\src
 
 #
 # The dumped executable
 #
 emacs:          $(EMACS)
-$(EMACS):       $(PREPARED_HEADERS) $(DOC) $(TEMACS)
-               cd $(BLD)
-               temacs.exe -batch -l loadup dump
-               cd ..\..
+$(EMACS):       $(DOC) $(TEMACS)
+               $(MAKEDIR)\$(BLD)\temacs.exe -batch -l loadup dump
 
 #
 # The undumped executable
+# Note the extra post-link step to insert a static preload heap section.
+# If preload runs out of memory, increase the last argument to addsection
+# (it is the preload heap size in MB).
 #
 temacs:         $(BLD) $(TEMACS)
-$(TEMACS):      $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
-               $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
+$(TEMACS):      $(PREPARED_HEADERS) $(TLIB0) $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
+               $(LINK) -out:$(TEMACS_TMP) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
+               ..\nt\$(BLD)\addsection $(TEMACS_TMP) $(TEMACS) EMHEAP 16
+
+bootstrap: bootstrap-emacs
+
+#
+# Build a temacs with a sufficiently large PURESIZE to load the
+# Lisp files from loadup.el in source form.
+#
+bootstrap-temacs: bootstrap-clean
+               $(MAKE) $(MFLAGS) -f makefile.nt temacs CFLAGS="$(CFLAGS) -DPURESIZE=5000000"
+
+#
+# Dump an Emacs executable named bootstrap-emacs containing the
+# files from loadup.el in source form.
+#
+bootstrap-emacs: bootstrap-temacs
+               $(MAKEDIR)\$(BLD)\temacs.exe -batch -l loadup bootstrap
+               - mkdir ..\bin
+               $(CP) $(EMACS) ..\bin
+
+#
+# Force recompile of files that depend on PURESIZE
+#
+bootstrap-clean:
+               - $(DEL) $(BLD)\alloc.obj
+               - $(DEL) $(BLD)\data.obj
+               - $(DEL) $(BLD)\intervals.obj
+               - $(DEL) $(BLD)\keyboard.obj
+               - $(DEL) $(BLD)\keymap.obj
 
 #
 # The resource file.  NT 3.10 requires the use of cvtres; even though
@@ -194,9 +263,11 @@ $(TRES):   ..\nt\emacs.rc
 !endif
 
 #
-# Build the library.  Split up the build into two phases...otherwise we 
+# Build the library.  Split up the build into two phases...otherwise we
 # run out of command line space.
 #
+$(TLIB0):       $(OBJ0)
+               @- $(AR) -out:$@ $**
 $(TLIB1):       $(OBJ1)
                @- $(AR) -out:$@ $**
 $(TLIB2):      $(OBJ2)
@@ -212,13 +283,7 @@ $(TLIBW32):        $(WIN32OBJ)
 # the end of Emacs' data section portably across compilers and systems.
 #
 $(TLASTLIB):   $(BLD)\lastfile.obj
-               @- $(AR) -out:$@ $**
-
-#
-# Object files.
-#
-.c{$(BLD)}.obj:
-               $(CC) $(CFLAGS) -Fo$@ $<
+               @- $(AR) -out:$@ $**
 
 #
 # Assuming INSTALL_DIR is defined, build and install emacs in it.
@@ -229,17 +294,21 @@ install:        all
 
 #
 # Maintenance
-# 
-clean:;         - del *~ *.pdb config.h paths.h
+#
+clean:;         - $(DEL) *~ s\*~
+               - $(DEL) *.pdb config.h epaths.h
+               - $(DEL) *.orig *.rej *.crlf
+               - $(DEL) s\*.orig s\*.rej s\*.crlf
                - $(DEL_TREE) deleted
                - $(DEL_TREE) obj
+               - $(DEL_TREE) obj-spd
 
 #
 # These files are the ones that compile conditionally on CANNOT_DUMP...
 # this target is mostly used for debugging.
 #
 cleandump:;     cd $(BLD)
-               - del callproc.obj data.obj dispnew.obj doc.obj editfns.obj emacs.obj lread.obj process.obj sysdep.obj term.obj ntheap.obj unexnt.obj
+               - $(DEL) callproc.obj data.obj dispnew.obj doc.obj editfns.obj emacs.obj lread.obj process.obj sysdep.obj term.obj w32heap.obj unexw32.obj
                cd ..\..
 
 
@@ -250,22 +319,22 @@ SRC               = .
 
 $(BLD)\abbrev.obj : \
        $(SRC)\abbrev.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h
 
 $(BLD)\alloc.obj : \
        $(SRC)\alloc.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\puresize.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h \
@@ -275,23 +344,38 @@ $(BLD)\alloc.obj : \
 
 $(BLD)\alloca.obj : \
        $(SRC)\alloca.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\s\ms-w32.h \
+       $(SRC)\m\intel386.h \
+       $(SRC)\config.h \
+       $(SRC)\blockinput.h
+
+$(BLD)\atimer.obj : \
+       $(SRC)\atimer.c \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\s\windowsnt.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
+       $(SRC)\atimer.h \
+       $(SRC)\syssignal.h \
+       $(SRC)\systime.h \
        $(SRC)\blockinput.h
 
 $(BLD)\buffer.obj : \
        $(SRC)\buffer.c \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
+       $(SRC)\frame.h \
        $(SRC)\window.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
@@ -301,27 +385,29 @@ $(BLD)\buffer.obj : \
 
 $(BLD)\bytecode.obj : \
        $(SRC)\bytecode.c \
-       $(SRC)\lisp.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
        $(SRC)\buffer.h \
        $(SRC)\syntax.h
 
 $(BLD)\callint.obj : \
        $(SRC)\callint.c \
-       $(SRC)\lisp.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
        $(SRC)\buffer.h \
        $(SRC)\commands.h \
        $(SRC)\keyboard.h \
-       $(SRC)\window.h \
-       $(SRC)\mocklisp.h
+       $(SRC)\window.h
 
 $(BLD)\callproc.obj : \
        $(SRC)\callproc.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\msdos.h \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\process.h \
@@ -332,10 +418,9 @@ $(BLD)\callproc.obj : \
 
 $(BLD)\casefiddle.obj : \
        $(SRC)\casefiddle.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\commands.h \
        $(SRC)\syntax.h
@@ -343,15 +428,14 @@ $(BLD)\casefiddle.obj : \
 
 $(BLD)\casetab.obj : \
        $(SRC)\casetab.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h
 
 $(BLD)\cm.obj : \
        $(SRC)\cm.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\cm.h \
@@ -359,42 +443,47 @@ $(BLD)\cm.obj : \
 
 $(BLD)\cmds.obj : \
        $(SRC)\cmds.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\syntax.h
 
+$(BLD)\composite.obj : \
+       $(SRC)\composite.c \
+       $(SRC)\buffer.h \
+       $(SRC)\charset.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h
+
 $(BLD)\data.obj : \
        $(SRC)\data.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\puresize.h \
        $(SRC)\buffer.h \
        $(SRC)\syssignal.h
 
 $(BLD)\dired.obj : \
        $(SRC)\dired.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\vmsdir.h \
        $(SRC)\ndir.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\commands.h \
        $(SRC)\regex.h
 
 $(BLD)\dispnew.obj : \
        $(SRC)\dispnew.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\termchar.h \
        $(SRC)\termopts.h \
        $(SRC)\termhooks.h \
@@ -407,36 +496,35 @@ $(BLD)\dispnew.obj : \
        $(SRC)\indent.h \
        $(SRC)\dispextern.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
        $(SRC)\w32term.h \
+       $(SRC)\w32gui.h \
        $(SRC)\xterm.h \
-       $(SRC)\vmstime.h \
        $(SRC)\systime.h
 
 $(BLD)\doc.obj : \
        $(SRC)\doc.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\keyboard.h
 
 $(BLD)\doprnt.obj : \
        $(SRC)\doprnt.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h
 
 $(BLD)\dosfns.obj : \
        $(SRC)\dosfns.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\termchar.h \
        $(SRC)\termhooks.h \
@@ -446,29 +534,29 @@ $(BLD)\dosfns.obj : \
 
 $(BLD)\editfns.obj : \
        $(SRC)\editfns.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\uaf.h \
-       $(SRC)\vms-pwd.h \
        $(EMACS_ROOT)\nt\inc\pwd.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h \
-       $(SRC)\vmstime.h \
        $(SRC)\systime.h
 
 $(BLD)\emacs.obj : \
        $(SRC)\emacs.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
@@ -477,84 +565,84 @@ $(BLD)\emacs.obj : \
 
 $(BLD)\eval.obj : \
        $(SRC)\eval.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\blockinput.h \
        $(SRC)\commands.h \
        $(SRC)\keyboard.h
 
 $(BLD)\fileio.obj : \
        $(SRC)\fileio.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\uaf.h \
-       $(SRC)\vms-pwd.h \
        $(EMACS_ROOT)\nt\inc\pwd.h \
        $(SRC)\msdos.h \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
-       $(SRC)\vmsdir.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
-       $(SRC)\vmstime.h \
        $(SRC)\systime.h
 
 $(BLD)\filelock.obj : \
        $(SRC)\filelock.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\uaf.h \
-       $(SRC)\vms-pwd.h \
        $(EMACS_ROOT)\nt\inc\pwd.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
-       $(SRC)\lisp.h \
-       $(EMACS_ROOT)\src\paths.h \
+       $(EMACS_ROOT)\src\epaths.h \
        $(SRC)\buffer.h \
-       $(SRC)\vmsdir.h \
        $(SRC)\ndir.h
 
 $(BLD)\filemode.obj : \
        $(SRC)\filemode.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\s\windowsnt.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h
 
+$(BLD)\firstfile.obj : \
+       $(SRC)\firstfile.c \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h
+
 $(BLD)\floatfns.obj : \
        $(SRC)\floatfns.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\syssignal.h
 
 $(BLD)\fns.obj : \
        $(SRC)\fns.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\keyboard.h \
        $(SRC)\dispextern.h \
-       $(SRC)\intervals.h
+       $(SRC)\w32gui.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h \
+        $(SRC)\md5.h
 
 $(BLD)\frame.obj : \
        $(SRC)\frame.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\frame.h \
        $(SRC)\termhooks.h \
        $(SRC)\window.h \
@@ -565,17 +653,17 @@ $(BLD)\frame.obj : \
 $(BLD)\getloadavg.obj : \
        $(SRC)\getloadavg.c \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\s\windowsnt.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h
 
 $(BLD)\gmalloc.obj : \
        $(SRC)\gmalloc.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
@@ -584,17 +672,16 @@ $(BLD)\gmalloc.obj : \
 
 $(BLD)\hftctl.obj : \
        $(SRC)\hftctl.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h
 
 $(BLD)\indent.obj : \
        $(SRC)\indent.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\indent.h \
        $(SRC)\frame.h \
@@ -603,41 +690,44 @@ $(BLD)\indent.obj : \
        $(SRC)\termopts.h \
        $(SRC)\disptab.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
-       $(SRC)\region-cache.h
+       $(SRC)\region-cache.h \
+       $(SRC)\composite.h
 
 $(BLD)\insdel.obj : \
        $(SRC)\insdel.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h \
        $(SRC)\blockinput.h
 
 $(BLD)\intervals.obj : \
        $(SRC)\intervals.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
+       $(SRC)\keyboard.h \
        $(SRC)\buffer.h \
        $(SRC)\puresize.h
-       $(CC) $(CFLAGS) -Fo$@ intervals.c
 
 $(BLD)\keyboard.obj : \
        $(SRC)\keyboard.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\termchar.h \
        $(SRC)\termopts.h \
-       $(SRC)\lisp.h \
        $(SRC)\termhooks.h \
        $(SRC)\macros.h \
        $(SRC)\frame.h \
@@ -648,6 +738,7 @@ $(BLD)\keyboard.obj : \
        $(SRC)\keyboard.h \
        $(SRC)\dispextern.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\blockinput.h \
        $(SRC)\msdos.h \
        $(SRC)\syssignal.h \
@@ -655,16 +746,16 @@ $(BLD)\keyboard.obj : \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
        $(SRC)\w32term.h \
+       $(SRC)\w32gui.h \
        $(SRC)\xterm.h \
-       $(SRC)\vmstime.h \
-       $(SRC)\systime.h
+       $(SRC)\systime.h \
+       $(SRC)\atimer.h
 
 $(BLD)\keymap.obj : \
        $(SRC)\keymap.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\keyboard.h \
@@ -672,17 +763,19 @@ $(BLD)\keymap.obj : \
        $(SRC)\blockinput.h
 
 $(BLD)\lastfile.obj : \
-       $(SRC)\lastfile.c
+       $(SRC)\lastfile.c \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h
 
 $(BLD)\lread.obj : \
        $(SRC)\lread.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
-       $(EMACS_ROOT)\src\paths.h \
+       $(EMACS_ROOT)\src\epaths.h \
        $(SRC)\commands.h \
        $(SRC)\keyboard.h \
        $(SRC)\termhooks.h \
@@ -690,10 +783,9 @@ $(BLD)\lread.obj : \
 
 $(BLD)\macros.obj : \
        $(SRC)\macros.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\macros.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
@@ -701,97 +793,96 @@ $(BLD)\macros.obj : \
 
 $(BLD)\marker.obj : \
        $(SRC)\marker.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h
 
+$(BLD)\md5.obj : \
+        $(SRC)\md5.c \
+        $(SRC)\md5.h
+
 $(BLD)\minibuf.obj : \
        $(SRC)\minibuf.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\frame.h \
        $(SRC)\window.h \
        $(SRC)\syntax.h
 
-$(BLD)\mocklisp.obj : \
-       $(SRC)\mocklisp.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
-       $(EMACS_ROOT)\src\m\intel386.h \
-       $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
-       $(SRC)\buffer.h
-
-$(BLD)\nt.obj : \
-       $(SRC)\nt.c \
-       $(SRC)\s\windowsnt.h \
+$(BLD)\w32.obj : \
+       $(SRC)\w32.c \
+       $(SRC)\w32.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
-       $(SRC)\lisp.h \
        $(EMACS_ROOT)\nt\inc\pwd.h \
-       $(SRC)\ntheap.h
+       $(SRC)\w32heap.h
 
-$(BLD)\ntheap.obj : \
-       $(SRC)\ntheap.c \
-       $(SRC)\ntheap.h
+$(BLD)\w32heap.obj : \
+       $(SRC)\w32heap.c \
+       $(SRC)\w32heap.h \
+       $(SRC)\s\ms-w32.h \
+       $(SRC)\m\intel386.h \
+       $(SRC)\config.h
 
-$(BLD)\ntinevt.obj : \
-       $(SRC)\ntinevt.c \
-       $(SRC)\s\windowsnt.h \
+$(BLD)\w32inevt.obj : \
+       $(SRC)\w32inevt.c \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\frame.h \
        $(SRC)\blockinput.h \
-       $(SRC)\termhooks.h
+       $(SRC)\termhooks.h \
+       $(SRC)\w32heap.h \
+       $(SRC)\w32term.h \
+       $(SRC)\w32gui.h
 
-$(BLD)\ntproc.obj : \
-       $(SRC)\ntproc.c \
-       $(SRC)\s\windowsnt.h \
+$(BLD)\w32proc.obj : \
+       $(SRC)\w32proc.c \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
-       $(SRC)\lisp.h \
-       $(SRC)\nt.h \
-       $(SRC)\vmstime.h \
+       $(SRC)\w32.h \
+       $(SRC)\w32heap.h \
        $(SRC)\systime.h
 
-$(BLD)\ntterm.obj : \
-       $(SRC)\ntterm.c \
-       $(SRC)\s\windowsnt.h \
+$(BLD)\w32console.obj : \
+       $(SRC)\w32console.c \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\frame.h \
        $(SRC)\disptab.h \
        $(SRC)\termhooks.h \
-       $(SRC)\ntinevt.h
+       $(SRC)\w32inevt.h
 
 $(BLD)\prefix-args.obj : \
        $(SRC)\prefix-args.c
 
 $(BLD)\print.obj : \
        $(SRC)\print.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\frame.h \
        $(SRC)\window.h \
        $(SRC)\process.h \
        $(SRC)\termchar.h \
        $(SRC)\dispextern.h \
-       $(SRC)\intervals.h
+       $(SRC)\w32gui.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h
 
 $(BLD)\process.obj : \
        $(SRC)\process.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
@@ -804,20 +895,18 @@ $(BLD)\process.obj : \
        $(SRC)\commands.h \
        $(SRC)\frame.h \
        $(SRC)\syssignal.h \
-       $(SRC)\vmsproc.h \
        $(SRC)\syswait.h \
-       $(SRC)\lisp.h \
-       $(SRC)\vmstime.h \
        $(SRC)\systime.h \
-       $(SRC)\termopts.h
+       $(SRC)\termopts.h \
+       $(SRC)\composite.h \
+       $(SRC)\atimer.h
 
 $(BLD)\ralloc.obj : \
        $(SRC)\ralloc.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
-       $(SRC)\s\windowsnt.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
        $(EMACS_ROOT)\nt\inc\sys\param.h \
@@ -825,82 +914,68 @@ $(BLD)\ralloc.obj : \
 
 $(BLD)\regex.obj : \
        $(SRC)\regex.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\s\windowsnt.h \
+       $(SRC)\s\ms-w32.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\syntax.h \
        $(SRC)\regex.h
 
 $(BLD)\region-cache.obj : \
        $(SRC)\region-cache.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\region-cache.h
 
 $(BLD)\scroll.obj : \
        $(SRC)\scroll.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\termchar.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\frame.h
 
 $(BLD)\search.obj : \
        $(SRC)\search.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\syntax.h \
        $(SRC)\buffer.h \
        $(SRC)\commands.h \
        $(SRC)\blockinput.h \
        $(SRC)\regex.h \
-       $(SRC)\region-cache.h
+       $(SRC)\region-cache.h \
+       $(SRC)\composite.h
 
 $(BLD)\strftime.obj : \
        $(SRC)\strftime.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h
-       $(CC) $(CFLAGS) -Dstrftime=emacs_strftime -Fo$@ strftime.c
-
-$(BLD)\sunfns.obj : \
-       $(SRC)\sunfns.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
-       $(EMACS_ROOT)\src\m\intel386.h \
-       $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
-       $(SRC)\window.h \
-       $(SRC)\buffer.h \
-       $(SRC)\termhooks.h
 
 $(BLD)\syntax.obj : \
        $(SRC)\syntax.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\commands.h \
        $(SRC)\buffer.h \
-       $(SRC)\syntax.h
+       $(SRC)\syntax.h \
+       $(SRC)\composite.h
 
 $(BLD)\sysdep.obj : \
        $(SRC)\sysdep.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\blockinput.h \
        $(SRC)\dosfns.h \
        $(SRC)\msdos.h \
@@ -909,7 +984,6 @@ $(BLD)\sysdep.obj : \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
-       $(SRC)\vmsproc.h \
        $(SRC)\syswait.h \
        $(SRC)\frame.h \
        $(SRC)\window.h \
@@ -917,34 +991,32 @@ $(BLD)\sysdep.obj : \
        $(SRC)\termchar.h \
        $(SRC)\termopts.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\process.h \
-       $(SRC)\vmsdir.h \
        $(SRC)\ndir.h \
        $(SRC)\syssignal.h \
-       $(SRC)\vmstime.h \
        $(SRC)\systime.h \
        $(SRC)\uaf.h \
-       $(SRC)\vms-pwd.h \
        $(EMACS_ROOT)\src\acldef.h \
        $(EMACS_ROOT)\src\chpdef.h
 
 $(BLD)\term.obj : \
        $(SRC)\term.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\termchar.h \
        $(SRC)\termopts.h \
        $(SRC)\cm.h \
-       $(SRC)\lisp.h \
        $(SRC)\frame.h \
        $(SRC)\disptab.h \
+       $(SRC)/dispextern.h \
        $(SRC)\termhooks.h \
        $(SRC)\keyboard.h
 
 $(BLD)\termcap.obj : \
        $(SRC)\termcap.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h
@@ -954,59 +1026,61 @@ $(BLD)\terminfo.obj : \
 
 $(BLD)\textprop.obj : \
        $(SRC)\textprop.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\intervals.h \
+       $(SRC)\composite.h \
        $(SRC)\buffer.h \
        $(SRC)\window.h
 
 $(BLD)\tparam.obj : \
        $(SRC)\tparam.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h
 
 $(BLD)\undo.obj : \
        $(SRC)\undo.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\commands.h
 
-$(BLD)\unexnt.obj : \
-       $(SRC)\unexnt.c \
-       $(SRC)\ntheap.h
+$(BLD)\unexw32.obj : \
+       $(SRC)\unexw32.c \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32heap.h
 
 $(BLD)\vm-limit.obj : \
        $(SRC)\vm-limit.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\mem-limits.h     
+       $(SRC)\mem-limits.h
 
 $(BLD)\widget.obj : \
        $(SRC)\widget.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\xterm.h \
        $(SRC)\frame.h \
        $(SRC)\dispextern.h \
+       $(SRC)\w32gui.h \
        $(SRC)\widget.h \
        $(SRC)\widgetprv.h
 
 $(BLD)\window.obj : \
        $(SRC)\window.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\buffer.h \
        $(SRC)\frame.h \
        $(SRC)\window.h \
@@ -1014,14 +1088,14 @@ $(BLD)\window.obj : \
        $(SRC)\indent.h \
        $(SRC)\termchar.h \
        $(SRC)\disptab.h \
-       $(SRC)\keyboard.h
+       $(SRC)\keyboard.h \
+       $(SRC)\composite.h
 
 $(BLD)\xdisp.obj : \
        $(SRC)\xdisp.c \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\lisp.h \
        $(SRC)\frame.h \
        $(SRC)\window.h \
        $(SRC)\termchar.h \
@@ -1032,78 +1106,125 @@ $(BLD)\xdisp.obj : \
        $(SRC)\disptab.h \
        $(SRC)\termhooks.h \
        $(SRC)\dispextern.h \
-       $(SRC)\intervals.h
+       $(SRC)\w32gui.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h
 
-$(BLD)\w32faces.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+$(BLD)\xfaces.obj: \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
-       $(SRC)\w32faces.c \
-       $(SRC)\dispextern.h \
-       $(SRC)\frame.h \
+       $(SRC)\xfaces.c \
+       $(SRC)\charset.h \
+       $(SRC)\fontset.h \
        $(SRC)\w32term.h \
-       $(SRC)\win32.h \
+       $(SRC)\w32gui.h \
        $(SRC)\buffer.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\frame.h \
        $(SRC)\blockinput.h \
-       $(SRC)\window.h
+       $(SRC)\window.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h
 
 $(BLD)\w32fns.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\w32fns.c \
-       $(SRC)\dispextern.h \
-       $(SRC)\frame.h \
        $(SRC)\w32term.h \
-       $(SRC)\win32.h \
+       $(SRC)\w32gui.h \
+       $(SRC)\frame.h \
+       $(SRC)\window.h \
        $(SRC)\buffer.h \
+       $(SRC)\charset.h \
+       $(SRC)\coding.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\keyboard.h \
        $(SRC)\blockinput.h \
-       $(SRC)\window.h
+       $(SRC)\epaths.h \
+       $(SRC)\w32heap.h \
+       $(SRC)\termhooks.h
 
 $(BLD)\w32menu.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\w32menu.c \
-       $(SRC)\dispextern.h \
+       $(SRC)\termhooks.h \
        $(SRC)\frame.h \
-       $(SRC)\w32term.h \
-       $(SRC)\win32.h \
-       $(SRC)\buffer.h \
+       $(SRC)\window.h \
+       $(SRC)\keyboard.h \
        $(SRC)\blockinput.h \
-       $(SRC)\window.h
+       $(SRC)\buffer.h \
+       $(SRC)\charset.h \
+       $(SRC)\coding.h
 
 $(BLD)\w32term.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\w32term.c \
-       $(SRC)\dispextern.h \
-       $(SRC)\frame.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\w32heap.h \
        $(SRC)\w32term.h \
-       $(SRC)\win32.h \
+       $(SRC)\w32gui.h \
+       $(SRC)\systty.h \
+       $(SRC)\systime.h \
+       $(SRC)\frame.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\termhooks.h \
+       $(SRC)\termopts.h \
+       $(SRC)\termchar.h \
+       $(SRC)\gnu.h \
+       $(SRC)\disptab.h \
        $(SRC)\buffer.h \
-       $(SRC)\blockinput.h \
-       $(SRC)\window.h
+       $(SRC)\window.h \
+       $(SRC)\keyboard.h \
+       $(SRC)\intervals.h \
+       $(SRC)\composite.h \
+       $(SRC)\atimer.h
 
 $(BLD)\w32select.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\w32select.c \
+       $(SRC)\w32term.h \
+       $(SRC)\w32gui.h \
        $(SRC)\dispextern.h \
        $(SRC)\frame.h \
-       $(SRC)\w32term.h \
-       $(SRC)\win32.h \
        $(SRC)\blockinput.h
 
 $(BLD)\w32reg.obj: \
-       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
        $(EMACS_ROOT)\src\m\intel386.h \
        $(EMACS_ROOT)\src\config.h \
        $(SRC)\w32reg.c \
-       $(SRC)\dispextern.h \
+       $(SRC)\w32term.h \
+       $(SRC)\w32gui.h \
+       $(SRC)\blockinput.h
+
+$(BLD)\w32xfns.obj: \
+       $(EMACS_ROOT)\src\s\ms-w32.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32xfns.c \
+
+$(BLD)\w32bdf.obj: \
+       $(EMACS_ROOT)\src/s\ms-w32.h \
+       $(EMACS_ROOT)\src/m\intel386.h \
+       $(EMACS_ROOT)\src/config.h \
+       $(SRC)\w32bdf.c \
+       $(SRC)\charset.h \
        $(SRC)\frame.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\fontset.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\w32gui.h \
        $(SRC)\w32term.h \
-       $(SRC)\win32.h \
+       $(SRC)\w32gui.h \
+       $(SRC)\w32bdf.h \
+       $(SRC)\w32.h \
+       $(SRC)\frame.h \
        $(SRC)\blockinput.h