(UNISCRIBE): New variable.
[bpt/emacs.git] / nt / gmake.defs
index bd201cd..ab1bc10 100644 (file)
@@ -1,9 +1,10 @@
 #  -*- Makefile -*- definition file for building GNU Emacs on Windows NT.
-#  Copyright (c) 2000-2001 Free Software Foundation, Inc.
+#  Copyright (C) 2000, 2001, 2002, 2003, 2004,
+#    2005, 2006, 2007, 2008 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)
+#  the Free Software Foundation; either version 3, or (at your option)
 #  any later version.
 #
 #  GNU Emacs is distributed in the hope that it will be useful,
@@ -13,8 +14,8 @@
 #
 #  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:
@@ -98,6 +99,16 @@ sh_output := $(shell echo foo")
 ifeq "$(sh_output)" ""
 NEW_CYGWIN = 1
 endif
+
+# By default, newer versions of Cygwin mess with NTFS ACLs in an
+# attempt to emulate traditional posix file permissions. This can
+# cause bad effects, such as .exe files that are missing the
+# FILE_EXECUTE/FILE_GENERIC_EXECUTE permissions when they are created
+# with Cygwin commands that don't expect to be creating executable
+# files. Then when we later use a non-Cygwin program to create the
+# real .exe, the previous Cygwin defined ACL sticks.
+CYGWIN=nontsec
+export CYGWIN
 endif
 
 ALL_DEPS       = $^
@@ -169,28 +180,37 @@ A         = a
 BASE_LIBS      = $(libc) $(baselibs)
 
 ADVAPI32       = -ladvapi32
+COMCTL32       = -lcomctl32
 COMDLG32       = -lcomdlg32
 GDI32          = -lgdi32
 MPR            = -lmpr
 SHELL32                = -lshell32
 USER32         = -luser32
 WSOCK32                = -lwsock32
-WINMM     = -lwinmm
+WINMM          = -lwinmm
 WINSPOOL       = -lwinspool
+OLE32          = -lole32
+UNISCRIBE      = -lusp10
+
+ifdef USE_FONTBACKEND
+FONT_CFLAGS    = -DUSE_FONT_BACKEND=1
+else
+FONT_CFLAGS    =
+endif
 
 ifdef NOOPT
 DEBUG_CFLAGS   = -DEMACSDEBUG
 else
 DEBUG_CFLAGS   =
 endif
-CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
-                 -D_CRTAPI1=_cdecl \
+CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 \
+                 $(ARCH_CFLAGS) -D$(ARCH) -D_CRTAPI1=_cdecl \
                  $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
-EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
+EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 $(FONT_CFLAGS)
 
 # 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
@@ -199,8 +219,9 @@ OBJDIR          = oo-spd
 endif
 $(OBJDIR):;    -mkdir "$(OBJDIR)"
 BLD             = $(OBJDIR)/$(ARCH)
-$(BLD):         $(OBJDIR)
+stamp_BLD:      $(OBJDIR)
                -mkdir "$(BLD)"
+               echo $(BLD) > $@
 
 COMPILER_TEMP_FILES =
 
@@ -241,8 +262,8 @@ ifdef NODEBUG
 DEBUG_FLAG =
 DEBUG_LINK =
 else
-DEBUG_FLAG = -g
-DEBUG_LINK = -g
+DEBUG_FLAG = -gstabs+ -g3
+DEBUG_LINK = -gstabs+ -g3
 endif
 
 ifdef NOCYGWIN
@@ -253,7 +274,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
@@ -265,6 +286,8 @@ endif
 
 LINK_FLAGS     = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS)
 
+export XMFLAGS
+
 .DEFAULT:
 
 $(BLD)/%.o: %.c