aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorAndrew Innes2000-09-03 17:36:34 +0000
committerAndrew Innes2000-09-03 17:36:34 +0000
commit32bc732bed56c6efb29ea121f3f0be80f94e8971 (patch)
tree6f7ecd46851528854aea09c7df9bf9f2052d490d /nt
parent918dd0ab6d4e378d62c786dabd9b9b00050bf249 (diff)
downloademacs-32bc732bed56c6efb29ea121f3f0be80f94e8971.tar.gz
emacs-32bc732bed56c6efb29ea121f3f0be80f94e8971.zip
(CFLAGS): No need for -D_ANONYMOUS_UNION
-D_ANONYMOUS_STRUCT on compile line. (FOREACH, FORVAR, FORDO, ENDFOR): New definitions. (ARGQUOTE, DQUOTE): New defines.
Diffstat (limited to 'nt')
-rw-r--r--nt/nmake.defs431
1 files changed, 218 insertions, 213 deletions
diff --git a/nt/nmake.defs b/nt/nmake.defs
index 66291c0a9e3..d6238c92279 100644
--- a/nt/nmake.defs
+++ b/nt/nmake.defs
@@ -1,213 +1,218 @@
1# 1#
2# Makefile definition file for building GNU Emacs on Windows NT 2# Makefile definition file for building GNU Emacs on Windows NT
3# 3#
4# GNU Emacs is free software; you can redistribute it and/or modify 4# GNU Emacs is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2, or (at your option) 6# the Free Software Foundation; either version 2, or (at your option)
7# any later version. 7# any later version.
8# 8#
9# GNU Emacs is distributed in the hope that it will be useful, 9# GNU Emacs is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details. 12# GNU General Public License for more details.
13# 13#
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with GNU Emacs; see the file COPYING. If not, write to 15# along with GNU Emacs; see the file COPYING. If not, write to
16# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17# Boston, MA 02111-1307, USA. 17# Boston, MA 02111-1307, USA.
18 18
19# Ensure 'all' is the default target 19# Ensure 'all' is the default target
20all: 20all:
21 21
22THE_SHELL = $(COMSPEC) 22THE_SHELL = $(COMSPEC)
23 23
24ALL_DEPS = $** 24ALL_DEPS = $**
25 25
26SUBSYSTEM_WINDOWS=-subsystem:windows 26SUBSYSTEM_WINDOWS=-subsystem:windows
27SUBSYSTEM_CONSOLE=-subsystem:console 27SUBSYSTEM_CONSOLE=-subsystem:console
28 28
29# INSTALL_DIR is the directory into which emacs will be installed. 29# INSTALL_DIR is the directory into which emacs will be installed.
30# 30#
31!ifndef INSTALL_DIR 31!ifndef INSTALL_DIR
32INSTALL_DIR = $(MAKEDIR)/.. 32INSTALL_DIR = $(MAKEDIR)/..
33!endif 33!endif
34 34
35# Allow detection of builds with MSVC 5 or later, so we can 35# Allow detection of builds with MSVC 5 or later, so we can
36# speed up compiles (see rule at end). 36# speed up compiles (see rule at end).
37# 37#
38_NMAKE_VER_5=162 38_NMAKE_VER_5=162
39_NMAKE_VER_4=0 39_NMAKE_VER_4=0
40 40
41!IFNDEF _NMAKE_VER 41!IFNDEF _NMAKE_VER
42_NMAKE_VER=$(_NMAKE_VER_4) 42_NMAKE_VER=$(_NMAKE_VER_4)
43!ENDIF 43!ENDIF
44 44
45# Check that the INCLUDE and LIB environment variables are set. 45# Check that the INCLUDE and LIB environment variables are set.
46# 46#
47!ifndef INCLUDE 47!ifndef INCLUDE
48!error The INCLUDE environment variable needs to be set. 48!error The INCLUDE environment variable needs to be set.
49!endif 49!endif
50!ifndef LIB 50!ifndef LIB
51!error The LIB environment variable needs to be set. 51!error The LIB environment variable needs to be set.
52!endif 52!endif
53 53
54# Determine the architecture we're running on. 54# Determine the architecture we're running on.
55# Define ARCH for our purposes; 55# Define ARCH for our purposes;
56# Define CPU for use by ntwin32.mak; 56# Define CPU for use by ntwin32.mak;
57# Define CONFIG_H to the appropriate config.h for the system; 57# Define CONFIG_H to the appropriate config.h for the system;
58# 58#
59!ifdef PROCESSOR_ARCHITECTURE 59!ifdef PROCESSOR_ARCHITECTURE
60# We're on Windows NT 60# We're on Windows NT
61CPU = $(PROCESSOR_ARCHITECTURE) 61CPU = $(PROCESSOR_ARCHITECTURE)
62CONFIG_H = config.nt 62CONFIG_H = config.nt
63OS_TYPE = windowsnt 63OS_TYPE = windowsnt
64! if "$(PROCESSOR_ARCHITECTURE)" == "x86" 64! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
65ARCH = i386 65ARCH = i386
66CPU = i386 66CPU = i386
67! else 67! else
68! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS" 68! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
69ARCH = mips 69ARCH = mips
70! else 70! else
71! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" 71! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
72ARCH = alpha 72ARCH = alpha
73! else 73! else
74! if "$(PROCESSOR_ARCHITECTURE)" == "PPC" 74! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
75ARCH = ppc 75ARCH = ppc
76! else 76! else
77! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" 77! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
78! endif 78! endif
79! endif 79! endif
80! endif 80! endif
81! endif 81! endif
82!else 82!else
83# We're on Windows 95 83# We're on Windows 95
84ARCH = i386 84ARCH = i386
85CPU = i386 85CPU = i386
86CONFIG_H = config.nt 86CONFIG_H = config.nt
87OS_TYPE = windows95 87OS_TYPE = windows95
88!endif 88!endif
89 89
90AR = lib 90AR = lib
91AR_OUT = -out: 91AR_OUT = -out:
92CC = cl 92CC = cl
93CC_OUT = -Fo 93CC_OUT = -Fo
94LINK = link 94LINK = link
95LINK_OUT = -out: 95LINK_OUT = -out:
96RC = rc 96RC = rc
97RC_OUT = -Fo 97RC_OUT = -Fo
98RC_INCLUDE = -i 98RC_INCLUDE = -i
99 99
100libc = libc.lib 100libc = libc.lib
101baselibs = 101baselibs =
102O = obj 102O = obj
103A = lib 103A = lib
104 104
105BASE_LIBS = $(libc) $(baselibs) oldnames.lib 105BASE_LIBS = $(libc) $(baselibs) oldnames.lib
106 106
107ADVAPI32 = advapi32.lib 107ADVAPI32 = advapi32.lib
108COMDLG32 = comdlg32.lib 108COMDLG32 = comdlg32.lib
109GDI32 = gdi32.lib 109GDI32 = gdi32.lib
110MPR = mpr.lib 110MPR = mpr.lib
111SHELL32 = shell32.lib 111SHELL32 = shell32.lib
112USER32 = user32.lib 112USER32 = user32.lib
113WSOCK32 = wsock32.lib 113WSOCK32 = wsock32.lib
114 114
115!ifdef NOOPT 115!ifdef NOOPT
116DEBUG_CFLAGS = -DEMACSDEBUG 116DEBUG_CFLAGS = -DEMACSDEBUG
117!else 117!else
118DEBUG_CFLAGS = 118DEBUG_CFLAGS =
119!endif 119!endif
120CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ 120CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \
121 -D_CRTAPI1=_cdecl -D_ANONYMOUS_UNION -D_ANONYMOUS_STRUCT \ 121 -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
122 $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) 122EMACS_EXTRA_C_FLAGS =
123EMACS_EXTRA_C_FLAGS = 123
124 124SYS_LDFLAGS = -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net
125SYS_LDFLAGS = -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net 125
126 126# see comments in allocate_heap in w32heap.c before changing any of the
127# see comments in allocate_heap in w32heap.c before changing any of the 127# -stack, -heap, or -base settings.
128# -stack, -heap, or -base settings. 128TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -debugtype:both -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
129TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -debug:full -debugtype:both -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK) 129
130 130!ifdef NOOPT
131!ifdef NOOPT 131OBJDIR = obj
132OBJDIR = obj 132!else
133!else 133OBJDIR = obj-spd
134OBJDIR = obj-spd 134!endif
135!endif 135$(OBJDIR):; -mkdir $(OBJDIR)
136$(OBJDIR):; -mkdir $(OBJDIR) 136BLD = $(OBJDIR)/$(ARCH)
137BLD = $(OBJDIR)/$(ARCH) 137$(BLD): $(OBJDIR)
138$(BLD): $(OBJDIR) 138 -mkdir "$(BLD)"
139 -mkdir "$(BLD)" 139
140 140CP = cp -f
141CP = cp -f 141CP_DIR = cp -rf
142CP_DIR = cp -rf 142IFNOTSAMEDIR = if not exist ..\same-dir.tst
143IFNOTSAMEDIR = if not exist ..\same-dir.tst 143ENDIF =
144ENDIF = 144FOREACH = for %%f in (
145DEL = rm 145FORVAR = %%f
146DEL_TREE = rm -r 146FORDO = ) do
147 147ENDFOR =
148# The location of the icon file 148ARGQUOTE = "
149EMACS_ICON_PATH = ../nt/emacs.ico 149DQUOTE = \"
150 150DEL = rm
151!ifdef NODEBUG 151DEL_TREE = rm -r
152DEBUG_FLAG = 152
153!else 153# The location of the icon file
154DEBUG_FLAG = -Zi 154EMACS_ICON_PATH = ../nt/emacs.ico
155!endif 155
156 156!ifdef NODEBUG
157!if "$(ARCH)" == "i386" 157DEBUG_FLAG =
158!ifdef NOOPT 158!else
159ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) 159DEBUG_FLAG = -Zi
160!else 160!endif
161ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) 161
162!endif 162!if "$(ARCH)" == "i386"
163ARCH_LDFLAGS = $(SYS_LDFLAGS) 163!ifdef NOOPT
164 164ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)
165!else 165!else
166!if "$(ARCH)" == "mips" 166ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)
167ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 167!endif
168ARCH_LDFLAGS = $(SYS_LDFLAGS) 168ARCH_LDFLAGS = $(SYS_LDFLAGS)
169 169
170!else 170!else
171!if "$(ARCH)" == "alpha" 171!if "$(ARCH)" == "mips"
172!if "$(BUILD_TYPE)" == "spd" 172ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
173ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl= 173ARCH_LDFLAGS = $(SYS_LDFLAGS)
174!else 174
175ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl= 175!else
176!endif 176!if "$(ARCH)" == "alpha"
177ARCH_LDFLAGS = $(SYS_LDFLAGS) 177!if "$(BUILD_TYPE)" == "spd"
178 178ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl=
179!else 179!else
180!if "$(ARCH)" == "ppc" 180ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl=
181# These flags are a guess...if they don't work, please send me mail. 181!endif
182ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od 182ARCH_LDFLAGS = $(SYS_LDFLAGS)
183ARCH_LDFLAGS = $(SYS_LDFLAGS) 183
184 184!else
185!else 185!if "$(ARCH)" == "ppc"
186!ERROR Unknown architecture type "$(ARCH)". 186# These flags are a guess...if they don't work, please send me mail.
187!endif 187ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
188!endif 188ARCH_LDFLAGS = $(SYS_LDFLAGS)
189!endif 189
190!endif 190!else
191 191!ERROR Unknown architecture type "$(ARCH)".
192LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS) 192!endif
193 193!endif
194# From MSVC 5.0 onwards, it seem base relocation information is not included, 194!endif
195# at least in release builds. We need to ensure the reloc info is included 195!endif
196# in order to use the MSVC profiler. 196
197!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") 197LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS)
198EXTRA_LINK = 198
199!ELSE 199# From MSVC 5.0 onwards, it seem base relocation information is not included,
200EXTRA_LINK = -profile 200# at least in release builds. We need to ensure the reloc info is included
201!ENDIF 201# in order to use the MSVC profiler.
202 202!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
203# 203EXTRA_LINK =
204# If the compiler supports compiling multiple .c files to .o files at 204!ELSE
205# one time, use this feature. 205EXTRA_LINK = -profile
206# 206!ENDIF
207!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") 207
208.c{$(BLD)}.obj: 208#
209 $(CC) $(CFLAGS) -Fo$(BLD)\ $< 209# If the compiler supports compiling multiple .c files to .o files at
210!ELSE 210# one time, use this feature.
211.c{$(BLD)}.obj:: 211#
212 $(CC) $(CFLAGS) -Fo$(BLD)\ $< 212!IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
213!ENDIF 213.c{$(BLD)}.obj:
214 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
215!ELSE
216.c{$(BLD)}.obj::
217 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
218!ENDIF