]> code.delx.au - gnu-emacs/blobdiff - nt/gmake.defs
(xscheme-insert-expression): Use add-to-history.
[gnu-emacs] / nt / gmake.defs
index 2235417aca43b2e72f6a86b8bf4128b02c829976..56799f783e15101800fb7e95f47bfb644e81ccad 100644 (file)
@@ -1,27 +1,27 @@
+#  -*- Makefile -*- definition file for building GNU Emacs on Windows NT.
+#  Copyright (C) 2000, 2001, 2002, 2003, 2004,
+#    2005, 2006 Free Software Foundation, Inc.
 #
-#  Makefile definition file for building GNU Emacs on the Microsoft W32 API.
-#  Copyright (c) 2000-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
 #  the Free Software Foundation; either version 2, 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., 59 Temple Place - Suite 330,
-#  Boston, MA 02111-1307, USA.
+#  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#  Boston, MA 02110-1301, USA.
 
 # Ensure 'all' is the default target
 all:
 
 # NOTES
-# 
+#
 # I tried to force gmake to use the native shell for simplicity, by
 # setting SHELL as below, but this didn't work reliably because of
 # various case sensitivity niggles.  Specifically, COMSPEC (which is in
@@ -31,7 +31,7 @@ all:
 # thinks it doesn't exist (unless compiled with a switch to ignore
 # case), and so doesn't change which shell it will invoke to execute
 # commands.
-# 
+#
 # It would be possible, though very tedious using just gmake facilities,
 # to convert the COMSPEC value to uppercase to solve this problem, but
 # it isn't worth it.  That is partly because, even when using the native
@@ -46,14 +46,14 @@ all:
 # mandate that rm and cp be available, so we can use Unix-format file
 # names everywhere.  (Fortunately both MS and GNU make, and the
 # respective compilers, are happy with Unix-format names.)
-# 
+#
 # Since we cannot easily force the choice of a particular shell, we must
 # make the effort to cope with whichever shell is being used.
 # Fortunately, the only command we need to use that is shell specific is
 # the testing of a file's existence for the purpose of working out when
 # we are copying files to their original location.  That particular
 # requirement is abstracted easily enough.
-# 
+#
 # The only other problem area was the change of directory when running
 # temacs to dump emacs.exe (where gmake doesn't support cd foo in any
 # useful way), but that has been resolved by modifying the Windows
@@ -78,6 +78,16 @@ endif
 
 MAKETYPE=gmake
 
+# The following "ifeq" does not appear to DTRT, and therefore breaks
+# the build on mingw32. Also the -m option does not exist in many
+# (reasonably recent even) versions of Cygwin. These issues need to be
+# remedied before putting this cygpath kludge back in.
+
+# Convert CURDIR to native file name, if in Cygwin format
+#ifeq "$(shell cygpath $(CURDIR))" "$(CURDIR)"
+#CURDIR                := $(shell cygpath -m $(CURDIR))
+#endif
+
 THISDIR                = .
 
 # Cygwin has changed quoting rules somewhat since b20, in a way that
@@ -107,7 +117,7 @@ endif
 export EMACSLOADPATH
 
 # Determine the architecture we're running on.
-# Define ARCH for our purposes; 
+# Define ARCH for our purposes;
 # Define CPU for use by ntwin32.mak;
 # Define CONFIG_H to the appropriate config.h for the system;
 #
@@ -152,8 +162,8 @@ RC          = windres -O coff
 RC_OUT         = -o$(SPACE)
 RC_INCLUDE     = --include-dir$(SPACE)
 
-libc           = 
-baselibs       = 
+libc           =
+baselibs       =
 O              = o
 A              = a
 
@@ -167,11 +177,12 @@ SHELL32           = -lshell32
 USER32         = -luser32
 WSOCK32                = -lwsock32
 WINMM     = -lwinmm
+WINSPOOL       = -lwinspool
 
 ifdef NOOPT
 DEBUG_CFLAGS   = -DEMACSDEBUG
 else
-DEBUG_CFLAGS   = 
+DEBUG_CFLAGS   =
 endif
 CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
                  -D_CRTAPI1=_cdecl \
@@ -180,7 +191,7 @@ EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
 
 # see comments in allocate_heap in w32heap.c before changing any of the
 # -stack, -heap, or -image-base settings.
-TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -g $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map
+TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map
 
 ifdef NOOPT
 OBJDIR          = oo
@@ -228,11 +239,11 @@ DQUOTE            = \"
 endif
 
 ifdef NODEBUG
-DEBUG_FLAG = 
+DEBUG_FLAG =
 DEBUG_LINK =
 else
-DEBUG_FLAG = -g
-DEBUG_LINK = -g
+DEBUG_FLAG = -gstabs+ -g3
+DEBUG_LINK = -gstabs+ -g3
 endif
 
 ifdef NOCYGWIN
@@ -243,7 +254,7 @@ ifeq "$(ARCH)" "i386"
 ifdef NOOPT
 ARCH_CFLAGS     = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN)
 else
-ARCH_CFLAGS     = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) -mcpu=i686 -O2 \
+ARCH_CFLAGS     = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \
                  # -fbuiltin \
                  # -finline-functions \
                  # -fomit-frame-pointer
@@ -259,3 +270,5 @@ LINK_FLAGS  = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS)
 
 $(BLD)/%.o: %.c
                $(CC) $(CFLAGS) $(CC_OUT)$@ $<
+
+# arch-tag: 35eb9662-8534-4bcf-b891-0730a09d657f