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
1330
+ − 1105 ########################### Create the Installation file
428
+ − 1106
1330
+ − 1107 $(BLDROOT)\Installation:: installation
440
+ − 1108
442
+ − 1109 installation::
1330
+ − 1110 @echo OS version:>$(BLDROOT)\Installation
+ − 1111 @ver >> $(BLDROOT)\Installation
+ − 1112 @type >> $(BLDROOT)\Installation <<
428
+ − 1113 !if defined(OS)
+ − 1114 OS: $(OS)
+ − 1115 !endif
+ − 1116
1370
+ − 1117 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) $(xemacs_extra_name:"=) configured for `$(EMACS_CONFIGURATION)'.
428
+ − 1118
1052
+ − 1119 Building XEmacs using "$(MAKE:\=\\)".
+ − 1120 Building XEmacs using make flags "$(MAKEFLAGS)".
1330
+ − 1121 Building XEmacs in source tree "$(SRCROOT:\=\\)".
+ − 1122 !if $(SEPARATE_BUILD)
+ − 1123 Building XEmacs into compiled tree "$(BLDROOT:\=\\)".
+ − 1124 !endif
428
+ − 1125 !if defined(CCV)
1333
+ − 1126 For src, using compiler "$(CC) $(TEMACS_CPP_FLAGS)".
+ − 1127 For lib-src, using compiler "$(CC) $(LIB_SRC_CFLAGS)".
428
+ − 1128 !endif
1203
+ − 1129 !if $(CPLUSPLUS_COMPILE)
+ − 1130 Compiling as C++.
+ − 1131 !endif
1052
+ − 1132 Installing XEmacs in "$(INSTALL_DIR:\=\\)".
+ − 1133 Package path is $(PATH_PACKAGEPATH).
428
+ − 1134 !if $(INFODOCK)
+ − 1135 Building InfoDock.
+ − 1136 !endif
442
+ − 1137 !if $(HAVE_MS_WINDOWS)
428
+ − 1138 Compiling in support for Microsoft Windows native GUI.
+ − 1139 !endif
771
+ − 1140 !if $(MULE)
+ − 1141 Compiling in international (MULE) support.
428
+ − 1142 !endif
488
+ − 1143 !if $(HAVE_GTK)
+ − 1144 --------------------------------------------------------------------
1315
+ − 1145 NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
+ − 1146 NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
+ − 1147 NOTE: Yes, we know that gtk has been ported to native MS Windows, but
+ − 1148 NOTE: XEmacs is not yet ready to use that port.
488
+ − 1149 --------------------------------------------------------------------
+ − 1150 !endif
428
+ − 1151 !if $(HAVE_XPM)
+ − 1152 Compiling in support for XPM images.
+ − 1153 !else
+ − 1154 --------------------------------------------------------------------
1315
+ − 1155 NOTE: Compiling without XPM support.
+ − 1156 NOTE: You should strongly consider installing XPM.
+ − 1157 NOTE: Otherwise toolbars and other graphics will look suboptimal.
+ − 1158 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)
428
+ − 1159 --------------------------------------------------------------------
+ − 1160 !endif
+ − 1161 !if $(HAVE_GIF)
+ − 1162 Compiling in support for GIF images.
+ − 1163 !endif
+ − 1164 !if $(HAVE_PNG)
+ − 1165 Compiling in support for PNG images.
+ − 1166 !else
+ − 1167 --------------------------------------------------------------------
1315
+ − 1168 NOTE: Compiling without PNG image support.
+ − 1169 NOTE: You should strongly consider installing the PNG libraries.
+ − 1170 NOTE: Otherwise certain images and glyphs may not display.
+ − 1171 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux
428
+ − 1172 --------------------------------------------------------------------
+ − 1173 !endif
+ − 1174 !if $(HAVE_TIFF)
+ − 1175 Compiling in support for TIFF images.
+ − 1176 !endif
+ − 1177 !if $(HAVE_JPEG)
+ − 1178 Compiling in support for JPEG images.
+ − 1179 !endif
+ − 1180 !if $(HAVE_XFACE)
+ − 1181 Compiling in support for X-Face message headers.
+ − 1182 !endif
771
+ − 1183 !if $(HAVE_ZLIB)
+ − 1184 Compiling in support for GZIP compression/decompression.
+ − 1185 !endif
428
+ − 1186 !if $(HAVE_TOOLBARS)
+ − 1187 Compiling in support for toolbars.
+ − 1188 !endif
+ − 1189 !if $(HAVE_DIALOGS)
+ − 1190 Compiling in support for dialogs.
+ − 1191 !endif
+ − 1192 !if $(HAVE_WIDGETS)
+ − 1193 Compiling in support for widgets.
+ − 1194 !endif
+ − 1195 !if $(HAVE_NATIVE_SOUND)
+ − 1196 Compiling in support for native sounds.
+ − 1197 !endif
+ − 1198 !if $(USE_UNION_TYPE)
+ − 1199 Using union type for Lisp object storage.
1315
+ − 1200 NOTE: ---------------------------------------------------------
+ − 1201 NOTE: This tends to trigger compiler bugs, especially when combined
+ − 1202 NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently
+ − 1203 NOTE: been observed using Visual C++ in combination with union type,
+ − 1204 NOTE: MULE, and ERROR_CHECKING.
+ − 1205 NOTE: ---------------------------------------------------------
428
+ − 1206 !endif
438
+ − 1207 !if $(USE_PORTABLE_DUMPER)
+ − 1208 Using portable dumper.
+ − 1209 !endif
440
+ − 1210 !if $(USE_SYSTEM_MALLOC)
+ − 1211 Using system malloc.
+ − 1212 !endif
+ − 1213 !if $(USE_CRTDLL)
942
+ − 1214 Using DLL version of C runtime library.
440
+ − 1215 !endif
814
+ − 1216 !if $(ERROR_CHECK_ALL)
1203
+ − 1217 Compiling in extra internal error-checking.
1315
+ − 1218 NOTE: ---------------------------------------------------------
+ − 1219 NOTE: Compiling in support for runtime error-checking.
+ − 1220 NOTE: XEmacs will run noticeably more slowly as a result.
+ − 1221 NOTE: Error-checking is on by default for XEmacs beta releases.
+ − 1222 NOTE: ---------------------------------------------------------
814
+ − 1223 !endif
428
+ − 1224 !if $(DEBUG_XEMACS)
814
+ − 1225 Compiling in debugging support (no slowdown).
+ − 1226 !endif
+ − 1227 !if $(OPTIMIZED_BUILD)
+ − 1228 Compiling with optimization.
428
+ − 1229 !endif
442
+ − 1230 !if $(QUICK_BUILD)
+ − 1231 Disabling non-essential build actions. Use with care!
+ − 1232 !endif
942
+ − 1233 !if $(USE_KKCC)
+ − 1234 Using new experimental GC algorithms.
+ − 1235 !endif
428
+ − 1236 <<NOKEEP
+ − 1237 @echo --------------------------------------------------------------------
1330
+ − 1238 @type $(BLDROOT)\Installation
428
+ − 1239 @echo --------------------------------------------------------------------
+ − 1240
1330
+ − 1241 #########################################################################
+ − 1242 ## Primary rebuilding process ##
+ − 1243 #########################################################################
+ − 1244
+ − 1245 ########################### Definitions for linking temacs.exe
+ − 1246
+ − 1247 !if !$(USE_PORTABLE_DUMPER)
+ − 1248 TEMACS_ENTRYPOINT=-entry:_start
+ − 1249 !else
+ − 1250 TEMACS_ENTRYPOINT=-entry:mainCRTStartup
+ − 1251 !endif
+ − 1252
+ − 1253 TEMACS_BROWSE=$(BLDSRC)\temacs.bsc
+ − 1254 TEMACS_LIBS=$(LASTFILE) $(MSW_LIBS) \
+ − 1255 oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
+ − 1256 shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
+ − 1257 mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
1333
+ − 1258 TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \
+ − 1259 -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \
1330
+ − 1260 -pdb:$(BLDSRC)\temacs.pdb -map:$(BLDSRC)\temacs.map \
+ − 1261 -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
+ − 1262
+ − 1263 ########################### Definitions for running temacs.exe/xemacs.exe
+ − 1264
+ − 1265 RAW_EXE=$(BLDSRC)\temacs.exe
+ − 1266 DUMP_TARGET = $(BLDSRC)\xemacs.exe
+ − 1267 DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)"
+ − 1268 DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)"
+ − 1269
+ − 1270 BATCH = -no-packages -batch
+ − 1271 BATCH_PACKAGES = -vanilla -batch
+ − 1272 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
1657
+ − 1273 TEMACS_BATCH_PACKAGES = $(DO_TEMACS) -nd $(BATCH_PACKAGES)
1330
+ − 1274 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
+ − 1275 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
+ − 1276 temacs_loadup_args = -l $(LISP)/loadup.el
+ − 1277 dump_temacs_args = $(temacs_loadup_args) dump
+ − 1278 run_temacs_args = $(temacs_loadup_args) run-temacs
+ − 1279 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
+ − 1280
+ − 1281 ########################### Build rules
+ − 1282
1346
+ − 1283 ## Use this rule to build the complete system. We need both update-elc
+ − 1284 ## and update-elc-2 due to the sideways dependency of NEEDTODUMP. See
+ − 1285 ## src/Makefile.in.in for a more detailed discussion of this.
+ − 1286
+ − 1287 all: installation $(OUTDIR)\nul $(LIB_SRC_TOOLS) \
+ − 1288 update-elc update-elc-2 \
+ − 1289 $(LISP)/finder-inf.el load-shadows info
1330
+ − 1290
+ − 1291 $(TEMACS_BROWSE): $(TEMACS_OBJS)
+ − 1292 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp
+ − 1293 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp
+ − 1294 -$(DEL) $(OUTDIR)\bscmake.tmp
+ − 1295
1346
+ − 1296 ## (1) Compile all dependencies of the XEmacs executable
1330
+ − 1297
+ − 1298 $(OUTDIR)\dump-id.obj : $(BLDSRC)\dump-id.c
+ − 1299 $(CCV) $(TEMACS_CPP_FLAGS) $(BLDSRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
+ − 1300
+ − 1301 $(BLDSRC)\dump-id.c : $(BLDLIB_SRC)/make-dump-id.exe $(TEMACS_OBJS)
+ − 1302 cd $(BLDSRC)
+ − 1303 $(BLDLIB_SRC)\make-dump-id.exe
+ − 1304
+ − 1305 $(OUTDIR)\temacs.res: $(NT)\xemacs.rc
+ − 1306 cd $(NT)
+ − 1307 rc -Fo$@ xemacs.rc
+ − 1308
1346
+ − 1309 ## (2) Link the XEmacs executable
+ − 1310
1330
+ − 1311 !if $(USE_PORTABLE_DUMPER)
+ − 1312 TEMACS_DUMP_DEP = $(OUTDIR)\dump-id.obj
+ − 1313 !else
+ − 1314 TEMACS_DUMP_DEP = $(OUTDIR)\temacs.res
+ − 1315 !endif
+ − 1316
+ − 1317 $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
+ − 1318 link.exe @<<
+ − 1319 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
+ − 1320 <<
+ − 1321
+ − 1322 !if $(DEBUG_XEMACS)
+ − 1323 $(RAW_EXE): $(TEMACS_BROWSE)
+ − 1324 !endif
+ − 1325
1346
+ − 1326 ## (3) Update the .elc's needed for dumping
+ − 1327
+ − 1328 update-elc: $(RAW_EXE)
+ − 1329 $(TEMACS_BATCH) -l $(LISP)\update-elc.el
+ − 1330
+ − 1331 ## This file is touched by update-elc.el when redumping is necessary.
+ − 1332 $(BLDSRC)\NEEDTODUMP:
+ − 1333 @echo >$(BLDSRC)\NEEDTODUMP
+ − 1334
+ − 1335 ## (4) Build the DOC file
1330
+ − 1336
+ − 1337 DOC=$(BLDLIB_SRC)\DOC
+ − 1338
+ − 1339 docfile ::
+ − 1340 if exist $(DOC) $(DEL) $(DOC)
+ − 1341 docfile :: $(DOC)
+ − 1342
+ − 1343 # We need to write the QUICK_BUILD stuff as-is (and not just have no
+ − 1344 # dependencies for DOC) because DOC needs TEMACS_OBJS as dependencies to
+ − 1345 # get $(**) right. The `touch' is needed because of the way nmake
+ − 1346 # calculates dependencies; see comments in src/Makefile.in.in.
+ − 1347 $(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_OBJS)
+ − 1348 !if $(QUICK_BUILD)
+ − 1349 if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
+ − 1350 $(**)
+ − 1351 <<
+ − 1352 -touch $(DOC)
+ − 1353 !else
+ − 1354 $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
+ − 1355 $(**)
+ − 1356 <<
+ − 1357 !endif
+ − 1358
1346
+ − 1359 ## (5) Dump
1330
+ − 1360
+ − 1361 !if $(USE_PORTABLE_DUMPER)
+ − 1362 $(DUMP_TARGET): $(NT)\xemacs.rc
+ − 1363 !endif
+ − 1364
+ − 1365 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
+ − 1366 # requirements have changed.
+ − 1367
+ − 1368 $(DUMP_TARGET): $(DOC) $(RAW_EXE) $(BLDSRC)\NEEDTODUMP
+ − 1369 $(TEMACS_BATCH) -l $(LISP)\loadup.el dump
+ − 1370 !if $(USE_PORTABLE_DUMPER)
+ − 1371 cd $(BLDSRC)
+ − 1372 rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
+ − 1373 # Make the resource section read/write since almost all of it is the dump
+ − 1374 # data which needs to be writable. This avoids having to copy it.
+ − 1375 link.exe @<<
+ − 1376 $(TEMACS_LFLAGS) -section:.rsrc,rw -out:$(BLDSRC)\xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
+ − 1377 <<
+ − 1378 -$(DEL) $(BLDSRC)\xemacs.dmp
+ − 1379 !endif
+ − 1380
1346
+ − 1381 ## (6) Update the remaining .elc's, post-dumping
+ − 1382
+ − 1383 update-elc-2: $(DUMP_TARGET)
1330
+ − 1384 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
+ − 1385
1346
+ − 1386 ## (7) Other random stuff
+ − 1387
+ − 1388 $(LISP)/finder-inf.el: update-elc-2
1330
+ − 1389 !if !$(QUICK_BUILD)
+ − 1390 @echo Building finder database ...
+ − 1391 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
+ − 1392 -l finder -f finder-compile-keywords
+ − 1393 @echo Building finder database ...(done)
+ − 1394 !endif
+ − 1395
1346
+ − 1396 load-shadows: update-elc-2
1330
+ − 1397 !if !$(QUICK_BUILD)
+ − 1398 @echo Testing for Lisp shadows ...
+ − 1399 @$(XEMACS_BATCH) -f list-load-path-shadows
+ − 1400 !endif
+ − 1401
+ − 1402 #########################################################################
+ − 1403 ## Other random crap ##
+ − 1404 #########################################################################
+ − 1405
+ − 1406 ########################### Automated tests
428
+ − 1407
1330
+ − 1408 testdir = ../tests/automated
+ − 1409 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
+ − 1410
+ − 1411 check:
+ − 1412 cd $(BLDSRC)
+ − 1413 $(DO_XEMACS) $(batch_test_emacs)
+ − 1414
+ − 1415 check-temacs:
+ − 1416 cd $(BLDSRC)
1657
+ − 1417 $(TEMACS_BATCH_PACKAGES) $(run_temacs_args) $(batch_test_emacs)
1330
+ − 1418
+ − 1419 check-features: all
+ − 1420 cd $(BLDSRC)
+ − 1421 $(XEMACS_BATCH) -l check-features.el
+ − 1422
+ − 1423
+ − 1424 ########################### Rebuilding TAGS
+ − 1425
+ − 1426 tags:
+ − 1427 @echo If you do not have a copy of etags around, then do 'make lib-src' first.
+ − 1428 @echo To make use of the tags file, put the following in your .emacs:
+ − 1429 @echo (setq tag-table-alist
+ − 1430 @echo '(("$(SRCROOT:\=\\)\\" . "$(SRCROOT:\=\\)\\")))
+ − 1431 cd $(SRCROOT)
+ − 1432 -$(DEL) TAGS
+ − 1433 set PATH=lib-src;%PATH%
+ − 1434 # we need to double ^, but only in one place, because (according to the
+ − 1435 # nmake manual), a ^ is used to quote certain special characters such as
+ − 1436 # backslash, but is treated literally within double quotes -- and notice
+ − 1437 # carefully the occurrences of double quotes in the first line below!
+ − 1438 etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
+ − 1439 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
+ − 1440
+ − 1441 ########################### Install the system
+ − 1442
+ − 1443 # use this rule to install the system
+ − 1444 install: all
+ − 1445 cd $(NT)
+ − 1446 set COPYCMD=/y
+ − 1447 @echo Installing in $(INSTALL_DIR) ...
+ − 1448 @echo PlaceHolder > PlaceHolder
1393
+ − 1449 @$(COPY) $(SRCROOT)\PROBLEMS "$(INSTALL_DIR)\"
1330
+ − 1450 @$(COPY) PlaceHolder "$(INSTALL_DIR)\lock\"
+ − 1451 -$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder"
+ − 1452 @$(COPY) $(BLDLIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
+ − 1453 @$(COPY) $(BLDLIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
+ − 1454 @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
+ − 1455 @$(COPY) $(BLDSRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
1657
+ − 1456 # APA: This is not good enough! It copies all .#* CVS files
+ − 1457 # and the CVS directory too!
1330
+ − 1458 @$(COPYDIR) $(SRCROOT)\etc "$(INSTALL_DIR)\etc\"
+ − 1459 @$(COPYDIR) $(SRCROOT)\info "$(INSTALL_DIR)\info\"
+ − 1460 @$(COPYDIR) $(SRCROOT)\lisp "$(INSTALL_DIR)\lisp\"
+ − 1461 @echo Making skeleton package tree in $(PACKAGE_PREFIX) ...
+ − 1462 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\site-packages\"
+ − 1463 -$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder"
+ − 1464 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\"
+ − 1465 -$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder"
+ − 1466 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\"
+ − 1467 -$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder"
+ − 1468 -$(DEL) PlaceHolder
+ − 1469
+ − 1470 ########################### clean
+ − 1471
+ − 1472 mostlyclean:
+ − 1473 -$(DEL) $(BLDROOT)\Installation
+ − 1474 -$(DEL) $(OUTDIR)\*.lib
+ − 1475 -$(DEL) $(OUTDIR)\*.obj
+ − 1476 -$(DEL) $(OUTDIR)\*.pdb
+ − 1477 -$(DEL) $(OUTDIR)\*.res
+ − 1478 -$(DEL) $(OUTDIR)\*.sbr
+ − 1479 -$(DEL) $(BLDSRC)\*.exe
+ − 1480 -$(DEL) $(BLDSRC)\*.dmp
+ − 1481 -$(DEL) $(BLDSRC)\*.map
+ − 1482 -$(DEL) $(BLDSRC)\*.pdb
+ − 1483 -$(DEL) $(BLDSRC)\NEEDTODUMP
+ − 1484 -$(DEL) $(BLDSRC)\dump-id.c
+ − 1485 -$(DEL) $(SRC)\*.bsc
+ − 1486 -$(DEL) $(BLDLIB_SRC)\*.exe
+ − 1487 -$(DEL) $(BLDLIB_SRC)\*.obj
+ − 1488 -$(DEL) $(BLDLIB_SRC)\*.pdb
+ − 1489 -$(DEL) $(BLDLIB_SRC)\*.res
+ − 1490
+ − 1491 versionclean:
+ − 1492 -$(DEL) $(BLDSRC)\xemacs.exe
+ − 1493 -$(DEL) $(BLDLIB_SRC)\DOC
+ − 1494
+ − 1495 clean: mostlyclean versionclean
+ − 1496 -$(DEL) $(SRCROOT)\TAGS
+ − 1497 -$(DEL) $(LISP)\auto-autoloads.el*
+ − 1498 -$(DEL) $(LISP)\mule\auto-autoloads.el*
+ − 1499 -$(DEL) $(LISP)\custom-load.el*
+ − 1500 -$(DEL) $(LISP)\mule\custom-load.el*
+ − 1501
+ − 1502 nicenclean: clean
+ − 1503 -$(DEL) $(NT)\*.bak
+ − 1504 -$(DEL) $(NT)\*.orig
+ − 1505 -$(DEL) $(NT)\*.rej
+ − 1506 -$(DEL) $(NT)\*.tmp
+ − 1507 -$(DEL) $(LIB_SRC)\*.bak
+ − 1508 -$(DEL) $(LIB_SRC)\*.orig
+ − 1509 -$(DEL) $(LIB_SRC)\*.rej
+ − 1510 -$(DEL) $(LIB_SRC)\*.tmp
+ − 1511 -$(DEL) $(SRC)\*.bak
+ − 1512 -$(DEL) $(SRC)\*.orig
+ − 1513 -$(DEL) $(SRC)\*.rej
+ − 1514 -$(DEL) $(SRC)\*.tmp
+ − 1515 -$(DEL) $(LISP)\*.bak
+ − 1516 -$(DEL) $(LISP)\*.orig
+ − 1517 -$(DEL) $(LISP)\*.rej
+ − 1518 -$(DEL) $(LISP)\*.tmp
+ − 1519
+ − 1520 # Convenience target.
+ − 1521 # Reproducing the configuration is just a matter of copying, and if
+ − 1522 # we use the same directory for Cygwin builds these must go. We don't
+ − 1523 # want to use distclean.
+ − 1524 configclean:
+ − 1525 -$(DEL) $(SRC)\config.h
+ − 1526 -$(DEL) $(SRC)\paths.h
+ − 1527 -$(DEL) $(SRC)\Emacs.ad.h
+ − 1528
+ − 1529 ## This is used in making a distribution.
+ − 1530 ## Do not use it on development directories!
+ − 1531 distclean: nicenclean configclean
+ − 1532 -$(DEL) $(BLDLIB_SRC)\$(CONFIG_VALUES)
+ − 1533 -$(DEL) $(INFODIR)\*.info*
+ − 1534 -$(DEL) $(LISP)\*.elc
+ − 1535 -$(DEL) $(LISP)\mule\*.elc
+ − 1536 -$(DEL) $(LISP)\term\*.elc
+ − 1537
+ − 1538 realclean: distclean
+ − 1539
+ − 1540 #not sure about those wildcards. DOS wildcards are stupid compared to Unix,
+ − 1541 #and could end up deleting *everything* instead of just backup files or
+ − 1542 #whatever. So just leave it at "realclean"
+ − 1543 extraclean: realclean
+ − 1544 # -$(DEL) *~
+ − 1545 # -$(DEL) *.*~
+ − 1546 # -$(DEL) #*
+ − 1547 # -$(DEL) m\*~
+ − 1548 # -$(DEL) m\#*
+ − 1549 # -$(DEL) s\*~
+ − 1550 # -$(DEL) s\#*
+ − 1551
+ − 1552 ########################### Rebuild source dependency file
+ − 1553
+ − 1554 depend:
+ − 1555 cd $(SRC)
+ − 1556 perl ./make-src-depend > depend.tmp
+ − 1557 perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
+ − 1558
+ − 1559 ########################### Redo Unicode-Encapsulation
+ − 1560
+ − 1561 unicode-encapsulate:
+ − 1562 cd $(SRC)
+ − 1563 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
+ − 1564
1657
+ − 1565 makeinfo-test: $(DUMP_TARGET)
+ − 1566 @<<makeinfo_test.bat
+ − 1567 @echo off
+ − 1568 @"$(MAKEINFO)" --version
+ − 1569 @if not errorlevel 1 goto test_done
+ − 1570 @$(XEMACS_BATCH_PACKAGES) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
+ − 1571 @if not errorlevel 1 goto suggest_makeinfo
+ − 1572 @echo XEmacs 'info' cannot be built!
+ − 1573 @echo Install XEmacs package 'texinfo' (see README.packages).
+ − 1574 :suggest_makeinfo
+ − 1575 @echo Consider specifying path to 'makeinfo' in config.inc.
+ − 1576 @echo as this will build the info docs much faster than XEmacs using 'texinfo'.
+ − 1577 @if errorlevel 1 exit 1
+ − 1578 :test_done
+ − 1579 <<NOKEEP