2 # Makefile definition file for building GNU Emacs on Windows NT
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
6 # the Free Software Foundation
; either version
2, or (at your option
)
9 # GNU Emacs is distributed in the hope that it will be useful
,
10 # but WITHOUT ANY WARRANTY
; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
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
16 # the Free Software Foundation
, Inc.
, 59 Temple Place
- Suite
330,
17 # Boston
, MA
02111-1307, USA.
19 # Geoff
Voelker (voelker@cs.washington.edu
) 9-6-94
25 # Define the following to build the GUI version
29 # Set INSTALL_DIR to be the directory into which you want emacs installed.
32 INSTALL_DIR
= C
:\emacs
35 # Define MSVCNT11 to be nonzero if you are using the MSVCNT
1.1 environment.
46 # Allow detection of builds with MSVC
5 or later
52 _NMAKE_VER
=$
(_NMAKE_VER_4
)
55 # Check that the INCLUDE and LIB environment variables are set.
58 !error The INCLUDE environment variable needs to be set.
61 !error The LIB environment variable needs to be set.
64 # Determine the architecture we
're running on.
65 # Define ARCH for our purposes;
66 # Define CPU for use by ntwin32.mak;
67 # Define CONFIG_H to the appropriate config.h for the system;
69 !ifdef PROCESSOR_ARCHITECTURE
71 CPU
= $
(PROCESSOR_ARCHITECTURE
)
74 ! if
"$(PROCESSOR_ARCHITECTURE)" == "x86"
78 ! if
"$(PROCESSOR_ARCHITECTURE)" == "MIPS"
81 ! if
"$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
84 ! if
"$(PROCESSOR_ARCHITECTURE)" == "PPC"
87 !error Unknown architecture type
"$(PROCESSOR_ARCHITECTURE)"
100 # Include ntwin32.mak. So far, this file seems to be supported by every
101 # Microsoft compiler on NT and Windows 95 and properly defines the executable
102 # names and libraries necessary to build Emacs. I do not have access
103 # to any other vendor compilers, so I do not know if they supply this
104 # file, too. For now I'll assume that they do.
106 !include
<ntwin32.mak
>
108 # Using cvtres is necessary on NT
3.10 and doesn
't hurt on later platforms.
111 # The assignment $(CC) = $(cc) fails even though variables are case sensitive.
117 # advapi32.lib is left off of $(baselibs) on NT 3.10
118 !if "$(baselibs)" == "kernel32.lib "
119 ADVAPI32 = advapi32.lib
124 # Older ntwin32.mak files do not define libc; do it for them.
129 # The base libraries for compiling Emacs on NT. With MSVC, this should
130 # include oldnames.lib.
132 BASE_LIBS = $(libc) $(baselibs) oldnames.lib
134 BASE_LIBS = $(libc) $(baselibs) -nodefaultlib:oldnames.lib
137 # We want any debugging info in the executable.
138 !if "$(LINK)" == "link32"
139 SYS_LDFLAGS = -nologo
141 SYS_LDFLAGS = -nologo -release -incremental:no -version:3.10
144 # Tag the executables to run out of the swapfile when execute off CD or network shares
145 SYS_LDFLAGS = $(SYS_LDFLAGS) -swaprun:cd -swaprun:net
148 !if "$(BUILD_TYPE)" == "spd"
149 CFLAGS_COMMON = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH) -Fd$(BLD)\vc.pdb
151 CFLAGS_COMMON = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH) -Fd$(BLD)\vc.pdb -DEMACSDEBUG
154 CFLAGS = $(CFLAGS_COMMON) -D_CRTAPI1=_cdecl
156 CFLAGS = $(CFLAGS_COMMON) -D_CRTAPI1=_cdecl
160 OBJDIR = obj-$(BUILD_TYPE)
164 $(OBJDIR):; -mkdir $(OBJDIR)
165 BLD = $(OBJDIR)\$(ARCH)
170 CP_DIR = xcopy /f/r/i/e/d/k
172 !if "$(OS_TYPE)" == "windows95"
174 DEL_TREE = deltree /y
177 # NT better way of killing a deltree
181 # Lets us add icons to the GNU Emacs folder
182 ADDPM = ..\nt\$(BLD)\addpm.exe
184 !if "$(ARCH)" == "i386"
185 !if "$(BUILD_TYPE)" == "spd"
186 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -G6dF -Zi -Zp8
188 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zi -Zp8
190 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
193 !if "$(ARCH)" == "mips"
194 ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
195 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
198 !if "$(ARCH)" == "alpha"
199 !if "$(BUILD_TYPE)" == "spd"
200 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl=
202 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl=
204 ARCH_LDFLAGS = -align:0x2000 $(SYS_LDFLAGS)
207 !if "$(ARCH)" == "ppc"
208 # These flags are a guess...if they don't work
, please send me mail.
209 ARCH_CFLAGS
= -D_PPC_
=1 -c
-Ze
-Zi
-W2
-Od
210 ARCH_LDFLAGS
= -align
:0x1000 $
(SYS_LDFLAGS
)
213 !ERROR Unknown architecture type
"$(ARCH)".
220 # If the compiler supports compiling multiple .c files to .o files at
221 # one time
, use this feature.
223 !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
225 $
(CC
) $
(CFLAGS
) -Fo$
(BLD
)\ $
<
228 $
(CC
) $
(CFLAGS
) -Fo$
(BLD
)\ $
<