1 |
# |
# |
2 |
# Makefile definition file for building GNU Emacs on the Microsoft W32 API. |
# Makefile definition file for building GNU Emacs on the Microsoft W32 API. |
3 |
# Copyright (c) 2000-2001 Free Software Foundation, Inc. |
# Copyright (c) 2000-2001 Free Software Foundation, Inc. |
4 |
# |
# |
5 |
# GNU Emacs is free software; you can redistribute it and/or modify |
# GNU Emacs is free software; you can redistribute it and/or modify |
6 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 2, or (at your option) |
# the Free Software Foundation; either version 2, or (at your option) |
8 |
# any later version. |
# any later version. |
9 |
# |
# |
10 |
# GNU Emacs is distributed in the hope that it will be useful, |
# GNU Emacs is distributed in the hope that it will be useful, |
11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
# GNU General Public License for more details. |
14 |
# |
# |
15 |
# You should have received a copy of the GNU General Public License |
# You should have received a copy of the GNU General Public License |
16 |
# along with GNU Emacs; see the file COPYING. If not, write to |
# along with GNU Emacs; see the file COPYING. If not, write to |
17 |
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 |
all: |
all: |
22 |
|
|
23 |
# NOTES |
# NOTES |
24 |
# |
# |
25 |
# I tried to force gmake to use the native shell for simplicity, by |
# I tried to force gmake to use the native shell for simplicity, by |
26 |
# setting SHELL as below, but this didn't work reliably because of |
# setting SHELL as below, but this didn't work reliably because of |
27 |
# various case sensitivity niggles. Specifically, COMSPEC (which is in |
# various case sensitivity niggles. Specifically, COMSPEC (which is in |
31 |
# thinks it doesn't exist (unless compiled with a switch to ignore |
# thinks it doesn't exist (unless compiled with a switch to ignore |
32 |
# case), and so doesn't change which shell it will invoke to execute |
# case), and so doesn't change which shell it will invoke to execute |
33 |
# commands. |
# commands. |
34 |
# |
# |
35 |
# It would be possible, though very tedious using just gmake facilities, |
# It would be possible, though very tedious using just gmake facilities, |
36 |
# to convert the COMSPEC value to uppercase to solve this problem, but |
# to convert the COMSPEC value to uppercase to solve this problem, but |
37 |
# it isn't worth it. That is partly because, even when using the native |
# it isn't worth it. That is partly because, even when using the native |
46 |
# mandate that rm and cp be available, so we can use Unix-format file |
# mandate that rm and cp be available, so we can use Unix-format file |
47 |
# names everywhere. (Fortunately both MS and GNU make, and the |
# names everywhere. (Fortunately both MS and GNU make, and the |
48 |
# respective compilers, are happy with Unix-format names.) |
# respective compilers, are happy with Unix-format names.) |
49 |
# |
# |
50 |
# Since we cannot easily force the choice of a particular shell, we must |
# Since we cannot easily force the choice of a particular shell, we must |
51 |
# make the effort to cope with whichever shell is being used. |
# make the effort to cope with whichever shell is being used. |
52 |
# Fortunately, the only command we need to use that is shell specific is |
# Fortunately, the only command we need to use that is shell specific is |
53 |
# the testing of a file's existence for the purpose of working out when |
# the testing of a file's existence for the purpose of working out when |
54 |
# we are copying files to their original location. That particular |
# we are copying files to their original location. That particular |
55 |
# requirement is abstracted easily enough. |
# requirement is abstracted easily enough. |
56 |
# |
# |
57 |
# The only other problem area was the change of directory when running |
# The only other problem area was the change of directory when running |
58 |
# temacs to dump emacs.exe (where gmake doesn't support cd foo in any |
# temacs to dump emacs.exe (where gmake doesn't support cd foo in any |
59 |
# useful way), but that has been resolved by modifying the Windows |
# useful way), but that has been resolved by modifying the Windows |
117 |
export EMACSLOADPATH |
export EMACSLOADPATH |
118 |
|
|
119 |
# Determine the architecture we're running on. |
# Determine the architecture we're running on. |
120 |
# Define ARCH for our purposes; |
# Define ARCH for our purposes; |
121 |
# Define CPU for use by ntwin32.mak; |
# Define CPU for use by ntwin32.mak; |
122 |
# Define CONFIG_H to the appropriate config.h for the system; |
# Define CONFIG_H to the appropriate config.h for the system; |
123 |
# |
# |
162 |
RC_OUT = -o$(SPACE) |
RC_OUT = -o$(SPACE) |
163 |
RC_INCLUDE = --include-dir$(SPACE) |
RC_INCLUDE = --include-dir$(SPACE) |
164 |
|
|
165 |
libc = |
libc = |
166 |
baselibs = |
baselibs = |
167 |
O = o |
O = o |
168 |
A = a |
A = a |
169 |
|
|
181 |
ifdef NOOPT |
ifdef NOOPT |
182 |
DEBUG_CFLAGS = -DEMACSDEBUG |
DEBUG_CFLAGS = -DEMACSDEBUG |
183 |
else |
else |
184 |
DEBUG_CFLAGS = |
DEBUG_CFLAGS = |
185 |
endif |
endif |
186 |
CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \ |
CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \ |
187 |
-D_CRTAPI1=_cdecl \ |
-D_CRTAPI1=_cdecl \ |
238 |
endif |
endif |
239 |
|
|
240 |
ifdef NODEBUG |
ifdef NODEBUG |
241 |
DEBUG_FLAG = |
DEBUG_FLAG = |
242 |
DEBUG_LINK = |
DEBUG_LINK = |
243 |
else |
else |
244 |
DEBUG_FLAG = -g |
DEBUG_FLAG = -g |