annotate nt/nmake.defs @ 36957:0c9ff9f1d49f

*** empty log message ***
author Gerd Moellmann <gerd@gnu.org>
date Fri, 23 Mar 2001 11:14:13 +0000
parents d4c0b7a5bc48
children 3e0214f03d95
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 #
36375
19b74f67a4ae Add copyright notice.
Andrew Innes <andrewi@gnu.org>
parents: 35899
diff changeset
2 # Makefile definition file for building GNU Emacs on the Microsoft W32 API.
19b74f67a4ae Add copyright notice.
Andrew Innes <andrewi@gnu.org>
parents: 35899
diff changeset
3 # Copyright (c) 2000-2001 Free Software Foundation, Inc.
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
4 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
5 # 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
6 # 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
7 # 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
8 # any later version.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
9 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
10 # 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
11 # 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
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
13 # GNU General Public License for more details.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
14 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
15 # 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
16 # 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
17 # 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
18 # Boston, MA 02111-1307, USA.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
19
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
20 # Ensure 'all' is the default target
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
21 all:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
22
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
23 THE_SHELL = $(COMSPEC)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
24 SHELLTYPE=CMD
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
25
35103
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
26 MAKETYPE=nmake
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
27
35899
0158865560da (THISDIR): New definition.
Andrew Innes <andrewi@gnu.org>
parents: 35103
diff changeset
28 CURDIR = $(MAKEDIR:\=/)
0158865560da (THISDIR): New definition.
Andrew Innes <andrewi@gnu.org>
parents: 35103
diff changeset
29 THISDIR = $(MAKEDIR)
0158865560da (THISDIR): New definition.
Andrew Innes <andrewi@gnu.org>
parents: 35103
diff changeset
30
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
31 ALL_DEPS = $**
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
32
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
33 SUBSYSTEM_WINDOWS=-subsystem:windows
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
34 SUBSYSTEM_CONSOLE=-subsystem:console
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 # 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
37 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
38 !ifndef INSTALL_DIR
34275
4828a262abb5 (CURDIR): New define.
Andrew Innes <andrewi@gnu.org>
parents: 31679
diff changeset
39 INSTALL_DIR = $(CURDIR)/..
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
40 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
41
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
42 # 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
43 # speed up compiles (see rule at end).
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
44 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
45 _NMAKE_VER_5=162
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
46 _NMAKE_VER_4=0
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
47
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
48 !IFNDEF _NMAKE_VER
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
49 _NMAKE_VER=$(_NMAKE_VER_4)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
50 !ENDIF
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 # 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
53 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
54 !ifndef INCLUDE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
55 !error The INCLUDE environment variable needs to be set.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
56 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
57 !ifndef LIB
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
58 !error The LIB environment variable needs to be set.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
59 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
60
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
61 # Determine the architecture we're running on.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
62 # Define ARCH for our purposes;
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
63 # Define CPU for use by ntwin32.mak;
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
64 # 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
65 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
66 !ifdef PROCESSOR_ARCHITECTURE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
67 # We're on Windows NT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
68 CPU = $(PROCESSOR_ARCHITECTURE)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
69 CONFIG_H = config.nt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
70 OS_TYPE = windowsnt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
71 ! if "$(PROCESSOR_ARCHITECTURE)" == "x86"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
72 ARCH = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
73 CPU = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
74 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
75 ! if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
76 ARCH = mips
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
77 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
78 ! if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
79 ARCH = alpha
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
80 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
81 ! if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
82 ARCH = ppc
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
83 ! else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
84 ! error Unknown architecture type "$(PROCESSOR_ARCHITECTURE)"
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 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
88 ! endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
89 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
90 # We're on Windows 95
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
91 ARCH = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
92 CPU = i386
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
93 CONFIG_H = config.nt
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
94 OS_TYPE = windows95
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
95 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
96
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
97 AR = lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
98 AR_OUT = -out:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
99 CC = cl
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
100 CC_OUT = -Fo
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
101 LINK = link
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
102 LINK_OUT = -out:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
103 RC = rc
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
104 RC_OUT = -Fo
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
105 RC_INCLUDE = -i
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
106
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
107 libc = libc.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
108 baselibs =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
109 O = obj
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
110 A = 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 BASE_LIBS = $(libc) $(baselibs) oldnames.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
113
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
114 ADVAPI32 = advapi32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
115 COMDLG32 = comdlg32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
116 GDI32 = gdi32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
117 MPR = mpr.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
118 SHELL32 = shell32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
119 USER32 = user32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
120 WSOCK32 = wsock32.lib
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
121
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
122 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
123 DEBUG_CFLAGS = -DEMACSDEBUG
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
124 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
125 DEBUG_CFLAGS =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
126 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
127 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
128 -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
129 EMACS_EXTRA_C_FLAGS =
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 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
132
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
133 # 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
134 # -stack, -heap, or -base settings.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
135 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
136
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
137 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
138 OBJDIR = obj
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
139 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
140 OBJDIR = obj-spd
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
141 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
142 $(OBJDIR):; -mkdir $(OBJDIR)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
143 BLD = $(OBJDIR)/$(ARCH)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
144 $(BLD): $(OBJDIR)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
145 -mkdir "$(BLD)"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
146
35103
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
147 COMPILER_TEMP_FILES = *.pdb
2ed117dc79cf (EMACS_ICON_PATH): Delete definition.
Andrew Innes <andrewi@gnu.org>
parents: 34275
diff changeset
148
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
149 CP = cp -f
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
150 CP_DIR = cp -rf
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
151 IFNOTSAMEDIR = if not exist ..\same-dir.tst
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
152 ENDIF =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
153 FOREACH = for %%f in (
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
154 FORVAR = %%f
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
155 FORDO = ) do
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
156 ENDFOR =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
157 ARGQUOTE = "
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
158 DQUOTE = \"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
159 DEL = rm
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
160 DEL_TREE = rm -r
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
161
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
162 !ifdef NODEBUG
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
163 DEBUG_FLAG =
36859
d4c0b7a5bc48 (DEBUG_LINK): New macro.
Andrew Innes <andrewi@gnu.org>
parents: 36375
diff changeset
164 DEBUG_LINK =
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
165 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
166 DEBUG_FLAG = -Zi
36859
d4c0b7a5bc48 (DEBUG_LINK): New macro.
Andrew Innes <andrewi@gnu.org>
parents: 36375
diff changeset
167 DEBUG_LINK = -debug:full -debugtype:both
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
168 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
169
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
170 !if "$(ARCH)" == "i386"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
171 !ifdef NOOPT
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
172 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
173 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
174 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
175 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
176 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
177
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
178 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
179 !if "$(ARCH)" == "mips"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
180 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
181 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
182
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 !if "$(ARCH)" == "alpha"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
185 !if "$(BUILD_TYPE)" == "spd"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
186 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
187 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
188 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
189 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
190 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
191
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
192 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
193 !if "$(ARCH)" == "ppc"
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
194 # 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
195 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
196 ARCH_LDFLAGS = $(SYS_LDFLAGS)
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
197
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
198 !else
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
199 !ERROR Unknown architecture type "$(ARCH)".
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
200 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
201 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
202 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
203 !endif
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
204
36859
d4c0b7a5bc48 (DEBUG_LINK): New macro.
Andrew Innes <andrewi@gnu.org>
parents: 36375
diff changeset
205 LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(USER_LDFLAGS)
31679
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
206
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
207 # 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
208 # 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
209 # in order to use the MSVC profiler.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
210 !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
211 EXTRA_LINK =
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
212 !ELSE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
213 EXTRA_LINK = -profile
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
214 !ENDIF
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 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
217 # 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
218 # one time, use this feature.
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
219 #
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
220 !IF ("$(_NMAKE_VER)" == "$(_NMAKE_VER_4)")
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
221 .c{$(BLD)}.obj:
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
222 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
223 !ELSE
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
224 .c{$(BLD)}.obj::
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
225 $(CC) $(CFLAGS) -Fo$(BLD)\ $<
7e706d145fab Revert to Unix line endings.
Andrew Innes <andrewi@gnu.org>
parents: 31628
diff changeset
226 !ENDIF