1 # Makefile for GNU Emacs on Windows NT
2 # Copyright (c) 1992, 1993, 1994 Free Software Foundation, Inc.
3 # Tim Fleehart (apollo@online.com)
4 # Geoff Voelker (voelker@cs.washington.edu)
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs; see the file COPYING. If not, write to
20 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24 # Sets up the system dependent macros.
26 !include ..\nt\makefile.def
29 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
30 # the emacs source tree.
32 LOCAL_FLAGS = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I..\nt\inc -Zi
34 EMACS = $(BLD)\emacs.exe
35 TEMACS = $(BLD)\temacs.exe
36 TLIB = $(BLD)\temacs.lib
37 TOBJ = $(BLD)\emacs.obj
39 LINK_FLAGS = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:console -entry:_start
41 # -debug:PARTIAL -debugtype:COFF
44 # Split up the objects into two sets so that we don't run out of
45 # command line space when we link them into a library.
47 OBJ1 = $(BLD)\abbrev.obj \
54 $(BLD)\casefiddle.obj \
80 OBJ2 = $(BLD)\nt.obj \
100 $(BLD)\floatfns.obj \
103 $(BLD)\intervals.obj \
105 $(BLD)\textprop.obj \
109 $(SYS_LIB_DIR)\setargv.obj \
110 $(SYS_LIB_DIR)\kernel32.lib \
111 $(SYS_LIB_DIR)\advapi32.lib \
112 $(SYS_LIB_DIR)\libc.lib
115 # Build the executable and dump it.
120 # Headers we would preprocess if we could.
122 PREPARED_HEADERS = config.h paths.h
123 config.h: ..\nt\src\config.h
124 cp ..\nt\src\config.h config.h
125 paths.h: ..\nt\src\paths.h
126 cp ..\nt\src\paths.h paths.h
129 # The dumped executable
132 $(EMACS): $(PREPARED_HEADERS) $(TEMACS)
134 temacs.exe -batch -l loadup dump
138 # The undumped executable
140 temacs: $(BLD) $(TEMACS)
141 $(TEMACS): $(LIBS) $(TOBJ)
142 $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(LIBS)
145 # Build the library. Split up the build into two phases...otherwise we
146 # run out of command line space.
148 $(TLIB): $(OBJ1) $(OBJ2)
149 @- $(AR) -out:$(TLIB) $(OBJ1)
150 @- $(AR) -out:$(TLIB) $(TLIB) $(OBJ2)
156 $(CC) $(CFLAGS) -Fo$@ $<
159 # Assuming INSTALL_DIR is defined, build and install emacs in it.
162 - mkdir $(INSTALL_DIR)\bin
163 $(CP) $(EMACS) $(INSTALL_DIR)\bin
173 # These files are the ones that compile conditionally on CANNOT_DUMP...
174 # this target is mostly used for debugging.
176 cleandump:; cd $(BLD) && - del callproc.obj data.obj dispnew.obj doc.obj editfns.obj emacs.obj lread.obj process.obj sysdep.obj term.obj ntheap.obj unexnt.obj
184 $(BLD)\abbrev.obj : \
186 $(EMACS_ROOT)\src\s\windowsnt.h \
187 $(EMACS_ROOT)\src\m\intel386.h \
188 $(EMACS_ROOT)\src\config.h \
196 $(EMACS_ROOT)\src\s\windowsnt.h \
197 $(EMACS_ROOT)\src\m\intel386.h \
198 $(EMACS_ROOT)\src\config.h \
200 $(SRC)\dispextern.h \
206 $(SRC)\blockinput.h \
209 $(BLD)\alloca.obj : \
211 $(EMACS_ROOT)\src\s\windowsnt.h \
212 $(EMACS_ROOT)\src\m\intel386.h \
213 $(EMACS_ROOT)\src\config.h \
214 $(SRC)\s\windowsnt.h \
215 $(SRC)\m\intel386.h \
219 $(BLD)\buffer.obj : \
221 $(EMACS_ROOT)\nt\inc\sys\param.h \
222 $(EMACS_ROOT)\src\s\windowsnt.h \
223 $(EMACS_ROOT)\src\m\intel386.h \
224 $(EMACS_ROOT)\src\config.h \
226 $(SRC)\dispextern.h \
234 $(BLD)\bytecode.obj : \
240 $(BLD)\callint.obj : \
249 $(BLD)\callproc.obj : \
251 $(EMACS_ROOT)\src\s\windowsnt.h \
252 $(EMACS_ROOT)\src\m\intel386.h \
253 $(EMACS_ROOT)\src\config.h \
255 $(EMACS_ROOT)\nt\inc\sys\param.h \
261 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
262 $(EMACS_ROOT)\nt\inc\sys\file.h \
265 $(BLD)\casefiddle.obj : \
266 $(SRC)\casefiddle.c \
267 $(EMACS_ROOT)\src\s\windowsnt.h \
268 $(EMACS_ROOT)\src\m\intel386.h \
269 $(EMACS_ROOT)\src\config.h \
274 $(CC) $(CFLAGS) -Fo$@ casefiddle.c
276 $(BLD)\casetab.obj : \
278 $(EMACS_ROOT)\src\s\windowsnt.h \
279 $(EMACS_ROOT)\src\m\intel386.h \
280 $(EMACS_ROOT)\src\config.h \
286 $(EMACS_ROOT)\src\s\windowsnt.h \
287 $(EMACS_ROOT)\src\m\intel386.h \
288 $(EMACS_ROOT)\src\config.h \
294 $(EMACS_ROOT)\src\s\windowsnt.h \
295 $(EMACS_ROOT)\src\m\intel386.h \
296 $(EMACS_ROOT)\src\config.h \
304 $(EMACS_ROOT)\src\s\windowsnt.h \
305 $(EMACS_ROOT)\src\m\intel386.h \
306 $(EMACS_ROOT)\src\config.h \
314 $(EMACS_ROOT)\src\s\windowsnt.h \
315 $(EMACS_ROOT)\src\m\intel386.h \
316 $(EMACS_ROOT)\src\config.h \
324 $(BLD)\dispnew.obj : \
326 $(EMACS_ROOT)\src\s\windowsnt.h \
327 $(EMACS_ROOT)\src\m\intel386.h \
328 $(EMACS_ROOT)\src\config.h \
340 $(SRC)\dispextern.h \
342 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
343 $(EMACS_ROOT)\nt\inc\sys\file.h \
351 $(EMACS_ROOT)\src\s\windowsnt.h \
352 $(EMACS_ROOT)\src\m\intel386.h \
353 $(EMACS_ROOT)\src\config.h \
354 $(EMACS_ROOT)\nt\inc\sys\file.h \
359 $(BLD)\doprnt.obj : \
361 $(EMACS_ROOT)\src\s\windowsnt.h \
362 $(EMACS_ROOT)\src\m\intel386.h \
363 $(EMACS_ROOT)\src\config.h
365 $(BLD)\dosfns.obj : \
367 $(EMACS_ROOT)\src\s\windowsnt.h \
368 $(EMACS_ROOT)\src\m\intel386.h \
369 $(EMACS_ROOT)\src\config.h \
378 $(BLD)\editfns.obj : \
380 $(EMACS_ROOT)\src\s\windowsnt.h \
381 $(EMACS_ROOT)\src\m\intel386.h \
382 $(EMACS_ROOT)\src\config.h \
385 $(EMACS_ROOT)\nt\inc\pwd.h \
387 $(SRC)\dispextern.h \
396 $(EMACS_ROOT)\src\s\windowsnt.h \
397 $(EMACS_ROOT)\src\m\intel386.h \
398 $(EMACS_ROOT)\src\config.h \
401 $(SRC)\dispextern.h \
403 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
404 $(EMACS_ROOT)\nt\inc\sys\file.h \
411 $(EMACS_ROOT)\src\s\windowsnt.h \
412 $(EMACS_ROOT)\src\m\intel386.h \
413 $(EMACS_ROOT)\src\config.h \
415 $(SRC)\blockinput.h \
419 $(BLD)\fileio.obj : \
421 $(EMACS_ROOT)\src\s\windowsnt.h \
422 $(EMACS_ROOT)\src\m\intel386.h \
423 $(EMACS_ROOT)\src\config.h \
426 $(EMACS_ROOT)\nt\inc\pwd.h \
428 $(EMACS_ROOT)\nt\inc\sys\param.h \
431 $(SRC)\dispextern.h \
435 $(EMACS_ROOT)\nt\inc\sys\file.h \
439 $(BLD)\filelock.obj : \
441 $(EMACS_ROOT)\src\s\windowsnt.h \
442 $(EMACS_ROOT)\src\m\intel386.h \
443 $(EMACS_ROOT)\src\config.h \
446 $(EMACS_ROOT)\nt\inc\pwd.h \
447 $(EMACS_ROOT)\nt\inc\sys\file.h \
449 $(EMACS_ROOT)\src\paths.h \
454 $(BLD)\filemode.obj : \
456 $(EMACS_ROOT)\src\s\windowsnt.h \
457 $(EMACS_ROOT)\src\m\intel386.h \
458 $(EMACS_ROOT)\src\config.h \
459 $(SRC)\s\windowsnt.h \
460 $(SRC)\m\intel386.h \
463 $(BLD)\floatfns.obj : \
465 $(EMACS_ROOT)\src\s\windowsnt.h \
466 $(EMACS_ROOT)\src\m\intel386.h \
467 $(EMACS_ROOT)\src\config.h \
473 $(EMACS_ROOT)\src\s\windowsnt.h \
474 $(EMACS_ROOT)\src\m\intel386.h \
475 $(EMACS_ROOT)\src\config.h \
480 $(SRC)\dispextern.h \
485 $(EMACS_ROOT)\src\s\windowsnt.h \
486 $(EMACS_ROOT)\src\m\intel386.h \
487 $(EMACS_ROOT)\src\config.h \
496 $(BLD)\getloadavg.obj : \
497 $(SRC)\getloadavg.c \
498 $(EMACS_ROOT)\nt\inc\sys\param.h \
499 $(EMACS_ROOT)\src\s\windowsnt.h \
500 $(EMACS_ROOT)\src\m\intel386.h \
501 $(EMACS_ROOT)\src\config.h \
502 $(SRC)\s\windowsnt.h \
503 $(SRC)\m\intel386.h \
505 $(EMACS_ROOT)\nt\inc\sys\file.h
507 $(BLD)\gmalloc.obj : \
509 $(EMACS_ROOT)\src\s\windowsnt.h \
510 $(EMACS_ROOT)\src\m\intel386.h \
511 $(EMACS_ROOT)\src\config.h \
512 $(EMACS_ROOT)\nt\inc\sys\param.h \
514 $(CC) $(CFLAGS) -D__STDC__ -Fo$@ gmalloc.c
516 $(BLD)\hftctl.obj : \
518 $(EMACS_ROOT)\src\s\windowsnt.h \
519 $(EMACS_ROOT)\src\m\intel386.h \
520 $(EMACS_ROOT)\src\config.h \
521 $(EMACS_ROOT)\nt\inc\sys\ioctl.h
523 $(BLD)\indent.obj : \
525 $(EMACS_ROOT)\src\s\windowsnt.h \
526 $(EMACS_ROOT)\src\m\intel386.h \
527 $(EMACS_ROOT)\src\config.h \
536 $(SRC)\dispextern.h \
539 $(BLD)\insdel.obj : \
541 $(EMACS_ROOT)\src\s\windowsnt.h \
542 $(EMACS_ROOT)\src\m\intel386.h \
543 $(EMACS_ROOT)\src\config.h \
545 $(SRC)\dispextern.h \
551 $(BLD)\intervals.obj : \
553 $(EMACS_ROOT)\src\s\windowsnt.h \
554 $(EMACS_ROOT)\src\m\intel386.h \
555 $(EMACS_ROOT)\src\config.h \
557 $(SRC)\dispextern.h \
561 $(CC) $(CFLAGS) -Fo$@ intervals.c
563 $(BLD)\keyboard.obj : \
565 $(EMACS_ROOT)\src\s\windowsnt.h \
566 $(EMACS_ROOT)\src\m\intel386.h \
567 $(EMACS_ROOT)\src\config.h \
579 $(SRC)\dispextern.h \
581 $(SRC)\blockinput.h \
584 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
585 $(EMACS_ROOT)\nt\inc\sys\file.h \
591 $(BLD)\keymap.obj : \
593 $(EMACS_ROOT)\src\s\windowsnt.h \
594 $(EMACS_ROOT)\src\m\intel386.h \
595 $(EMACS_ROOT)\src\config.h \
603 $(BLD)\lastfile.obj : \
608 $(EMACS_ROOT)\src\s\windowsnt.h \
609 $(EMACS_ROOT)\src\m\intel386.h \
610 $(EMACS_ROOT)\src\config.h \
611 $(EMACS_ROOT)\nt\inc\sys\file.h \
614 $(EMACS_ROOT)\src\paths.h \
620 $(BLD)\macros.obj : \
622 $(EMACS_ROOT)\src\s\windowsnt.h \
623 $(EMACS_ROOT)\src\m\intel386.h \
624 $(EMACS_ROOT)\src\config.h \
631 $(BLD)\marker.obj : \
633 $(EMACS_ROOT)\src\s\windowsnt.h \
634 $(EMACS_ROOT)\src\m\intel386.h \
635 $(EMACS_ROOT)\src\config.h \
639 $(BLD)\minibuf.obj : \
641 $(EMACS_ROOT)\src\s\windowsnt.h \
642 $(EMACS_ROOT)\src\m\intel386.h \
643 $(EMACS_ROOT)\src\config.h \
647 $(SRC)\dispextern.h \
652 $(BLD)\mocklisp.obj : \
654 $(EMACS_ROOT)\src\s\windowsnt.h \
655 $(EMACS_ROOT)\src\m\intel386.h \
656 $(EMACS_ROOT)\src\config.h \
662 $(SRC)\s\windowsnt.h \
663 $(SRC)\m\intel386.h \
666 $(EMACS_ROOT)\nt\inc\pwd.h \
669 $(BLD)\ntheap.obj : \
673 $(BLD)\ntinevt.obj : \
675 $(SRC)\s\windowsnt.h \
676 $(SRC)\m\intel386.h \
680 $(SRC)\blockinput.h \
683 $(BLD)\ntproc.obj : \
685 $(SRC)\s\windowsnt.h \
686 $(SRC)\m\intel386.h \
693 $(BLD)\ntterm.obj : \
695 $(SRC)\s\windowsnt.h \
696 $(SRC)\m\intel386.h \
704 $(BLD)\prefix-args.obj : \
709 $(EMACS_ROOT)\src\s\windowsnt.h \
710 $(EMACS_ROOT)\src\m\intel386.h \
711 $(EMACS_ROOT)\src\config.h \
718 $(SRC)\dispextern.h \
721 $(BLD)\process.obj : \
723 $(EMACS_ROOT)\src\s\windowsnt.h \
724 $(EMACS_ROOT)\src\m\intel386.h \
725 $(EMACS_ROOT)\src\config.h \
726 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
727 $(EMACS_ROOT)\nt\inc\sys\file.h \
743 $(BLD)\ralloc.obj : \
745 $(EMACS_ROOT)\src\s\windowsnt.h \
746 $(EMACS_ROOT)\src\m\intel386.h \
747 $(EMACS_ROOT)\src\config.h \
749 $(SRC)\s\windowsnt.h \
750 $(SRC)\m\intel386.h \
752 $(EMACS_ROOT)\nt\inc\sys\param.h \
757 $(EMACS_ROOT)\src\s\windowsnt.h \
758 $(EMACS_ROOT)\src\m\intel386.h \
759 $(EMACS_ROOT)\src\config.h \
760 $(SRC)\s\windowsnt.h \
761 $(SRC)\m\intel386.h \
768 $(BLD)\scroll.obj : \
770 $(EMACS_ROOT)\src\s\windowsnt.h \
771 $(EMACS_ROOT)\src\m\intel386.h \
772 $(EMACS_ROOT)\src\config.h \
775 $(SRC)\dispextern.h \
778 $(BLD)\search.obj : \
780 $(EMACS_ROOT)\src\s\windowsnt.h \
781 $(EMACS_ROOT)\src\m\intel386.h \
782 $(EMACS_ROOT)\src\config.h \
787 $(SRC)\blockinput.h \
790 $(BLD)\sunfns.obj : \
792 $(EMACS_ROOT)\src\s\windowsnt.h \
793 $(EMACS_ROOT)\src\m\intel386.h \
794 $(EMACS_ROOT)\src\config.h \
800 $(BLD)\syntax.obj : \
802 $(EMACS_ROOT)\src\s\windowsnt.h \
803 $(EMACS_ROOT)\src\m\intel386.h \
804 $(EMACS_ROOT)\src\config.h \
810 $(BLD)\sysdep.obj : \
812 $(EMACS_ROOT)\src\s\windowsnt.h \
813 $(EMACS_ROOT)\src\m\intel386.h \
814 $(EMACS_ROOT)\src\config.h \
816 $(SRC)\blockinput.h \
819 $(EMACS_ROOT)\nt\inc\sys\param.h \
820 $(EMACS_ROOT)\nt\inc\sys\file.h \
821 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
822 $(EMACS_ROOT)\nt\inc\sys\file.h \
831 $(SRC)\dispextern.h \
840 $(EMACS_ROOT)\src\acldef.h \
841 $(EMACS_ROOT)\src\chpdef.h
845 $(EMACS_ROOT)\src\s\windowsnt.h \
846 $(EMACS_ROOT)\src\m\intel386.h \
847 $(EMACS_ROOT)\src\config.h \
857 $(BLD)\termcap.obj : \
859 $(EMACS_ROOT)\src\s\windowsnt.h \
860 $(EMACS_ROOT)\src\m\intel386.h \
861 $(EMACS_ROOT)\src\config.h \
862 $(EMACS_ROOT)\nt\inc\sys\file.h
864 $(BLD)\terminfo.obj : \
867 $(BLD)\textprop.obj : \
869 $(EMACS_ROOT)\src\s\windowsnt.h \
870 $(EMACS_ROOT)\src\m\intel386.h \
871 $(EMACS_ROOT)\src\config.h \
873 $(SRC)\dispextern.h \
878 $(BLD)\tparam.obj : \
880 $(EMACS_ROOT)\src\s\windowsnt.h \
881 $(EMACS_ROOT)\src\m\intel386.h \
882 $(EMACS_ROOT)\src\config.h
886 $(EMACS_ROOT)\src\s\windowsnt.h \
887 $(EMACS_ROOT)\src\m\intel386.h \
888 $(EMACS_ROOT)\src\config.h \
893 $(BLD)\unexnt.obj : \
897 $(BLD)\widget.obj : \
899 $(EMACS_ROOT)\src\s\windowsnt.h \
900 $(EMACS_ROOT)\src\m\intel386.h \
901 $(EMACS_ROOT)\src\config.h \
905 $(SRC)\dispextern.h \
909 $(BLD)\window.obj : \
911 $(EMACS_ROOT)\src\s\windowsnt.h \
912 $(EMACS_ROOT)\src\m\intel386.h \
913 $(EMACS_ROOT)\src\config.h \
926 $(EMACS_ROOT)\src\s\windowsnt.h \
927 $(EMACS_ROOT)\src\m\intel386.h \
928 $(EMACS_ROOT)\src\config.h \
939 $(SRC)\dispextern.h \