diff options
| author | Andrew Innes | 2000-09-03 17:36:34 +0000 |
|---|---|---|
| committer | Andrew Innes | 2000-09-03 17:36:34 +0000 |
| commit | 32bc732bed56c6efb29ea121f3f0be80f94e8971 (patch) | |
| tree | 6f7ecd46851528854aea09c7df9bf9f2052d490d /nt | |
| parent | 918dd0ab6d4e378d62c786dabd9b9b00050bf249 (diff) | |
| download | emacs-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.defs | 431 |
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 |
| 20 | all: | 20 | all: |
| 21 | 21 | ||
| 22 | THE_SHELL = $(COMSPEC) | 22 | THE_SHELL = $(COMSPEC) |
| 23 | 23 | ||
| 24 | ALL_DEPS = $** | 24 | ALL_DEPS = $** |
| 25 | 25 | ||
| 26 | SUBSYSTEM_WINDOWS=-subsystem:windows | 26 | SUBSYSTEM_WINDOWS=-subsystem:windows |
| 27 | SUBSYSTEM_CONSOLE=-subsystem:console | 27 | SUBSYSTEM_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 |
| 32 | INSTALL_DIR = $(MAKEDIR)/.. | 32 | INSTALL_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 |
| 61 | CPU = $(PROCESSOR_ARCHITECTURE) | 61 | CPU = $(PROCESSOR_ARCHITECTURE) |
| 62 | CONFIG_H = config.nt | 62 | CONFIG_H = config.nt |
| 63 | OS_TYPE = windowsnt | 63 | OS_TYPE = windowsnt |
| 64 | ! if "$(PROCESSOR_ARCHITECTURE)" == "x86" | 64 | ! if "$(PROCESSOR_ARCHITECTURE)" == "x86" |
| 65 | ARCH = i386 | 65 | ARCH = i386 |
| 66 | CPU = i386 | 66 | CPU = i386 |
| 67 | ! else | 67 | ! else |
| 68 | ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS" | 68 | ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS" |
| 69 | ARCH = mips | 69 | ARCH = mips |
| 70 | ! else | 70 | ! else |
| 71 | ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" | 71 | ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" |
| 72 | ARCH = alpha | 72 | ARCH = alpha |
| 73 | ! else | 73 | ! else |
| 74 | ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC" | 74 | ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC" |
| 75 | ARCH = ppc | 75 | ARCH = 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 |
| 84 | ARCH = i386 | 84 | ARCH = i386 |
| 85 | CPU = i386 | 85 | CPU = i386 |
| 86 | CONFIG_H = config.nt | 86 | CONFIG_H = config.nt |
| 87 | OS_TYPE = windows95 | 87 | OS_TYPE = windows95 |
| 88 | !endif | 88 | !endif |
| 89 | 89 | ||
| 90 | AR = lib | 90 | AR = lib |
| 91 | AR_OUT = -out: | 91 | AR_OUT = -out: |
| 92 | CC = cl | 92 | CC = cl |
| 93 | CC_OUT = -Fo | 93 | CC_OUT = -Fo |
| 94 | LINK = link | 94 | LINK = link |
| 95 | LINK_OUT = -out: | 95 | LINK_OUT = -out: |
| 96 | RC = rc | 96 | RC = rc |
| 97 | RC_OUT = -Fo | 97 | RC_OUT = -Fo |
| 98 | RC_INCLUDE = -i | 98 | RC_INCLUDE = -i |
| 99 | 99 | ||
| 100 | libc = libc.lib | 100 | libc = libc.lib |
| 101 | baselibs = | 101 | baselibs = |
| 102 | O = obj | 102 | O = obj |
| 103 | A = lib | 103 | A = lib |
| 104 | 104 | ||
| 105 | BASE_LIBS = $(libc) $(baselibs) oldnames.lib | 105 | BASE_LIBS = $(libc) $(baselibs) oldnames.lib |
| 106 | 106 | ||
| 107 | ADVAPI32 = advapi32.lib | 107 | ADVAPI32 = advapi32.lib |
| 108 | COMDLG32 = comdlg32.lib | 108 | COMDLG32 = comdlg32.lib |
| 109 | GDI32 = gdi32.lib | 109 | GDI32 = gdi32.lib |
| 110 | MPR = mpr.lib | 110 | MPR = mpr.lib |
| 111 | SHELL32 = shell32.lib | 111 | SHELL32 = shell32.lib |
| 112 | USER32 = user32.lib | 112 | USER32 = user32.lib |
| 113 | WSOCK32 = wsock32.lib | 113 | WSOCK32 = wsock32.lib |
| 114 | 114 | ||
| 115 | !ifdef NOOPT | 115 | !ifdef NOOPT |
| 116 | DEBUG_CFLAGS = -DEMACSDEBUG | 116 | DEBUG_CFLAGS = -DEMACSDEBUG |
| 117 | !else | 117 | !else |
| 118 | DEBUG_CFLAGS = | 118 | DEBUG_CFLAGS = |
| 119 | !endif | 119 | !endif |
| 120 | CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ | 120 | CFLAGS = -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) | 122 | EMACS_EXTRA_C_FLAGS = |
| 123 | EMACS_EXTRA_C_FLAGS = | 123 | |
| 124 | 124 | SYS_LDFLAGS = -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net | |
| 125 | SYS_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. | 128 | TEMACS_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 | TEMACS_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 | 131 | OBJDIR = obj |
| 132 | OBJDIR = obj | 132 | !else |
| 133 | !else | 133 | OBJDIR = obj-spd |
| 134 | OBJDIR = obj-spd | 134 | !endif |
| 135 | !endif | 135 | $(OBJDIR):; -mkdir $(OBJDIR) |
| 136 | $(OBJDIR):; -mkdir $(OBJDIR) | 136 | BLD = $(OBJDIR)/$(ARCH) |
| 137 | BLD = $(OBJDIR)/$(ARCH) | 137 | $(BLD): $(OBJDIR) |
| 138 | $(BLD): $(OBJDIR) | 138 | -mkdir "$(BLD)" |
| 139 | -mkdir "$(BLD)" | 139 | |
| 140 | 140 | CP = cp -f | |
| 141 | CP = cp -f | 141 | CP_DIR = cp -rf |
| 142 | CP_DIR = cp -rf | 142 | IFNOTSAMEDIR = if not exist ..\same-dir.tst |
| 143 | IFNOTSAMEDIR = if not exist ..\same-dir.tst | 143 | ENDIF = |
| 144 | ENDIF = | 144 | FOREACH = for %%f in ( |
| 145 | DEL = rm | 145 | FORVAR = %%f |
| 146 | DEL_TREE = rm -r | 146 | FORDO = ) do |
| 147 | 147 | ENDFOR = | |
| 148 | # The location of the icon file | 148 | ARGQUOTE = " |
| 149 | EMACS_ICON_PATH = ../nt/emacs.ico | 149 | DQUOTE = \" |
| 150 | 150 | DEL = rm | |
| 151 | !ifdef NODEBUG | 151 | DEL_TREE = rm -r |
| 152 | DEBUG_FLAG = | 152 | |
| 153 | !else | 153 | # The location of the icon file |
| 154 | DEBUG_FLAG = -Zi | 154 | EMACS_ICON_PATH = ../nt/emacs.ico |
| 155 | !endif | 155 | |
| 156 | 156 | !ifdef NODEBUG | |
| 157 | !if "$(ARCH)" == "i386" | 157 | DEBUG_FLAG = |
| 158 | !ifdef NOOPT | 158 | !else |
| 159 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) | 159 | DEBUG_FLAG = -Zi |
| 160 | !else | 160 | !endif |
| 161 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) | 161 | |
| 162 | !endif | 162 | !if "$(ARCH)" == "i386" |
| 163 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 163 | !ifdef NOOPT |
| 164 | 164 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) | |
| 165 | !else | 165 | !else |
| 166 | !if "$(ARCH)" == "mips" | 166 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) |
| 167 | ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 | 167 | !endif |
| 168 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 168 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 169 | 169 | ||
| 170 | !else | 170 | !else |
| 171 | !if "$(ARCH)" == "alpha" | 171 | !if "$(ARCH)" == "mips" |
| 172 | !if "$(BUILD_TYPE)" == "spd" | 172 | ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 |
| 173 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl= | 173 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 174 | !else | 174 | |
| 175 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl= | 175 | !else |
| 176 | !endif | 176 | !if "$(ARCH)" == "alpha" |
| 177 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 177 | !if "$(BUILD_TYPE)" == "spd" |
| 178 | 178 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl= | |
| 179 | !else | 179 | !else |
| 180 | !if "$(ARCH)" == "ppc" | 180 | ARCH_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 |
| 182 | ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od | 182 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 183 | ARCH_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 | 187 | ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od |
| 188 | !endif | 188 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 189 | !endif | 189 | |
| 190 | !endif | 190 | !else |
| 191 | 191 | !ERROR Unknown architecture type "$(ARCH)". | |
| 192 | LINK_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)") | 197 | LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS) |
| 198 | EXTRA_LINK = | 198 | |
| 199 | !ELSE | 199 | # From MSVC 5.0 onwards, it seem base relocation information is not included, |
| 200 | EXTRA_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 | # | 203 | EXTRA_LINK = |
| 204 | # If the compiler supports compiling multiple .c files to .o files at | 204 | !ELSE |
| 205 | # one time, use this feature. | 205 | EXTRA_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 | ||