makefile.nt (TLIB0, TOBJ, OBJ0): New macro.
authorGeoff Voelker <voelker@cs.washington.edu>
Wed, 3 Sep 1997 00:41:32 +0000 (00:41 +0000)
committerGeoff Voelker <voelker@cs.washington.edu>
Wed, 3 Sep 1997 00:41:32 +0000 (00:41 +0000)
(LINK_FLAGS): Separate debugging info from the executable.
(LIBS): Include TLIB0.
(TEMACS): Link with TLIB0.
(EMACS): Copy temacs map file to emacs map file.
Update file dependencies.

src/makefile.nt

index 9ffd18d..7abd0eb 100644 (file)
@@ -36,6 +36,7 @@ LOCAL_FLAGS     = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I..\nt\inc
 
 EMACS           = $(BLD)\emacs.exe
 TEMACS          = $(BLD)\temacs.exe
+TLIB0           = $(BLD)\temacs0.lib
 TLIB1           = $(BLD)\temacs1.lib
 TLIB2           = $(BLD)\temacs2.lib
 !IFDEF NTGUI
@@ -43,7 +44,7 @@ TLIBW32         = $(BLD)\temacw32.lib
 !ELSE
 TLIBW32                =
 !ENDIF
-TOBJ            = $(BLD)\emacs.obj
+TOBJ            = $(BLD)\firstfile.obj
 !if $(MSVCNT11)
 TRES           = $(BLD)\emacs.res
 !else
@@ -53,12 +54,17 @@ TLASTLIB    = $(BLD)\lastfile.lib
 
 # see comments in allocate_heap in w32heap.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
+LINK_FLAGS      = $(ARCH_LDFLAGS) -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -pdb:$(BLD)\temacs.pdb -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
 # 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       \
@@ -133,7 +139,8 @@ WIN32OBJ = $(BLD)\w32term.obj       \
           $(BLD)\w32menu.obj   \
           $(BLD)\w32reg.obj
 
-LIBS =  $(TLIB1)       \
+LIBS =  $(TLIB0)       \
+       $(TLIB1)        \
        $(TLIB2)        \
 !IFDEF NTGUI
        $(TLIBW32)      \
@@ -179,13 +186,14 @@ emacs:          $(EMACS)
 $(EMACS):       $(PREPARED_HEADERS) $(DOC) $(TEMACS)
                cd $(BLD)
                temacs.exe -batch -l loadup dump
+               copy temacs.map emacs.map
                cd ..\..
 
 #
 # The undumped executable
 #
 temacs:         $(BLD) $(TEMACS)
-$(TEMACS):      $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
+$(TEMACS):      $(TLIB0) $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
                $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
 
 #
@@ -202,6 +210,8 @@ $(TRES):    ..\nt\emacs.rc
 # 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)
@@ -306,12 +316,18 @@ $(BLD)\buffer.obj : \
 
 $(BLD)\bytecode.obj : \
        $(SRC)\bytecode.c \
+       $(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)\syntax.h
 
 $(BLD)\callint.obj : \
        $(SRC)\callint.c \
+       $(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 \
@@ -534,6 +550,12 @@ $(BLD)\filemode.obj : \
        $(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\ms-w32.h \
@@ -677,7 +699,10 @@ $(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 \
@@ -745,7 +770,10 @@ $(BLD)\w32.obj : \
 
 $(BLD)\w32heap.obj : \
        $(SRC)\w32heap.c \
-       $(SRC)\w32heap.h
+       $(SRC)\w32heap.h \
+       $(SRC)\s\ms-w32.h \
+       $(SRC)\m\intel386.h \
+       $(SRC)\config.h
 
 $(BLD)\w32inevt.obj : \
        $(SRC)\w32inevt.c \
@@ -764,6 +792,7 @@ $(BLD)\w32proc.obj : \
        $(SRC)\config.h \
        $(SRC)\lisp.h \
        $(SRC)\w32.h \
+       $(SRC)\w32heap.h \
        $(SRC)\vmstime.h \
        $(SRC)\systime.h
 
@@ -986,6 +1015,9 @@ $(BLD)\undo.obj : \
 
 $(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 : \
@@ -1130,3 +1162,14 @@ $(BLD)\w32reg.obj: \
        $(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 \
+       $(SRC)\lisp.h \
+       $(SRC)\w32term.h \
+       $(SRC)\w32.h \
+       $(SRC)\frame.h \
+       $(SRC)\blockinput.h