Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org
[bpt/emacs.git] / nt / gmake.defs
index 9cad0a2..b4c76cf 100644 (file)
@@ -1,6 +1,5 @@
 #  -*- Makefile -*- definition file for building GNU Emacs on Windows NT.
-#  Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-#    2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -70,10 +69,18 @@ sh_output := $(shell echo)
 ifeq "$(findstring ECHO, $(sh_output))" "ECHO"
 THE_SHELL = $(COMSPEC)$(ComSpec)
 SHELLTYPE=CMD
+SWITCHCHAR=/
 else
 USING_SH = 1
 THE_SHELL = $(SHELL)
 SHELLTYPE=SH
+# MSYS needs to double the slash in cmd-style switches to avoid
+# interpreting /x as a Posix style file name reference
+ifneq ($(MSYSTEM),)
+SWITCHCHAR=//
+else
+SWITCHCHAR=/
+endif
 endif
 
 MAKETYPE=gmake
@@ -96,7 +103,7 @@ THISDIR              = .
 ifdef USING_SH
 sh_output := $(shell echo [Please ignore a syntax error on the next line - it is intentional] 1>&2)
 sh_output := $(shell echo foo")
-# This single quote " is to fix fintification due to previous line
+# This single quote " is to fix fontification due to previous line
 ifeq "$(sh_output)" ""
 NEW_CYGWIN = 1
 endif
@@ -140,17 +147,29 @@ OS_TYPE           = windowsnt
  ifeq "$(PROCESSOR_ARCHITECTURE)" "x86"
 ARCH           = i386
 CPU            = i386
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-x86.manifest
  else
   ifeq "$(PROCESSOR_ARCHITECTURE)" "MIPS"
 ARCH           = mips
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-mips.manifest
   else
    ifeq "$(PROCESSOR_ARCHITECTURE)" "ALPHA"
 ARCH           = alpha
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-alpha.manifest
    else
     ifeq "$(PROCESSOR_ARCHITECTURE)" "PPC"
 ARCH           = ppc
+EMACS_HEAPSIZE = 27
+EMACS_PURESIZE = 5000000
+EMACS_MANIFEST = emacs-ppc.manifest
     else
-error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
+     $(error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)")
     endif
    endif
   endif
@@ -194,19 +213,21 @@ OLE32             = -lole32
 UNISCRIBE      = -lusp10
 UUID           = -luuid
 
+# Used by src/makefile.w32-in, since Nmake barfs on $(func SOMETHING)
+OBJ0_c         = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ0))
+OBJ1_c         = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
+OBJ2_c         = $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ2))
+
 ifdef NOOPT
-DEBUG_CFLAGS   = -DEMACSDEBUG
+DEBUG_CFLAGS   = -DEMACSDEBUG -fno-crossjumping -std=gnu99
 else
 DEBUG_CFLAGS   =
 endif
 
-ifdef ENABLECHECKS
-CHECKING_CFLAGS        = -DENABLE_CHECKING -DXASSERTS -fno-crossjumping
-else
-CHECKING_CFLAGS        =
-endif
+MWINDOWS        = -mwindows
 
-CFLAGS          = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
+CFLAGS          = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
+ESC_CFLAGS      = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS)
 EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
 
 ifdef PROFILE
@@ -240,9 +261,11 @@ CP_DIR             = cp -rf
 DEL            = rm
 DEL_TREE       = rm -r
 
+DIRNAME                = $(notdir $(CURDIR))
+
 ifdef USING_SH
 
-IFNOTSAMEDIR   = if [ ! -s ../same-dir.tst ] ; then
+IFNOTSAMEDIR   = if [ ! -s ../$(DIRNAME)_same-dir.tst ] ; then
 FOREACH                = for f in
 FORVAR         = $${f}
 FORDO          = ; do
@@ -257,7 +280,7 @@ endif
 
 else
 
-IFNOTSAMEDIR   = if not exist ../same-dir.tst
+IFNOTSAMEDIR   = if not exist ../$(DIRNAME)_same-dir.tst
 FOREACH                = for %%f in (
 FORVAR         = %%f
 FORDO          = ) do
@@ -280,6 +303,12 @@ ifdef NOCYGWIN
 NOCYGWIN = -mno-cygwin
 endif
 
+ifdef USER_LIBS
+USER_LIBS := $(patsubst %,-l%,$(USER_LIBS))
+endif
+
+PRAGMA_SYSTEM_HEADER = \#pragma GCC system_header
+
 ifeq "$(ARCH)" "i386"
 ifdef NOOPT
 ARCH_CFLAGS     = -c $(DEBUG_FLAG) $(NOCYGWIN)
@@ -302,4 +331,3 @@ export XMFLAGS
 
 $(BLD)/%.o: %.c
                $(CC) $(CFLAGS) $(CC_OUT)$@ $<
-