($(DOC)): Use -o and -a options to make-docfile,
[bpt/emacs.git] / nt / makefile.def
index fdfa602..6fb05df 100644 (file)
@@ -1,5 +1,6 @@
 #
 #  Makefile definition file for building GNU Emacs on Windows NT
+#  Copyright (c) 1994-2001 Free Software Foundation, Inc.
 #  
 #  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
@@ -42,6 +43,16 @@ MSVCNT11        = 0
 # END CONFIGURATION
 #
 
+#
+# Allow detection of builds with MSVC 5 or later
+#
+_NMAKE_VER_5=162
+_NMAKE_VER_4=0
+
+!IFNDEF _NMAKE_VER
+_NMAKE_VER=$(_NMAKE_VER_4)
+!ENDIF
+
 # Check that the INCLUDE and LIB environment variables are set.
 #
 !ifndef INCLUDE
@@ -126,11 +137,14 @@ BASE_LIBS = $(libc) $(baselibs) -nodefaultlib:oldnames.lib
 
 # We want any debugging info in the executable.
 !if "$(LINK)" == "link32"
-SYS_LDFLAGS    = 
+SYS_LDFLAGS    = -nologo
 !else
-SYS_LDFLAGS    = -release -incremental:no -version:3.10
+SYS_LDFLAGS    = -nologo -release -incremental:no -version:3.10
 !endif
 
+# Tag the executables to run out of the swapfile when execute off CD or network shares
+SYS_LDFLAGS = $(SYS_LDFLAGS) -swaprun:cd -swaprun:net
+
 INC             = -I.
 !if "$(BUILD_TYPE)" == "spd"
 CFLAGS_COMMON  = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH) -Fd$(BLD)\vc.pdb
@@ -161,21 +175,18 @@ DEL               = deltree /y
 DEL_TREE       = deltree /y
 !else
 DEL            = del
-# This is completely braindamaged, but it's the only routine known to be there
-DEL_TREE       = echo y | rmdir /s
+# NT better way of killing a deltree
+DEL_TREE       = rd /s/q
 !endif
 
-# The location of the icon file
-EMACS_ICON_PATH = ..\nt\emacs.ico
-
 # Lets us add icons to the GNU Emacs folder
 ADDPM          = ..\nt\$(BLD)\addpm.exe
 
 !if "$(ARCH)" == "i386"
 !if "$(BUILD_TYPE)" == "spd"
-ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -G5dF -Zi
+ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -G6dF -Zi -Zp8
 !else
-ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od
+ARCH_CFLAGS     = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zi -Zp8
 !endif
 ARCH_LDFLAGS   = -align:0x1000 $(SYS_LDFLAGS)
 
@@ -205,3 +216,15 @@ ARCH_LDFLAGS       = -align:0x1000 $(SYS_LDFLAGS)
 !endif
 !endif
 !endif
+
+#
+# If the compiler supports compiling multiple .c files to .o files at
+# one time, use this feature.
+#
+!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
+.c{$(BLD)}.obj:
+               $(CC) $(CFLAGS) -Fo$(BLD)\ $<
+!ELSE
+.c{$(BLD)}.obj::
+               $(CC) $(CFLAGS) -Fo$(BLD)\ $<
+!ENDIF