795
|
1 # Makefile for Microsoft NMAKE -*- Makefile -*-
|
|
2 #
|
428
|
3 # Copyright (C) 1995 Board of Trustees, University of Illinois.
|
1303
|
4 # Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing.
|
795
|
5 # Copyright (C) 1997, 1998, 2000 Jonathan Harris.
|
428
|
6 # Copyright (C) 1995 Sun Microsystems, Inc.
|
|
7 # Copyright (C) 1998 Free Software Foundation, Inc.
|
|
8 #
|
|
9 # This file is part of XEmacs.
|
|
10 #
|
|
11 # XEmacs is free software; you can redistribute it and/or modify it
|
|
12 # under the terms of the GNU General Public License as published by the
|
|
13 # Free Software Foundation; either version 2, or (at your option) any
|
|
14 # later version.
|
|
15 #
|
|
16 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
19 # for more details.
|
|
20 #
|
|
21 # You should have received a copy of the GNU General Public License
|
|
22 # along with XEmacs; see the file COPYING. If not, write to
|
|
23 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
24 # Boston, MA 02111-1307, USA.
|
|
25 #
|
|
26 # Synched up with: Not in FSF.
|
|
27 #
|
|
28
|
442
|
29 default: all
|
|
30
|
444
|
31 # APA: Since there seems to be no way to determine the directory where
|
|
32 # xemacs.mak is located (from within nmake) we just insist on the user
|
|
33 # to invoke nmake in the directory where xemacs.mak is.
|
|
34 !if !exist("$(MAKEDIR)\xemacs.mak")
|
|
35 !error Please run nmake from the directory of this makefile (xemacs\nt).
|
|
36 !endif
|
|
37
|
1330
|
38 MAKEROOT=$(MAKEDIR:\nt=)
|
442
|
39
|
1330
|
40 ########################### Common commands.
|
428
|
41
|
1330
|
42 # Put these before including config.inc so they can be overridden there.
|
637
|
43 # Note that some versions of some commands are deficient.
|
428
|
44
|
637
|
45 # Define the 'del' command to use
|
|
46 # WinME's DEL command can only handle one argument and only has the /P flag.
|
|
47 # So only delete one glob at a time. Override flags in config.inc.
|
|
48 DEL=del
|
|
49
|
1001
|
50 # Tell COPY, MOVE, and XCOPY to suppress confirmation for overwriting
|
|
51 # files.
|
|
52 # set COPYCMD=/y
|
|
53 # Define the 'copy' command to use.
|
669
|
54 # Use /r (instead of /y), which exists on Windows NT 4 and 5.
|
1001
|
55 COPY=xcopy /q /r
|
|
56 COPYDIR=xcopy /q /r /e
|
583
|
57
|
1330
|
58 ########################### Includes, and source and build tree determination.
|
442
|
59
|
|
60 !include "config.inc"
|
428
|
61
|
1330
|
62 !if defined(BUILD_DIR)
|
|
63 SEPARATE_BUILD=1
|
|
64 SRCROOT=$(MAKEROOT)
|
|
65 BLDROOT=$(BUILD_DIR)
|
|
66 !else
|
|
67 !if defined(SOURCE_DIR)
|
|
68 SEPARATE_BUILD=1
|
|
69 SRCROOT=$(SOURCE_DIR)
|
|
70 BLDROOT=$(MAKEROOT)
|
|
71 !else
|
|
72 SEPARATE_BUILD=0
|
|
73 SRCROOT=$(MAKEROOT)
|
|
74 BLDROOT=$(MAKEROOT)
|
|
75 !endif
|
|
76 !endif
|
|
77
|
|
78 # Program name and version
|
|
79 !include "$(SRCROOT)\version.sh"
|
|
80
|
|
81 ########################### Basic vars referring to directories, both in
|
|
82 ########################### the source and build trees.
|
|
83
|
|
84 LISP=$(SRCROOT)\lisp
|
|
85 LIB_SRC=$(SRCROOT)\lib-src
|
|
86 NT=$(SRCROOT)\nt
|
|
87 SRC=$(SRCROOT)\src
|
|
88 ETC=$(SRCROOT)\etc
|
1346
|
89 INFO=$(SRCROOT)\info
|
1330
|
90
|
|
91 BLDLIB_SRC=$(BLDROOT)\lib-src
|
|
92 BLDNT=$(BLDROOT)\nt
|
|
93 OUTDIR=$(BLDNT)\obj
|
|
94 BLDSRC=$(BLDROOT)\src
|
|
95
|
|
96 # This appears in the dependency file
|
|
97 LWLIB_SRCDIR=$(SRCROOT)\lwlib
|
|
98
|
|
99 ########################### Process the config.inc options.
|
|
100
|
428
|
101 !if !defined(INFODOCK)
|
|
102 INFODOCK=0
|
|
103 !endif
|
771
|
104 !if !defined(MULE)
|
|
105 MULE=0
|
428
|
106 !endif
|
442
|
107 !if !defined(HAVE_MS_WINDOWS)
|
|
108 HAVE_MS_WINDOWS=1
|
428
|
109 !endif
|
|
110 !if !defined(HAVE_XPM)
|
|
111 HAVE_XPM=0
|
|
112 !endif
|
|
113 !if !defined(HAVE_PNG)
|
|
114 HAVE_PNG=0
|
|
115 !endif
|
632
|
116 !if !defined(HAVE_ZLIB)
|
|
117 HAVE_ZLIB=$(HAVE_PNG)
|
|
118 !endif
|
428
|
119 !if !defined(HAVE_TIFF)
|
|
120 HAVE_TIFF=0
|
|
121 !endif
|
|
122 !if !defined(HAVE_JPEG)
|
|
123 HAVE_JPEG=0
|
|
124 !endif
|
|
125 !if !defined(HAVE_XFACE)
|
|
126 HAVE_XFACE=0
|
|
127 !endif
|
|
128 !if !defined(HAVE_GIF)
|
|
129 HAVE_GIF=1
|
|
130 !endif
|
488
|
131 !if !defined(HAVE_GTK)
|
|
132 HAVE_GTK=0
|
|
133 !endif
|
827
|
134 !if !defined(HAVE_MENUBARS)
|
|
135 HAVE_MENUBARS=1
|
|
136 !endif
|
|
137 !if !defined(HAVE_SCROLLBARS)
|
|
138 HAVE_SCROLLBARS=1
|
|
139 !endif
|
428
|
140 !if !defined(HAVE_TOOLBARS)
|
|
141 HAVE_TOOLBARS=$(HAVE_XPM)
|
|
142 !endif
|
|
143 !if !defined(HAVE_DIALOGS)
|
|
144 HAVE_DIALOGS=1
|
|
145 !endif
|
|
146 !if !defined(HAVE_NATIVE_SOUND)
|
|
147 HAVE_NATIVE_SOUND=1
|
|
148 !endif
|
|
149 !if !defined(HAVE_WIDGETS)
|
|
150 HAVE_WIDGETS=1
|
|
151 !endif
|
872
|
152 !if !defined(OPTIMIZED_BUILD)
|
|
153 OPTIMIZED_BUILD=1
|
|
154 !endif
|
|
155 !if !defined(USE_FASTCALL)
|
|
156 # #### Change to 1 when I check in the ws with support for fastcall
|
|
157 USE_FASTCALL=0
|
|
158 !endif
|
|
159 !if !defined(PROFILE_SUPPORT)
|
|
160 PROFILE_SUPPORT=0
|
|
161 !endif
|
428
|
162 !if !defined(DEBUG_XEMACS)
|
|
163 DEBUG_XEMACS=0
|
|
164 !endif
|
1333
|
165 !if !defined(SUPPORT_EDIT_AND_CONTINUE)
|
|
166 SUPPORT_EDIT_AND_CONTINUE=0
|
834
|
167 !endif
|
1203
|
168
|
800
|
169 !if !defined(ERROR_CHECK_ALL)
|
1203
|
170 !if "$(emacs_is_beta)" != ""
|
800
|
171 ERROR_CHECK_ALL=1
|
1203
|
172 !else
|
|
173 ERROR_CHECK_ALL=0
|
|
174 !endif
|
|
175 !endif
|
|
176
|
|
177 !if !defined(CPLUSPLUS_COMPILE)
|
|
178 !if $(ERROR_CHECK_ALL)
|
|
179 CPLUSPLUS_COMPILE=1
|
|
180 !else
|
|
181 CPLUSPLUS_COMPILE=0
|
|
182 !endif
|
|
183 !endif
|
|
184
|
|
185 !if !defined(USE_KKCC)
|
|
186 USE_KKCC=0
|
|
187 !endif
|
|
188 !if !defined(USE_UNION_TYPE)
|
|
189 USE_UNION_TYPE=0
|
800
|
190 !endif
|
442
|
191 !if !defined(QUICK_BUILD)
|
|
192 QUICK_BUILD=0
|
|
193 !endif
|
872
|
194 !if !defined(VERBOSECC)
|
|
195 VERBOSECC=0
|
|
196 !endif
|
|
197 !if !defined(DEPEND)
|
|
198 DEPEND=0
|
|
199 !endif
|
|
200 !if !defined(USE_PORTABLE_DUMPER)
|
|
201 USE_PORTABLE_DUMPER=1
|
|
202 !endif
|
438
|
203 !if !defined(USE_MINITAR)
|
632
|
204 USE_MINITAR=$(HAVE_ZLIB)
|
438
|
205 !endif
|
428
|
206
|
440
|
207 # A little bit of adhockery. Default to use system malloc and
|
|
208 # DLL version of the C runtime library when using portable
|
|
209 # dumping. These are the optimal settings.
|
|
210 !if !defined(USE_SYSTEM_MALLOC)
|
|
211 USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
|
|
212 !endif
|
|
213 !if !defined(USE_CRTDLL)
|
|
214 USE_CRTDLL=$(USE_PORTABLE_DUMPER)
|
|
215 !endif
|
|
216
|
1330
|
217 ########################### Check for incompatible options.
|
428
|
218
|
|
219 CONFIG_ERROR=0
|
|
220 !if $(INFODOCK) && !exist("..\..\Infodock.rules")
|
|
221 !message Cannot build InfoDock without InfoDock sources
|
|
222 CONFIG_ERROR=1
|
|
223 !endif
|
440
|
224 !if !$(USE_PORTABLE_DUMPER) && $(USE_SYSTEM_MALLOC)
|
|
225 !message Cannot use system allocator when dumping old way, use portable dumper.
|
|
226 CONFIG_ERROR=1
|
|
227 !endif
|
|
228 !if !$(USE_PORTABLE_DUMPER) && $(USE_CRTDLL)
|
|
229 !message Cannot use C runtime DLL when dumping old way, use portable dumper.
|
|
230 CONFIG_ERROR=1
|
|
231 !endif
|
|
232 !if !$(USE_SYSTEM_MALLOC) && $(USE_CRTDLL)
|
|
233 !message GNU malloc currently cannot be used with CRT DLL.
|
|
234 !message [[[Developer note: If you want to fix it, read Q112297 first]]] ####
|
|
235 CONFIG_ERROR=1
|
|
236 !endif
|
1330
|
237 !if !$(HAVE_MS_WINDOWS) && !$(HAVE_GTK)
|
|
238 !message Please specify at least one HAVE_MS_WINDOWS=1 and/or HAVE_GTK=1
|
428
|
239 CONFIG_ERROR=1
|
|
240 !endif
|
488
|
241 !if $(HAVE_MS_WINDOWS) && $(HAVE_GTK) && !defined(GTK_DIR)
|
|
242 !message Please specify root directory for your GTK installation: GTK_DIR=path
|
|
243 CONFIG_ERROR=1
|
|
244 !endif
|
442
|
245 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
|
428
|
246 !message Please specify root directory for your XPM installation: XPM_DIR=path
|
|
247 CONFIG_ERROR=1
|
|
248 !endif
|
442
|
249 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
|
428
|
250 !message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
|
|
251 CONFIG_ERROR=1
|
|
252 !endif
|
442
|
253 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
|
428
|
254 !message Please specify root directory for your PNG installation: PNG_DIR=path
|
|
255 CONFIG_ERROR=1
|
|
256 !endif
|
442
|
257 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
|
428
|
258 !message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
|
|
259 CONFIG_ERROR=1
|
|
260 !endif
|
442
|
261 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
|
428
|
262 !message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
|
|
263 CONFIG_ERROR=1
|
|
264 !endif
|
442
|
265 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
|
428
|
266 !message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
|
|
267 CONFIG_ERROR=1
|
|
268 !endif
|
442
|
269 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
|
428
|
270 !message Please specify root directory for your TIFF installation: TIFF_DIR=path
|
|
271 CONFIG_ERROR=1
|
|
272 !endif
|
442
|
273 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
|
428
|
274 !message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib"
|
|
275 CONFIG_ERROR=1
|
|
276 !endif
|
442
|
277 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
|
428
|
278 !message Please specify root directory for your JPEG installation: JPEG_DIR=path
|
|
279 CONFIG_ERROR=1
|
|
280 !endif
|
442
|
281 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
|
428
|
282 !message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
|
|
283 CONFIG_ERROR=1
|
|
284 !endif
|
442
|
285 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
|
428
|
286 !message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
|
|
287 CONFIG_ERROR=1
|
|
288 !endif
|
442
|
289 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
|
428
|
290 !message Specified COMPFACE directory does not contain "$(COMPFACE_DIR)\libcompface.lib"
|
|
291 CONFIG_ERROR=1
|
|
292 !endif
|
442
|
293 !if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
|
428
|
294 !message Toolbars require XPM support
|
|
295 CONFIG_ERROR=1
|
|
296 !endif
|
|
297 !if $(CONFIG_ERROR)
|
|
298 !error Configuration error(s) found
|
|
299 !endif
|
|
300
|
1330
|
301 ########################### Set version strings.
|
|
302
|
|
303 !if $(INFODOCK)
|
|
304 INFODOCK_VERSION_STRING=$(infodock_major_version).$(infodock_minor_version).$(infodock_build_version)
|
|
305 PROGRAM_DEFINES=-DINFODOCK \
|
|
306 -DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
|
|
307 -DPATH_PROGNAME=\"infodock\" \
|
|
308 -DEMACS_PROGNAME=\"infodock\" \
|
|
309 -DEMACS_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
|
|
310 -DINFODOCK_MAJOR_VERSION=$(infodock_major_version) \
|
|
311 -DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \
|
|
312 -DINFODOCK_BUILD_VERSION=$(infodock_build_version)
|
|
313 !else
|
|
314 XEMACS_VERSION_STRING=$(emacs_major_version).$(emacs_minor_version)
|
|
315 !if "$(emacs_beta_version)" != ""
|
|
316 !if "$(emacs_is_beta)" != ""
|
|
317 XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING)-b$(emacs_beta_version)
|
|
318 !else
|
|
319 XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING).$(emacs_beta_version)
|
|
320 !endif
|
|
321 !endif
|
|
322 PROGRAM_DEFINES= \
|
|
323 -DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \
|
|
324 -DPATH_PROGNAME=\"xemacs\" \
|
|
325 -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \
|
|
326 -DEMACS_PROGNAME=\"xemacs\"
|
|
327 !endif
|
|
328
|
|
329 ########################### Set up installation and package directories.
|
|
330
|
|
331 !if !defined(INSTALL_DIR)
|
|
332 ! if $(INFODOCK)
|
|
333 INSTALL_DIR=c:\Program Files\Infodock\Infodock-$(INFODOCK_VERSION_STRING)
|
|
334 ! else
|
|
335 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
|
442
|
336 ! endif
|
1330
|
337 !endif
|
|
338 !if !defined(PACKAGE_PATH)
|
|
339 ! if !defined(PACKAGE_PREFIX)
|
|
340 PACKAGE_PREFIX=c:\Program Files\XEmacs
|
442
|
341 ! endif
|
1330
|
342 ! if $(MULE)
|
|
343 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\mule-packages;$(PACKAGE_PREFIX)\xemacs-packages
|
|
344 ! else
|
|
345 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages
|
442
|
346 ! endif
|
|
347 !endif
|
1330
|
348 PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)"
|
|
349
|
|
350 !if $(INFODOCK)
|
|
351 PATH_PREFIX=../..
|
|
352 !else
|
|
353 PATH_PREFIX=..
|
|
354 !endif
|
|
355
|
|
356 PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
|
|
357
|
|
358 !if $(SEPARATE_BUILD)
|
1346
|
359 PATH_DEFINES=$(PATH_DEFINES) -DPATH_LOADSEARCH=\"$(LISP:\=\\)\" -DPATH_DATA=\"$(ETC:\=\\)\" -DPATH_INFO=\"$(INFO:\=\\)\"
|
1330
|
360 !endif
|
|
361
|
|
362 ########################### Determine system configuration.
|
|
363
|
|
364 !if !defined(OS)
|
|
365 OS=Windows_95/98
|
|
366 EMACS_CONFIGURATION=i586-pc-win32
|
|
367 !else if "$(PROCESSOR_ARCHITECTURE)" == "x86"
|
|
368 EMACS_CONFIGURATION=i586-pc-win32
|
|
369 !else if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
|
|
370 EMACS_CONFIGURATION=mips-pc-win32
|
|
371 !else if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
|
|
372 EMACS_CONFIGURATION=alpha-pc-win32
|
|
373 !else if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
|
|
374 EMACS_CONFIGURATION=ppc-pc-win32
|
|
375 !else
|
|
376 ! error Unknown processor architecture type $(PROCESSOR_ARCHITECTURE)
|
|
377 !endif
|
|
378 STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_)
|
|
379 STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_)
|
|
380 PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER)
|
|
381
|
|
382 ########################### Determine includes/defines/object file for
|
|
383 ########################### various options.
|
|
384
|
|
385 !if $(HAVE_MS_WINDOWS)
|
|
386 MSW_DEFINES=-DHAVE_MS_WINDOWS
|
|
387 MSW_INCLUDES=
|
|
388 MSW_LIBS=comctl32.lib
|
|
389
|
|
390 !if $(HAVE_XPM)
|
|
391 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XPM -DFOR_MSW
|
|
392 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib"
|
|
393 MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib"
|
|
394 !endif
|
|
395 !if $(HAVE_GIF)
|
|
396 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF
|
|
397 MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj
|
|
398 !endif
|
|
399 !if $(HAVE_PNG)
|
|
400 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_PNG
|
|
401 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(PNG_DIR)" -I"$(ZLIB_DIR)"
|
|
402 MSW_LIBS=$(MSW_LIBS) "$(PNG_DIR)\libpng.lib" "$(ZLIB_DIR)\zlib.lib"
|
|
403 !endif
|
|
404 !if $(HAVE_TIFF)
|
|
405 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TIFF
|
|
406 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(TIFF_DIR)\libtiff"
|
|
407 MSW_LIBS=$(MSW_LIBS) "$(TIFF_DIR)\libtiff\libtiff.lib"
|
|
408 !endif
|
|
409 !if $(HAVE_JPEG)
|
|
410 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_JPEG
|
|
411 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(JPEG_DIR)"
|
|
412 MSW_LIBS=$(MSW_LIBS) "$(JPEG_DIR)\libjpeg.lib"
|
|
413 !endif
|
|
414 !if $(HAVE_XFACE)
|
|
415 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XFACE
|
|
416 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(COMPFACE_DIR)"
|
|
417 MSW_LIBS=$(MSW_LIBS) "$(COMPFACE_DIR)\libcompface.lib"
|
|
418 !endif
|
|
419 !if $(HAVE_ZLIB)
|
|
420 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_ZLIB
|
|
421 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(ZLIB_DIR)"
|
|
422 MSW_LIBS=$(MSW_LIBS) "$(ZLIB_DIR)\zlib.lib"
|
|
423 !endif
|
|
424 !if $(HAVE_MENUBARS)
|
|
425 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MENUBARS
|
|
426 MSW_MENUBAR_OBJ=$(OUTDIR)\menubar.obj $(OUTDIR)\menubar-msw.obj
|
|
427 !endif
|
|
428 !if $(HAVE_SCROLLBARS)
|
|
429 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_SCROLLBARS
|
|
430 MSW_SCROLLBAR_OBJ=$(OUTDIR)\scrollbar.obj $(OUTDIR)\scrollbar-msw.obj
|
|
431 !endif
|
|
432 !if $(HAVE_TOOLBARS)
|
|
433 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
|
|
434 MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
|
|
435 !endif
|
|
436 !if $(HAVE_WIDGETS)
|
|
437 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS
|
|
438 !endif
|
|
439 !if $(HAVE_DIALOGS)
|
|
440 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
|
|
441 MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
|
|
442 !endif
|
|
443 !if $(HAVE_NATIVE_SOUND)
|
|
444 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
|
|
445 !endif
|
|
446
|
|
447 TEMACS_MSW_OBJS=\
|
|
448 $(OUTDIR)\console-msw.obj \
|
|
449 $(OUTDIR)\device-msw.obj \
|
|
450 $(OUTDIR)\event-msw.obj \
|
|
451 $(OUTDIR)\frame-msw.obj \
|
|
452 $(OUTDIR)\glyphs-msw.obj \
|
|
453 $(OUTDIR)\gui-msw.obj \
|
|
454 $(OUTDIR)\objects-msw.obj \
|
|
455 $(OUTDIR)\redisplay-msw.obj \
|
|
456 $(OUTDIR)\select-msw.obj \
|
|
457 $(OUTDIR)\dired-msw.obj \
|
|
458 $(MSW_MENUBAR_OBJ) \
|
|
459 $(MSW_SCROLLBAR_OBJ) \
|
|
460 $(MSW_TOOLBAR_OBJ) \
|
|
461 $(MSW_DIALOG_OBJ) \
|
|
462 $(MSW_GIF_OBJ)
|
|
463
|
|
464 # end !if $(HAVE_MS_WINDOWS)
|
|
465 !endif
|
|
466
|
|
467 !if $(MULE)
|
|
468 MULE_DEFINES=-DMULE
|
|
469 TEMACS_MULE_OBJS=\
|
|
470 $(OUTDIR)\mule-ccl.obj \
|
|
471 $(OUTDIR)\mule-charset.obj \
|
|
472 $(OUTDIR)\mule-coding.obj
|
|
473 !endif
|
|
474
|
|
475 !if $(DEBUG_XEMACS)
|
|
476 TEMACS_DEBUG_OBJS=$(OUTDIR)\debug.obj $(OUTDIR)\tests.obj
|
|
477 !endif
|
|
478
|
|
479 !if $(QUICK_BUILD)
|
|
480 QUICK_DEFINES=-DQUICK_BUILD
|
|
481 !endif
|
|
482
|
|
483 !if $(ERROR_CHECK_ALL)
|
|
484 ERROR_CHECK_DEFINES=-DERROR_CHECK_ALL
|
|
485 !endif
|
|
486
|
|
487 !if $(USE_UNION_TYPE)
|
|
488 UNION_DEFINES=-DUSE_UNION_TYPE
|
|
489 !endif
|
|
490
|
|
491 !if $(USE_PORTABLE_DUMPER)
|
|
492 DUMPER_DEFINES=-DPDUMP
|
|
493 TEMACS_DUMP_OBJS=$(OUTDIR)\dumper.obj
|
|
494 !else
|
|
495 TEMACS_DUMP_OBJS=$(OUTDIR)\unexnt.obj
|
|
496 !endif
|
|
497
|
|
498 !if $(USE_KKCC)
|
|
499 KKCC_DEFINES=-DUSE_KKCC
|
|
500 !endif
|
|
501
|
|
502 !if $(USE_SYSTEM_MALLOC)
|
|
503 MALLOC_DEFINES=-DSYSTEM_MALLOC
|
|
504 !else
|
|
505 MALLOC_DEFINES=-DGNU_MALLOC
|
|
506 TEMACS_ALLOC_OBJS=$(OUTDIR)\free-hook.obj $(OUTDIR)\gmalloc.obj \
|
|
507 $(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj
|
|
508 !endif
|
|
509
|
|
510 ########################### Process options related to compilation.
|
442
|
511
|
|
512 #
|
428
|
513 # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
|
|
514 #
|
|
515 !if $(VERBOSECC)
|
|
516 CCV=$(CC)
|
|
517 !else
|
|
518 CCV=@$(CC)
|
|
519 !endif
|
|
520
|
|
521 !if $(DEBUG_XEMACS)
|
814
|
522
|
872
|
523 # ---- Debugging support ----
|
1333
|
524 ! if $(SUPPORT_EDIT_AND_CONTINUE)
|
872
|
525 # support edit-and-continue
|
|
526 DEBUG_FLAGS_COMPILE=-ZI
|
1333
|
527 # WARNING: There is a very good reason for -incremental:no, as it can cause
|
|
528 # all sorts of weird crashes in or after a pdump load. We must allow
|
|
529 # incremental linking for edit-and-continue to work, however.
|
|
530 DEBUG_FLAGS_LINK=-debug:full
|
872
|
531 ! else
|
|
532 DEBUG_FLAGS_COMPILE=-Zi
|
1333
|
533 DEBUG_FLAGS_LINK=-debug:full -incremental:no
|
872
|
534 ! endif
|
|
535 DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
|
|
536 #BROWSERFLAGS=-Fr -Fd$(OUTDIR)\temacs.pdb
|
|
537 BROWSERFLAGS=-Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
|
|
538
|
814
|
539 !else
|
872
|
540
|
|
541 # ---- No debugging support ----
|
|
542 DEBUG_FLAGS_COMPILE=
|
|
543 DEBUG_FLAGS_LINK=-incremental:no
|
882
|
544 DEBUG_DEFINES=
|
872
|
545 BROWSERFLAGS=
|
|
546
|
428
|
547 !endif
|
|
548
|
440
|
549 !if $(USE_CRTDLL)
|
872
|
550 ! if $(DEBUG_XEMACS)
|
440
|
551 C_LIBFLAG=-MDd
|
|
552 LIBC_LIB=msvcrtd.lib
|
872
|
553 ! else
|
440
|
554 C_LIBFLAG=-MD
|
|
555 LIBC_LIB=msvcrt.lib
|
872
|
556 ! endif
|
440
|
557 !else
|
|
558 C_LIBFLAG=-ML
|
|
559 LIBC_LIB=libc.lib
|
|
560 !endif
|
|
561
|
872
|
562 !if $(OPTIMIZED_BUILD)
|
|
563 # -G5 means optimize for Pentium. (According to the code-optimization
|
|
564 # article, -GB is the same as -G5, and -G6, i.e. optimze for Pentium Pro,
|
|
565 # gains you little over -G5 for PPro's but causes big slowdowns for
|
|
566 # Pentiums.) -GF means put strings in read-only memory; -Gr means use
|
|
567 # fastcall convention. Another possible addition: -Ob2 -- allows inlining
|
|
568 # of any function, not just those declared inline. Potential code size
|
|
569 # increase, though.
|
|
570 #
|
|
571 # #### Note: fastcall doesn't actually seem to make any difference, at least
|
|
572 # not using the (admittedly unscientific) test of (hanoi 6). The
|
|
573 # optimization article claims 1-2% improvement in both speed and size.
|
|
574 OPTFLAGS_FASTCALL =-O2 -G5 -Gr -Ob2
|
|
575 OPTFLAGS_CDECL =-O2 -G5 -Ob2
|
|
576 !else
|
|
577 OPTFLAGS_FASTCALL =-Od
|
|
578 OPTFLAGS_CDECL =-Od
|
|
579 !endif
|
|
580
|
|
581 !if $(USE_FASTCALL)
|
|
582 OPTFLAGS = $(OPTFLAGS_FASTCALL)
|
|
583 !else
|
|
584 OPTFLAGS = $(OPTFLAGS_CDECL)
|
|
585 !endif
|
|
586
|
|
587 !if $(PROFILE_SUPPORT)
|
|
588 PROFILE_FLAGS=-profile
|
|
589 !else
|
|
590 PROFILE_FLAGS=
|
|
591 !endif
|
|
592
|
1203
|
593 !if $(CPLUSPLUS_COMPILE)
|
|
594 CPLUSPLUS_COMPILE_FLAGS=-TP
|
|
595 !else
|
|
596 CPLUSPLUS_COMPILE_FLAGS=
|
|
597 !endif
|
|
598
|
1330
|
599 ########################### Determine generic includes/defines/flags.
|
|
600
|
|
601 INCLUDES=$(MSW_INCLUDES) -I$(NT)\inc -I$(SRC)
|
|
602
|
|
603 DEFINES=$(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
|
|
604 $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MALLOC_DEFINES) \
|
|
605 $(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) $(DEBUG_DEFINES) \
|
|
606 -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
|
|
607 -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
|
|
608
|
872
|
609 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
|
|
610
|
|
611 CFLAGS_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS)
|
826
|
612 CFLAGS=$(CFLAGS_NO_LIB) $(C_LIBFLAG)
|
|
613
|
872
|
614 CFLAGS_CDECL_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS_CDECL)
|
|
615 CFLAGS_CDECL=$(CFLAGS_CDECL_NO_LIB) $(C_LIBFLAG)
|
|
616
|
1330
|
617 ########################### Determine flags for XEmacs object files.
|
428
|
618
|
|
619 # This may not exist
|
|
620 !if "$(emacs_beta_version)" != ""
|
496
|
621 !if "$(emacs_is_beta)" != ""
|
428
|
622 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
|
496
|
623 !else
|
|
624 EMACS_PATCH_LEVEL=-DEMACS_PATCH_LEVEL=$(emacs_beta_version)
|
|
625 !endif
|
|
626 !endif
|
428
|
627
|
1203
|
628 TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(CPLUSPLUS_COMPILE_FLAGS) \
|
1330
|
629 $(INCLUDES) $(DEFINES) \
|
428
|
630 -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
|
|
631 -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
|
1330
|
632 $(EMACS_BETA_VERSION) $(EMACS_PATCH_LEVEL) \
|
442
|
633 -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
|
428
|
634 -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
|
|
635 -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
|
872
|
636 TEMACS_CPP_FLAGS=$(CFLAGS) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
|
|
637 TEMACS_CPP_CDECL_FLAGS=$(CFLAGS_CDECL) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
|
428
|
638
|
1330
|
639 ########################### Determine XEmacs object files.
|
428
|
640
|
|
641 TEMACS_OBJS= \
|
|
642 $(TEMACS_MSW_OBJS)\
|
|
643 $(TEMACS_MULE_OBJS)\
|
|
644 $(TEMACS_DEBUG_OBJS)\
|
440
|
645 $(TEMACS_ALLOC_OBJS)\
|
|
646 $(TEMACS_DUMP_OBJS)\
|
428
|
647 $(OUTDIR)\abbrev.obj \
|
|
648 $(OUTDIR)\alloc.obj \
|
851
|
649 $(OUTDIR)\alloca.obj \
|
428
|
650 $(OUTDIR)\blocktype.obj \
|
|
651 $(OUTDIR)\buffer.obj \
|
|
652 $(OUTDIR)\bytecode.obj \
|
|
653 $(OUTDIR)\callint.obj \
|
|
654 $(OUTDIR)\casefiddle.obj \
|
|
655 $(OUTDIR)\casetab.obj \
|
|
656 $(OUTDIR)\chartab.obj \
|
|
657 $(OUTDIR)\cmdloop.obj \
|
|
658 $(OUTDIR)\cmds.obj \
|
|
659 $(OUTDIR)\console-stream.obj \
|
|
660 $(OUTDIR)\console.obj \
|
|
661 $(OUTDIR)\data.obj \
|
|
662 $(OUTDIR)\device.obj \
|
|
663 $(OUTDIR)\dired.obj \
|
|
664 $(OUTDIR)\doc.obj \
|
|
665 $(OUTDIR)\doprnt.obj \
|
|
666 $(OUTDIR)\dragdrop.obj \
|
|
667 $(OUTDIR)\dynarr.obj \
|
|
668 $(OUTDIR)\editfns.obj \
|
|
669 $(OUTDIR)\elhash.obj \
|
|
670 $(OUTDIR)\emacs.obj \
|
|
671 $(OUTDIR)\eval.obj \
|
|
672 $(OUTDIR)\event-stream.obj \
|
|
673 $(OUTDIR)\events.obj \
|
|
674 $(OUTDIR)\extents.obj \
|
|
675 $(OUTDIR)\faces.obj \
|
|
676 $(OUTDIR)\file-coding.obj \
|
|
677 $(OUTDIR)\fileio.obj \
|
|
678 $(OUTDIR)\filemode.obj \
|
|
679 $(OUTDIR)\floatfns.obj \
|
|
680 $(OUTDIR)\fns.obj \
|
|
681 $(OUTDIR)\font-lock.obj \
|
|
682 $(OUTDIR)\frame.obj \
|
|
683 $(OUTDIR)\general.obj \
|
442
|
684 $(OUTDIR)\getloadavg.obj \
|
428
|
685 $(OUTDIR)\glyphs.obj \
|
|
686 $(OUTDIR)\glyphs-eimage.obj \
|
587
|
687 $(OUTDIR)\glyphs-shared.obj \
|
428
|
688 $(OUTDIR)\glyphs-widget.obj \
|
|
689 $(OUTDIR)\gui.obj \
|
|
690 $(OUTDIR)\gutter.obj \
|
|
691 $(OUTDIR)\hash.obj \
|
|
692 $(OUTDIR)\indent.obj \
|
|
693 $(OUTDIR)\imgproc.obj \
|
|
694 $(OUTDIR)\insdel.obj \
|
|
695 $(OUTDIR)\intl.obj \
|
771
|
696 $(OUTDIR)\intl-win32.obj \
|
|
697 $(OUTDIR)\intl-encap-win32.obj \
|
|
698 $(OUTDIR)\intl-auto-encap-win32.obj \
|
428
|
699 $(OUTDIR)\keymap.obj \
|
872
|
700 $(OUTDIR)\libinterface.obj \
|
428
|
701 $(OUTDIR)\line-number.obj \
|
|
702 $(OUTDIR)\lread.obj \
|
|
703 $(OUTDIR)\lstream.obj \
|
|
704 $(OUTDIR)\macros.obj \
|
|
705 $(OUTDIR)\marker.obj \
|
|
706 $(OUTDIR)\md5.obj \
|
|
707 $(OUTDIR)\minibuf.obj \
|
872
|
708 # #### Leave the next one out when integrating my working ws
|
428
|
709 $(OUTDIR)\nt.obj \
|
|
710 $(OUTDIR)\ntplay.obj \
|
|
711 $(OUTDIR)\objects.obj \
|
|
712 $(OUTDIR)\opaque.obj \
|
|
713 $(OUTDIR)\print.obj \
|
|
714 $(OUTDIR)\process.obj \
|
|
715 $(OUTDIR)\process-nt.obj \
|
|
716 $(OUTDIR)\profile.obj \
|
|
717 $(OUTDIR)\rangetab.obj \
|
|
718 $(OUTDIR)\realpath.obj \
|
|
719 $(OUTDIR)\redisplay-output.obj \
|
|
720 $(OUTDIR)\redisplay.obj \
|
|
721 $(OUTDIR)\regex.obj \
|
|
722 $(OUTDIR)\search.obj \
|
|
723 $(OUTDIR)\select.obj \
|
|
724 $(OUTDIR)\signal.obj \
|
|
725 $(OUTDIR)\sound.obj \
|
|
726 $(OUTDIR)\specifier.obj \
|
|
727 $(OUTDIR)\strftime.obj \
|
|
728 $(OUTDIR)\symbols.obj \
|
|
729 $(OUTDIR)\syntax.obj \
|
|
730 $(OUTDIR)\sysdep.obj \
|
771
|
731 $(OUTDIR)\text.obj \
|
428
|
732 $(OUTDIR)\tparam.obj \
|
|
733 $(OUTDIR)\undo.obj \
|
771
|
734 $(OUTDIR)\unicode.obj \
|
428
|
735 $(OUTDIR)\widget.obj \
|
|
736 $(OUTDIR)\window.obj \
|
442
|
737 $(OUTDIR)\win32.obj
|
428
|
738
|
1330
|
739 #########################################################################
|
|
740 ## Implicit rules ##
|
|
741 #########################################################################
|
|
742
|
428
|
743 # Rules
|
|
744
|
|
745 .SUFFIXES:
|
430
|
746 .SUFFIXES: .c .obj .texi .info
|
428
|
747
|
872
|
748 # nmake rule with batching:
|
1330
|
749 #{$(SRC)}.c{$(OUTDIR)}.obj:
|
872
|
750 # echo $< >> $(OUTDIR)\listfile.tmp
|
|
751
|
1330
|
752 {$(SRC)}.c{$(OUTDIR)}.obj:
|
872
|
753 $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ $(BROWSERFLAGS)
|
428
|
754
|
1330
|
755 #########################################################################
|
|
756 ## Subsidiary dependency rules ##
|
|
757 #########################################################################
|
|
758
|
|
759 ###################### Include auto-generated dependencies.
|
|
760
|
|
761 #
|
|
762 # Whether to use dependency information generated by make-src-depend
|
|
763 #
|
|
764 !if $(DEPEND) && exist("$(SRC)\depend")
|
|
765 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
|
|
766 ! endif
|
|
767 # This perl script used to be inline but that caused too many quoting problems
|
|
768 ! if [perl $(NT)\make-nt-depend -s=$(SRC) -c=$(NT) -o=$(OUTDIR) < $(SRC)\depend > $(OUTDIR)\depend.tmp]
|
|
769 ! endif
|
|
770 ! include "$(OUTDIR)\depend.tmp"
|
|
771 !else
|
|
772 ! if [echo WARNING: Compiling without dependency information.]
|
|
773 ! endif
|
|
774 !endif
|
|
775
|
|
776 ###################### Build the output directory structure if not same as
|
|
777 ###################### source.
|
|
778
|
|
779 !if $(SEPARATE_BUILD)
|
|
780 # #### `if not exist' does not like the quotes around file names.
|
|
781 # But what if one of them has spaces? Fucking Microsoft!
|
|
782 ! if [if not exist $(BLDROOT)\nul mkdir "$(BLDROOT)"]
|
|
783 ! endif
|
|
784 ! if [if not exist $(BLDLIB_SRC)\nul mkdir "$(BLDLIB_SRC)"]
|
|
785 ! endif
|
|
786 ! if [if not exist $(BLDNT)\nul mkdir "$(BLDNT)"]
|
|
787 ! endif
|
|
788 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
|
|
789 ! endif
|
|
790 ! if [if not exist $(BLDSRC)\nul mkdir "$(BLDSRC)"]
|
|
791 ! endif
|
|
792 # No point.
|
|
793 # ! if [if not exist "$(BLDROOT)\nul" mkdir "$(BLDROOT)"]
|
|
794 # ! endif
|
|
795 !endif
|
|
796
|
|
797 ###################### Random .obj dependencies
|
|
798
|
872
|
799 # An explicit rule looks like this ($< works only in implicit rules):
|
1330
|
800 # $(OUTDIR)\foo.obj: $(SRC)\foo.c
|
|
801 # $(CCV) $(TEMACS_CPP_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
442
|
802
|
1330
|
803 $(OUTDIR)\emacs.obj: $(SRCROOT)\version.sh
|
872
|
804
|
1330
|
805 $(OUTDIR)\libinterface.obj: $(SRC)\libinterface.c
|
|
806 $(CCV) $(TEMACS_CPP_CDECL_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
428
|
807
|
1330
|
808 ###################### Generated source files
|
|
809
|
|
810 $(OUTDIR)\nul:
|
|
811 -@mkdir $(OUTDIR)
|
872
|
812
|
1330
|
813 XEMACS_INCLUDES=\
|
|
814 $(SRC)\config.h \
|
|
815 $(SRC)\Emacs.ad.h \
|
|
816 $(SRC)\paths.h
|
428
|
817
|
1330
|
818 # #### Copying is cheap, we should just force these
|
|
819 $(SRC)\config.h: $(SRC)\config.h.in
|
|
820 # #### ms must have hired monkeys to design their shell commands. if
|
|
821 # #### you use xcopy to copy a file from one name to another, it
|
|
822 # #### PROMPTS you to see if you meant the second as a directory! and
|
|
823 # #### no switch to mean "no of course, you idiots, it's a file!"
|
|
824 @copy $(SRC)\config.h.in $(SRC)\config.h
|
428
|
825
|
1330
|
826 #$(SRC)\Emacs.ad.h: $(SRCROOT)\etc\Emacs.ad
|
|
827 # !"sed -f ad2c.sed < $(SRCROOT)\etc\Emacs.ad > $(SRC)\Emacs.ad.h"
|
872
|
828
|
1330
|
829 #$(SRC)\paths.h: $(SRC)\paths.h.in
|
|
830 # !"cd $(SRC); cp paths.h.in paths.h"
|
|
831
|
|
832 $(SRC)\Emacs.ad.h: $(NT)\Emacs.ad.h
|
|
833 set COPYCMD=/y
|
|
834 @$(COPY) $(NT)\Emacs.ad.h $(SRC)
|
872
|
835
|
1330
|
836 $(SRC)\paths.h: $(NT)\paths.h
|
|
837 set COPYCMD=/y
|
|
838 @$(COPY) $(NT)\paths.h $(SRC)
|
872
|
839
|
1330
|
840
|
|
841 ###################### lastfile.lib
|
872
|
842
|
1330
|
843 !if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
|
872
|
844
|
1330
|
845 LASTFILE=$(OUTDIR)\lastfile.lib
|
|
846 LASTFILE_SRC=$(SRC)
|
|
847 LASTFILE_FLAGS=$(CFLAGS) $(CPLUSPLUS_COMPILE_FLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
|
|
848 LASTFILE_OBJS= \
|
|
849 $(OUTDIR)\lastfile.obj
|
872
|
850
|
1330
|
851 $(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
|
|
852 link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS)
|
|
853
|
|
854 $(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c
|
|
855 $(CCV) $(LASTFILE_FLAGS) $(LASTFILE_SRC)\$(@B).c
|
|
856
|
872
|
857 !endif
|
|
858
|
1330
|
859 ###################### lib-src programs
|
|
860
|
|
861 LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32_NATIVE
|
|
862
|
|
863 #
|
|
864 # Creating config.values to be used by config.el
|
|
865 #
|
|
866 CONFIG_VALUES = $(BLDLIB_SRC)\config.values
|
|
867 !if [echo Creating $(CONFIG_VALUES) && echo ;;; Do not edit this file!>$(CONFIG_VALUES)]
|
|
868 !endif
|
|
869 !if [echo blddir>>$(CONFIG_VALUES) && echo "$(BLDROOT:\=\\)">>$(CONFIG_VALUES)]
|
|
870 !endif
|
|
871 !if [echo srcdir>>$(CONFIG_VALUES) && echo "$(SRCROOT:\=\\)">>$(CONFIG_VALUES)]
|
|
872 !endif
|
|
873 !if [echo CC>>$(CONFIG_VALUES) && echo "$(CC:\=\\)">>$(CONFIG_VALUES)]
|
|
874 !endif
|
|
875 !if [echo CFLAGS>>$(CONFIG_VALUES) && echo "$(CFLAGS:\=\\)">>$(CONFIG_VALUES)]
|
|
876 !endif
|
|
877 !if [echo CPP>>$(CONFIG_VALUES) && echo "$(CPP:\=\\)">>$(CONFIG_VALUES)]
|
|
878 !endif
|
|
879 !if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo "$(CPPFLAGS:\=\\)">>$(CONFIG_VALUES)]
|
|
880 !endif
|
|
881 !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "\\$(LISP:\=\\)">>$(CONFIG_VALUES)]
|
|
882 !endif
|
|
883 # PATH_PACKAGEPATH is already a quoted string.
|
|
884 !if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
|
|
885 !endif
|
|
886
|
|
887 LINK_DEPENDENCY_ARGS = -Fe$@ -Fd$* $** -link $(DEBUG_FLAGS_LINK)
|
|
888 LINK_STANDARD_LIBRARY_ARGS = setargv.obj user32.lib wsock32.lib
|
|
889
|
1333
|
890 LIB_SRC_CFLAGS = $(CFLAGS) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES)
|
|
891
|
1330
|
892 # Inferred rule
|
|
893 {$(LIB_SRC)}.c{$(BLDLIB_SRC)}.exe :
|
1333
|
894 $(CCV) $(LIB_SRC_CFLAGS) $(LINK_DEPENDENCY_ARGS) $(LINK_STANDARD_LIBRARY_ARGS)
|
1330
|
895
|
|
896 # Individual dependencies
|
|
897 ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(SRC)/regex.c
|
|
898 $(BLDLIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
|
1333
|
899 $(CCV) $(LIB_SRC_CFLAGS) $(LINK_DEPENDENCY_ARGS) -stack:0x800000 $(LINK_STANDARD_LIBRARY_ARGS)
|
1330
|
900
|
|
901 $(BLDLIB_SRC)/movemail.exe : $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
|
|
902
|
|
903 # Minitar uses zlib so just use cdecl to simplify things
|
|
904 $(BLDLIB_SRC)/minitar.exe : $(NT)/minitar.c
|
|
905 $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
|
|
906
|
|
907 LIB_SRC_TOOLS = \
|
|
908 $(BLDLIB_SRC)/etags.exe \
|
|
909 $(BLDLIB_SRC)/hexl.exe \
|
|
910 $(BLDLIB_SRC)/i.exe \
|
|
911 $(BLDLIB_SRC)/winclient.exe \
|
|
912 $(BLDLIB_SRC)/make-docfile.exe \
|
|
913 $(BLDLIB_SRC)/mmencode.exe \
|
|
914 $(BLDLIB_SRC)/movemail.exe \
|
|
915 $(BLDLIB_SRC)/sorted-doc.exe \
|
|
916 $(BLDLIB_SRC)/wakeup.exe
|
|
917 !if $(USE_MINITAR)
|
|
918 LIB_SRC_TOOLS = \
|
|
919 $(LIB_SRC_TOOLS) \
|
|
920 $(BLDLIB_SRC)/minitar.exe
|
428
|
921 !endif
|
440
|
922 !if $(USE_PORTABLE_DUMPER)
|
1330
|
923 LIB_SRC_TOOLS = \
|
|
924 $(XEMACS_INCLUDES) \
|
|
925 $(BLDLIB_SRC)/make-dump-id.exe \
|
|
926 $(LIB_SRC_TOOLS)
|
442
|
927 !endif
|
428
|
928
|
1330
|
929 ###################### Building the info files
|
430
|
930
|
|
931 !if !defined(MAKEINFO)
|
776
|
932 MAKEINFO=$(XEMACS_BATCH_PACKAGES) -l texinfmt -f batch-texinfo-format
|
430
|
933 !endif
|
428
|
934
|
1330
|
935 MANDIR = $(SRCROOT)\man
|
|
936 INFODIR = $(SRCROOT)\info
|
428
|
937 INFO_FILES= \
|
|
938 $(INFODIR)\cl.info \
|
|
939 $(INFODIR)\custom.info \
|
|
940 $(INFODIR)\emodules.info \
|
|
941 $(INFODIR)\external-widget.info \
|
|
942 $(INFODIR)\info.info \
|
|
943 $(INFODIR)\standards.info \
|
|
944 $(INFODIR)\term.info \
|
|
945 $(INFODIR)\termcap.info \
|
|
946 $(INFODIR)\texinfo.info \
|
|
947 $(INFODIR)\widget.info \
|
|
948 $(INFODIR)\xemacs-faq.info \
|
|
949 $(INFODIR)\xemacs.info \
|
|
950 $(INFODIR)\lispref.info \
|
|
951 $(INFODIR)\new-users-guide.info \
|
|
952 $(INFODIR)\internals.info
|
|
953
|
|
954 {$(MANDIR)}.texi{$(INFODIR)}.info:
|
430
|
955 cd $(MANDIR)
|
428
|
956 $(MAKEINFO) $**
|
|
957
|
430
|
958 XEMACS_SRCS = \
|
428
|
959 $(MANDIR)\xemacs\abbrevs.texi \
|
|
960 $(MANDIR)\xemacs\basic.texi \
|
|
961 $(MANDIR)\xemacs\buffers.texi \
|
|
962 $(MANDIR)\xemacs\building.texi \
|
|
963 $(MANDIR)\xemacs\calendar.texi \
|
|
964 $(MANDIR)\xemacs\cmdargs.texi \
|
|
965 $(MANDIR)\xemacs\custom.texi \
|
|
966 $(MANDIR)\xemacs\display.texi \
|
|
967 $(MANDIR)\xemacs\entering.texi \
|
|
968 $(MANDIR)\xemacs\files.texi \
|
|
969 $(MANDIR)\xemacs\fixit.texi \
|
430
|
970 $(MANDIR)\xemacs\frame.texi \
|
428
|
971 $(MANDIR)\xemacs\glossary.texi \
|
|
972 $(MANDIR)\xemacs\gnu.texi \
|
|
973 $(MANDIR)\xemacs\help.texi \
|
|
974 $(MANDIR)\xemacs\indent.texi \
|
|
975 $(MANDIR)\xemacs\keystrokes.texi \
|
|
976 $(MANDIR)\xemacs\killing.texi \
|
|
977 $(MANDIR)\xemacs\m-x.texi \
|
|
978 $(MANDIR)\xemacs\major.texi \
|
|
979 $(MANDIR)\xemacs\mark.texi \
|
|
980 $(MANDIR)\xemacs\menus.texi \
|
|
981 $(MANDIR)\xemacs\mini.texi \
|
|
982 $(MANDIR)\xemacs\misc.texi \
|
|
983 $(MANDIR)\xemacs\mouse.texi \
|
430
|
984 $(MANDIR)\xemacs\mule.texi \
|
428
|
985 $(MANDIR)\xemacs\new.texi \
|
430
|
986 $(MANDIR)\xemacs\packages.texi \
|
428
|
987 $(MANDIR)\xemacs\picture.texi \
|
|
988 $(MANDIR)\xemacs\programs.texi \
|
|
989 $(MANDIR)\xemacs\reading.texi \
|
|
990 $(MANDIR)\xemacs\regs.texi \
|
|
991 $(MANDIR)\xemacs\search.texi \
|
|
992 $(MANDIR)\xemacs\sending.texi \
|
430
|
993 $(MANDIR)\xemacs\startup.texi \
|
428
|
994 $(MANDIR)\xemacs\text.texi \
|
|
995 $(MANDIR)\xemacs\trouble.texi \
|
|
996 $(MANDIR)\xemacs\undo.texi \
|
430
|
997 $(MANDIR)\xemacs\windows.texi \
|
|
998 $(MANDIR)\xemacs\xemacs.texi
|
428
|
999
|
430
|
1000 LISPREF_SRCS = \
|
428
|
1001 $(MANDIR)\lispref\abbrevs.texi \
|
|
1002 $(MANDIR)\lispref\annotations.texi \
|
|
1003 $(MANDIR)\lispref\back.texi \
|
|
1004 $(MANDIR)\lispref\backups.texi \
|
|
1005 $(MANDIR)\lispref\buffers.texi \
|
|
1006 $(MANDIR)\lispref\building.texi \
|
|
1007 $(MANDIR)\lispref\commands.texi \
|
|
1008 $(MANDIR)\lispref\compile.texi \
|
|
1009 $(MANDIR)\lispref\consoles-devices.texi \
|
|
1010 $(MANDIR)\lispref\control.texi \
|
430
|
1011 $(MANDIR)\lispref\customize.texi \
|
428
|
1012 $(MANDIR)\lispref\databases.texi \
|
|
1013 $(MANDIR)\lispref\debugging.texi \
|
|
1014 $(MANDIR)\lispref\dialog.texi \
|
|
1015 $(MANDIR)\lispref\display.texi \
|
430
|
1016 $(MANDIR)\lispref\dragndrop.texi \
|
428
|
1017 $(MANDIR)\lispref\edebug-inc.texi \
|
|
1018 $(MANDIR)\lispref\edebug.texi \
|
|
1019 $(MANDIR)\lispref\errors.texi \
|
|
1020 $(MANDIR)\lispref\eval.texi \
|
|
1021 $(MANDIR)\lispref\extents.texi \
|
|
1022 $(MANDIR)\lispref\faces.texi \
|
|
1023 $(MANDIR)\lispref\files.texi \
|
|
1024 $(MANDIR)\lispref\frames.texi \
|
|
1025 $(MANDIR)\lispref\functions.texi \
|
|
1026 $(MANDIR)\lispref\glyphs.texi \
|
|
1027 $(MANDIR)\lispref\hash-tables.texi \
|
|
1028 $(MANDIR)\lispref\help.texi \
|
|
1029 $(MANDIR)\lispref\hooks.texi \
|
430
|
1030 $(MANDIR)\lispref\index.texi \
|
428
|
1031 $(MANDIR)\lispref\internationalization.texi \
|
|
1032 $(MANDIR)\lispref\intro.texi \
|
|
1033 $(MANDIR)\lispref\keymaps.texi \
|
|
1034 $(MANDIR)\lispref\ldap.texi \
|
430
|
1035 $(MANDIR)\lispref\lispref.texi \
|
428
|
1036 $(MANDIR)\lispref\lists.texi \
|
|
1037 $(MANDIR)\lispref\loading.texi \
|
|
1038 $(MANDIR)\lispref\locals.texi \
|
|
1039 $(MANDIR)\lispref\macros.texi \
|
|
1040 $(MANDIR)\lispref\maps.texi \
|
|
1041 $(MANDIR)\lispref\markers.texi \
|
|
1042 $(MANDIR)\lispref\menus.texi \
|
|
1043 $(MANDIR)\lispref\minibuf.texi \
|
|
1044 $(MANDIR)\lispref\modes.texi \
|
|
1045 $(MANDIR)\lispref\mouse.texi \
|
|
1046 $(MANDIR)\lispref\mule.texi \
|
|
1047 $(MANDIR)\lispref\numbers.texi \
|
|
1048 $(MANDIR)\lispref\objects.texi \
|
|
1049 $(MANDIR)\lispref\os.texi \
|
|
1050 $(MANDIR)\lispref\positions.texi \
|
|
1051 $(MANDIR)\lispref\processes.texi \
|
|
1052 $(MANDIR)\lispref\range-tables.texi \
|
|
1053 $(MANDIR)\lispref\scrollbars.texi \
|
|
1054 $(MANDIR)\lispref\searching.texi \
|
|
1055 $(MANDIR)\lispref\sequences.texi \
|
|
1056 $(MANDIR)\lispref\specifiers.texi \
|
|
1057 $(MANDIR)\lispref\streams.texi \
|
|
1058 $(MANDIR)\lispref\strings.texi \
|
|
1059 $(MANDIR)\lispref\symbols.texi \
|
|
1060 $(MANDIR)\lispref\syntax.texi \
|
|
1061 $(MANDIR)\lispref\text.texi \
|
|
1062 $(MANDIR)\lispref\tips.texi \
|
|
1063 $(MANDIR)\lispref\toolbar.texi \
|
|
1064 $(MANDIR)\lispref\tooltalk.texi \
|
|
1065 $(MANDIR)\lispref\variables.texi \
|
|
1066 $(MANDIR)\lispref\windows.texi \
|
430
|
1067 $(MANDIR)\lispref\x-windows.texi
|
|
1068
|
|
1069 INTERNALS_SRCS = \
|
|
1070 $(MANDIR)\internals\internals.texi \
|
|
1071 $(MANDIR)\internals\index.texi
|
|
1072
|
|
1073 NEW_USERS_GUIDE_SRCS = \
|
|
1074 $(MANDIR)\new-users-guide\custom1.texi \
|
|
1075 $(MANDIR)\new-users-guide\custom2.texi \
|
|
1076 $(MANDIR)\new-users-guide\edit.texi \
|
|
1077 $(MANDIR)\new-users-guide\enter.texi \
|
|
1078 $(MANDIR)\new-users-guide\files.texi \
|
|
1079 $(MANDIR)\new-users-guide\help.texi \
|
|
1080 $(MANDIR)\new-users-guide\modes.texi \
|
|
1081 $(MANDIR)\new-users-guide\new-users-guide.texi \
|
|
1082 $(MANDIR)\new-users-guide\region.texi \
|
|
1083 $(MANDIR)\new-users-guide\search.texi \
|
|
1084 $(MANDIR)\new-users-guide\xmenu.texi
|
|
1085
|
|
1086 $(INFODIR)\xemacs.info: $(XEMACS_SRCS)
|
|
1087 cd $(MANDIR)\xemacs
|
|
1088 $(MAKEINFO) xemacs.texi
|
428
|
1089
|
|
1090
|
430
|
1091 $(INFODIR)\lispref.info: $(LISPREF_SRCS)
|
|
1092 cd $(MANDIR)\lispref
|
|
1093 $(MAKEINFO) lispref.texi
|
|
1094
|
|
1095 $(INFODIR)\internals.info: $(INTERNALS_SRCS)
|
|
1096 cd $(MANDIR)\internals
|
|
1097 $(MAKEINFO) internals.texi
|
|
1098
|
|
1099 $(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS)
|
|
1100 cd $(MANDIR)\new-users-guide
|
|
1101 $(MAKEINFO) new-users-guide.texi
|
428
|
1102
|
815
|
1103 info: makeinfo-test $(INFO_FILES)
|
428
|
1104
|
430
|
1105 makeinfo-test:
|
|
1106 @<<makeinfo_test.bat
|
|
1107 @echo off
|
|
1108 if exist "$(MAKEINFO)" goto test_done
|
776
|
1109 @$(XEMACS_BATCH_PACKAGES) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
|
430
|
1110 @if not errorlevel 1 goto suggest_makeinfo
|
442
|
1111 @echo XEmacs 'info' cannot be built!
|
|
1112 @echo Install XEmacs package 'texinfo' (see README.packages).
|
430
|
1113 :suggest_makeinfo
|
1315
|
1114 @echo Consider specifying path to 'makeinfo' in config.inc.
|
|
1115 @echo as this will build the info docs much faster than XEmacs using 'texinfo'.
|
430
|
1116 @if errorlevel 1 exit 1
|
|
1117 :test_done
|
|
1118 <<NOKEEP
|
428
|
1119
|
1330
|
1120 ########################### Create the Installation file
|
428
|
1121
|
1330
|
1122 $(BLDROOT)\Installation:: installation
|
440
|
1123
|
442
|
1124 installation::
|
1330
|
1125 @echo OS version:>$(BLDROOT)\Installation
|
|
1126 @ver >> $(BLDROOT)\Installation
|
|
1127 @type >> $(BLDROOT)\Installation <<
|
428
|
1128 !if defined(OS)
|
|
1129 OS: $(OS)
|
|
1130 !endif
|
|
1131
|
1370
|
1132 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) $(xemacs_extra_name:"=) configured for `$(EMACS_CONFIGURATION)'.
|
428
|
1133
|
1052
|
1134 Building XEmacs using "$(MAKE:\=\\)".
|
|
1135 Building XEmacs using make flags "$(MAKEFLAGS)".
|
1330
|
1136 Building XEmacs in source tree "$(SRCROOT:\=\\)".
|
|
1137 !if $(SEPARATE_BUILD)
|
|
1138 Building XEmacs into compiled tree "$(BLDROOT:\=\\)".
|
|
1139 !endif
|
428
|
1140 !if defined(CCV)
|
1333
|
1141 For src, using compiler "$(CC) $(TEMACS_CPP_FLAGS)".
|
|
1142 For lib-src, using compiler "$(CC) $(LIB_SRC_CFLAGS)".
|
428
|
1143 !endif
|
1203
|
1144 !if $(CPLUSPLUS_COMPILE)
|
|
1145 Compiling as C++.
|
|
1146 !endif
|
1052
|
1147 Installing XEmacs in "$(INSTALL_DIR:\=\\)".
|
|
1148 Package path is $(PATH_PACKAGEPATH).
|
428
|
1149 !if $(INFODOCK)
|
|
1150 Building InfoDock.
|
|
1151 !endif
|
442
|
1152 !if $(HAVE_MS_WINDOWS)
|
428
|
1153 Compiling in support for Microsoft Windows native GUI.
|
|
1154 !endif
|
771
|
1155 !if $(MULE)
|
|
1156 Compiling in international (MULE) support.
|
428
|
1157 !endif
|
488
|
1158 !if $(HAVE_GTK)
|
|
1159 --------------------------------------------------------------------
|
1315
|
1160 NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
|
|
1161 NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
|
|
1162 NOTE: Yes, we know that gtk has been ported to native MS Windows, but
|
|
1163 NOTE: XEmacs is not yet ready to use that port.
|
488
|
1164 --------------------------------------------------------------------
|
|
1165 !endif
|
428
|
1166 !if $(HAVE_XPM)
|
|
1167 Compiling in support for XPM images.
|
|
1168 !else
|
|
1169 --------------------------------------------------------------------
|
1315
|
1170 NOTE: Compiling without XPM support.
|
|
1171 NOTE: You should strongly consider installing XPM.
|
|
1172 NOTE: Otherwise toolbars and other graphics will look suboptimal.
|
|
1173 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)
|
428
|
1174 --------------------------------------------------------------------
|
|
1175 !endif
|
|
1176 !if $(HAVE_GIF)
|
|
1177 Compiling in support for GIF images.
|
|
1178 !endif
|
|
1179 !if $(HAVE_PNG)
|
|
1180 Compiling in support for PNG images.
|
|
1181 !else
|
|
1182 --------------------------------------------------------------------
|
1315
|
1183 NOTE: Compiling without PNG image support.
|
|
1184 NOTE: You should strongly consider installing the PNG libraries.
|
|
1185 NOTE: Otherwise certain images and glyphs may not display.
|
|
1186 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux
|
428
|
1187 --------------------------------------------------------------------
|
|
1188 !endif
|
|
1189 !if $(HAVE_TIFF)
|
|
1190 Compiling in support for TIFF images.
|
|
1191 !endif
|
|
1192 !if $(HAVE_JPEG)
|
|
1193 Compiling in support for JPEG images.
|
|
1194 !endif
|
|
1195 !if $(HAVE_XFACE)
|
|
1196 Compiling in support for X-Face message headers.
|
|
1197 !endif
|
771
|
1198 !if $(HAVE_ZLIB)
|
|
1199 Compiling in support for GZIP compression/decompression.
|
|
1200 !endif
|
428
|
1201 !if $(HAVE_TOOLBARS)
|
|
1202 Compiling in support for toolbars.
|
|
1203 !endif
|
|
1204 !if $(HAVE_DIALOGS)
|
|
1205 Compiling in support for dialogs.
|
|
1206 !endif
|
|
1207 !if $(HAVE_WIDGETS)
|
|
1208 Compiling in support for widgets.
|
|
1209 !endif
|
|
1210 !if $(HAVE_NATIVE_SOUND)
|
|
1211 Compiling in support for native sounds.
|
|
1212 !endif
|
|
1213 !if $(USE_UNION_TYPE)
|
|
1214 Using union type for Lisp object storage.
|
1315
|
1215 NOTE: ---------------------------------------------------------
|
|
1216 NOTE: This tends to trigger compiler bugs, especially when combined
|
|
1217 NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently
|
|
1218 NOTE: been observed using Visual C++ in combination with union type,
|
|
1219 NOTE: MULE, and ERROR_CHECKING.
|
|
1220 NOTE: ---------------------------------------------------------
|
428
|
1221 !endif
|
438
|
1222 !if $(USE_PORTABLE_DUMPER)
|
|
1223 Using portable dumper.
|
|
1224 !endif
|
440
|
1225 !if $(USE_SYSTEM_MALLOC)
|
|
1226 Using system malloc.
|
|
1227 !endif
|
|
1228 !if $(USE_CRTDLL)
|
942
|
1229 Using DLL version of C runtime library.
|
440
|
1230 !endif
|
814
|
1231 !if $(ERROR_CHECK_ALL)
|
1203
|
1232 Compiling in extra internal error-checking.
|
1315
|
1233 NOTE: ---------------------------------------------------------
|
|
1234 NOTE: Compiling in support for runtime error-checking.
|
|
1235 NOTE: XEmacs will run noticeably more slowly as a result.
|
|
1236 NOTE: Error-checking is on by default for XEmacs beta releases.
|
|
1237 NOTE: ---------------------------------------------------------
|
814
|
1238 !endif
|
428
|
1239 !if $(DEBUG_XEMACS)
|
814
|
1240 Compiling in debugging support (no slowdown).
|
|
1241 !endif
|
|
1242 !if $(OPTIMIZED_BUILD)
|
|
1243 Compiling with optimization.
|
428
|
1244 !endif
|
442
|
1245 !if $(QUICK_BUILD)
|
|
1246 Disabling non-essential build actions. Use with care!
|
|
1247 !endif
|
942
|
1248 !if $(USE_KKCC)
|
|
1249 Using new experimental GC algorithms.
|
|
1250 !endif
|
428
|
1251 <<NOKEEP
|
|
1252 @echo --------------------------------------------------------------------
|
1330
|
1253 @type $(BLDROOT)\Installation
|
428
|
1254 @echo --------------------------------------------------------------------
|
|
1255
|
1330
|
1256 #########################################################################
|
|
1257 ## Primary rebuilding process ##
|
|
1258 #########################################################################
|
|
1259
|
|
1260 ########################### Definitions for linking temacs.exe
|
|
1261
|
|
1262 !if !$(USE_PORTABLE_DUMPER)
|
|
1263 TEMACS_ENTRYPOINT=-entry:_start
|
|
1264 !else
|
|
1265 TEMACS_ENTRYPOINT=-entry:mainCRTStartup
|
|
1266 !endif
|
|
1267
|
|
1268 TEMACS_BROWSE=$(BLDSRC)\temacs.bsc
|
|
1269 TEMACS_LIBS=$(LASTFILE) $(MSW_LIBS) \
|
|
1270 oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
|
|
1271 shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
|
|
1272 mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
|
1333
|
1273 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \
|
|
1274 -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \
|
1330
|
1275 -pdb:$(BLDSRC)\temacs.pdb -map:$(BLDSRC)\temacs.map \
|
|
1276 -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
|
|
1277
|
|
1278 ########################### Definitions for running temacs.exe/xemacs.exe
|
|
1279
|
|
1280 RAW_EXE=$(BLDSRC)\temacs.exe
|
|
1281 DUMP_TARGET = $(BLDSRC)\xemacs.exe
|
|
1282 DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)"
|
|
1283 DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)"
|
|
1284
|
|
1285 BATCH = -no-packages -batch
|
|
1286 BATCH_PACKAGES = -vanilla -batch
|
|
1287 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
|
|
1288 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
|
|
1289 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
|
|
1290 temacs_loadup_args = -l $(LISP)/loadup.el
|
|
1291 dump_temacs_args = $(temacs_loadup_args) dump
|
|
1292 run_temacs_args = $(temacs_loadup_args) run-temacs
|
|
1293 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
|
|
1294
|
|
1295 ########################### Build rules
|
|
1296
|
1346
|
1297 ## Use this rule to build the complete system. We need both update-elc
|
|
1298 ## and update-elc-2 due to the sideways dependency of NEEDTODUMP. See
|
|
1299 ## src/Makefile.in.in for a more detailed discussion of this.
|
|
1300
|
|
1301 all: installation $(OUTDIR)\nul $(LIB_SRC_TOOLS) \
|
|
1302 update-elc update-elc-2 \
|
|
1303 $(LISP)/finder-inf.el load-shadows info
|
1330
|
1304
|
|
1305 $(TEMACS_BROWSE): $(TEMACS_OBJS)
|
|
1306 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp
|
|
1307 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp
|
|
1308 -$(DEL) $(OUTDIR)\bscmake.tmp
|
|
1309
|
1346
|
1310 ## (1) Compile all dependencies of the XEmacs executable
|
1330
|
1311
|
|
1312 $(OUTDIR)\dump-id.obj : $(BLDSRC)\dump-id.c
|
|
1313 $(CCV) $(TEMACS_CPP_FLAGS) $(BLDSRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
|
1314
|
|
1315 $(BLDSRC)\dump-id.c : $(BLDLIB_SRC)/make-dump-id.exe $(TEMACS_OBJS)
|
|
1316 cd $(BLDSRC)
|
|
1317 $(BLDLIB_SRC)\make-dump-id.exe
|
|
1318
|
|
1319 $(OUTDIR)\temacs.res: $(NT)\xemacs.rc
|
|
1320 cd $(NT)
|
|
1321 rc -Fo$@ xemacs.rc
|
|
1322
|
1346
|
1323 ## (2) Link the XEmacs executable
|
|
1324
|
1330
|
1325 !if $(USE_PORTABLE_DUMPER)
|
|
1326 TEMACS_DUMP_DEP = $(OUTDIR)\dump-id.obj
|
|
1327 !else
|
|
1328 TEMACS_DUMP_DEP = $(OUTDIR)\temacs.res
|
|
1329 !endif
|
|
1330
|
|
1331 $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
|
|
1332 link.exe @<<
|
|
1333 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
|
|
1334 <<
|
|
1335
|
|
1336 !if $(DEBUG_XEMACS)
|
|
1337 $(RAW_EXE): $(TEMACS_BROWSE)
|
|
1338 !endif
|
|
1339
|
1346
|
1340 ## (3) Update the .elc's needed for dumping
|
|
1341
|
|
1342 update-elc: $(RAW_EXE)
|
|
1343 $(TEMACS_BATCH) -l $(LISP)\update-elc.el
|
|
1344
|
|
1345 ## This file is touched by update-elc.el when redumping is necessary.
|
|
1346 $(BLDSRC)\NEEDTODUMP:
|
|
1347 @echo >$(BLDSRC)\NEEDTODUMP
|
|
1348
|
|
1349 ## (4) Build the DOC file
|
1330
|
1350
|
|
1351 DOC=$(BLDLIB_SRC)\DOC
|
|
1352
|
|
1353 docfile ::
|
|
1354 if exist $(DOC) $(DEL) $(DOC)
|
|
1355 docfile :: $(DOC)
|
|
1356
|
|
1357 # We need to write the QUICK_BUILD stuff as-is (and not just have no
|
|
1358 # dependencies for DOC) because DOC needs TEMACS_OBJS as dependencies to
|
|
1359 # get $(**) right. The `touch' is needed because of the way nmake
|
|
1360 # calculates dependencies; see comments in src/Makefile.in.in.
|
|
1361 $(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_OBJS)
|
|
1362 !if $(QUICK_BUILD)
|
|
1363 if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
|
|
1364 $(**)
|
|
1365 <<
|
|
1366 -touch $(DOC)
|
|
1367 !else
|
|
1368 $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
|
|
1369 $(**)
|
|
1370 <<
|
|
1371 !endif
|
|
1372
|
1346
|
1373 ## (5) Dump
|
1330
|
1374
|
|
1375 !if $(USE_PORTABLE_DUMPER)
|
|
1376 $(DUMP_TARGET): $(NT)\xemacs.rc
|
|
1377 !endif
|
|
1378
|
|
1379 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
|
|
1380 # requirements have changed.
|
|
1381
|
|
1382 $(DUMP_TARGET): $(DOC) $(RAW_EXE) $(BLDSRC)\NEEDTODUMP
|
|
1383 $(TEMACS_BATCH) -l $(LISP)\loadup.el dump
|
|
1384 !if $(USE_PORTABLE_DUMPER)
|
|
1385 cd $(BLDSRC)
|
|
1386 rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
|
|
1387 # Make the resource section read/write since almost all of it is the dump
|
|
1388 # data which needs to be writable. This avoids having to copy it.
|
|
1389 link.exe @<<
|
|
1390 $(TEMACS_LFLAGS) -section:.rsrc,rw -out:$(BLDSRC)\xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
|
|
1391 <<
|
|
1392 -$(DEL) $(BLDSRC)\xemacs.dmp
|
|
1393 !endif
|
|
1394
|
1346
|
1395 ## (6) Update the remaining .elc's, post-dumping
|
|
1396
|
|
1397 update-elc-2: $(DUMP_TARGET)
|
1330
|
1398 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
|
|
1399
|
1346
|
1400 ## (7) Other random stuff
|
|
1401
|
|
1402 $(LISP)/finder-inf.el: update-elc-2
|
1330
|
1403 !if !$(QUICK_BUILD)
|
|
1404 @echo Building finder database ...
|
|
1405 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
|
|
1406 -l finder -f finder-compile-keywords
|
|
1407 @echo Building finder database ...(done)
|
|
1408 !endif
|
|
1409
|
1346
|
1410 load-shadows: update-elc-2
|
1330
|
1411 !if !$(QUICK_BUILD)
|
|
1412 @echo Testing for Lisp shadows ...
|
|
1413 @$(XEMACS_BATCH) -f list-load-path-shadows
|
|
1414 !endif
|
|
1415
|
|
1416 #########################################################################
|
|
1417 ## Other random crap ##
|
|
1418 #########################################################################
|
|
1419
|
|
1420 ########################### Automated tests
|
428
|
1421
|
1330
|
1422 testdir = ../tests/automated
|
|
1423 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
|
|
1424
|
|
1425 check:
|
|
1426 cd $(BLDSRC)
|
|
1427 $(DO_XEMACS) $(batch_test_emacs)
|
|
1428
|
|
1429 check-temacs:
|
|
1430 cd $(BLDSRC)
|
|
1431 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
|
|
1432
|
|
1433 check-features: all
|
|
1434 cd $(BLDSRC)
|
|
1435 $(XEMACS_BATCH) -l check-features.el
|
|
1436
|
|
1437
|
|
1438 ########################### Rebuilding TAGS
|
|
1439
|
|
1440 tags:
|
|
1441 @echo If you do not have a copy of etags around, then do 'make lib-src' first.
|
|
1442 @echo To make use of the tags file, put the following in your .emacs:
|
|
1443 @echo (setq tag-table-alist
|
|
1444 @echo '(("$(SRCROOT:\=\\)\\" . "$(SRCROOT:\=\\)\\")))
|
|
1445 cd $(SRCROOT)
|
|
1446 -$(DEL) TAGS
|
|
1447 set PATH=lib-src;%PATH%
|
|
1448 # we need to double ^, but only in one place, because (according to the
|
|
1449 # nmake manual), a ^ is used to quote certain special characters such as
|
|
1450 # backslash, but is treated literally within double quotes -- and notice
|
|
1451 # carefully the occurrences of double quotes in the first line below!
|
|
1452 etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
|
|
1453 etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(LISP)\*.el $(LISP)\mule\*.el
|
|
1454
|
|
1455 ########################### Install the system
|
|
1456
|
|
1457 # use this rule to install the system
|
|
1458 install: all
|
|
1459 cd $(NT)
|
|
1460 set COPYCMD=/y
|
|
1461 @echo Installing in $(INSTALL_DIR) ...
|
|
1462 @echo PlaceHolder > PlaceHolder
|
|
1463 @$(COPY) PROBLEMS "$(INSTALL_DIR)\"
|
|
1464 @$(COPY) PlaceHolder "$(INSTALL_DIR)\lock\"
|
|
1465 -$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder"
|
|
1466 @$(COPY) $(BLDLIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
|
|
1467 @$(COPY) $(BLDLIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
|
1468 @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
|
1469 @$(COPY) $(BLDSRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
|
1470 @$(COPYDIR) $(SRCROOT)\etc "$(INSTALL_DIR)\etc\"
|
|
1471 @$(COPYDIR) $(SRCROOT)\info "$(INSTALL_DIR)\info\"
|
|
1472 @$(COPYDIR) $(SRCROOT)\lisp "$(INSTALL_DIR)\lisp\"
|
|
1473 @echo Making skeleton package tree in $(PACKAGE_PREFIX) ...
|
|
1474 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\site-packages\"
|
|
1475 -$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder"
|
|
1476 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\"
|
|
1477 -$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder"
|
|
1478 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\"
|
|
1479 -$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder"
|
|
1480 -$(DEL) PlaceHolder
|
|
1481
|
|
1482 ########################### clean
|
|
1483
|
|
1484 mostlyclean:
|
|
1485 -$(DEL) $(BLDROOT)\Installation
|
|
1486 -$(DEL) $(OUTDIR)\*.lib
|
|
1487 -$(DEL) $(OUTDIR)\*.obj
|
|
1488 -$(DEL) $(OUTDIR)\*.pdb
|
|
1489 -$(DEL) $(OUTDIR)\*.res
|
|
1490 -$(DEL) $(OUTDIR)\*.sbr
|
|
1491 -$(DEL) $(BLDSRC)\*.exe
|
|
1492 -$(DEL) $(BLDSRC)\*.dmp
|
|
1493 -$(DEL) $(BLDSRC)\*.map
|
|
1494 -$(DEL) $(BLDSRC)\*.pdb
|
|
1495 -$(DEL) $(BLDSRC)\NEEDTODUMP
|
|
1496 -$(DEL) $(BLDSRC)\dump-id.c
|
|
1497 -$(DEL) $(SRC)\*.bsc
|
|
1498 -$(DEL) $(BLDLIB_SRC)\*.exe
|
|
1499 -$(DEL) $(BLDLIB_SRC)\*.obj
|
|
1500 -$(DEL) $(BLDLIB_SRC)\*.pdb
|
|
1501 -$(DEL) $(BLDLIB_SRC)\*.res
|
|
1502
|
|
1503 versionclean:
|
|
1504 -$(DEL) $(BLDSRC)\xemacs.exe
|
|
1505 -$(DEL) $(BLDLIB_SRC)\DOC
|
|
1506
|
|
1507 clean: mostlyclean versionclean
|
|
1508 -$(DEL) $(SRCROOT)\TAGS
|
|
1509 -$(DEL) $(LISP)\auto-autoloads.el*
|
|
1510 -$(DEL) $(LISP)\mule\auto-autoloads.el*
|
|
1511 -$(DEL) $(LISP)\custom-load.el*
|
|
1512 -$(DEL) $(LISP)\mule\custom-load.el*
|
|
1513
|
|
1514 nicenclean: clean
|
|
1515 -$(DEL) $(NT)\*.bak
|
|
1516 -$(DEL) $(NT)\*.orig
|
|
1517 -$(DEL) $(NT)\*.rej
|
|
1518 -$(DEL) $(NT)\*.tmp
|
|
1519 -$(DEL) $(LIB_SRC)\*.bak
|
|
1520 -$(DEL) $(LIB_SRC)\*.orig
|
|
1521 -$(DEL) $(LIB_SRC)\*.rej
|
|
1522 -$(DEL) $(LIB_SRC)\*.tmp
|
|
1523 -$(DEL) $(SRC)\*.bak
|
|
1524 -$(DEL) $(SRC)\*.orig
|
|
1525 -$(DEL) $(SRC)\*.rej
|
|
1526 -$(DEL) $(SRC)\*.tmp
|
|
1527 -$(DEL) $(LISP)\*.bak
|
|
1528 -$(DEL) $(LISP)\*.orig
|
|
1529 -$(DEL) $(LISP)\*.rej
|
|
1530 -$(DEL) $(LISP)\*.tmp
|
|
1531
|
|
1532 # Convenience target.
|
|
1533 # Reproducing the configuration is just a matter of copying, and if
|
|
1534 # we use the same directory for Cygwin builds these must go. We don't
|
|
1535 # want to use distclean.
|
|
1536 configclean:
|
|
1537 -$(DEL) $(SRC)\config.h
|
|
1538 -$(DEL) $(SRC)\paths.h
|
|
1539 -$(DEL) $(SRC)\Emacs.ad.h
|
|
1540
|
|
1541 ## This is used in making a distribution.
|
|
1542 ## Do not use it on development directories!
|
|
1543 distclean: nicenclean configclean
|
|
1544 -$(DEL) $(BLDLIB_SRC)\$(CONFIG_VALUES)
|
|
1545 -$(DEL) $(INFODIR)\*.info*
|
|
1546 -$(DEL) $(LISP)\*.elc
|
|
1547 -$(DEL) $(LISP)\mule\*.elc
|
|
1548 -$(DEL) $(LISP)\term\*.elc
|
|
1549
|
|
1550 realclean: distclean
|
|
1551
|
|
1552 #not sure about those wildcards. DOS wildcards are stupid compared to Unix,
|
|
1553 #and could end up deleting *everything* instead of just backup files or
|
|
1554 #whatever. So just leave it at "realclean"
|
|
1555 extraclean: realclean
|
|
1556 # -$(DEL) *~
|
|
1557 # -$(DEL) *.*~
|
|
1558 # -$(DEL) #*
|
|
1559 # -$(DEL) m\*~
|
|
1560 # -$(DEL) m\#*
|
|
1561 # -$(DEL) s\*~
|
|
1562 # -$(DEL) s\#*
|
|
1563
|
|
1564 ########################### Rebuild source dependency file
|
|
1565
|
|
1566 depend:
|
|
1567 cd $(SRC)
|
|
1568 perl ./make-src-depend > depend.tmp
|
|
1569 perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
|
|
1570
|
|
1571 ########################### Redo Unicode-Encapsulation
|
|
1572
|
|
1573 unicode-encapsulate:
|
|
1574 cd $(SRC)
|
|
1575 perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c
|
|
1576
|