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
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
34 EMACS = $(BLD)\emacs.exe
35 TEMACS = $(BLD)\temacs.exe
36 TLIB1 = $(BLD)\temacs1.lib
37 TLIB2 = $(BLD)\temacs2.lib
38 TOBJ = $(BLD)\emacs.obj
40 TRES = $(BLD)\emacs.res
42 TRES = $(BLD)\emacs.rbj
44 TLASTLIB = $(BLD)\lastfile.lib
46 LINK_FLAGS = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:console -entry:_start
49 # Split up the objects into two sets so that we don't run out of
50 # command line space when we link them into a library.
52 OBJ1 = $(BLD)\abbrev.obj \
59 $(BLD)\casefiddle.obj \
83 OBJ2 = $(BLD)\nt.obj \
103 $(BLD)\floatfns.obj \
106 $(BLD)\intervals.obj \
108 $(BLD)\textprop.obj \
109 $(BLD)\vm-limit.obj \
110 $(BLD)\region-cache.obj \
121 # Build the executable and dump it.
126 # Headers we would preprocess if we could.
128 PREPARED_HEADERS = config.h paths.h
129 config.h: ..\nt\$(CONFIG_H)
131 paths.h: ..\nt\paths.h
135 # Make sure we have the DOC file in the right place.
138 $(DOC):; cd ..\lib-src
140 $(MAKE) -f makefile.nt all
144 # The dumped executable
147 $(EMACS): $(PREPARED_HEADERS) $(DOC) $(TEMACS)
149 temacs.exe -batch -l loadup dump
153 # The undumped executable
155 temacs: $(BLD) $(TEMACS)
156 $(TEMACS): $(TLIB1) $(TLIB2) $(TLASTLIB) $(TOBJ) $(TRES)
157 $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
160 # The resource file. NT 3.10 requires the use of cvtres; even though
161 # it is not necessary on later versions, it is still ok to use it.
163 $(TRES): ..\nt\emacs.rc
164 $(RC) -i..\nt -Fo$(BLD)\emacs.res $**
166 $(CVTRES) -r -$(ARCH) -o $@ $(BLD)\emacs.res
170 # Build the library. Split up the build into two phases...otherwise we
171 # run out of command line space.
178 # Place lastfile.obj in it's own library so that it can be loaded after
179 # the source libraries but before any system libraries. Doing so defines
180 # the end of Emacs' data section portably across compilers.
182 $(TLASTLIB): $(BLD)\lastfile.obj
189 $(CC) $(CFLAGS) -Fo$@ $<
192 # Assuming INSTALL_DIR is defined, build and install emacs in it.
195 - mkdir $(INSTALL_DIR)\bin
196 $(CP) $(EMACS) $(INSTALL_DIR)\bin
201 clean:; - del /q *~ *.pdb config.h
202 - $(DEL_TREE) deleted
206 # These files are the ones that compile conditionally on CANNOT_DUMP...
207 # this target is mostly used for debugging.
209 cleandump:; cd $(BLD)
210 - 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
219 $(BLD)\abbrev.obj : \
221 $(EMACS_ROOT)\src\s\windowsnt.h \
222 $(EMACS_ROOT)\src\m\intel386.h \
223 $(EMACS_ROOT)\src\config.h \
231 $(EMACS_ROOT)\src\s\windowsnt.h \
232 $(EMACS_ROOT)\src\m\intel386.h \
233 $(EMACS_ROOT)\src\config.h \
235 $(SRC)\dispextern.h \
241 $(SRC)\blockinput.h \
244 $(BLD)\alloca.obj : \
246 $(EMACS_ROOT)\src\s\windowsnt.h \
247 $(EMACS_ROOT)\src\m\intel386.h \
248 $(EMACS_ROOT)\src\config.h \
249 $(SRC)\s\windowsnt.h \
250 $(SRC)\m\intel386.h \
254 $(BLD)\buffer.obj : \
256 $(EMACS_ROOT)\nt\inc\sys\param.h \
257 $(EMACS_ROOT)\src\s\windowsnt.h \
258 $(EMACS_ROOT)\src\m\intel386.h \
259 $(EMACS_ROOT)\src\config.h \
261 $(SRC)\dispextern.h \
267 $(SRC)\blockinput.h \
268 $(SRC)\region-cache.h
270 $(BLD)\bytecode.obj : \
276 $(BLD)\callint.obj : \
285 $(BLD)\callproc.obj : \
287 $(EMACS_ROOT)\src\s\windowsnt.h \
288 $(EMACS_ROOT)\src\m\intel386.h \
289 $(EMACS_ROOT)\src\config.h \
291 $(EMACS_ROOT)\nt\inc\sys\param.h \
297 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
298 $(EMACS_ROOT)\nt\inc\sys\file.h \
301 $(BLD)\casefiddle.obj : \
302 $(SRC)\casefiddle.c \
303 $(EMACS_ROOT)\src\s\windowsnt.h \
304 $(EMACS_ROOT)\src\m\intel386.h \
305 $(EMACS_ROOT)\src\config.h \
310 $(CC) $(CFLAGS) -Fo$@ casefiddle.c
312 $(BLD)\casetab.obj : \
314 $(EMACS_ROOT)\src\s\windowsnt.h \
315 $(EMACS_ROOT)\src\m\intel386.h \
316 $(EMACS_ROOT)\src\config.h \
322 $(EMACS_ROOT)\src\s\windowsnt.h \
323 $(EMACS_ROOT)\src\m\intel386.h \
324 $(EMACS_ROOT)\src\config.h \
330 $(EMACS_ROOT)\src\s\windowsnt.h \
331 $(EMACS_ROOT)\src\m\intel386.h \
332 $(EMACS_ROOT)\src\config.h \
340 $(EMACS_ROOT)\src\s\windowsnt.h \
341 $(EMACS_ROOT)\src\m\intel386.h \
342 $(EMACS_ROOT)\src\config.h \
350 $(EMACS_ROOT)\src\s\windowsnt.h \
351 $(EMACS_ROOT)\src\m\intel386.h \
352 $(EMACS_ROOT)\src\config.h \
360 $(BLD)\dispnew.obj : \
362 $(EMACS_ROOT)\src\s\windowsnt.h \
363 $(EMACS_ROOT)\src\m\intel386.h \
364 $(EMACS_ROOT)\src\config.h \
376 $(SRC)\dispextern.h \
378 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
379 $(EMACS_ROOT)\nt\inc\sys\file.h \
387 $(EMACS_ROOT)\src\s\windowsnt.h \
388 $(EMACS_ROOT)\src\m\intel386.h \
389 $(EMACS_ROOT)\src\config.h \
390 $(EMACS_ROOT)\nt\inc\sys\file.h \
395 $(BLD)\doprnt.obj : \
397 $(EMACS_ROOT)\src\s\windowsnt.h \
398 $(EMACS_ROOT)\src\m\intel386.h \
399 $(EMACS_ROOT)\src\config.h
401 $(BLD)\dosfns.obj : \
403 $(EMACS_ROOT)\src\s\windowsnt.h \
404 $(EMACS_ROOT)\src\m\intel386.h \
405 $(EMACS_ROOT)\src\config.h \
414 $(BLD)\editfns.obj : \
416 $(EMACS_ROOT)\src\s\windowsnt.h \
417 $(EMACS_ROOT)\src\m\intel386.h \
418 $(EMACS_ROOT)\src\config.h \
421 $(EMACS_ROOT)\nt\inc\pwd.h \
423 $(SRC)\dispextern.h \
432 $(EMACS_ROOT)\src\s\windowsnt.h \
433 $(EMACS_ROOT)\src\m\intel386.h \
434 $(EMACS_ROOT)\src\config.h \
437 $(SRC)\dispextern.h \
439 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
440 $(EMACS_ROOT)\nt\inc\sys\file.h \
447 $(EMACS_ROOT)\src\s\windowsnt.h \
448 $(EMACS_ROOT)\src\m\intel386.h \
449 $(EMACS_ROOT)\src\config.h \
451 $(SRC)\blockinput.h \
455 $(BLD)\fileio.obj : \
457 $(EMACS_ROOT)\src\s\windowsnt.h \
458 $(EMACS_ROOT)\src\m\intel386.h \
459 $(EMACS_ROOT)\src\config.h \
462 $(EMACS_ROOT)\nt\inc\pwd.h \
464 $(EMACS_ROOT)\nt\inc\sys\param.h \
467 $(SRC)\dispextern.h \
471 $(EMACS_ROOT)\nt\inc\sys\file.h \
475 $(BLD)\filelock.obj : \
477 $(EMACS_ROOT)\src\s\windowsnt.h \
478 $(EMACS_ROOT)\src\m\intel386.h \
479 $(EMACS_ROOT)\src\config.h \
482 $(EMACS_ROOT)\nt\inc\pwd.h \
483 $(EMACS_ROOT)\nt\inc\sys\file.h \
485 $(EMACS_ROOT)\src\paths.h \
490 $(BLD)\filemode.obj : \
492 $(EMACS_ROOT)\src\s\windowsnt.h \
493 $(EMACS_ROOT)\src\m\intel386.h \
494 $(EMACS_ROOT)\src\config.h \
495 $(SRC)\s\windowsnt.h \
496 $(SRC)\m\intel386.h \
499 $(BLD)\floatfns.obj : \
501 $(EMACS_ROOT)\src\s\windowsnt.h \
502 $(EMACS_ROOT)\src\m\intel386.h \
503 $(EMACS_ROOT)\src\config.h \
509 $(EMACS_ROOT)\src\s\windowsnt.h \
510 $(EMACS_ROOT)\src\m\intel386.h \
511 $(EMACS_ROOT)\src\config.h \
516 $(SRC)\dispextern.h \
521 $(EMACS_ROOT)\src\s\windowsnt.h \
522 $(EMACS_ROOT)\src\m\intel386.h \
523 $(EMACS_ROOT)\src\config.h \
532 $(BLD)\getloadavg.obj : \
533 $(SRC)\getloadavg.c \
534 $(EMACS_ROOT)\nt\inc\sys\param.h \
535 $(EMACS_ROOT)\src\s\windowsnt.h \
536 $(EMACS_ROOT)\src\m\intel386.h \
537 $(EMACS_ROOT)\src\config.h \
538 $(SRC)\s\windowsnt.h \
539 $(SRC)\m\intel386.h \
541 $(EMACS_ROOT)\nt\inc\sys\file.h
543 $(BLD)\gmalloc.obj : \
545 $(EMACS_ROOT)\src\s\windowsnt.h \
546 $(EMACS_ROOT)\src\m\intel386.h \
547 $(EMACS_ROOT)\src\config.h \
548 $(EMACS_ROOT)\nt\inc\sys\param.h \
550 $(CC) $(CFLAGS) -D__STDC__ -Fo$@ gmalloc.c
552 $(BLD)\hftctl.obj : \
554 $(EMACS_ROOT)\src\s\windowsnt.h \
555 $(EMACS_ROOT)\src\m\intel386.h \
556 $(EMACS_ROOT)\src\config.h \
557 $(EMACS_ROOT)\nt\inc\sys\ioctl.h
559 $(BLD)\indent.obj : \
561 $(EMACS_ROOT)\src\s\windowsnt.h \
562 $(EMACS_ROOT)\src\m\intel386.h \
563 $(EMACS_ROOT)\src\config.h \
572 $(SRC)\dispextern.h \
574 $(SRC)\region-cache.h
576 $(BLD)\insdel.obj : \
578 $(EMACS_ROOT)\src\s\windowsnt.h \
579 $(EMACS_ROOT)\src\m\intel386.h \
580 $(EMACS_ROOT)\src\config.h \
582 $(SRC)\dispextern.h \
588 $(BLD)\intervals.obj : \
590 $(EMACS_ROOT)\src\s\windowsnt.h \
591 $(EMACS_ROOT)\src\m\intel386.h \
592 $(EMACS_ROOT)\src\config.h \
594 $(SRC)\dispextern.h \
598 $(CC) $(CFLAGS) -Fo$@ intervals.c
600 $(BLD)\keyboard.obj : \
602 $(EMACS_ROOT)\src\s\windowsnt.h \
603 $(EMACS_ROOT)\src\m\intel386.h \
604 $(EMACS_ROOT)\src\config.h \
616 $(SRC)\dispextern.h \
618 $(SRC)\blockinput.h \
621 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
622 $(EMACS_ROOT)\nt\inc\sys\file.h \
628 $(BLD)\keymap.obj : \
630 $(EMACS_ROOT)\src\s\windowsnt.h \
631 $(EMACS_ROOT)\src\m\intel386.h \
632 $(EMACS_ROOT)\src\config.h \
640 $(BLD)\lastfile.obj : \
645 $(EMACS_ROOT)\src\s\windowsnt.h \
646 $(EMACS_ROOT)\src\m\intel386.h \
647 $(EMACS_ROOT)\src\config.h \
648 $(EMACS_ROOT)\nt\inc\sys\file.h \
651 $(EMACS_ROOT)\src\paths.h \
657 $(BLD)\macros.obj : \
659 $(EMACS_ROOT)\src\s\windowsnt.h \
660 $(EMACS_ROOT)\src\m\intel386.h \
661 $(EMACS_ROOT)\src\config.h \
668 $(BLD)\marker.obj : \
670 $(EMACS_ROOT)\src\s\windowsnt.h \
671 $(EMACS_ROOT)\src\m\intel386.h \
672 $(EMACS_ROOT)\src\config.h \
676 $(BLD)\minibuf.obj : \
678 $(EMACS_ROOT)\src\s\windowsnt.h \
679 $(EMACS_ROOT)\src\m\intel386.h \
680 $(EMACS_ROOT)\src\config.h \
684 $(SRC)\dispextern.h \
689 $(BLD)\mocklisp.obj : \
691 $(EMACS_ROOT)\src\s\windowsnt.h \
692 $(EMACS_ROOT)\src\m\intel386.h \
693 $(EMACS_ROOT)\src\config.h \
699 $(SRC)\s\windowsnt.h \
700 $(SRC)\m\intel386.h \
703 $(EMACS_ROOT)\nt\inc\pwd.h \
706 $(BLD)\ntheap.obj : \
710 $(BLD)\ntinevt.obj : \
712 $(SRC)\s\windowsnt.h \
713 $(SRC)\m\intel386.h \
717 $(SRC)\blockinput.h \
720 $(BLD)\ntproc.obj : \
722 $(SRC)\s\windowsnt.h \
723 $(SRC)\m\intel386.h \
730 $(BLD)\ntterm.obj : \
732 $(SRC)\s\windowsnt.h \
733 $(SRC)\m\intel386.h \
741 $(BLD)\prefix-args.obj : \
746 $(EMACS_ROOT)\src\s\windowsnt.h \
747 $(EMACS_ROOT)\src\m\intel386.h \
748 $(EMACS_ROOT)\src\config.h \
755 $(SRC)\dispextern.h \
758 $(BLD)\process.obj : \
760 $(EMACS_ROOT)\src\s\windowsnt.h \
761 $(EMACS_ROOT)\src\m\intel386.h \
762 $(EMACS_ROOT)\src\config.h \
763 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
764 $(EMACS_ROOT)\nt\inc\sys\file.h \
780 $(BLD)\ralloc.obj : \
782 $(EMACS_ROOT)\src\s\windowsnt.h \
783 $(EMACS_ROOT)\src\m\intel386.h \
784 $(EMACS_ROOT)\src\config.h \
786 $(SRC)\s\windowsnt.h \
787 $(SRC)\m\intel386.h \
789 $(EMACS_ROOT)\nt\inc\sys\param.h \
794 $(EMACS_ROOT)\src\s\windowsnt.h \
795 $(EMACS_ROOT)\src\m\intel386.h \
796 $(EMACS_ROOT)\src\config.h \
797 $(SRC)\s\windowsnt.h \
798 $(SRC)\m\intel386.h \
805 $(BLD)\region-cache.obj : \
806 $(SRC)\region-cache.c \
807 $(EMACS_ROOT)\src\s\windowsnt.h \
808 $(EMACS_ROOT)\src\m\intel386.h \
809 $(EMACS_ROOT)\src\config.h \
812 $(SRC)\region-cache.h
814 $(BLD)\scroll.obj : \
816 $(EMACS_ROOT)\src\s\windowsnt.h \
817 $(EMACS_ROOT)\src\m\intel386.h \
818 $(EMACS_ROOT)\src\config.h \
821 $(SRC)\dispextern.h \
824 $(BLD)\search.obj : \
826 $(EMACS_ROOT)\src\s\windowsnt.h \
827 $(EMACS_ROOT)\src\m\intel386.h \
828 $(EMACS_ROOT)\src\config.h \
833 $(SRC)\blockinput.h \
835 $(SRC)\region-cache.h
837 $(BLD)\strftime.obj : \
839 $(EMACS_ROOT)\src\s\windowsnt.h \
840 $(EMACS_ROOT)\src\m\intel386.h \
841 $(EMACS_ROOT)\src\config.h
842 $(CC) $(CFLAGS) -Dstrftime=emacs_strftime -Fo$@ strftime.c
844 $(BLD)\sunfns.obj : \
846 $(EMACS_ROOT)\src\s\windowsnt.h \
847 $(EMACS_ROOT)\src\m\intel386.h \
848 $(EMACS_ROOT)\src\config.h \
854 $(BLD)\syntax.obj : \
856 $(EMACS_ROOT)\src\s\windowsnt.h \
857 $(EMACS_ROOT)\src\m\intel386.h \
858 $(EMACS_ROOT)\src\config.h \
864 $(BLD)\sysdep.obj : \
866 $(EMACS_ROOT)\src\s\windowsnt.h \
867 $(EMACS_ROOT)\src\m\intel386.h \
868 $(EMACS_ROOT)\src\config.h \
870 $(SRC)\blockinput.h \
873 $(EMACS_ROOT)\nt\inc\sys\param.h \
874 $(EMACS_ROOT)\nt\inc\sys\file.h \
875 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
876 $(EMACS_ROOT)\nt\inc\sys\file.h \
885 $(SRC)\dispextern.h \
894 $(EMACS_ROOT)\src\acldef.h \
895 $(EMACS_ROOT)\src\chpdef.h
899 $(EMACS_ROOT)\src\s\windowsnt.h \
900 $(EMACS_ROOT)\src\m\intel386.h \
901 $(EMACS_ROOT)\src\config.h \
911 $(BLD)\termcap.obj : \
913 $(EMACS_ROOT)\src\s\windowsnt.h \
914 $(EMACS_ROOT)\src\m\intel386.h \
915 $(EMACS_ROOT)\src\config.h \
916 $(EMACS_ROOT)\nt\inc\sys\file.h
918 $(BLD)\terminfo.obj : \
921 $(BLD)\textprop.obj : \
923 $(EMACS_ROOT)\src\s\windowsnt.h \
924 $(EMACS_ROOT)\src\m\intel386.h \
925 $(EMACS_ROOT)\src\config.h \
927 $(SRC)\dispextern.h \
932 $(BLD)\tparam.obj : \
934 $(EMACS_ROOT)\src\s\windowsnt.h \
935 $(EMACS_ROOT)\src\m\intel386.h \
936 $(EMACS_ROOT)\src\config.h
940 $(EMACS_ROOT)\src\s\windowsnt.h \
941 $(EMACS_ROOT)\src\m\intel386.h \
942 $(EMACS_ROOT)\src\config.h \
947 $(BLD)\unexnt.obj : \
951 $(BLD)\vm-limit.obj : \
953 $(EMACS_ROOT)\src\s\windowsnt.h \
954 $(EMACS_ROOT)\src\m\intel386.h \
955 $(EMACS_ROOT)\src\config.h \
958 $(BLD)\widget.obj : \
960 $(EMACS_ROOT)\src\s\windowsnt.h \
961 $(EMACS_ROOT)\src\m\intel386.h \
962 $(EMACS_ROOT)\src\config.h \
966 $(SRC)\dispextern.h \
970 $(BLD)\window.obj : \
972 $(EMACS_ROOT)\src\s\windowsnt.h \
973 $(EMACS_ROOT)\src\m\intel386.h \
974 $(EMACS_ROOT)\src\config.h \
987 $(EMACS_ROOT)\src\s\windowsnt.h \
988 $(EMACS_ROOT)\src\m\intel386.h \
989 $(EMACS_ROOT)\src\config.h \
1000 $(SRC)\dispextern.h \