diff options
| author | Andrew Innes | 2000-09-17 21:00:02 +0000 |
|---|---|---|
| committer | Andrew Innes | 2000-09-17 21:00:02 +0000 |
| commit | 9e6fd35da920826d71e5f47c1e8f3bb13ea2b760 (patch) | |
| tree | 79239c190e706bcb61e872b9028483dbdcca0b8b | |
| parent | 45e5607fd3121ff6fa3ae536b8a3eaabb3316419 (diff) | |
| download | emacs-9e6fd35da920826d71e5f47c1e8f3bb13ea2b760.tar.gz emacs-9e6fd35da920826d71e5f47c1e8f3bb13ea2b760.zip | |
Revert to Unix line endings.
| -rw-r--r-- | nt/gmake.defs | 468 | ||||
| -rw-r--r-- | nt/nmake.defs | 438 |
2 files changed, 453 insertions, 453 deletions
diff --git a/nt/gmake.defs b/nt/gmake.defs index 8734943e7da..40ae5e1c50f 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs | |||
| @@ -1,234 +1,234 @@ | |||
| 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 | # NOTES | 22 | # NOTES |
| 23 | # | 23 | # |
| 24 | # I tried to force gmake to use the native shell for simplicity, by | 24 | # I tried to force gmake to use the native shell for simplicity, by |
| 25 | # setting SHELL as below, but this didn't work reliably because of | 25 | # setting SHELL as below, but this didn't work reliably because of |
| 26 | # various case sensitivity niggles. Specifically, COMSPEC (which is in | 26 | # various case sensitivity niggles. Specifically, COMSPEC (which is in |
| 27 | # fact usually spelled ComSpec on NT, to make life difficult) typically | 27 | # fact usually spelled ComSpec on NT, to make life difficult) typically |
| 28 | # references "cmd.exe" (on NT) when the file is actually called | 28 | # references "cmd.exe" (on NT) when the file is actually called |
| 29 | # "CMD.EXE" on disk for hysterical raisons. As a result, GNU make | 29 | # "CMD.EXE" on disk for hysterical raisons. As a result, GNU make |
| 30 | # thinks it doesn't exist (unless compiled with a switch to ignore | 30 | # thinks it doesn't exist (unless compiled with a switch to ignore |
| 31 | # case), and so doesn't change which shell it will invoke to execute | 31 | # case), and so doesn't change which shell it will invoke to execute |
| 32 | # commands. | 32 | # commands. |
| 33 | # | 33 | # |
| 34 | # It would be possible, though very tedious using just gmake facilities, | 34 | # It would be possible, though very tedious using just gmake facilities, |
| 35 | # to convert the COMSPEC value to uppercase to solve this problem, but | 35 | # to convert the COMSPEC value to uppercase to solve this problem, but |
| 36 | # it isn't worth it. That is partly because, even when using the native | 36 | # it isn't worth it. That is partly because, even when using the native |
| 37 | # shell, gmake tends to not be happy with backslashes in command | 37 | # shell, gmake tends to not be happy with backslashes in command |
| 38 | # strings. The obvious solution is to use forward slashes as much as | 38 | # strings. The obvious solution is to use forward slashes as much as |
| 39 | # possible, which can be made to work most of the time (putting | 39 | # possible, which can be made to work most of the time (putting |
| 40 | # filenames in quotes often helps), but there are still some internal | 40 | # filenames in quotes often helps), but there are still some internal |
| 41 | # cmd.exe commands like `del' and `copy' that won't work with them. | 41 | # cmd.exe commands like `del' and `copy' that won't work with them. |
| 42 | # Although it is possible to convert slashes to backslashes when | 42 | # Although it is possible to convert slashes to backslashes when |
| 43 | # necessary, gmake requires explicitly calling its subst function, which | 43 | # necessary, gmake requires explicitly calling its subst function, which |
| 44 | # nmake does not understand). For this reason, it is simplest to | 44 | # nmake does not understand). For this reason, it is simplest to |
| 45 | # mandate that rm and cp be available, so we can use Unix-format file | 45 | # mandate that rm and cp be available, so we can use Unix-format file |
| 46 | # names everywhere. (Fortunately both MS and GNU make, and the | 46 | # names everywhere. (Fortunately both MS and GNU make, and the |
| 47 | # respective compilers, are happy with Unix-format names.) | 47 | # respective compilers, are happy with Unix-format names.) |
| 48 | # | 48 | # |
| 49 | # Since we cannot easily force the choice of a particular shell, we must | 49 | # Since we cannot easily force the choice of a particular shell, we must |
| 50 | # make the effort to cope with whichever shell is being used. | 50 | # make the effort to cope with whichever shell is being used. |
| 51 | # Fortunately, the only command we need to use that is shell specific is | 51 | # Fortunately, the only command we need to use that is shell specific is |
| 52 | # the testing of a file's existence for the purpose of working out when | 52 | # the testing of a file's existence for the purpose of working out when |
| 53 | # we are copying files to their original location. That particular | 53 | # we are copying files to their original location. That particular |
| 54 | # requirement is abstracted easily enough. | 54 | # requirement is abstracted easily enough. |
| 55 | # | 55 | # |
| 56 | # The only other problem area was the change of directory when running | 56 | # The only other problem area was the change of directory when running |
| 57 | # temacs to dump emacs.exe (where gmake doesn't support cd foo in any | 57 | # temacs to dump emacs.exe (where gmake doesn't support cd foo in any |
| 58 | # useful way), but that has been resolved by modifying the Windows | 58 | # useful way), but that has been resolved by modifying the Windows |
| 59 | # unexec function slightly to not require the directory change while | 59 | # unexec function slightly to not require the directory change while |
| 60 | # still allowing objects and binaries to be in subdirectories. | 60 | # still allowing objects and binaries to be in subdirectories. |
| 61 | 61 | ||
| 62 | # This doesn't work. | 62 | # This doesn't work. |
| 63 | #SHELL:=$(COMSPEC) | 63 | #SHELL:=$(COMSPEC) |
| 64 | 64 | ||
| 65 | # Determine whether make is using sh or cmd/command as shell; cmd.exe | 65 | # Determine whether make is using sh or cmd/command as shell; cmd.exe |
| 66 | # will output "ECHO is on" when echo is given by itself, while sh will | 66 | # will output "ECHO is on" when echo is given by itself, while sh will |
| 67 | # not produce any output. | 67 | # not produce any output. |
| 68 | sh_output := $(shell echo) | 68 | sh_output := $(shell echo) |
| 69 | ifeq "$(findstring ECHO, $(sh_output))" "ECHO" | 69 | ifeq "$(findstring ECHO, $(sh_output))" "ECHO" |
| 70 | THE_SHELL = $(COMSPEC)$(ComSpec) | 70 | THE_SHELL = $(COMSPEC)$(ComSpec) |
| 71 | SHELLTYPE=CMD | 71 | SHELLTYPE=CMD |
| 72 | else | 72 | else |
| 73 | USING_SH = 1 | 73 | USING_SH = 1 |
| 74 | THE_SHELL = $(SHELL) | 74 | THE_SHELL = $(SHELL) |
| 75 | SHELLTYPE=SH | 75 | SHELLTYPE=SH |
| 76 | SETLOADPATH=EMACSLOADPATH=$(lisp) | 76 | SETLOADPATH=EMACSLOADPATH=../lisp |
| 77 | endif | 77 | endif |
| 78 | 78 | ||
| 79 | MAKEDIR = $(CURDIR) | 79 | MAKEDIR = $(CURDIR) |
| 80 | ALL_DEPS = $^ | 80 | ALL_DEPS = $^ |
| 81 | EMPTY = | 81 | EMPTY = |
| 82 | SPACE = $(EMPTY) $(EMPTY) | 82 | SPACE = $(EMPTY) $(EMPTY) |
| 83 | 83 | ||
| 84 | SUBSYSTEM_WINDOWS=-Wl,-subsystem,windows | 84 | SUBSYSTEM_WINDOWS=-Wl,-subsystem,windows |
| 85 | SUBSYSTEM_CONSOLE=-Wl,-subsystem,console | 85 | SUBSYSTEM_CONSOLE=-Wl,-subsystem,console |
| 86 | 86 | ||
| 87 | # INSTALL_DIR is the directory into which emacs will be installed. | 87 | # INSTALL_DIR is the directory into which emacs will be installed. |
| 88 | # | 88 | # |
| 89 | ifndef INSTALL_DIR | 89 | ifndef INSTALL_DIR |
| 90 | INSTALL_DIR = $(MAKEDIR)/.. | 90 | INSTALL_DIR = $(MAKEDIR)/.. |
| 91 | endif | 91 | endif |
| 92 | 92 | ||
| 93 | # Determine the architecture we're running on. | 93 | # Determine the architecture we're running on. |
| 94 | # Define ARCH for our purposes; | 94 | # Define ARCH for our purposes; |
| 95 | # Define CPU for use by ntwin32.mak; | 95 | # Define CPU for use by ntwin32.mak; |
| 96 | # Define CONFIG_H to the appropriate config.h for the system; | 96 | # Define CONFIG_H to the appropriate config.h for the system; |
| 97 | # | 97 | # |
| 98 | ifdef PROCESSOR_ARCHITECTURE | 98 | ifdef PROCESSOR_ARCHITECTURE |
| 99 | # We're on Windows NT | 99 | # We're on Windows NT |
| 100 | CPU = $(PROCESSOR_ARCHITECTURE) | 100 | CPU = $(PROCESSOR_ARCHITECTURE) |
| 101 | CONFIG_H = config.nt | 101 | CONFIG_H = config.nt |
| 102 | OS_TYPE = windowsnt | 102 | OS_TYPE = windowsnt |
| 103 | ifeq "$(PROCESSOR_ARCHITECTURE)" "x86" | 103 | ifeq "$(PROCESSOR_ARCHITECTURE)" "x86" |
| 104 | ARCH = i386 | 104 | ARCH = i386 |
| 105 | CPU = i386 | 105 | CPU = i386 |
| 106 | else | 106 | else |
| 107 | ifeq "$(PROCESSOR_ARCHITECTURE)" "MIPS" | 107 | ifeq "$(PROCESSOR_ARCHITECTURE)" "MIPS" |
| 108 | ARCH = mips | 108 | ARCH = mips |
| 109 | else | 109 | else |
| 110 | ifeq "$(PROCESSOR_ARCHITECTURE)" "ALPHA" | 110 | ifeq "$(PROCESSOR_ARCHITECTURE)" "ALPHA" |
| 111 | ARCH = alpha | 111 | ARCH = alpha |
| 112 | else | 112 | else |
| 113 | ifeq "$(PROCESSOR_ARCHITECTURE)" "PPC" | 113 | ifeq "$(PROCESSOR_ARCHITECTURE)" "PPC" |
| 114 | ARCH = ppc | 114 | ARCH = ppc |
| 115 | else | 115 | else |
| 116 | error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" | 116 | error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" |
| 117 | endif | 117 | endif |
| 118 | endif | 118 | endif |
| 119 | endif | 119 | endif |
| 120 | endif | 120 | endif |
| 121 | else | 121 | else |
| 122 | # We're on Windows 95 | 122 | # We're on Windows 95 |
| 123 | ARCH = i386 | 123 | ARCH = i386 |
| 124 | CPU = i386 | 124 | CPU = i386 |
| 125 | CONFIG_H = config.nt | 125 | CONFIG_H = config.nt |
| 126 | OS_TYPE = windows95 | 126 | OS_TYPE = windows95 |
| 127 | endif | 127 | endif |
| 128 | 128 | ||
| 129 | AR = ar -rsc | 129 | AR = ar -rsc |
| 130 | AR_OUT = | 130 | AR_OUT = |
| 131 | CC = gcc | 131 | CC = gcc |
| 132 | CC_OUT = -o$(SPACE) | 132 | CC_OUT = -o$(SPACE) |
| 133 | LINK = gcc | 133 | LINK = gcc |
| 134 | LINK_OUT = -o$(SPACE) | 134 | LINK_OUT = -o$(SPACE) |
| 135 | RC = windres -O coff | 135 | RC = windres -O coff |
| 136 | RC_OUT = -o$(SPACE) | 136 | RC_OUT = -o$(SPACE) |
| 137 | RC_INCLUDE = --include-dir$(SPACE) | 137 | RC_INCLUDE = --include-dir$(SPACE) |
| 138 | 138 | ||
| 139 | libc = | 139 | libc = |
| 140 | baselibs = | 140 | baselibs = |
| 141 | O = o | 141 | O = o |
| 142 | A = a | 142 | A = a |
| 143 | 143 | ||
| 144 | BASE_LIBS = $(libc) $(baselibs) | 144 | BASE_LIBS = $(libc) $(baselibs) |
| 145 | 145 | ||
| 146 | ADVAPI32 = -ladvapi32 | 146 | ADVAPI32 = -ladvapi32 |
| 147 | COMDLG32 = -lcomdlg32 | 147 | COMDLG32 = -lcomdlg32 |
| 148 | GDI32 = -lgdi32 | 148 | GDI32 = -lgdi32 |
| 149 | MPR = -lmpr | 149 | MPR = -lmpr |
| 150 | SHELL32 = -lshell32 | 150 | SHELL32 = -lshell32 |
| 151 | USER32 = -luser32 | 151 | USER32 = -luser32 |
| 152 | WSOCK32 = -lwsock32 | 152 | WSOCK32 = -lwsock32 |
| 153 | 153 | ||
| 154 | ifdef NOOPT | 154 | ifdef NOOPT |
| 155 | DEBUG_CFLAGS = -DEMACSDEBUG | 155 | DEBUG_CFLAGS = -DEMACSDEBUG |
| 156 | else | 156 | else |
| 157 | DEBUG_CFLAGS = | 157 | DEBUG_CFLAGS = |
| 158 | endif | 158 | endif |
| 159 | CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ | 159 | CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ |
| 160 | -D_CRTAPI1=_cdecl \ | 160 | -D_CRTAPI1=_cdecl \ |
| 161 | $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) | 161 | $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) |
| 162 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 | 162 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 |
| 163 | 163 | ||
| 164 | # see comments in allocate_heap in w32heap.c before changing any of the | 164 | # see comments in allocate_heap in w32heap.c before changing any of the |
| 165 | # -stack, -heap, or -image-base settings. | 165 | # -stack, -heap, or -image-base settings. |
| 166 | TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -g $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map | 166 | TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -g $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map |
| 167 | 167 | ||
| 168 | ifdef NOOPT | 168 | ifdef NOOPT |
| 169 | OBJDIR = oo | 169 | OBJDIR = oo |
| 170 | else | 170 | else |
| 171 | OBJDIR = oo-spd | 171 | OBJDIR = oo-spd |
| 172 | endif | 172 | endif |
| 173 | $(OBJDIR):; -mkdir "$(OBJDIR)" | 173 | $(OBJDIR):; -mkdir "$(OBJDIR)" |
| 174 | BLD = $(OBJDIR)/$(ARCH) | 174 | BLD = $(OBJDIR)/$(ARCH) |
| 175 | $(BLD): $(OBJDIR) | 175 | $(BLD): $(OBJDIR) |
| 176 | -mkdir "$(BLD)" | 176 | -mkdir "$(BLD)" |
| 177 | 177 | ||
| 178 | CP = cp -f | 178 | CP = cp -f |
| 179 | CP_DIR = cp -rf | 179 | CP_DIR = cp -rf |
| 180 | DEL = rm | 180 | DEL = rm |
| 181 | DEL_TREE = rm -r | 181 | DEL_TREE = rm -r |
| 182 | ifdef USING_SH | 182 | ifdef USING_SH |
| 183 | IFNOTSAMEDIR = if [ ! -s ../same-dir.tst ] ; then | 183 | IFNOTSAMEDIR = if [ ! -s ../same-dir.tst ] ; then |
| 184 | FOREACH = for f in | 184 | FOREACH = for f in |
| 185 | FORVAR = $${f} | 185 | FORVAR = $${f} |
| 186 | FORDO = ; do | 186 | FORDO = ; do |
| 187 | ENDFOR = ; done | 187 | ENDFOR = ; done |
| 188 | ENDIF = ; fi | 188 | ENDIF = ; fi |
| 189 | ARGQUOTE = ' | 189 | ARGQUOTE = ' |
| 190 | DQUOTE = "" | 190 | DQUOTE = "" |
| 191 | else | 191 | else |
| 192 | IFNOTSAMEDIR = if not exist ../same-dir.tst | 192 | IFNOTSAMEDIR = if not exist ../same-dir.tst |
| 193 | FOREACH = for %%f in ( | 193 | FOREACH = for %%f in ( |
| 194 | FORVAR = %%f | 194 | FORVAR = %%f |
| 195 | FORDO = ) do | 195 | FORDO = ) do |
| 196 | ENDFOR = | 196 | ENDFOR = |
| 197 | ENDIF = | 197 | ENDIF = |
| 198 | ARGQUOTE = " | 198 | ARGQUOTE = " |
| 199 | DQUOTE = \" | 199 | DQUOTE = \" |
| 200 | endif | 200 | endif |
| 201 | 201 | ||
| 202 | # The location of the icon file | 202 | # The location of the icon file |
| 203 | EMACS_ICON_PATH = ../nt/emacs.ico | 203 | EMACS_ICON_PATH = ../nt/emacs.ico |
| 204 | 204 | ||
| 205 | ifdef NODEBUG | 205 | ifdef NODEBUG |
| 206 | DEBUG_FLAG = | 206 | DEBUG_FLAG = |
| 207 | else | 207 | else |
| 208 | DEBUG_FLAG = -g | 208 | DEBUG_FLAG = -g |
| 209 | endif | 209 | endif |
| 210 | 210 | ||
| 211 | ifdef NOCYGWIN | 211 | ifdef NOCYGWIN |
| 212 | NOCYGWIN = -mno-cygwin | 212 | NOCYGWIN = -mno-cygwin |
| 213 | endif | 213 | endif |
| 214 | 214 | ||
| 215 | ifeq "$(ARCH)" "i386" | 215 | ifeq "$(ARCH)" "i386" |
| 216 | ifdef NOOPT | 216 | ifdef NOOPT |
| 217 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) | 217 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) |
| 218 | else | 218 | else |
| 219 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) -mcpu=i686 -O2 \ | 219 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) -mcpu=i686 -O2 \ |
| 220 | # -fbuiltin \ | 220 | # -fbuiltin \ |
| 221 | # -finline-functions \ | 221 | # -finline-functions \ |
| 222 | # -fomit-frame-pointer | 222 | # -fomit-frame-pointer |
| 223 | endif | 223 | endif |
| 224 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 224 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 225 | else | 225 | else |
| 226 | ERROR Unknown architecture type "$(ARCH)". | 226 | ERROR Unknown architecture type "$(ARCH)". |
| 227 | endif | 227 | endif |
| 228 | 228 | ||
| 229 | LINK_FLAGS = $(ARCH_LDFLAGS) $(NOCYGWIN) $(USER_LDFLAGS) | 229 | LINK_FLAGS = $(ARCH_LDFLAGS) $(NOCYGWIN) $(USER_LDFLAGS) |
| 230 | 230 | ||
| 231 | .DEFAULT: | 231 | .DEFAULT: |
| 232 | 232 | ||
| 233 | $(BLD)/%.o: %.c | 233 | $(BLD)/%.o: %.c |
| 234 | $(CC) $(CFLAGS) $(CC_OUT)$@ $< | 234 | $(CC) $(CFLAGS) $(CC_OUT)$@ $< |
diff --git a/nt/nmake.defs b/nt/nmake.defs index ff3cc1be90d..4e3ead1b14d 100644 --- a/nt/nmake.defs +++ b/nt/nmake.defs | |||
| @@ -1,219 +1,219 @@ | |||
| 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 | SHELLTYPE=CMD | 23 | SHELLTYPE=CMD |
| 24 | 24 | ||
| 25 | ALL_DEPS = $** | 25 | ALL_DEPS = $** |
| 26 | 26 | ||
| 27 | SUBSYSTEM_WINDOWS=-subsystem:windows | 27 | SUBSYSTEM_WINDOWS=-subsystem:windows |
| 28 | SUBSYSTEM_CONSOLE=-subsystem:console | 28 | SUBSYSTEM_CONSOLE=-subsystem:console |
| 29 | 29 | ||
| 30 | # INSTALL_DIR is the directory into which emacs will be installed. | 30 | # INSTALL_DIR is the directory into which emacs will be installed. |
| 31 | # | 31 | # |
| 32 | !ifndef INSTALL_DIR | 32 | !ifndef INSTALL_DIR |
| 33 | INSTALL_DIR = $(MAKEDIR)/.. | 33 | INSTALL_DIR = $(MAKEDIR)/.. |
| 34 | !endif | 34 | !endif |
| 35 | 35 | ||
| 36 | # Allow detection of builds with MSVC 5 or later, so we can | 36 | # Allow detection of builds with MSVC 5 or later, so we can |
| 37 | # speed up compiles (see rule at end). | 37 | # speed up compiles (see rule at end). |
| 38 | # | 38 | # |
| 39 | _NMAKE_VER_5=162 | 39 | _NMAKE_VER_5=162 |
| 40 | _NMAKE_VER_4=0 | 40 | _NMAKE_VER_4=0 |
| 41 | 41 | ||
| 42 | !IFNDEF _NMAKE_VER | 42 | !IFNDEF _NMAKE_VER |
| 43 | _NMAKE_VER=$(_NMAKE_VER_4) | 43 | _NMAKE_VER=$(_NMAKE_VER_4) |
| 44 | !ENDIF | 44 | !ENDIF |
| 45 | 45 | ||
| 46 | # Check that the INCLUDE and LIB environment variables are set. | 46 | # Check that the INCLUDE and LIB environment variables are set. |
| 47 | # | 47 | # |
| 48 | !ifndef INCLUDE | 48 | !ifndef INCLUDE |
| 49 | !error The INCLUDE environment variable needs to be set. | 49 | !error The INCLUDE environment variable needs to be set. |
| 50 | !endif | 50 | !endif |
| 51 | !ifndef LIB | 51 | !ifndef LIB |
| 52 | !error The LIB environment variable needs to be set. | 52 | !error The LIB environment variable needs to be set. |
| 53 | !endif | 53 | !endif |
| 54 | 54 | ||
| 55 | # Determine the architecture we're running on. | 55 | # Determine the architecture we're running on. |
| 56 | # Define ARCH for our purposes; | 56 | # Define ARCH for our purposes; |
| 57 | # Define CPU for use by ntwin32.mak; | 57 | # Define CPU for use by ntwin32.mak; |
| 58 | # Define CONFIG_H to the appropriate config.h for the system; | 58 | # Define CONFIG_H to the appropriate config.h for the system; |
| 59 | # | 59 | # |
| 60 | !ifdef PROCESSOR_ARCHITECTURE | 60 | !ifdef PROCESSOR_ARCHITECTURE |
| 61 | # We're on Windows NT | 61 | # We're on Windows NT |
| 62 | CPU = $(PROCESSOR_ARCHITECTURE) | 62 | CPU = $(PROCESSOR_ARCHITECTURE) |
| 63 | CONFIG_H = config.nt | 63 | CONFIG_H = config.nt |
| 64 | OS_TYPE = windowsnt | 64 | OS_TYPE = windowsnt |
| 65 | ! if "$(PROCESSOR_ARCHITECTURE)" == "x86" | 65 | ! if "$(PROCESSOR_ARCHITECTURE)" == "x86" |
| 66 | ARCH = i386 | 66 | ARCH = i386 |
| 67 | CPU = i386 | 67 | CPU = i386 |
| 68 | ! else | 68 | ! else |
| 69 | ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS" | 69 | ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS" |
| 70 | ARCH = mips | 70 | ARCH = mips |
| 71 | ! else | 71 | ! else |
| 72 | ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" | 72 | ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" |
| 73 | ARCH = alpha | 73 | ARCH = alpha |
| 74 | ! else | 74 | ! else |
| 75 | ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC" | 75 | ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC" |
| 76 | ARCH = ppc | 76 | ARCH = ppc |
| 77 | ! else | 77 | ! else |
| 78 | ! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" | 78 | ! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)" |
| 79 | ! endif | 79 | ! endif |
| 80 | ! endif | 80 | ! endif |
| 81 | ! endif | 81 | ! endif |
| 82 | ! endif | 82 | ! endif |
| 83 | !else | 83 | !else |
| 84 | # We're on Windows 95 | 84 | # We're on Windows 95 |
| 85 | ARCH = i386 | 85 | ARCH = i386 |
| 86 | CPU = i386 | 86 | CPU = i386 |
| 87 | CONFIG_H = config.nt | 87 | CONFIG_H = config.nt |
| 88 | OS_TYPE = windows95 | 88 | OS_TYPE = windows95 |
| 89 | !endif | 89 | !endif |
| 90 | 90 | ||
| 91 | AR = lib | 91 | AR = lib |
| 92 | AR_OUT = -out: | 92 | AR_OUT = -out: |
| 93 | CC = cl | 93 | CC = cl |
| 94 | CC_OUT = -Fo | 94 | CC_OUT = -Fo |
| 95 | LINK = link | 95 | LINK = link |
| 96 | LINK_OUT = -out: | 96 | LINK_OUT = -out: |
| 97 | RC = rc | 97 | RC = rc |
| 98 | RC_OUT = -Fo | 98 | RC_OUT = -Fo |
| 99 | RC_INCLUDE = -i | 99 | RC_INCLUDE = -i |
| 100 | 100 | ||
| 101 | libc = libc.lib | 101 | libc = libc.lib |
| 102 | baselibs = | 102 | baselibs = |
| 103 | O = obj | 103 | O = obj |
| 104 | A = lib | 104 | A = lib |
| 105 | 105 | ||
| 106 | BASE_LIBS = $(libc) $(baselibs) oldnames.lib | 106 | BASE_LIBS = $(libc) $(baselibs) oldnames.lib |
| 107 | 107 | ||
| 108 | ADVAPI32 = advapi32.lib | 108 | ADVAPI32 = advapi32.lib |
| 109 | COMDLG32 = comdlg32.lib | 109 | COMDLG32 = comdlg32.lib |
| 110 | GDI32 = gdi32.lib | 110 | GDI32 = gdi32.lib |
| 111 | MPR = mpr.lib | 111 | MPR = mpr.lib |
| 112 | SHELL32 = shell32.lib | 112 | SHELL32 = shell32.lib |
| 113 | USER32 = user32.lib | 113 | USER32 = user32.lib |
| 114 | WSOCK32 = wsock32.lib | 114 | WSOCK32 = wsock32.lib |
| 115 | 115 | ||
| 116 | !ifdef NOOPT | 116 | !ifdef NOOPT |
| 117 | DEBUG_CFLAGS = -DEMACSDEBUG | 117 | DEBUG_CFLAGS = -DEMACSDEBUG |
| 118 | !else | 118 | !else |
| 119 | DEBUG_CFLAGS = | 119 | DEBUG_CFLAGS = |
| 120 | !endif | 120 | !endif |
| 121 | CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ | 121 | CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \ |
| 122 | -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) | 122 | -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) |
| 123 | EMACS_EXTRA_C_FLAGS = | 123 | EMACS_EXTRA_C_FLAGS = |
| 124 | 124 | ||
| 125 | 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 |
| 126 | 126 | ||
| 127 | # 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 |
| 128 | # -stack, -heap, or -base settings. | 128 | # -stack, -heap, or -base settings. |
| 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 | 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) |
| 130 | 130 | ||
| 131 | !ifdef NOOPT | 131 | !ifdef NOOPT |
| 132 | OBJDIR = obj | 132 | OBJDIR = obj |
| 133 | !else | 133 | !else |
| 134 | OBJDIR = obj-spd | 134 | OBJDIR = obj-spd |
| 135 | !endif | 135 | !endif |
| 136 | $(OBJDIR):; -mkdir $(OBJDIR) | 136 | $(OBJDIR):; -mkdir $(OBJDIR) |
| 137 | BLD = $(OBJDIR)/$(ARCH) | 137 | BLD = $(OBJDIR)/$(ARCH) |
| 138 | $(BLD): $(OBJDIR) | 138 | $(BLD): $(OBJDIR) |
| 139 | -mkdir "$(BLD)" | 139 | -mkdir "$(BLD)" |
| 140 | 140 | ||
| 141 | CP = cp -f | 141 | CP = cp -f |
| 142 | CP_DIR = cp -rf | 142 | CP_DIR = cp -rf |
| 143 | IFNOTSAMEDIR = if not exist ..\same-dir.tst | 143 | IFNOTSAMEDIR = if not exist ..\same-dir.tst |
| 144 | ENDIF = | 144 | ENDIF = |
| 145 | FOREACH = for %%f in ( | 145 | FOREACH = for %%f in ( |
| 146 | FORVAR = %%f | 146 | FORVAR = %%f |
| 147 | FORDO = ) do | 147 | FORDO = ) do |
| 148 | ENDFOR = | 148 | ENDFOR = |
| 149 | ARGQUOTE = " | 149 | ARGQUOTE = " |
| 150 | DQUOTE = \" | 150 | DQUOTE = \" |
| 151 | DEL = rm | 151 | DEL = rm |
| 152 | DEL_TREE = rm -r | 152 | DEL_TREE = rm -r |
| 153 | 153 | ||
| 154 | # The location of the icon file | 154 | # The location of the icon file |
| 155 | EMACS_ICON_PATH = ../nt/emacs.ico | 155 | EMACS_ICON_PATH = ../nt/emacs.ico |
| 156 | 156 | ||
| 157 | !ifdef NODEBUG | 157 | !ifdef NODEBUG |
| 158 | DEBUG_FLAG = | 158 | DEBUG_FLAG = |
| 159 | !else | 159 | !else |
| 160 | DEBUG_FLAG = -Zi | 160 | DEBUG_FLAG = -Zi |
| 161 | !endif | 161 | !endif |
| 162 | 162 | ||
| 163 | !if "$(ARCH)" == "i386" | 163 | !if "$(ARCH)" == "i386" |
| 164 | !ifdef NOOPT | 164 | !ifdef NOOPT |
| 165 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) | 165 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG) |
| 166 | !else | 166 | !else |
| 167 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) | 167 | ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG) |
| 168 | !endif | 168 | !endif |
| 169 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 169 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 170 | 170 | ||
| 171 | !else | 171 | !else |
| 172 | !if "$(ARCH)" == "mips" | 172 | !if "$(ARCH)" == "mips" |
| 173 | ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 | 173 | ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0 |
| 174 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 174 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 175 | 175 | ||
| 176 | !else | 176 | !else |
| 177 | !if "$(ARCH)" == "alpha" | 177 | !if "$(ARCH)" == "alpha" |
| 178 | !if "$(BUILD_TYPE)" == "spd" | 178 | !if "$(BUILD_TYPE)" == "spd" |
| 179 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl= | 179 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl= |
| 180 | !else | 180 | !else |
| 181 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl= | 181 | ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl= |
| 182 | !endif | 182 | !endif |
| 183 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 183 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 184 | 184 | ||
| 185 | !else | 185 | !else |
| 186 | !if "$(ARCH)" == "ppc" | 186 | !if "$(ARCH)" == "ppc" |
| 187 | # These flags are a guess...if they don't work, please send me mail. | 187 | # These flags are a guess...if they don't work, please send me mail. |
| 188 | ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od | 188 | ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od |
| 189 | ARCH_LDFLAGS = $(SYS_LDFLAGS) | 189 | ARCH_LDFLAGS = $(SYS_LDFLAGS) |
| 190 | 190 | ||
| 191 | !else | 191 | !else |
| 192 | !ERROR Unknown architecture type "$(ARCH)". | 192 | !ERROR Unknown architecture type "$(ARCH)". |
| 193 | !endif | 193 | !endif |
| 194 | !endif | 194 | !endif |
| 195 | !endif | 195 | !endif |
| 196 | !endif | 196 | !endif |
| 197 | 197 | ||
| 198 | LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS) | 198 | LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS) |
| 199 | 199 | ||
| 200 | # From MSVC 5.0 onwards, it seem base relocation information is not included, | 200 | # From MSVC 5.0 onwards, it seem base relocation information is not included, |
| 201 | # at least in release builds. We need to ensure the reloc info is included | 201 | # at least in release builds. We need to ensure the reloc info is included |
| 202 | # in order to use the MSVC profiler. | 202 | # in order to use the MSVC profiler. |
| 203 | !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") | 203 | !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") |
| 204 | EXTRA_LINK = | 204 | EXTRA_LINK = |
| 205 | !ELSE | 205 | !ELSE |
| 206 | EXTRA_LINK = -profile | 206 | EXTRA_LINK = -profile |
| 207 | !ENDIF | 207 | !ENDIF |
| 208 | 208 | ||
| 209 | # | 209 | # |
| 210 | # If the compiler supports compiling multiple .c files to .o files at | 210 | # If the compiler supports compiling multiple .c files to .o files at |
| 211 | # one time, use this feature. | 211 | # one time, use this feature. |
| 212 | # | 212 | # |
| 213 | !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") | 213 | !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)") |
| 214 | .c{$(BLD)}.obj: | 214 | .c{$(BLD)}.obj: |
| 215 | $(CC) $(CFLAGS) -Fo$(BLD)\ $< | 215 | $(CC) $(CFLAGS) -Fo$(BLD)\ $< |
| 216 | !ELSE | 216 | !ELSE |
| 217 | .c{$(BLD)}.obj:: | 217 | .c{$(BLD)}.obj:: |
| 218 | $(CC) $(CFLAGS) -Fo$(BLD)\ $< | 218 | $(CC) $(CFLAGS) -Fo$(BLD)\ $< |
| 219 | !ENDIF | 219 | !ENDIF |