]> code.delx.au - gnu-emacs/blobdiff - src/makefile.nt
(x_connection_closed): Add newline when printing error message on stderr.
[gnu-emacs] / src / makefile.nt
index 20805b5a084ce66b7e16d89ab9d47baec97a3a40..9feca95df0ce131a9e8530da985cacfea65794b7 100644 (file)
@@ -25,6 +25,8 @@
 #
 !include ..\nt\makefile.def
 
+SUBSYSTEM=console
+
 #
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
 # the emacs source tree.
@@ -35,10 +37,22 @@ EMACS           = $(BLD)\emacs.exe
 TEMACS          = $(BLD)\temacs.exe
 TLIB1           = $(BLD)\temacs1.lib
 TLIB2           = $(BLD)\temacs2.lib
+!IFDEF NTGUI
+TLIBW32         = $(BLD)\temacw32.lib
+!ELSE
+TLIBW32                =
+!ENDIF
 TOBJ            = $(BLD)\emacs.obj
+!if $(MSVCNT11)
+TRES           = $(BLD)\emacs.res
+!else
 TRES           = $(BLD)\emacs.rbj
+!endif
+TLASTLIB       = $(BLD)\lastfile.lib
 
-LINK_FLAGS      = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:console -entry:_start 
+# see comments in allocate_heap in ntheap.c before changing any of the
+# -stack, -heap, or -base settings.
+LINK_FLAGS      = $(ARCH_LDFLAGS) -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:$(SUBSYSTEM) -entry:_start -map:$(BLD)\temacs.map
 
 #
 # Split up the objects into two sets so that we don't run out of
@@ -69,7 +83,6 @@ OBJ1 =  $(BLD)\abbrev.obj       \
        $(BLD)\insdel.obj       \
        $(BLD)\keyboard.obj     \
        $(BLD)\keymap.obj       \
-       $(BLD)\lastfile.obj     \
        $(BLD)\lread.obj        \
        $(BLD)\macros.obj       \
        $(BLD)\marker.obj       \
@@ -106,11 +119,29 @@ OBJ2 =  $(BLD)\nt.obj           \
        $(BLD)\region-cache.obj \
        $(BLD)\strftime.obj
 
+WIN32OBJ = $(BLD)\w32term.obj  \
+          $(BLD)\w32xfns.obj   \
+          $(BLD)\w32fns.obj    \
+          $(BLD)\w32faces.obj  \
+          $(BLD)\w32select.obj \
+          $(BLD)\w32menu.obj   \
+          $(BLD)\w32reg.obj
+
 LIBS =  $(TLIB1)       \
        $(TLIB2)        \
+!IFDEF NTGUI
+       $(TLIBW32)      \
+!ENDIF
+       $(TLASTLIB)     \
+!IFDEF NTGUI
+       gdi32.lib       \
+       comdlg32.lib    \
+!ENDIF
+#      libcmt.lib      \
        $(BASE_LIBS)    \
        $(ADVAPI32)     \
-       user32.lib
+       user32.lib      \
+       mpr.lib
 
 #
 # Build the executable and dump it.
@@ -131,7 +162,7 @@ paths.h:    ..\nt\paths.h
 #
 DOC            = obj\etc\DOC-X
 $(DOC):;       cd ..\lib-src 
-               - del /q DOC-X
+               - $(DEL) DOC-X
                $(MAKE) -f makefile.nt all
                cd ..\src
 
@@ -140,19 +171,15 @@ $(DOC):;  cd ..\lib-src
 #
 emacs:          $(EMACS)
 $(EMACS):       $(PREPARED_HEADERS) $(DOC) $(TEMACS)
-!if "$(OS_TYPE)" == "win95"
-               move $(BLD)\temacs.exe $(BLD)\emacs.exe
-!else
                cd $(BLD)
                temacs.exe -batch -l loadup dump
                cd ..\..
-!endif
 
 #
 # The undumped executable
 #
-temacs:         $(TEMACS)
-$(TEMACS):      $(BLD) $(TLIB1) $(TLIB2) $(TOBJ) $(TRES)
+temacs:         $(BLD) $(TEMACS)
+$(TEMACS):      $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
                $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
 
 #
@@ -161,7 +188,9 @@ $(TEMACS):      $(BLD) $(TLIB1) $(TLIB2) $(TOBJ) $(TRES)
 #
 $(TRES):       ..\nt\emacs.rc
                $(RC) -i..\nt -Fo$(BLD)\emacs.res $**
+!if !$(MSVCNT11)
                $(CVTRES) -r -$(ARCH) -o $@ $(BLD)\emacs.res
+!endif
 
 #
 # Build the library.  Split up the build into two phases...otherwise we 
@@ -171,6 +200,18 @@ $(TLIB1):       $(OBJ1)
                @- $(AR) -out:$@ $**
 $(TLIB2):      $(OBJ2)
                @- $(AR) -out:$@ $**
+!IFDEF NTGUI
+$(TLIBW32):    $(WIN32OBJ)
+               @- $(AR) -out:$@ $**
+!ENDIF
+
+#
+# Place lastfile.obj in its own library so that it can be loaded after
+# the source libraries but before any system libraries.  Doing so defines
+# the end of Emacs' data section portably across compilers and systems.
+#
+$(TLASTLIB):   $(BLD)\lastfile.obj
+               @- $(AR) -out:$@ $**
 
 #
 # Object files.
@@ -188,7 +229,7 @@ install:        all
 #
 # Maintenance
 # 
-clean:;         - del /q *~ *.pdb config.h
+clean:;         - $(DEL) *~ *.pdb config.h paths.h
                - $(DEL_TREE) deleted
                - $(DEL_TREE) obj
 
@@ -197,7 +238,7 @@ clean:;         - del /q *~ *.pdb config.h
 # 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 ntheap.obj unexnt.obj
                cd ..\..
 
 
@@ -368,6 +409,7 @@ $(BLD)\dispnew.obj : \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
+       $(SRC)\w32term.h \
        $(SRC)\xterm.h \
        $(SRC)\vmstime.h \
        $(SRC)\systime.h
@@ -611,6 +653,7 @@ $(BLD)\keyboard.obj : \
        $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
        $(EMACS_ROOT)\nt\inc\sys\file.h \
        $(SRC)\systty.h \
+       $(SRC)\w32term.h \
        $(SRC)\xterm.h \
        $(SRC)\vmstime.h \
        $(SRC)\systime.h
@@ -686,6 +729,7 @@ $(BLD)\mocklisp.obj : \
 
 $(BLD)\nt.obj : \
        $(SRC)\nt.c \
+       $(SRC)\nt.h \
        $(SRC)\s\windowsnt.h \
        $(SRC)\m\intel386.h \
        $(SRC)\config.h \
@@ -989,3 +1033,94 @@ $(BLD)\xdisp.obj : \
        $(SRC)\termhooks.h \
        $(SRC)\dispextern.h \
        $(SRC)\intervals.h
+
+$(BLD)\w32faces.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32faces.c \
+       $(SRC)\lisp.h \
+       $(SRC)\w32term.h \
+       $(SRC)\win32.h \
+       $(SRC)\buffer.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\frame.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\window.h \
+       $(SRC)\intervals.h
+
+$(BLD)\w32fns.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32fns.c \
+       $(SRC)\lisp.h \
+       $(SRC)\w32term.h \
+       $(SRC)\win32.h \
+       $(SRC)\frame.h \
+       $(SRC)\window.h \
+       $(SRC)\buffer.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\keyboard.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\paths.h \
+       $(SRC)\ntheap.h \
+       $(SRC)\termhooks.h
+
+$(BLD)\w32menu.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32menu.c \
+       $(SRC)\lisp.h \
+       $(SRC)\termhooks.h \
+       $(SRC)\frame.h \
+       $(SRC)\window.h \
+       $(SRC)\keyboard.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\buffer.h
+
+$(BLD)\w32term.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32term.c \
+       $(SRC)\lisp.h \
+       $(SRC)\blockinput.h \
+       $(SRC)\w32term.h \
+       $(SRC)\win32.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)\window.h \
+       $(SRC)\keyboard.h \
+       $(SRC)\intervals.h
+
+$(BLD)\w32select.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32select.c \
+       $(SRC)\lisp.h \
+       $(SRC)\w32term.h \
+       $(SRC)\win32.h \
+       $(SRC)\dispextern.h \
+       $(SRC)\frame.h \
+       $(SRC)\blockinput.h
+
+$(BLD)\w32reg.obj: \
+       $(EMACS_ROOT)\src\s\windowsnt.h \
+       $(EMACS_ROOT)\src\m\intel386.h \
+       $(EMACS_ROOT)\src\config.h \
+       $(SRC)\w32reg.c \
+       $(SRC)\lisp.h \
+       $(SRC)\w32term.h \
+       $(SRC)\win32.h \
+       $(SRC)\blockinput.h