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, 675 Mass Ave, Cambridge, MA 02139, USA. */
18 # Geoff Voelker (voelker@cs.washington.edu) 9-6-94
24 # Set INSTALL_DIR to be the directory into which you want emacs installed.
27 INSTALL_DIR = C:\emacs
30 # Define MSVCNT11 to be nonzero if you are using the MSVCNT 1.1 environment.
38 # Check that the INCLUDE and LIB environment variables are set.
41 !error The INCLUDE environment variable needs to be set.
44 !error The LIB environment variable needs to be set.
47 # Determine the architecture we're running on.
48 # Define ARCH for our purposes;
49 # Define CPU for use by ntwin32.mak;
50 # Define CONFIG_H to the appropriate config.h for the system;
52 !ifdef PROCESSOR_ARCHITECTURE
54 CPU = $(PROCESSOR_ARCHITECTURE)
57 ! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
61 ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
64 ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
67 ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
70 !error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
83 # Include ntwin32.mak. So far, this file seems to be supported by every
84 # Microsoft compiler on NT and Win95 and properly defines the executable
85 # names and libraries necessary to build Emacs. I do not have access
86 # to any other vendor compilers, so I do not know if they supply this
87 # file, too. For now I'll assume that they do.
89 !include <ntwin32.mak>
91 # Using cvtres is necessary on NT 3.10 and doesn't hurt on later platforms.
94 # The assignment $(CC) = $(cc) fails even though variables are case sensitive.
100 # advapi32.lib is left off of $(baselibs) on NT 3.10
101 !if "$(baselibs)" == "kernel32.lib "
102 ADVAPI32 = advapi32.lib
107 # Older ntwin32.mak files do not define libc; do it for them.
112 # The base libraries for compiling Emacs on NT. With MSVC, this should
113 # include oldnames.lib.
115 BASE_LIBS = $(libc) $(baselibs) oldnames.lib
117 BASE_LIBS = $(libc) $(baselibs)
120 # We want any debugging info in the executable.
121 !if "$(LINK)" == "link32"
124 SYS_LDFLAGS = -pdb:none -release -incremental:no
128 CFLAGS_COMMON = -nologo $(INC) $(ARCH_CFLAGS) $(LOCAL_FLAGS) -DWIN32_LEAN_AND_MEAN -D$(ARCH)
130 CFLAGS = $(CFLAGS_COMMON) -D_CRTAPI1=_cdecl
132 CFLAGS = $(CFLAGS_COMMON)
136 $(OBJDIR):; -mkdir $(OBJDIR)
137 BLD = $(OBJDIR)\$(ARCH)
142 CP_DIR = xcopy /fried
144 # This is completely braindamaged, but it's the only routine known to be there
145 DEL_TREE = echo y | rmdir /s
147 # The location of the icon file
148 EMACS_ICON_PATH = ..\nt\emacs.ico
150 # Lets us add icons to the GNU Emacs folder
151 ADDPM = ..\nt\$(BLD)\addpm.exe
153 !if "$(ARCH)" == "i386"
154 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -G3d -Zi -Od
155 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
158 !if "$(ARCH)" == "mips"
159 ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
160 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
163 !if "$(ARCH)" == "alpha"
164 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -D__stdcall= -D__cdecl=
165 ARCH_LDFLAGS = -align:0x2000 $(SYS_LDFLAGS)
168 !if "$(ARCH)" == "ppc"
169 # These flags are a guess...if they don't work, please send me mail.
170 ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
171 ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS)
174 !ERROR Unknown architecture type "$(ARCH)".