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
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 \
147 # Build the executable and dump it.
152 # Headers we would preprocess if we could.
154 PREPARED_HEADERS = config.h paths.h
155 config.h: ..\nt\$(CONFIG_H)
157 paths.h: ..\nt\paths.h
161 # Make sure we have the DOC file in the right place.
164 $(DOC):; cd ..\lib-src
166 $(MAKE) -f makefile.nt all
170 # The dumped executable
173 $(EMACS): $(PREPARED_HEADERS) $(DOC) $(TEMACS)
175 temacs.exe -batch -l loadup dump
179 # The undumped executable
181 temacs: $(BLD) $(TEMACS)
182 $(TEMACS): $(TLIB1) $(TLIB2) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES)
183 $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
186 # The resource file. NT 3.10 requires the use of cvtres; even though
187 # it is not necessary on later versions, it is still ok to use it.
189 $(TRES): ..\nt\emacs.rc
190 $(RC) -i..\nt -Fo$(BLD)\emacs.res $**
192 $(CVTRES) -r -$(ARCH) -o $@ $(BLD)\emacs.res
196 # Build the library. Split up the build into two phases...otherwise we
197 # run out of command line space.
204 $(TLIBW32): $(WIN32OBJ)
209 # Place lastfile.obj in its own library so that it can be loaded after
210 # the source libraries but before any system libraries. Doing so defines
211 # the end of Emacs' data section portably across compilers and systems.
213 $(TLASTLIB): $(BLD)\lastfile.obj
220 $(CC) $(CFLAGS) -Fo$@ $<
223 # Assuming INSTALL_DIR is defined, build and install emacs in it.
226 - mkdir $(INSTALL_DIR)\bin
227 $(CP) $(EMACS) $(INSTALL_DIR)\bin
232 clean:; - del /q *~ *.pdb config.h paths.h
233 - $(DEL_TREE) deleted
237 # These files are the ones that compile conditionally on CANNOT_DUMP...
238 # this target is mostly used for debugging.
240 cleandump:; cd $(BLD)
241 - 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
250 $(BLD)\abbrev.obj : \
252 $(EMACS_ROOT)\src\s\windowsnt.h \
253 $(EMACS_ROOT)\src\m\intel386.h \
254 $(EMACS_ROOT)\src\config.h \
262 $(EMACS_ROOT)\src\s\windowsnt.h \
263 $(EMACS_ROOT)\src\m\intel386.h \
264 $(EMACS_ROOT)\src\config.h \
266 $(SRC)\dispextern.h \
272 $(SRC)\blockinput.h \
275 $(BLD)\alloca.obj : \
277 $(EMACS_ROOT)\src\s\windowsnt.h \
278 $(EMACS_ROOT)\src\m\intel386.h \
279 $(EMACS_ROOT)\src\config.h \
280 $(SRC)\s\windowsnt.h \
281 $(SRC)\m\intel386.h \
285 $(BLD)\buffer.obj : \
287 $(EMACS_ROOT)\nt\inc\sys\param.h \
288 $(EMACS_ROOT)\src\s\windowsnt.h \
289 $(EMACS_ROOT)\src\m\intel386.h \
290 $(EMACS_ROOT)\src\config.h \
292 $(SRC)\dispextern.h \
298 $(SRC)\blockinput.h \
299 $(SRC)\region-cache.h
301 $(BLD)\bytecode.obj : \
307 $(BLD)\callint.obj : \
316 $(BLD)\callproc.obj : \
318 $(EMACS_ROOT)\src\s\windowsnt.h \
319 $(EMACS_ROOT)\src\m\intel386.h \
320 $(EMACS_ROOT)\src\config.h \
322 $(EMACS_ROOT)\nt\inc\sys\param.h \
328 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
329 $(EMACS_ROOT)\nt\inc\sys\file.h \
332 $(BLD)\casefiddle.obj : \
333 $(SRC)\casefiddle.c \
334 $(EMACS_ROOT)\src\s\windowsnt.h \
335 $(EMACS_ROOT)\src\m\intel386.h \
336 $(EMACS_ROOT)\src\config.h \
341 $(CC) $(CFLAGS) -Fo$@ casefiddle.c
343 $(BLD)\casetab.obj : \
345 $(EMACS_ROOT)\src\s\windowsnt.h \
346 $(EMACS_ROOT)\src\m\intel386.h \
347 $(EMACS_ROOT)\src\config.h \
353 $(EMACS_ROOT)\src\s\windowsnt.h \
354 $(EMACS_ROOT)\src\m\intel386.h \
355 $(EMACS_ROOT)\src\config.h \
361 $(EMACS_ROOT)\src\s\windowsnt.h \
362 $(EMACS_ROOT)\src\m\intel386.h \
363 $(EMACS_ROOT)\src\config.h \
371 $(EMACS_ROOT)\src\s\windowsnt.h \
372 $(EMACS_ROOT)\src\m\intel386.h \
373 $(EMACS_ROOT)\src\config.h \
381 $(EMACS_ROOT)\src\s\windowsnt.h \
382 $(EMACS_ROOT)\src\m\intel386.h \
383 $(EMACS_ROOT)\src\config.h \
391 $(BLD)\dispnew.obj : \
393 $(EMACS_ROOT)\src\s\windowsnt.h \
394 $(EMACS_ROOT)\src\m\intel386.h \
395 $(EMACS_ROOT)\src\config.h \
407 $(SRC)\dispextern.h \
409 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
410 $(EMACS_ROOT)\nt\inc\sys\file.h \
418 $(EMACS_ROOT)\src\s\windowsnt.h \
419 $(EMACS_ROOT)\src\m\intel386.h \
420 $(EMACS_ROOT)\src\config.h \
421 $(EMACS_ROOT)\nt\inc\sys\file.h \
426 $(BLD)\doprnt.obj : \
428 $(EMACS_ROOT)\src\s\windowsnt.h \
429 $(EMACS_ROOT)\src\m\intel386.h \
430 $(EMACS_ROOT)\src\config.h
432 $(BLD)\dosfns.obj : \
434 $(EMACS_ROOT)\src\s\windowsnt.h \
435 $(EMACS_ROOT)\src\m\intel386.h \
436 $(EMACS_ROOT)\src\config.h \
445 $(BLD)\editfns.obj : \
447 $(EMACS_ROOT)\src\s\windowsnt.h \
448 $(EMACS_ROOT)\src\m\intel386.h \
449 $(EMACS_ROOT)\src\config.h \
452 $(EMACS_ROOT)\nt\inc\pwd.h \
454 $(SRC)\dispextern.h \
463 $(EMACS_ROOT)\src\s\windowsnt.h \
464 $(EMACS_ROOT)\src\m\intel386.h \
465 $(EMACS_ROOT)\src\config.h \
468 $(SRC)\dispextern.h \
470 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
471 $(EMACS_ROOT)\nt\inc\sys\file.h \
478 $(EMACS_ROOT)\src\s\windowsnt.h \
479 $(EMACS_ROOT)\src\m\intel386.h \
480 $(EMACS_ROOT)\src\config.h \
482 $(SRC)\blockinput.h \
486 $(BLD)\fileio.obj : \
488 $(EMACS_ROOT)\src\s\windowsnt.h \
489 $(EMACS_ROOT)\src\m\intel386.h \
490 $(EMACS_ROOT)\src\config.h \
493 $(EMACS_ROOT)\nt\inc\pwd.h \
495 $(EMACS_ROOT)\nt\inc\sys\param.h \
498 $(SRC)\dispextern.h \
502 $(EMACS_ROOT)\nt\inc\sys\file.h \
506 $(BLD)\filelock.obj : \
508 $(EMACS_ROOT)\src\s\windowsnt.h \
509 $(EMACS_ROOT)\src\m\intel386.h \
510 $(EMACS_ROOT)\src\config.h \
513 $(EMACS_ROOT)\nt\inc\pwd.h \
514 $(EMACS_ROOT)\nt\inc\sys\file.h \
516 $(EMACS_ROOT)\src\paths.h \
521 $(BLD)\filemode.obj : \
523 $(EMACS_ROOT)\src\s\windowsnt.h \
524 $(EMACS_ROOT)\src\m\intel386.h \
525 $(EMACS_ROOT)\src\config.h \
526 $(SRC)\s\windowsnt.h \
527 $(SRC)\m\intel386.h \
530 $(BLD)\floatfns.obj : \
532 $(EMACS_ROOT)\src\s\windowsnt.h \
533 $(EMACS_ROOT)\src\m\intel386.h \
534 $(EMACS_ROOT)\src\config.h \
540 $(EMACS_ROOT)\src\s\windowsnt.h \
541 $(EMACS_ROOT)\src\m\intel386.h \
542 $(EMACS_ROOT)\src\config.h \
547 $(SRC)\dispextern.h \
552 $(EMACS_ROOT)\src\s\windowsnt.h \
553 $(EMACS_ROOT)\src\m\intel386.h \
554 $(EMACS_ROOT)\src\config.h \
563 $(BLD)\getloadavg.obj : \
564 $(SRC)\getloadavg.c \
565 $(EMACS_ROOT)\nt\inc\sys\param.h \
566 $(EMACS_ROOT)\src\s\windowsnt.h \
567 $(EMACS_ROOT)\src\m\intel386.h \
568 $(EMACS_ROOT)\src\config.h \
569 $(SRC)\s\windowsnt.h \
570 $(SRC)\m\intel386.h \
572 $(EMACS_ROOT)\nt\inc\sys\file.h
574 $(BLD)\gmalloc.obj : \
576 $(EMACS_ROOT)\src\s\windowsnt.h \
577 $(EMACS_ROOT)\src\m\intel386.h \
578 $(EMACS_ROOT)\src\config.h \
579 $(EMACS_ROOT)\nt\inc\sys\param.h \
581 $(CC) $(CFLAGS) -D__STDC__ -Fo$@ gmalloc.c
583 $(BLD)\hftctl.obj : \
585 $(EMACS_ROOT)\src\s\windowsnt.h \
586 $(EMACS_ROOT)\src\m\intel386.h \
587 $(EMACS_ROOT)\src\config.h \
588 $(EMACS_ROOT)\nt\inc\sys\ioctl.h
590 $(BLD)\indent.obj : \
592 $(EMACS_ROOT)\src\s\windowsnt.h \
593 $(EMACS_ROOT)\src\m\intel386.h \
594 $(EMACS_ROOT)\src\config.h \
603 $(SRC)\dispextern.h \
605 $(SRC)\region-cache.h
607 $(BLD)\insdel.obj : \
609 $(EMACS_ROOT)\src\s\windowsnt.h \
610 $(EMACS_ROOT)\src\m\intel386.h \
611 $(EMACS_ROOT)\src\config.h \
613 $(SRC)\dispextern.h \
619 $(BLD)\intervals.obj : \
621 $(EMACS_ROOT)\src\s\windowsnt.h \
622 $(EMACS_ROOT)\src\m\intel386.h \
623 $(EMACS_ROOT)\src\config.h \
625 $(SRC)\dispextern.h \
629 $(CC) $(CFLAGS) -Fo$@ intervals.c
631 $(BLD)\keyboard.obj : \
633 $(EMACS_ROOT)\src\s\windowsnt.h \
634 $(EMACS_ROOT)\src\m\intel386.h \
635 $(EMACS_ROOT)\src\config.h \
647 $(SRC)\dispextern.h \
649 $(SRC)\blockinput.h \
652 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
653 $(EMACS_ROOT)\nt\inc\sys\file.h \
659 $(BLD)\keymap.obj : \
661 $(EMACS_ROOT)\src\s\windowsnt.h \
662 $(EMACS_ROOT)\src\m\intel386.h \
663 $(EMACS_ROOT)\src\config.h \
671 $(BLD)\lastfile.obj : \
676 $(EMACS_ROOT)\src\s\windowsnt.h \
677 $(EMACS_ROOT)\src\m\intel386.h \
678 $(EMACS_ROOT)\src\config.h \
679 $(EMACS_ROOT)\nt\inc\sys\file.h \
682 $(EMACS_ROOT)\src\paths.h \
688 $(BLD)\macros.obj : \
690 $(EMACS_ROOT)\src\s\windowsnt.h \
691 $(EMACS_ROOT)\src\m\intel386.h \
692 $(EMACS_ROOT)\src\config.h \
699 $(BLD)\marker.obj : \
701 $(EMACS_ROOT)\src\s\windowsnt.h \
702 $(EMACS_ROOT)\src\m\intel386.h \
703 $(EMACS_ROOT)\src\config.h \
707 $(BLD)\minibuf.obj : \
709 $(EMACS_ROOT)\src\s\windowsnt.h \
710 $(EMACS_ROOT)\src\m\intel386.h \
711 $(EMACS_ROOT)\src\config.h \
715 $(SRC)\dispextern.h \
720 $(BLD)\mocklisp.obj : \
722 $(EMACS_ROOT)\src\s\windowsnt.h \
723 $(EMACS_ROOT)\src\m\intel386.h \
724 $(EMACS_ROOT)\src\config.h \
730 $(SRC)\s\windowsnt.h \
731 $(SRC)\m\intel386.h \
734 $(EMACS_ROOT)\nt\inc\pwd.h \
737 $(BLD)\ntheap.obj : \
741 $(BLD)\ntinevt.obj : \
743 $(SRC)\s\windowsnt.h \
744 $(SRC)\m\intel386.h \
748 $(SRC)\blockinput.h \
751 $(BLD)\ntproc.obj : \
753 $(SRC)\s\windowsnt.h \
754 $(SRC)\m\intel386.h \
761 $(BLD)\ntterm.obj : \
763 $(SRC)\s\windowsnt.h \
764 $(SRC)\m\intel386.h \
772 $(BLD)\prefix-args.obj : \
777 $(EMACS_ROOT)\src\s\windowsnt.h \
778 $(EMACS_ROOT)\src\m\intel386.h \
779 $(EMACS_ROOT)\src\config.h \
786 $(SRC)\dispextern.h \
789 $(BLD)\process.obj : \
791 $(EMACS_ROOT)\src\s\windowsnt.h \
792 $(EMACS_ROOT)\src\m\intel386.h \
793 $(EMACS_ROOT)\src\config.h \
794 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
795 $(EMACS_ROOT)\nt\inc\sys\file.h \
811 $(BLD)\ralloc.obj : \
813 $(EMACS_ROOT)\src\s\windowsnt.h \
814 $(EMACS_ROOT)\src\m\intel386.h \
815 $(EMACS_ROOT)\src\config.h \
817 $(SRC)\s\windowsnt.h \
818 $(SRC)\m\intel386.h \
820 $(EMACS_ROOT)\nt\inc\sys\param.h \
825 $(EMACS_ROOT)\src\s\windowsnt.h \
826 $(EMACS_ROOT)\src\m\intel386.h \
827 $(EMACS_ROOT)\src\config.h \
828 $(SRC)\s\windowsnt.h \
829 $(SRC)\m\intel386.h \
836 $(BLD)\region-cache.obj : \
837 $(SRC)\region-cache.c \
838 $(EMACS_ROOT)\src\s\windowsnt.h \
839 $(EMACS_ROOT)\src\m\intel386.h \
840 $(EMACS_ROOT)\src\config.h \
843 $(SRC)\region-cache.h
845 $(BLD)\scroll.obj : \
847 $(EMACS_ROOT)\src\s\windowsnt.h \
848 $(EMACS_ROOT)\src\m\intel386.h \
849 $(EMACS_ROOT)\src\config.h \
852 $(SRC)\dispextern.h \
855 $(BLD)\search.obj : \
857 $(EMACS_ROOT)\src\s\windowsnt.h \
858 $(EMACS_ROOT)\src\m\intel386.h \
859 $(EMACS_ROOT)\src\config.h \
864 $(SRC)\blockinput.h \
866 $(SRC)\region-cache.h
868 $(BLD)\strftime.obj : \
870 $(EMACS_ROOT)\src\s\windowsnt.h \
871 $(EMACS_ROOT)\src\m\intel386.h \
872 $(EMACS_ROOT)\src\config.h
873 $(CC) $(CFLAGS) -Dstrftime=emacs_strftime -Fo$@ strftime.c
875 $(BLD)\sunfns.obj : \
877 $(EMACS_ROOT)\src\s\windowsnt.h \
878 $(EMACS_ROOT)\src\m\intel386.h \
879 $(EMACS_ROOT)\src\config.h \
885 $(BLD)\syntax.obj : \
887 $(EMACS_ROOT)\src\s\windowsnt.h \
888 $(EMACS_ROOT)\src\m\intel386.h \
889 $(EMACS_ROOT)\src\config.h \
895 $(BLD)\sysdep.obj : \
897 $(EMACS_ROOT)\src\s\windowsnt.h \
898 $(EMACS_ROOT)\src\m\intel386.h \
899 $(EMACS_ROOT)\src\config.h \
901 $(SRC)\blockinput.h \
904 $(EMACS_ROOT)\nt\inc\sys\param.h \
905 $(EMACS_ROOT)\nt\inc\sys\file.h \
906 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
907 $(EMACS_ROOT)\nt\inc\sys\file.h \
916 $(SRC)\dispextern.h \
925 $(EMACS_ROOT)\src\acldef.h \
926 $(EMACS_ROOT)\src\chpdef.h
930 $(EMACS_ROOT)\src\s\windowsnt.h \
931 $(EMACS_ROOT)\src\m\intel386.h \
932 $(EMACS_ROOT)\src\config.h \
942 $(BLD)\termcap.obj : \
944 $(EMACS_ROOT)\src\s\windowsnt.h \
945 $(EMACS_ROOT)\src\m\intel386.h \
946 $(EMACS_ROOT)\src\config.h \
947 $(EMACS_ROOT)\nt\inc\sys\file.h
949 $(BLD)\terminfo.obj : \
952 $(BLD)\textprop.obj : \
954 $(EMACS_ROOT)\src\s\windowsnt.h \
955 $(EMACS_ROOT)\src\m\intel386.h \
956 $(EMACS_ROOT)\src\config.h \
958 $(SRC)\dispextern.h \
963 $(BLD)\tparam.obj : \
965 $(EMACS_ROOT)\src\s\windowsnt.h \
966 $(EMACS_ROOT)\src\m\intel386.h \
967 $(EMACS_ROOT)\src\config.h
971 $(EMACS_ROOT)\src\s\windowsnt.h \
972 $(EMACS_ROOT)\src\m\intel386.h \
973 $(EMACS_ROOT)\src\config.h \
978 $(BLD)\unexnt.obj : \
982 $(BLD)\vm-limit.obj : \
984 $(EMACS_ROOT)\src\s\windowsnt.h \
985 $(EMACS_ROOT)\src\m\intel386.h \
986 $(EMACS_ROOT)\src\config.h \
989 $(BLD)\widget.obj : \
991 $(EMACS_ROOT)\src\s\windowsnt.h \
992 $(EMACS_ROOT)\src\m\intel386.h \
993 $(EMACS_ROOT)\src\config.h \
997 $(SRC)\dispextern.h \
1001 $(BLD)\window.obj : \
1003 $(EMACS_ROOT)\src\s\windowsnt.h \
1004 $(EMACS_ROOT)\src\m\intel386.h \
1005 $(EMACS_ROOT)\src\config.h \
1016 $(BLD)\xdisp.obj : \
1018 $(EMACS_ROOT)\src\s\windowsnt.h \
1019 $(EMACS_ROOT)\src\m\intel386.h \
1020 $(EMACS_ROOT)\src\config.h \
1030 $(SRC)\termhooks.h \
1031 $(SRC)\dispextern.h \
1034 $(BLD)\w32faces.obj: \
1035 $(EMACS_ROOT)\src\s\windowsnt.h \
1036 $(EMACS_ROOT)\src\m\intel386.h \
1037 $(EMACS_ROOT)\src\config.h \
1039 $(SRC)\dispextern.h \
1044 $(SRC)\blockinput.h \
1047 $(BLD)\w32fns.obj: \
1048 $(EMACS_ROOT)\src\s\windowsnt.h \
1049 $(EMACS_ROOT)\src\m\intel386.h \
1050 $(EMACS_ROOT)\src\config.h \
1052 $(SRC)\dispextern.h \
1057 $(SRC)\blockinput.h \
1060 $(BLD)\w32menu.obj: \
1061 $(EMACS_ROOT)\src\s\windowsnt.h \
1062 $(EMACS_ROOT)\src\m\intel386.h \
1063 $(EMACS_ROOT)\src\config.h \
1065 $(SRC)\dispextern.h \
1070 $(SRC)\blockinput.h \
1073 $(BLD)\w32term.obj: \
1074 $(EMACS_ROOT)\src\s\windowsnt.h \
1075 $(EMACS_ROOT)\src\m\intel386.h \
1076 $(EMACS_ROOT)\src\config.h \
1078 $(SRC)\dispextern.h \
1083 $(SRC)\blockinput.h \
1086 $(BLD)\w32select.obj: \
1087 $(EMACS_ROOT)\src\s\windowsnt.h \
1088 $(EMACS_ROOT)\src\m\intel386.h \
1089 $(EMACS_ROOT)\src\config.h \
1090 $(SRC)\w32select.c \
1091 $(SRC)\dispextern.h \
1097 $(BLD)\w32reg.obj: \
1098 $(EMACS_ROOT)\src\s\windowsnt.h \
1099 $(EMACS_ROOT)\src\m\intel386.h \
1100 $(EMACS_ROOT)\src\config.h \
1102 $(SRC)\dispextern.h \