1 # Makefile for GNU Emacs on Windows NT
2 # Copyright (c) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3 # Tim Fleehart (apollo@online.com) 17-Apr-92
4 # Geoff Voelker (voelker@cs.washington.edu) 11-20-93
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
35 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
36 # the emacs source tree.
38 LOCAL_FLAGS = -Demacs=1 -DWINDOWSNT -DDOS_NT -DHAVE_CONFIG_H -I..\nt\inc
40 EMACS = $(BLD)\emacs.exe
41 TEMACS = $(BLD)\temacs.exe
42 TLIB1 = $(BLD)\temacs1.lib
43 TLIB2 = $(BLD)\temacs2.lib
45 TLIBW32 = $(BLD)\temacw32.lib
49 TOBJ = $(BLD)\emacs.obj
51 TRES = $(BLD)\emacs.res
53 TRES = $(BLD)\emacs.rbj
55 TLASTLIB = $(BLD)\lastfile.lib
57 LINK_FLAGS = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:$(SUBSYSTEM) -entry:_start -map:$(BLD)\temacs.map -map
60 # Split up the objects into two sets so that we don't run out of
61 # command line space when we link them into a library.
63 OBJ1 = $(BLD)\abbrev.obj \
70 $(BLD)\casefiddle.obj \
94 OBJ2 = $(BLD)\nt.obj \
114 $(BLD)\floatfns.obj \
117 $(BLD)\intervals.obj \
119 $(BLD)\textprop.obj \
120 $(BLD)\vm-limit.obj \
121 $(BLD)\region-cache.obj \
124 WIN32OBJ = $(BLD)\w32term.obj \
127 $(BLD)\w32faces.obj \
128 $(BLD)\w32select.obj \
148 # Build the executable and dump it.
153 # Headers we would preprocess if we could.
155 PREPARED_HEADERS = config.h paths.h
156 config.h: ..\nt\$(CONFIG_H)
158 paths.h: ..\nt\paths.h
162 # Make sure we have the DOC file in the right place.
165 $(DOC):; cd ..\lib-src
167 $(MAKE) -f makefile.nt all
171 # The dumped executable
174 $(EMACS): $(PREPARED_HEADERS) $(DOC) $(TEMACS)
176 temacs.exe -batch -l loadup dump
180 # The undumped executable
182 temacs: $(BLD) $(TEMACS)
183 $(TEMACS): $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
184 $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
187 # The resource file. NT 3.10 requires the use of cvtres; even though
188 # it is not necessary on later versions, it is still ok to use it.
190 $(TRES): ..\nt\emacs.rc
191 $(RC) -i..\nt -Fo$(BLD)\emacs.res $**
193 $(CVTRES) -r -$(ARCH) -o $@ $(BLD)\emacs.res
197 # Build the library. Split up the build into two phases...otherwise we
198 # run out of command line space.
205 $(TLIBW32): $(WIN32OBJ)
210 # Place lastfile.obj in its own library so that it can be loaded after
211 # the source libraries but before any system libraries. Doing so defines
212 # the end of Emacs' data section portably across compilers and systems.
214 $(TLASTLIB): $(BLD)\lastfile.obj
221 $(CC) $(CFLAGS) -Fo$@ $<
224 # Assuming INSTALL_DIR is defined, build and install emacs in it.
227 - mkdir $(INSTALL_DIR)\bin
228 $(CP) $(EMACS) $(INSTALL_DIR)\bin
233 clean:; - del *~ *.pdb config.h paths.h
234 - $(DEL_TREE) deleted
238 # These files are the ones that compile conditionally on CANNOT_DUMP...
239 # this target is mostly used for debugging.
241 cleandump:; cd $(BLD)
242 - 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
251 $(BLD)\abbrev.obj : \
253 $(EMACS_ROOT)\src\s\windowsnt.h \
254 $(EMACS_ROOT)\src\m\intel386.h \
255 $(EMACS_ROOT)\src\config.h \
263 $(EMACS_ROOT)\src\s\windowsnt.h \
264 $(EMACS_ROOT)\src\m\intel386.h \
265 $(EMACS_ROOT)\src\config.h \
267 $(SRC)\dispextern.h \
273 $(SRC)\blockinput.h \
276 $(BLD)\alloca.obj : \
278 $(EMACS_ROOT)\src\s\windowsnt.h \
279 $(EMACS_ROOT)\src\m\intel386.h \
280 $(EMACS_ROOT)\src\config.h \
281 $(SRC)\s\windowsnt.h \
282 $(SRC)\m\intel386.h \
286 $(BLD)\buffer.obj : \
288 $(EMACS_ROOT)\nt\inc\sys\param.h \
289 $(EMACS_ROOT)\src\s\windowsnt.h \
290 $(EMACS_ROOT)\src\m\intel386.h \
291 $(EMACS_ROOT)\src\config.h \
293 $(SRC)\dispextern.h \
299 $(SRC)\blockinput.h \
300 $(SRC)\region-cache.h
302 $(BLD)\bytecode.obj : \
308 $(BLD)\callint.obj : \
317 $(BLD)\callproc.obj : \
319 $(EMACS_ROOT)\src\s\windowsnt.h \
320 $(EMACS_ROOT)\src\m\intel386.h \
321 $(EMACS_ROOT)\src\config.h \
323 $(EMACS_ROOT)\nt\inc\sys\param.h \
329 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
330 $(EMACS_ROOT)\nt\inc\sys\file.h \
333 $(BLD)\casefiddle.obj : \
334 $(SRC)\casefiddle.c \
335 $(EMACS_ROOT)\src\s\windowsnt.h \
336 $(EMACS_ROOT)\src\m\intel386.h \
337 $(EMACS_ROOT)\src\config.h \
342 $(CC) $(CFLAGS) -Fo$@ casefiddle.c
344 $(BLD)\casetab.obj : \
346 $(EMACS_ROOT)\src\s\windowsnt.h \
347 $(EMACS_ROOT)\src\m\intel386.h \
348 $(EMACS_ROOT)\src\config.h \
354 $(EMACS_ROOT)\src\s\windowsnt.h \
355 $(EMACS_ROOT)\src\m\intel386.h \
356 $(EMACS_ROOT)\src\config.h \
362 $(EMACS_ROOT)\src\s\windowsnt.h \
363 $(EMACS_ROOT)\src\m\intel386.h \
364 $(EMACS_ROOT)\src\config.h \
372 $(EMACS_ROOT)\src\s\windowsnt.h \
373 $(EMACS_ROOT)\src\m\intel386.h \
374 $(EMACS_ROOT)\src\config.h \
382 $(EMACS_ROOT)\src\s\windowsnt.h \
383 $(EMACS_ROOT)\src\m\intel386.h \
384 $(EMACS_ROOT)\src\config.h \
392 $(BLD)\dispnew.obj : \
394 $(EMACS_ROOT)\src\s\windowsnt.h \
395 $(EMACS_ROOT)\src\m\intel386.h \
396 $(EMACS_ROOT)\src\config.h \
408 $(SRC)\dispextern.h \
410 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
411 $(EMACS_ROOT)\nt\inc\sys\file.h \
420 $(EMACS_ROOT)\src\s\windowsnt.h \
421 $(EMACS_ROOT)\src\m\intel386.h \
422 $(EMACS_ROOT)\src\config.h \
423 $(EMACS_ROOT)\nt\inc\sys\file.h \
428 $(BLD)\doprnt.obj : \
430 $(EMACS_ROOT)\src\s\windowsnt.h \
431 $(EMACS_ROOT)\src\m\intel386.h \
432 $(EMACS_ROOT)\src\config.h
434 $(BLD)\dosfns.obj : \
436 $(EMACS_ROOT)\src\s\windowsnt.h \
437 $(EMACS_ROOT)\src\m\intel386.h \
438 $(EMACS_ROOT)\src\config.h \
447 $(BLD)\editfns.obj : \
449 $(EMACS_ROOT)\src\s\windowsnt.h \
450 $(EMACS_ROOT)\src\m\intel386.h \
451 $(EMACS_ROOT)\src\config.h \
454 $(EMACS_ROOT)\nt\inc\pwd.h \
456 $(SRC)\dispextern.h \
465 $(EMACS_ROOT)\src\s\windowsnt.h \
466 $(EMACS_ROOT)\src\m\intel386.h \
467 $(EMACS_ROOT)\src\config.h \
470 $(SRC)\dispextern.h \
472 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
473 $(EMACS_ROOT)\nt\inc\sys\file.h \
480 $(EMACS_ROOT)\src\s\windowsnt.h \
481 $(EMACS_ROOT)\src\m\intel386.h \
482 $(EMACS_ROOT)\src\config.h \
484 $(SRC)\blockinput.h \
488 $(BLD)\fileio.obj : \
490 $(EMACS_ROOT)\src\s\windowsnt.h \
491 $(EMACS_ROOT)\src\m\intel386.h \
492 $(EMACS_ROOT)\src\config.h \
495 $(EMACS_ROOT)\nt\inc\pwd.h \
497 $(EMACS_ROOT)\nt\inc\sys\param.h \
500 $(SRC)\dispextern.h \
504 $(EMACS_ROOT)\nt\inc\sys\file.h \
508 $(BLD)\filelock.obj : \
510 $(EMACS_ROOT)\src\s\windowsnt.h \
511 $(EMACS_ROOT)\src\m\intel386.h \
512 $(EMACS_ROOT)\src\config.h \
515 $(EMACS_ROOT)\nt\inc\pwd.h \
516 $(EMACS_ROOT)\nt\inc\sys\file.h \
518 $(EMACS_ROOT)\src\paths.h \
523 $(BLD)\filemode.obj : \
525 $(EMACS_ROOT)\src\s\windowsnt.h \
526 $(EMACS_ROOT)\src\m\intel386.h \
527 $(EMACS_ROOT)\src\config.h \
528 $(SRC)\s\windowsnt.h \
529 $(SRC)\m\intel386.h \
532 $(BLD)\floatfns.obj : \
534 $(EMACS_ROOT)\src\s\windowsnt.h \
535 $(EMACS_ROOT)\src\m\intel386.h \
536 $(EMACS_ROOT)\src\config.h \
542 $(EMACS_ROOT)\src\s\windowsnt.h \
543 $(EMACS_ROOT)\src\m\intel386.h \
544 $(EMACS_ROOT)\src\config.h \
549 $(SRC)\dispextern.h \
554 $(EMACS_ROOT)\src\s\windowsnt.h \
555 $(EMACS_ROOT)\src\m\intel386.h \
556 $(EMACS_ROOT)\src\config.h \
565 $(BLD)\getloadavg.obj : \
566 $(SRC)\getloadavg.c \
567 $(EMACS_ROOT)\nt\inc\sys\param.h \
568 $(EMACS_ROOT)\src\s\windowsnt.h \
569 $(EMACS_ROOT)\src\m\intel386.h \
570 $(EMACS_ROOT)\src\config.h \
571 $(SRC)\s\windowsnt.h \
572 $(SRC)\m\intel386.h \
574 $(EMACS_ROOT)\nt\inc\sys\file.h
576 $(BLD)\gmalloc.obj : \
578 $(EMACS_ROOT)\src\s\windowsnt.h \
579 $(EMACS_ROOT)\src\m\intel386.h \
580 $(EMACS_ROOT)\src\config.h \
581 $(EMACS_ROOT)\nt\inc\sys\param.h \
583 $(CC) $(CFLAGS) -D__STDC__ -Fo$@ gmalloc.c
585 $(BLD)\hftctl.obj : \
587 $(EMACS_ROOT)\src\s\windowsnt.h \
588 $(EMACS_ROOT)\src\m\intel386.h \
589 $(EMACS_ROOT)\src\config.h \
590 $(EMACS_ROOT)\nt\inc\sys\ioctl.h
592 $(BLD)\indent.obj : \
594 $(EMACS_ROOT)\src\s\windowsnt.h \
595 $(EMACS_ROOT)\src\m\intel386.h \
596 $(EMACS_ROOT)\src\config.h \
605 $(SRC)\dispextern.h \
607 $(SRC)\region-cache.h
609 $(BLD)\insdel.obj : \
611 $(EMACS_ROOT)\src\s\windowsnt.h \
612 $(EMACS_ROOT)\src\m\intel386.h \
613 $(EMACS_ROOT)\src\config.h \
615 $(SRC)\dispextern.h \
621 $(BLD)\intervals.obj : \
623 $(EMACS_ROOT)\src\s\windowsnt.h \
624 $(EMACS_ROOT)\src\m\intel386.h \
625 $(EMACS_ROOT)\src\config.h \
627 $(SRC)\dispextern.h \
631 $(CC) $(CFLAGS) -Fo$@ intervals.c
633 $(BLD)\keyboard.obj : \
635 $(EMACS_ROOT)\src\s\windowsnt.h \
636 $(EMACS_ROOT)\src\m\intel386.h \
637 $(EMACS_ROOT)\src\config.h \
649 $(SRC)\dispextern.h \
651 $(SRC)\blockinput.h \
654 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
655 $(EMACS_ROOT)\nt\inc\sys\file.h \
662 $(BLD)\keymap.obj : \
664 $(EMACS_ROOT)\src\s\windowsnt.h \
665 $(EMACS_ROOT)\src\m\intel386.h \
666 $(EMACS_ROOT)\src\config.h \
674 $(BLD)\lastfile.obj : \
679 $(EMACS_ROOT)\src\s\windowsnt.h \
680 $(EMACS_ROOT)\src\m\intel386.h \
681 $(EMACS_ROOT)\src\config.h \
682 $(EMACS_ROOT)\nt\inc\sys\file.h \
685 $(EMACS_ROOT)\src\paths.h \
691 $(BLD)\macros.obj : \
693 $(EMACS_ROOT)\src\s\windowsnt.h \
694 $(EMACS_ROOT)\src\m\intel386.h \
695 $(EMACS_ROOT)\src\config.h \
702 $(BLD)\marker.obj : \
704 $(EMACS_ROOT)\src\s\windowsnt.h \
705 $(EMACS_ROOT)\src\m\intel386.h \
706 $(EMACS_ROOT)\src\config.h \
710 $(BLD)\minibuf.obj : \
712 $(EMACS_ROOT)\src\s\windowsnt.h \
713 $(EMACS_ROOT)\src\m\intel386.h \
714 $(EMACS_ROOT)\src\config.h \
718 $(SRC)\dispextern.h \
723 $(BLD)\mocklisp.obj : \
725 $(EMACS_ROOT)\src\s\windowsnt.h \
726 $(EMACS_ROOT)\src\m\intel386.h \
727 $(EMACS_ROOT)\src\config.h \
733 $(SRC)\s\windowsnt.h \
734 $(SRC)\m\intel386.h \
737 $(EMACS_ROOT)\nt\inc\pwd.h \
740 $(BLD)\ntheap.obj : \
744 $(BLD)\ntinevt.obj : \
746 $(SRC)\s\windowsnt.h \
747 $(SRC)\m\intel386.h \
751 $(SRC)\blockinput.h \
754 $(BLD)\ntproc.obj : \
756 $(SRC)\s\windowsnt.h \
757 $(SRC)\m\intel386.h \
764 $(BLD)\ntterm.obj : \
766 $(SRC)\s\windowsnt.h \
767 $(SRC)\m\intel386.h \
775 $(BLD)\prefix-args.obj : \
780 $(EMACS_ROOT)\src\s\windowsnt.h \
781 $(EMACS_ROOT)\src\m\intel386.h \
782 $(EMACS_ROOT)\src\config.h \
789 $(SRC)\dispextern.h \
792 $(BLD)\process.obj : \
794 $(EMACS_ROOT)\src\s\windowsnt.h \
795 $(EMACS_ROOT)\src\m\intel386.h \
796 $(EMACS_ROOT)\src\config.h \
797 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
798 $(EMACS_ROOT)\nt\inc\sys\file.h \
814 $(BLD)\ralloc.obj : \
816 $(EMACS_ROOT)\src\s\windowsnt.h \
817 $(EMACS_ROOT)\src\m\intel386.h \
818 $(EMACS_ROOT)\src\config.h \
820 $(SRC)\s\windowsnt.h \
821 $(SRC)\m\intel386.h \
823 $(EMACS_ROOT)\nt\inc\sys\param.h \
828 $(EMACS_ROOT)\src\s\windowsnt.h \
829 $(EMACS_ROOT)\src\m\intel386.h \
830 $(EMACS_ROOT)\src\config.h \
831 $(SRC)\s\windowsnt.h \
832 $(SRC)\m\intel386.h \
839 $(BLD)\region-cache.obj : \
840 $(SRC)\region-cache.c \
841 $(EMACS_ROOT)\src\s\windowsnt.h \
842 $(EMACS_ROOT)\src\m\intel386.h \
843 $(EMACS_ROOT)\src\config.h \
846 $(SRC)\region-cache.h
848 $(BLD)\scroll.obj : \
850 $(EMACS_ROOT)\src\s\windowsnt.h \
851 $(EMACS_ROOT)\src\m\intel386.h \
852 $(EMACS_ROOT)\src\config.h \
855 $(SRC)\dispextern.h \
858 $(BLD)\search.obj : \
860 $(EMACS_ROOT)\src\s\windowsnt.h \
861 $(EMACS_ROOT)\src\m\intel386.h \
862 $(EMACS_ROOT)\src\config.h \
867 $(SRC)\blockinput.h \
869 $(SRC)\region-cache.h
871 $(BLD)\strftime.obj : \
873 $(EMACS_ROOT)\src\s\windowsnt.h \
874 $(EMACS_ROOT)\src\m\intel386.h \
875 $(EMACS_ROOT)\src\config.h
876 $(CC) $(CFLAGS) -Dstrftime=emacs_strftime -Fo$@ strftime.c
878 $(BLD)\sunfns.obj : \
880 $(EMACS_ROOT)\src\s\windowsnt.h \
881 $(EMACS_ROOT)\src\m\intel386.h \
882 $(EMACS_ROOT)\src\config.h \
888 $(BLD)\syntax.obj : \
890 $(EMACS_ROOT)\src\s\windowsnt.h \
891 $(EMACS_ROOT)\src\m\intel386.h \
892 $(EMACS_ROOT)\src\config.h \
898 $(BLD)\sysdep.obj : \
900 $(EMACS_ROOT)\src\s\windowsnt.h \
901 $(EMACS_ROOT)\src\m\intel386.h \
902 $(EMACS_ROOT)\src\config.h \
904 $(SRC)\blockinput.h \
907 $(EMACS_ROOT)\nt\inc\sys\param.h \
908 $(EMACS_ROOT)\nt\inc\sys\file.h \
909 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
910 $(EMACS_ROOT)\nt\inc\sys\file.h \
919 $(SRC)\dispextern.h \
928 $(EMACS_ROOT)\src\acldef.h \
929 $(EMACS_ROOT)\src\chpdef.h
933 $(EMACS_ROOT)\src\s\windowsnt.h \
934 $(EMACS_ROOT)\src\m\intel386.h \
935 $(EMACS_ROOT)\src\config.h \
945 $(BLD)\termcap.obj : \
947 $(EMACS_ROOT)\src\s\windowsnt.h \
948 $(EMACS_ROOT)\src\m\intel386.h \
949 $(EMACS_ROOT)\src\config.h \
950 $(EMACS_ROOT)\nt\inc\sys\file.h
952 $(BLD)\terminfo.obj : \
955 $(BLD)\textprop.obj : \
957 $(EMACS_ROOT)\src\s\windowsnt.h \
958 $(EMACS_ROOT)\src\m\intel386.h \
959 $(EMACS_ROOT)\src\config.h \
961 $(SRC)\dispextern.h \
966 $(BLD)\tparam.obj : \
968 $(EMACS_ROOT)\src\s\windowsnt.h \
969 $(EMACS_ROOT)\src\m\intel386.h \
970 $(EMACS_ROOT)\src\config.h
974 $(EMACS_ROOT)\src\s\windowsnt.h \
975 $(EMACS_ROOT)\src\m\intel386.h \
976 $(EMACS_ROOT)\src\config.h \
981 $(BLD)\unexnt.obj : \
985 $(BLD)\vm-limit.obj : \
987 $(EMACS_ROOT)\src\s\windowsnt.h \
988 $(EMACS_ROOT)\src\m\intel386.h \
989 $(EMACS_ROOT)\src\config.h \
992 $(BLD)\widget.obj : \
994 $(EMACS_ROOT)\src\s\windowsnt.h \
995 $(EMACS_ROOT)\src\m\intel386.h \
996 $(EMACS_ROOT)\src\config.h \
1000 $(SRC)\dispextern.h \
1004 $(BLD)\window.obj : \
1006 $(EMACS_ROOT)\src\s\windowsnt.h \
1007 $(EMACS_ROOT)\src\m\intel386.h \
1008 $(EMACS_ROOT)\src\config.h \
1019 $(BLD)\xdisp.obj : \
1021 $(EMACS_ROOT)\src\s\windowsnt.h \
1022 $(EMACS_ROOT)\src\m\intel386.h \
1023 $(EMACS_ROOT)\src\config.h \
1033 $(SRC)\termhooks.h \
1034 $(SRC)\dispextern.h \
1037 $(BLD)\w32faces.obj: \
1038 $(EMACS_ROOT)\src\s\windowsnt.h \
1039 $(EMACS_ROOT)\src\m\intel386.h \
1040 $(EMACS_ROOT)\src\config.h \
1042 $(SRC)\dispextern.h \
1047 $(SRC)\blockinput.h \
1050 $(BLD)\w32fns.obj: \
1051 $(EMACS_ROOT)\src\s\windowsnt.h \
1052 $(EMACS_ROOT)\src\m\intel386.h \
1053 $(EMACS_ROOT)\src\config.h \
1055 $(SRC)\dispextern.h \
1060 $(SRC)\blockinput.h \
1063 $(BLD)\w32menu.obj: \
1064 $(EMACS_ROOT)\src\s\windowsnt.h \
1065 $(EMACS_ROOT)\src\m\intel386.h \
1066 $(EMACS_ROOT)\src\config.h \
1068 $(SRC)\dispextern.h \
1073 $(SRC)\blockinput.h \
1076 $(BLD)\w32term.obj: \
1077 $(EMACS_ROOT)\src\s\windowsnt.h \
1078 $(EMACS_ROOT)\src\m\intel386.h \
1079 $(EMACS_ROOT)\src\config.h \
1081 $(SRC)\dispextern.h \
1086 $(SRC)\blockinput.h \
1089 $(BLD)\w32select.obj: \
1090 $(EMACS_ROOT)\src\s\windowsnt.h \
1091 $(EMACS_ROOT)\src\m\intel386.h \
1092 $(EMACS_ROOT)\src\config.h \
1093 $(SRC)\w32select.c \
1094 $(SRC)\dispextern.h \
1100 $(BLD)\w32reg.obj: \
1101 $(EMACS_ROOT)\src\s\windowsnt.h \
1102 $(EMACS_ROOT)\src\m\intel386.h \
1103 $(EMACS_ROOT)\src\config.h \
1105 $(SRC)\dispextern.h \