annotate nt/nmake.defs @ 35882:77f591ec2038

*** empty log message ***
author Kenichi Handa <handa@m17n.org>
date Mon, 05 Feb 2001 01:20:37 +0000
parents 2ed117dc79cf
children 0158865560da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
1 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
2 # Makefile definition file for building GNU Emacs on Windows NT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
3 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
4 # GNU Emacs is free software; you can redistribute it and/or modify
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
5 # it under the terms of the GNU General Public License as published by
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
6 # the Free Software Foundation; either version 2, or (at your option)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
7 # any later version.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
8 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
9 # GNU Emacs is distributed in the hope that it will be useful,
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
12 # GNU General Public License for more details.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
13 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
14 # You should have received a copy of the GNU General Public License
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
15 # along with GNU Emacs; see the file COPYING. If not, write to
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
16 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
17 # Boston, MA 02111-1307, USA.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
18
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
19 # Ensure 'all' is the default target
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
20 all:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
21
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
22 THE_SHELL = $(COMSPEC)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
23 SHELLTYPE=CMD
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
24
35103
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
25 MAKETYPE=nmake
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
26
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
27 ALL_DEPS = $**
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
28
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
29 SUBSYSTEM_WINDOWS=-subsystem:windows
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
30 SUBSYSTEM_CONSOLE=-subsystem:console
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
31
34275
4828a262abb5 (CURDIR): New define.
Andrew Innes <andrewi@gnu.org>
parents: 31679
diff changeset
32 CURDIR = $(MAKEDIR:\=/)
4828a262abb5 (CURDIR): New define.
Andrew Innes <andrewi@gnu.org>
parents: 31679
diff changeset
33
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
34 # INSTALL_DIR is the directory into which emacs will be installed.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
35 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
36 !ifndef INSTALL_DIR
34275
4828a262abb5 (CURDIR): New define.
Andrew Innes <andrewi@gnu.org>
parents: 31679
diff changeset
37 INSTALL_DIR = $(CURDIR)/..
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
38 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
39
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
40 # Allow detection of builds with MSVC 5 or later, so we can
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
41 # speed up compiles (see rule at end).
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
42 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
43 _NMAKE_VER_5=162
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
44 _NMAKE_VER_4=0
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
45
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
46 !IFNDEF _NMAKE_VER
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
47 _NMAKE_VER=$(_NMAKE_VER_4)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
48 !ENDIF
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
49
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
50 # Check that the INCLUDE and LIB environment variables are set.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
51 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
52 !ifndef INCLUDE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
53 !error The INCLUDE environment variable needs to be set.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
54 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
55 !ifndef LIB
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
56 !error The LIB environment variable needs to be set.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
57 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
58
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
59 # Determine the architecture we're running on.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
60 # Define ARCH for our purposes;
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
61 # Define CPU for use by ntwin32.mak;
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
62 # Define CONFIG_H to the appropriate config.h for the system;
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
63 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
64 !ifdef PROCESSOR_ARCHITECTURE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
65 # We're on Windows NT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
66 CPU = $(PROCESSOR_ARCHITECTURE)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
67 CONFIG_H = config.nt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
68 OS_TYPE = windowsnt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
69 ! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
70 ARCH = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
71 CPU = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
72 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
73 ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
74 ARCH = mips
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
75 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
76 ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
77 ARCH = alpha
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
78 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
79 ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
80 ARCH = ppc
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
81 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
82 ! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
83 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
84 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
85 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
86 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
87 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
88 # We're on Windows 95
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
89 ARCH = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
90 CPU = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
91 CONFIG_H = config.nt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
92 OS_TYPE = windows95
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
93 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
94
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
95 AR = lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
96 AR_OUT = -out:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
97 CC = cl
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
98 CC_OUT = -Fo
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
99 LINK = link
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
100 LINK_OUT = -out:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
101 RC = rc
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
102 RC_OUT = -Fo
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
103 RC_INCLUDE = -i
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
104
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
105 libc = libc.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
106 baselibs =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
107 O = obj
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
108 A = lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
109
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
110 BASE_LIBS = $(libc) $(baselibs) oldnames.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
111
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
112 ADVAPI32 = advapi32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
113 COMDLG32 = comdlg32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
114 GDI32 = gdi32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
115 MPR = mpr.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
116 SHELL32 = shell32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
117 USER32 = user32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
118 WSOCK32 = wsock32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
119
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
120 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
121 DEBUG_CFLAGS = -DEMACSDEBUG
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
122 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
123 DEBUG_CFLAGS =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
124 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
125 CFLAGS = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
126 -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
127 EMACS_EXTRA_C_FLAGS =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
128
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
129 SYS_LDFLAGS = -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
130
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
131 # see comments in allocate_heap in w32heap.c before changing any of the
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
132 # -stack, -heap, or -base settings.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
133 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)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
134
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
135 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
136 OBJDIR = obj
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
137 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
138 OBJDIR = obj-spd
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
139 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
140 $(OBJDIR):; -mkdir $(OBJDIR)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
141 BLD = $(OBJDIR)/$(ARCH)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
142 $(BLD): $(OBJDIR)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
143 -mkdir "$(BLD)"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
144
35103
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
145 COMPILER_TEMP_FILES = *.pdb
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
146
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
147 CP = cp -f
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
148 CP_DIR = cp -rf
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
149 IFNOTSAMEDIR = if not exist ..\same-dir.tst
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
150 ENDIF =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
151 FOREACH = for %%f in (
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
152 FORVAR = %%f
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
153 FORDO = ) do
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
154 ENDFOR =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
155 ARGQUOTE = "
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
156 DQUOTE = \"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
157 DEL = rm
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
158 DEL_TREE = rm -r
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
159
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
160 !ifdef NODEBUG
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
161 DEBUG_FLAG =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
162 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
163 DEBUG_FLAG = -Zi
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
164 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
165
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
166 !if "$(ARCH)" == "i386"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
167 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
168 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Od -G3d -Zp8 $(DEBUG_FLAG)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
169 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
170 ARCH_CFLAGS = -nologo -D_X86_=1 -c -Zel -W2 -H63 -Oxsb2 -Oy- -G6dF -Zp8 $(DEBUG_FLAG)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
171 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
172 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
173
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
174 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
175 !if "$(ARCH)" == "mips"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
176 ARCH_CFLAGS = -D_MIPS_=1 -c -W2 -Zi -Od -Gt0
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
177 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
178
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
179 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
180 !if "$(ARCH)" == "alpha"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
181 !if "$(BUILD_TYPE)" == "spd"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
182 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -Od -D__stdcall= -D__cdecl=
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
183 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
184 ARCH_CFLAGS = -D_ALPHA_=1 -c -Ze -Zi -W2 -O1 -D__stdcall= -D__cdecl=
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
185 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
186 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
187
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
188 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
189 !if "$(ARCH)" == "ppc"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
190 # These flags are a guess...if they don't work, please send me mail.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
191 ARCH_CFLAGS = -D_PPC_=1 -c -Ze -Zi -W2 -Od
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
192 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
193
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
194 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
195 !ERROR Unknown architecture type "$(ARCH)".
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
196 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
197 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
198 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
199 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
200
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
201 LINK_FLAGS = $(ARCH_LDFLAGS) $(USER_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
202
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
203 # From MSVC 5.0 onwards, it seem base relocation information is not included,
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
204 # at least in release builds. We need to ensure the reloc info is included
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
205 # in order to use the MSVC profiler.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
206 !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
207 EXTRA_LINK =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
208 !ELSE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
209 EXTRA_LINK = -profile
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
210 !ENDIF
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
211
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
212 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
213 # If the compiler supports compiling multiple .c files to .o files at
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
214 # one time, use this feature.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
215 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
216 !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
217 .c{$(BLD)}.obj:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
218 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
219 !ELSE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
220 .c{$(BLD)}.obj::
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
221 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
222 !ENDIF