Consolidate redundant definitions in s/bsd-common.h.
[bpt/emacs.git] / src / makefile.w32-in
index dd70de6..156eddd 100644 (file)
@@ -1,24 +1,22 @@
-#  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-#  Copyright (C) 2000, 2001, 2002, 2003, 2004,
-#                2005, 2006, 2007 Free Software Foundation, Inc.
-#
-#  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 3, 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, Inc., 51 Franklin Street, Fifth Floor,
-#  Boston, MA 02110-1301, USA.
-#
+# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#   2008, 2009, 2010  Free Software Foundation, Inc.
+
+# 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 3 of the License, 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.  If not, see <http://www.gnu.org/licenses/>.
+
 
 ALL = emacs
 
@@ -31,8 +29,9 @@ EMACSLOADPATH=$(CURDIR)/../lisp
 # 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 -D_UCHAR_T -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
+LOCAL_FLAGS     = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS)
 
+SRC             = .
 EMACS           = $(BLD)/emacs.exe
 TEMACS          = $(BLD)/temacs.exe
 TEMACS_TMP      = $(BLD)/temacs.bin
@@ -45,7 +44,7 @@ TLASTLIB      = $(BLD)/lastfile.$(A)
 
 DOC            = $(OBJDIR)/etc/DOC-X
 
-FULL_LINK_FLAGS      = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
+FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
 
 #
 # Split up the objects into two sets so that we don't run out of
@@ -56,84 +55,88 @@ FULL_LINK_FLAGS      = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)
 #
 OBJ0 =  $(BLD)/emacs.$(O)
 
-OBJ1 =  $(BLD)/abbrev.$(O)                     \
-       $(BLD)/alloc.$(O)                       \
-       $(BLD)/atimer.$(O)                      \
-       $(BLD)/buffer.$(O)                      \
-       $(BLD)/bytecode.$(O)                    \
-       $(BLD)/callint.$(O)                     \
-       $(BLD)/callproc.$(O)                    \
-       $(BLD)/casefiddle.$(O)                  \
-       $(BLD)/cm.$(O)                          \
-       $(BLD)/cmds.$(O)                        \
-       $(BLD)/data.$(O)                        \
-       $(BLD)/dired.$(O)                       \
-       $(BLD)/dispnew.$(O)                     \
-       $(BLD)/doc.$(O)                         \
-       $(BLD)/doprnt.$(O)                      \
-       $(BLD)/editfns.$(O)                     \
-       $(BLD)/eval.$(O)                        \
-       $(BLD)/fileio.$(O)                      \
-       $(BLD)/filelock.$(O)                    \
-       $(BLD)/filemode.$(O)                    \
-       $(BLD)/fns.$(O)                         \
-       $(BLD)/indent.$(O)                      \
-       $(BLD)/insdel.$(O)                      \
-       $(BLD)/keyboard.$(O)                    \
-       $(BLD)/keymap.$(O)                      \
-       $(BLD)/lread.$(O)                       \
-       $(BLD)/macros.$(O)                      \
-       $(BLD)/marker.$(O)                      \
-       $(BLD)/md5.$(O)                         \
-       $(BLD)/minibuf.$(O)                     \
-       $(BLD)/w32.$(O)                         \
-       $(BLD)/w32heap.$(O)                     \
-       $(BLD)/w32inevt.$(O)                    \
-       $(BLD)/w32proc.$(O)                     \
-       $(BLD)/w32console.$(O)                  \
-       $(BLD)/print.$(O)                       \
-       $(BLD)/process.$(O)                     \
-       $(BLD)/regex.$(O)                       \
-       $(BLD)/scroll.$(O)                      \
-       $(BLD)/search.$(O)                      \
-       $(BLD)/sound.$(O)                       \
-       $(BLD)/syntax.$(O)                      \
-       $(BLD)/sysdep.$(O)                      \
-       $(BLD)/term.$(O)                        \
-       $(BLD)/termcap.$(O)                     \
-       $(BLD)/tparam.$(O)                      \
-       $(BLD)/undo.$(O)                        \
-       $(BLD)/unexw32.$(O)                     \
-       $(BLD)/window.$(O)                      \
-       $(BLD)/xdisp.$(O)                       \
-       $(BLD)/casetab.$(O)                     \
-       $(BLD)/floatfns.$(O)                    \
-       $(BLD)/frame.$(O)                       \
-       $(BLD)/gmalloc.$(O)                     \
-       $(BLD)/intervals.$(O)                   \
-       $(BLD)/composite.$(O)                   \
-       $(BLD)/ralloc.$(O)                      \
-       $(BLD)/textprop.$(O)                    \
-       $(BLD)/vm-limit.$(O)                    \
-       $(BLD)/region-cache.$(O)                \
-       $(BLD)/strftime.$(O)                    \
-       $(BLD)/charset.$(O)                     \
-       $(BLD)/coding.$(O)                      \
-       $(BLD)/category.$(O)                    \
-       $(BLD)/ccl.$(O)                         \
-       $(BLD)/fontset.$(O)                     \
-       $(BLD)/fringe.$(O)                      \
-       $(BLD)/image.$(O)                       \
-       $(BLD)/terminal.$(O)
-
-WIN32OBJ = $(BLD)/w32term.$(O)                 \
-          $(BLD)/w32xfns.$(O)                  \
-          $(BLD)/w32fns.$(O)                   \
-          $(BLD)/xfaces.$(O)                   \
-          $(BLD)/w32select.$(O)                \
-          $(BLD)/w32menu.$(O)                  \
-          $(BLD)/w32reg.$(O)                   \
-          $(BLD)/w32bdf.$(O)
+OBJ1 =  $(BLD)/alloc.$(O)              \
+       $(BLD)/atimer.$(O)              \
+       $(BLD)/buffer.$(O)              \
+       $(BLD)/bytecode.$(O)            \
+       $(BLD)/callint.$(O)             \
+       $(BLD)/callproc.$(O)            \
+       $(BLD)/casefiddle.$(O)          \
+       $(BLD)/cm.$(O)                  \
+       $(BLD)/cmds.$(O)                \
+       $(BLD)/data.$(O)                \
+       $(BLD)/dired.$(O)               \
+       $(BLD)/dispnew.$(O)             \
+       $(BLD)/doc.$(O)                 \
+       $(BLD)/doprnt.$(O)              \
+       $(BLD)/editfns.$(O)             \
+       $(BLD)/eval.$(O)                \
+       $(BLD)/fileio.$(O)              \
+       $(BLD)/filelock.$(O)            \
+       $(BLD)/filemode.$(O)            \
+       $(BLD)/fns.$(O)                 \
+       $(BLD)/indent.$(O)              \
+       $(BLD)/insdel.$(O)              \
+       $(BLD)/keyboard.$(O)            \
+       $(BLD)/keymap.$(O)              \
+       $(BLD)/lread.$(O)               \
+       $(BLD)/macros.$(O)              \
+       $(BLD)/marker.$(O)              \
+       $(BLD)/md5.$(O)                 \
+       $(BLD)/minibuf.$(O)             \
+       $(BLD)/w32.$(O)                 \
+       $(BLD)/w32heap.$(O)             \
+       $(BLD)/w32inevt.$(O)            \
+       $(BLD)/w32proc.$(O)             \
+       $(BLD)/w32console.$(O)          \
+       $(BLD)/print.$(O)               \
+       $(BLD)/process.$(O)             \
+       $(BLD)/regex.$(O)               \
+       $(BLD)/scroll.$(O)              \
+       $(BLD)/search.$(O)              \
+       $(BLD)/sound.$(O)               \
+       $(BLD)/syntax.$(O)              \
+       $(BLD)/sysdep.$(O)              \
+       $(BLD)/term.$(O)                \
+       $(BLD)/termcap.$(O)             \
+       $(BLD)/tparam.$(O)              \
+       $(BLD)/undo.$(O)                \
+       $(BLD)/unexw32.$(O)             \
+       $(BLD)/window.$(O)              \
+       $(BLD)/xdisp.$(O)               \
+       $(BLD)/casetab.$(O)             \
+       $(BLD)/floatfns.$(O)            \
+       $(BLD)/frame.$(O)               \
+       $(BLD)/gmalloc.$(O)             \
+       $(BLD)/intervals.$(O)           \
+       $(BLD)/composite.$(O)           \
+       $(BLD)/ralloc.$(O)              \
+       $(BLD)/textprop.$(O)            \
+       $(BLD)/vm-limit.$(O)            \
+       $(BLD)/region-cache.$(O)        \
+       $(BLD)/strftime.$(O)            \
+       $(BLD)/charset.$(O)             \
+       $(BLD)/character.$(O)           \
+       $(BLD)/chartab.$(O)             \
+       $(BLD)/coding.$(O)              \
+       $(BLD)/category.$(O)            \
+       $(BLD)/ccl.$(O)                 \
+       $(BLD)/font.$(O)                \
+       $(BLD)/fontset.$(O)             \
+       $(BLD)/fringe.$(O)              \
+       $(BLD)/image.$(O)               \
+       $(BLD)/terminal.$(O)            \
+        $(BLD)/menu.$(O)
+
+WIN32OBJ = $(BLD)/w32term.$(O)         \
+          $(BLD)/w32xfns.$(O)          \
+          $(BLD)/w32fns.$(O)           \
+          $(BLD)/xfaces.$(O)           \
+          $(BLD)/w32select.$(O)        \
+          $(BLD)/w32menu.$(O)          \
+          $(BLD)/w32reg.$(O)
+
+FONTOBJ = $(BLD)/w32font.$(O) $(BLD)/w32uniscribe.$(O)
 
 LIBS =  $(TLIB0)       \
        $(TLIB1)        \
@@ -144,11 +147,12 @@ LIBS =  $(TLIB0)  \
        $(GDI32)        \
        $(COMDLG32)     \
        $(USER32)       \
-       $(MPR)          \
+       $(MPR)  \
        $(SHELL32)      \
        $(WINSPOOL)     \
        $(OLE32)        \
        $(COMCTL32)     \
+       $(UNISCRIBE)    \
        $(libc)
 
 #
@@ -174,10 +178,30 @@ temacs:         stamp_BLD $(TEMACS)
 $(TEMACS):      $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
                  ../nt/$(BLD)/addsection.exe
        $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
-       "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16
-       echo $(OBJ0) > $(BLD)/buildobj.lst
-       echo $(OBJ1) >> $(BLD)/buildobj.lst
-       echo $(WIN32OBJ) >> $(BLD)/buildobj.lst
+       "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21
+
+# These omit firstfile.${O}, but there's no documentation in there
+# anyways.
+buildobj.h: $(SRC)/makefile.w32-in
+       $(MAKE) $(MFLAGS) make-buildobj-$(SHELLTYPE)
+
+# Cannot have blanks between the backslash and the redirection
+# characters, because CMD's `echo' will put them in buildobj.h.
+make-buildobj-CMD:
+       echo #define BUILDOBJ ^"\> buildobj.h
+       echo $(OBJ0)            \>> buildobj.h
+       echo $(OBJ1)            \>> buildobj.h
+       echo $(WIN32OBJ)        \>> buildobj.h
+       echo $(FONTOBJ)         \>> buildobj.h
+       echo ^">> buildobj.h
+
+make-buildobj-SH:
+       echo '#define BUILDOBJ $(DQUOTE)\'  > buildobj.h
+       echo $(OBJ0)                   '\' >> buildobj.h
+       echo $(OBJ1)                   '\' >> buildobj.h
+       echo $(WIN32OBJ)               '\' >> buildobj.h
+       echo $(FONTOBJ)                '\' >> buildobj.h
+       echo '$(DQUOTE)'                   >> buildobj.h
 
 bootstrap: bootstrap-emacs
 
@@ -226,7 +250,7 @@ $(TLIB0):       $(OBJ0)
 $(TLIB1):       $(OBJ1)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
-$(TLIBW32):    $(WIN32OBJ)
+$(TLIBW32):    $(WIN32OBJ) $(FONTOBJ)
        - $(DEL) $@
        $(AR) $(AR_OUT)$@ $(ALL_DEPS)
 
@@ -256,9 +280,13 @@ clean:
        - $(DEL) $(COMPILER_TEMP_FILES)
        - $(DEL_TREE) $(OBJDIR)
        - $(DEL) stamp_BLD
+       - $(DEL) buildobj.h
+
+distclean:     cleanall
+       - $(DEL) config.h epaths.h Makefile
 
-distclean:     clean
-       - $(DEL) config.h epaths.h
+maintainer-clean: distclean
+       - $(DEL) TAGS
 
 cleanall:      clean
        - $(DEL_TREE) obj
@@ -268,31 +296,23 @@ cleanall: clean
 
 ### DEPENDENCIES ###
 
-EMACS_ROOT     = ..
-SRC            = .
-
-$(BLD)/abbrev.$(O) : \
-       $(SRC)/abbrev.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/buffer.h \
-       $(SRC)/charset.h \
-       $(SRC)/commands.h \
-       $(SRC)/dispextern.h \
-       $(SRC)/syntax.h \
-       $(SRC)/w32bdf.h \
-       $(SRC)/w32gui.h \
-       $(SRC)/window.h
+EMACS_ROOT = ..
+CONFIG_H   = $(EMACS_ROOT)/src/s/ms-w32.h \
+            $(EMACS_ROOT)/src/m/intel386.h \
+            $(EMACS_ROOT)/src/config.h \
+            $(EMACS_ROOT)/nt/inc/sys/stat.h
 
 $(BLD)/alloc.$(O) : \
        $(SRC)/alloc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
@@ -301,18 +321,18 @@ $(BLD)/alloc.$(O) : \
        $(SRC)/process.h \
        $(SRC)/puresize.h \
        $(SRC)/syssignal.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
+       $(SRC)/termhooks.h \
+       $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/atimer.$(O) : \
        $(SRC)/atimer.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/syssignal.h \
@@ -320,13 +340,16 @@ $(BLD)/atimer.$(O) : \
 
 $(BLD)/buffer.$(O) : \
        $(SRC)/buffer.c \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -336,63 +359,69 @@ $(BLD)/buffer.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/region-cache.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/bytecode.$(O) : \
        $(SRC)/bytecode.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/dispextern.h \
        $(SRC)/syntax.h \
+       $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/callint.$(O) : \
        $(SRC)/callint.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/callproc.$(O) : \
        $(SRC)/callproc.c \
-       $(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 \
-       $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/epaths.h \
+       $(SRC)/frame.h \
        $(SRC)/process.h \
        $(SRC)/syssignal.h \
+       $(SRC)/systime.h \
        $(SRC)/systty.h \
-       $(SRC)/frame.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32.h
+       $(SRC)/w32.h \
+       $(SRC)/w32gui.h
 
 $(BLD)/casefiddle.$(O) : \
        $(SRC)/casefiddle.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/keymap.h \
@@ -400,137 +429,177 @@ $(BLD)/casefiddle.$(O) : \
 
 $(BLD)/casetab.$(O) : \
        $(SRC)/casetab.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h
+       $(SRC)/character.h
 
 $(BLD)/category.$(O) : \
        $(SRC)/category.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/keymap.h
 
 $(BLD)/ccl.$(O) : \
        $(SRC)/ccl.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
-       $(SRC)/coding.h
+       $(SRC)/coding.h \
+       $(SRC)/composite.h
+
+$(BLD)/character.$(O) : \
+       $(SRC)/character.c \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/buffer.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/composite.h \
+       $(SRC)/disptab.h
 
 $(BLD)/charset.$(O) : \
        $(SRC)/charset.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/disptab.h
 
+$(BLD)/chartab.$(O) : \
+       $(SRC)/chartab.c \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h
+
 $(BLD)/cm.$(O) : \
        $(SRC)/cm.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/cm.h \
-       $(SRC)/termhooks.h
+       $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
+       $(SRC)/termchar.h \
+       $(SRC)/termhooks.h \
+       $(SRC)/w32gui.h
 
 $(BLD)/cmds.$(O) : \
        $(SRC)/cmds.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/syntax.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/coding.$(O) : \
        $(SRC)/coding.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
-       $(SRC)/intervals.h \
        $(SRC)/frame.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/composite.$(O) : \
        $(SRC)/composite.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
+       $(SRC)/frame.h \
        $(SRC)/intervals.h \
-       $(SRC)/w32bdf.h \
-       $(SRC)/w32gui.h
+       $(SRC)/termhooks.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/window.h
 
 $(BLD)/data.$(O) : \
        $(SRC)/data.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/puresize.h \
        $(SRC)/syssignal.h \
-       $(SRC)/termhooks.h
+       $(SRC)/systime.h \
+       $(SRC)/termhooks.h \
+       $(SRC)/w32gui.h
 
 $(BLD)/dired.$(O) : \
        $(SRC)/dired.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/grp.h \
+       $(EMACS_ROOT)/nt/inc/pwd.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/dir.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/ndir.h \
        $(SRC)/regex.h \
        $(SRC)/systime.h
 
 $(BLD)/dispnew.$(O) : \
        $(SRC)/dispnew.c \
-       $(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 \
-       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/cm.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -545,61 +614,68 @@ $(BLD)/dispnew.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/doc.$(O) : \
        $(SRC)/doc.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       buildobj.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/keyboard.h \
-       $(SRC)/keymap.h
+       $(SRC)/keymap.h \
+       $(SRC)/systime.h
 
 $(BLD)/doprnt.$(O) : \
        $(SRC)/doprnt.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/charset.c
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(SRC)/lisp.h \
+       $(SRC)/character.h
 
 $(BLD)/editfns.$(O) : \
        $(SRC)/editfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/emacs.$(O) : \
        $(SRC)/emacs.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
@@ -608,94 +684,87 @@ $(BLD)/emacs.$(O) : \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/window.h
 
 $(BLD)/eval.$(O) : \
        $(SRC)/eval.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/fileio.$(O) : \
        $(SRC)/fileio.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/filelock.$(O) : \
        $(SRC)/filelock.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/pwd.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
-       $(EMACS_ROOT)/src/epaths.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/systime.h
 
 $(BLD)/filemode.$(O) : \
        $(SRC)/filemode.c \
-       $(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
+       $(CONFIG_H)
 
 $(BLD)/firstfile.$(O) : \
        $(SRC)/firstfile.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/floatfns.$(O) : \
        $(SRC)/floatfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/syssignal.h
 
 $(BLD)/fns.$(O) : \
        $(SRC)/fns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/langinfo.h \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -706,99 +775,128 @@ $(BLD)/fns.$(O) : \
        $(SRC)/keymap.h \
        $(SRC)/md5.h \
        $(SRC)/systime.h \
-       $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
+$(BLD)/font.$(O) : \
+       $(SRC)/font.c \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/buffer.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/font.h \
+       $(SRC)/fontset.h \
+       $(SRC)/frame.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/w32term.h \
+       $(SRC)/window.h
+
 $(BLD)/fontset.$(O) : \
        $(SRC)/fontset.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
+       $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
+       $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
+       $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/frame.$(O) : \
        $(SRC)/frame.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/fringe.$(O) : \
        $(SRC)/fringe.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/termhooks.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/gmalloc.$(O) : \
        $(SRC)/gmalloc.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(SRC)/getpagesize.h
 
-$(BLD)/image.$(O): \
+$(BLD)/image.$(O) : \
        $(SRC)/image.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/epaths.h \
+       $(SRC)/font.h \
        $(SRC)/frame.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
-       $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/indent.$(O) : \
        $(SRC)/indent.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
@@ -807,56 +905,57 @@ $(BLD)/indent.$(O) : \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/region-cache.h \
+       $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/insdel.$(O) : \
        $(SRC)/insdel.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
        $(SRC)/region-cache.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/intervals.$(O) : \
        $(SRC)/intervals.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/puresize.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
        $(SRC)/w32gui.h
 
 $(BLD)/keyboard.$(O) : \
        $(SRC)/keyboard.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
-       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -870,96 +969,121 @@ $(BLD)/keyboard.$(O) : \
        $(SRC)/syntax.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
-       $(SRC)/systty.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/keymap.$(O) : \
        $(SRC)/keymap.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/puresize.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
-       $(SRC)/w32gui.h
+       $(SRC)/w32gui.h \
+       $(SRC)/window.h
 
 $(BLD)/lastfile.$(O) : \
        $(SRC)/lastfile.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H)
 
 $(BLD)/lread.$(O) : \
        $(SRC)/lread.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
-       $(EMACS_ROOT)/src/epaths.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/epaths.h \
+       $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
+       $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/macros.$(O) : \
        $(SRC)/macros.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/keyboard.h \
        $(SRC)/macros.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/systime.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/marker.$(O) : \
        $(SRC)/marker.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h
+       $(SRC)/character.h
 
 $(BLD)/md5.$(O) : \
        $(SRC)/md5.c \
+       $(CONFIG_H) \
        $(SRC)/md5.h
 
+$(BLD)/menu.$(O) : \
+       $(SRC)/menu.c \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/frame.h \
+       $(SRC)/keyboard.h \
+       $(SRC)/keymap.h \
+       $(SRC)/menu.h \
+       $(SRC)/systime.h \
+       $(SRC)/termhooks.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/w32term.h \
+       $(SRC)/window.h
+
 $(BLD)/minibuf.$(O) : \
        $(SRC)/minibuf.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -968,108 +1092,133 @@ $(BLD)/minibuf.$(O) : \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
        $(SRC)/syntax.h \
+       $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/w32.$(O) : \
        $(SRC)/w32.c \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/grp.h \
        $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/socket.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/ndir.h \
+       $(SRC)/process.h \
        $(SRC)/systime.h \
        $(SRC)/w32.h \
+       $(SRC)/w32gui.h \
        $(SRC)/w32heap.h
 
 $(BLD)/w32heap.$(O) : \
        $(SRC)/w32heap.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/w32heap.h
 
 $(BLD)/w32inevt.$(O) : \
        $(SRC)/w32inevt.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32proc.$(O) : \
        $(SRC)/w32proc.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
+       $(CONFIG_H) \
        $(EMACS_ROOT)/nt/inc/langinfo.h \
        $(EMACS_ROOT)/nt/inc/nl_types.h \
-       $(SRC)/config.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/character.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/process.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/syswait.h \
        $(SRC)/w32.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
 $(BLD)/w32console.$(O) : \
        $(SRC)/w32console.c \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
-       $(SRC)/config.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
        $(SRC)/frame.h \
+       $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32inevt.h
 
 $(BLD)/print.$(O) : \
        $(SRC)/print.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/process.h \
+       $(SRC)/systime.h \
        $(SRC)/termchar.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/termhooks.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/process.$(O) : \
        $(SRC)/process.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/netdb.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/arpa/inet.h \
+       $(EMACS_ROOT)/nt/inc/netinet/in.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/socket.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -1084,66 +1233,64 @@ $(BLD)/process.$(O) : \
        $(SRC)/syswait.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/ralloc.$(O) : \
        $(SRC)/ralloc.c \
-       $(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 \
-       $(SRC)/s/ms-w32.h \
-       $(SRC)/m/intel386.h \
-       $(SRC)/config.h \
-       $(SRC)/getpagesize.h
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
+       $(SRC)/getpagesize.h \
+       $(SRC)/systime.h
 
 $(BLD)/regex.$(O) : \
        $(SRC)/regex.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
-       $(SRC)/charset.h \
-       $(SRC)/config.h \
+       $(SRC)/character.h \
        $(SRC)/regex.h \
        $(SRC)/syntax.h
 
 $(BLD)/region-cache.$(O) : \
        $(SRC)/region-cache.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/region-cache.h
 
 $(BLD)/scroll.$(O) : \
        $(SRC)/scroll.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
+       $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/search.$(O) : \
        $(SRC)/search.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
@@ -1153,57 +1300,62 @@ $(BLD)/search.$(O) : \
        $(SRC)/region-cache.h \
        $(SRC)/syntax.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/sound.$(O) : \
        $(SRC)/sound.c \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
        $(SRC)/lisp.h \
-       $(SRC)/dispextern.h \
        $(SRC)/atimer.h \
-       $(SRC)/syssignal.h
+       $(SRC)/dispextern.h \
+       $(SRC)/syssignal.h \
+       $(SRC)/systime.h \
+       $(SRC)/w32gui.h
 
 $(BLD)/strftime.$(O) : \
        $(SRC)/strftime.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h
 
 $(BLD)/syntax.$(O) : \
        $(SRC)/syntax.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/category.h \
-       $(SRC)/charset.h \
+       $(SRC)/character.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
        $(SRC)/keymap.h \
+       $(SRC)/regex.h \
        $(SRC)/syntax.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h
 
 $(BLD)/sysdep.$(O) : \
        $(SRC)/sysdep.c \
-       $(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 \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/grp.h \
+       $(EMACS_ROOT)/nt/inc/netdb.h \
+       $(EMACS_ROOT)/nt/inc/pwd.h \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
        $(EMACS_ROOT)/nt/inc/sys/file.h \
        $(EMACS_ROOT)/nt/inc/sys/ioctl.h \
-       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/socket.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/cm.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
-       $(SRC)/ndir.h \
        $(SRC)/process.h \
-       $(SRC)/sysselect.h \
        $(SRC)/syssignal.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
@@ -1211,99 +1363,109 @@ $(BLD)/sysdep.$(O) : \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/term.$(O) : \
        $(SRC)/term.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/ccl.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
+       $(SRC)/atimer.h \
+       $(SRC)/blockinput.h \
+       $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/cm.h \
        $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
        $(SRC)/frame.h \
+       $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
+       $(SRC)/syssignal.h \
+       $(SRC)/systime.h \
+       $(SRC)/systty.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/termcap.$(O) : \
        $(SRC)/termcap.c \
-       $(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
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/file.h \
+       $(SRC)/lisp.h
 
 $(BLD)/terminal.$(O) : \
        $(SRC)/terminal.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
+       $(SRC)/systime.h \
        $(SRC)/termchar.h \
-       $(SRC)/termhooks.h
+       $(SRC)/termhooks.h \
+       $(SRC)/w32gui.h
 
 $(BLD)/textprop.$(O) : \
        $(SRC)/textprop.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/intervals.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/window.h
 
 $(BLD)/tparam.$(O) : \
        $(SRC)/tparam.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h
+       $(CONFIG_H) \
+       $(SRC)/lisp.h
 
 $(BLD)/undo.$(O) : \
        $(SRC)/undo.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/buffer.h \
-       $(SRC)/commands.h
+       $(SRC)/commands.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/window.h
 
 $(BLD)/unexw32.$(O) : \
        $(SRC)/unexw32.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
        $(SRC)/w32heap.h
 
 $(BLD)/vm-limit.$(O) : \
        $(SRC)/vm-limit.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
        $(SRC)/mem-limits.h
 
 $(BLD)/window.$(O) : \
        $(SRC)/window.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
@@ -1315,26 +1477,29 @@ $(BLD)/window.$(O) : \
        $(SRC)/keymap.h \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/termhooks.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
 $(BLD)/xdisp.$(O) : \
        $(SRC)/xdisp.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/commands.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/indent.h \
@@ -1347,22 +1512,25 @@ $(BLD)/xdisp.$(O) : \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
-$(BLD)/xfaces.$(O): \
+$(BLD)/xfaces.$(O) : \
        $(SRC)/xfaces.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
@@ -1370,156 +1538,175 @@ $(BLD)/xfaces.$(O): \
        $(SRC)/systime.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
-$(BLD)/w32fns.$(O): \
+$(BLD)/w32fns.$(O) : \
        $(SRC)/w32fns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/epaths.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32font.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
-$(BLD)/w32menu.$(O): \
+$(BLD)/w32menu.$(O) : \
        $(SRC)/w32menu.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
+       $(SRC)/menu.h \
        $(SRC)/systime.h \
        $(SRC)/termhooks.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
-$(BLD)/w32term.$(O): \
+$(BLD)/w32term.$(O) : \
        $(SRC)/w32term.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/unistd.h \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/buffer.h \
        $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
        $(SRC)/dispextern.h \
        $(SRC)/disptab.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
-       $(SRC)/gnu.h \
        $(SRC)/intervals.h \
        $(SRC)/keyboard.h \
        $(SRC)/keymap.h \
+       $(SRC)/process.h \
        $(SRC)/systime.h \
        $(SRC)/systty.h \
        $(SRC)/termchar.h \
        $(SRC)/termhooks.h \
        $(SRC)/termopts.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32font.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h \
        $(SRC)/window.h
 
-$(BLD)/w32select.$(O): \
+$(BLD)/w32select.$(O) : \
        $(SRC)/w32select.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
-       $(SRC)/buffer.h \
-       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
        $(SRC)/coding.h \
        $(SRC)/composite.h \
-       $(SRC)/dispextern.h \
-       $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32heap.h \
        $(SRC)/w32term.h
 
-$(BLD)/w32reg.$(O): \
+$(BLD)/w32reg.$(O) : \
        $(SRC)/w32reg.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
-$(BLD)/w32xfns.$(O): \
+$(BLD)/w32xfns.$(O) : \
        $(SRC)/w32xfns.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
+       $(CONFIG_H) \
+       $(EMACS_ROOT)/nt/inc/sys/time.h \
+       $(SRC)/lisp.h \
        $(SRC)/atimer.h \
        $(SRC)/blockinput.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
        $(SRC)/keyboard.h \
        $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
-$(BLD)/w32bdf.$(O): \
-       $(SRC)/w32bdf.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(SRC)/atimer.h \
-       $(SRC)/blockinput.h \
+$(BLD)/w32font.$(O) : \
+       $(SRC)/w32font.c \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
        $(SRC)/charset.h \
+       $(SRC)/coding.h \
+       $(SRC)/composite.h \
        $(SRC)/dispextern.h \
+       $(SRC)/font.h \
        $(SRC)/fontset.h \
        $(SRC)/frame.h \
-       $(SRC)/keyboard.h \
-       $(SRC)/systime.h \
-       $(SRC)/w32bdf.h \
+       $(SRC)/w32font.h \
+       $(SRC)/w32gui.h \
+       $(SRC)/w32term.h
+
+$(BLD)/w32uniscribe.$(O) : \
+       $(SRC)/w32uniscribe.c \
+       $(CONFIG_H) \
+       $(SRC)/lisp.h \
+       $(SRC)/ccl.h \
+       $(SRC)/character.h \
+       $(SRC)/charset.h \
+       $(SRC)/composite.h \
+       $(SRC)/dispextern.h \
+       $(SRC)/font.h \
+       $(SRC)/fontset.h \
+       $(SRC)/frame.h \
+       $(SRC)/w32font.h \
        $(SRC)/w32gui.h \
        $(SRC)/w32term.h
 
 # Each object file depends on stamp_BLD, because in parallel builds we must
 # make sure $(BLD) exists before starting compilations.
 #
-$(OBJ0) $(OBJ1) $(WIN32OBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD
+$(OBJ0) $(OBJ1) $(WIN32OBJ) $(FONTOBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD