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
39 TRES = $(BLD)\emacs.rbj
41 LINK_FLAGS = $(ARCH_LDFLAGS) -stack:0x1000000 -base:0xD00000 -debug:full -debugtype:cv -machine:$(ARCH) -subsystem:console -entry:_start
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 \
79 OBJ2 = $(BLD)\nt.obj \
102 $(BLD)\intervals.obj \
104 $(BLD)\textprop.obj \
105 $(BLD)\vm-limit.obj \
106 $(BLD)\region-cache.obj \
116 # Build the executable and dump it.
121 # Headers we would preprocess if we could.
123 PREPARED_HEADERS = config.h paths.h
124 config.h: ..\nt\$(CONFIG_H)
126 paths.h: ..\nt\paths.h
130 # Make sure we have the DOC file in the right place.
133 $(DOC):; cd ..\lib-src
135 $(MAKE) -f makefile.nt all
139 # The dumped executable
142 $(EMACS): $(PREPARED_HEADERS) $(DOC) $(TEMACS)
143 !if "$(OS_TYPE)" == "win95"
144 move $(BLD)\temacs.exe $(BLD)\emacs.exe
147 temacs.exe -batch -l loadup dump
152 # The undumped executable
155 $(TEMACS): $(BLD) $(TLIB1) $(TLIB2) $(TOBJ) $(TRES)
156 $(LINK) -out:$(TEMACS) $(LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
159 # The resource file. NT 3.10 requires the use of cvtres; even though
160 # it is not necessary on later versions, it is still ok to use it.
162 $(TRES): ..\nt\emacs.rc
163 $(RC) -i..\nt -Fo$(BLD)\emacs.res $**
164 $(CVTRES) -r -$(ARCH) -o $@ $(BLD)\emacs.res
167 # Build the library. Split up the build into two phases...otherwise we
168 # run out of command line space.
179 $(CC) $(CFLAGS) -Fo$@ $<
182 # Assuming INSTALL_DIR is defined, build and install emacs in it.
185 - mkdir $(INSTALL_DIR)\bin
186 $(CP) $(EMACS) $(INSTALL_DIR)\bin
191 clean:; - del /q *~ *.pdb config.h
192 - $(DEL_TREE) deleted
196 # These files are the ones that compile conditionally on CANNOT_DUMP...
197 # this target is mostly used for debugging.
199 cleandump:; cd $(BLD)
200 - 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
209 $(BLD)\abbrev.obj : \
211 $(EMACS_ROOT)\src\s\windowsnt.h \
212 $(EMACS_ROOT)\src\m\intel386.h \
213 $(EMACS_ROOT)\src\config.h \
221 $(EMACS_ROOT)\src\s\windowsnt.h \
222 $(EMACS_ROOT)\src\m\intel386.h \
223 $(EMACS_ROOT)\src\config.h \
225 $(SRC)\dispextern.h \
231 $(SRC)\blockinput.h \
234 $(BLD)\alloca.obj : \
236 $(EMACS_ROOT)\src\s\windowsnt.h \
237 $(EMACS_ROOT)\src\m\intel386.h \
238 $(EMACS_ROOT)\src\config.h \
239 $(SRC)\s\windowsnt.h \
240 $(SRC)\m\intel386.h \
244 $(BLD)\buffer.obj : \
246 $(EMACS_ROOT)\nt\inc\sys\param.h \
247 $(EMACS_ROOT)\src\s\windowsnt.h \
248 $(EMACS_ROOT)\src\m\intel386.h \
249 $(EMACS_ROOT)\src\config.h \
251 $(SRC)\dispextern.h \
257 $(SRC)\blockinput.h \
258 $(SRC)\region-cache.h
260 $(BLD)\bytecode.obj : \
266 $(BLD)\callint.obj : \
275 $(BLD)\callproc.obj : \
277 $(EMACS_ROOT)\src\s\windowsnt.h \
278 $(EMACS_ROOT)\src\m\intel386.h \
279 $(EMACS_ROOT)\src\config.h \
281 $(EMACS_ROOT)\nt\inc\sys\param.h \
287 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
288 $(EMACS_ROOT)\nt\inc\sys\file.h \
291 $(BLD)\casefiddle.obj : \
292 $(SRC)\casefiddle.c \
293 $(EMACS_ROOT)\src\s\windowsnt.h \
294 $(EMACS_ROOT)\src\m\intel386.h \
295 $(EMACS_ROOT)\src\config.h \
300 $(CC) $(CFLAGS) -Fo$@ casefiddle.c
302 $(BLD)\casetab.obj : \
304 $(EMACS_ROOT)\src\s\windowsnt.h \
305 $(EMACS_ROOT)\src\m\intel386.h \
306 $(EMACS_ROOT)\src\config.h \
312 $(EMACS_ROOT)\src\s\windowsnt.h \
313 $(EMACS_ROOT)\src\m\intel386.h \
314 $(EMACS_ROOT)\src\config.h \
320 $(EMACS_ROOT)\src\s\windowsnt.h \
321 $(EMACS_ROOT)\src\m\intel386.h \
322 $(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 $(BLD)\dispnew.obj : \
352 $(EMACS_ROOT)\src\s\windowsnt.h \
353 $(EMACS_ROOT)\src\m\intel386.h \
354 $(EMACS_ROOT)\src\config.h \
366 $(SRC)\dispextern.h \
368 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
369 $(EMACS_ROOT)\nt\inc\sys\file.h \
377 $(EMACS_ROOT)\src\s\windowsnt.h \
378 $(EMACS_ROOT)\src\m\intel386.h \
379 $(EMACS_ROOT)\src\config.h \
380 $(EMACS_ROOT)\nt\inc\sys\file.h \
385 $(BLD)\doprnt.obj : \
387 $(EMACS_ROOT)\src\s\windowsnt.h \
388 $(EMACS_ROOT)\src\m\intel386.h \
389 $(EMACS_ROOT)\src\config.h
391 $(BLD)\dosfns.obj : \
393 $(EMACS_ROOT)\src\s\windowsnt.h \
394 $(EMACS_ROOT)\src\m\intel386.h \
395 $(EMACS_ROOT)\src\config.h \
404 $(BLD)\editfns.obj : \
406 $(EMACS_ROOT)\src\s\windowsnt.h \
407 $(EMACS_ROOT)\src\m\intel386.h \
408 $(EMACS_ROOT)\src\config.h \
411 $(EMACS_ROOT)\nt\inc\pwd.h \
413 $(SRC)\dispextern.h \
422 $(EMACS_ROOT)\src\s\windowsnt.h \
423 $(EMACS_ROOT)\src\m\intel386.h \
424 $(EMACS_ROOT)\src\config.h \
427 $(SRC)\dispextern.h \
429 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
430 $(EMACS_ROOT)\nt\inc\sys\file.h \
437 $(EMACS_ROOT)\src\s\windowsnt.h \
438 $(EMACS_ROOT)\src\m\intel386.h \
439 $(EMACS_ROOT)\src\config.h \
441 $(SRC)\blockinput.h \
445 $(BLD)\fileio.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 $(EMACS_ROOT)\nt\inc\sys\param.h \
457 $(SRC)\dispextern.h \
461 $(EMACS_ROOT)\nt\inc\sys\file.h \
465 $(BLD)\filelock.obj : \
467 $(EMACS_ROOT)\src\s\windowsnt.h \
468 $(EMACS_ROOT)\src\m\intel386.h \
469 $(EMACS_ROOT)\src\config.h \
472 $(EMACS_ROOT)\nt\inc\pwd.h \
473 $(EMACS_ROOT)\nt\inc\sys\file.h \
475 $(EMACS_ROOT)\src\paths.h \
480 $(BLD)\filemode.obj : \
482 $(EMACS_ROOT)\src\s\windowsnt.h \
483 $(EMACS_ROOT)\src\m\intel386.h \
484 $(EMACS_ROOT)\src\config.h \
485 $(SRC)\s\windowsnt.h \
486 $(SRC)\m\intel386.h \
489 $(BLD)\floatfns.obj : \
491 $(EMACS_ROOT)\src\s\windowsnt.h \
492 $(EMACS_ROOT)\src\m\intel386.h \
493 $(EMACS_ROOT)\src\config.h \
499 $(EMACS_ROOT)\src\s\windowsnt.h \
500 $(EMACS_ROOT)\src\m\intel386.h \
501 $(EMACS_ROOT)\src\config.h \
506 $(SRC)\dispextern.h \
511 $(EMACS_ROOT)\src\s\windowsnt.h \
512 $(EMACS_ROOT)\src\m\intel386.h \
513 $(EMACS_ROOT)\src\config.h \
522 $(BLD)\getloadavg.obj : \
523 $(SRC)\getloadavg.c \
524 $(EMACS_ROOT)\nt\inc\sys\param.h \
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 \
531 $(EMACS_ROOT)\nt\inc\sys\file.h
533 $(BLD)\gmalloc.obj : \
535 $(EMACS_ROOT)\src\s\windowsnt.h \
536 $(EMACS_ROOT)\src\m\intel386.h \
537 $(EMACS_ROOT)\src\config.h \
538 $(EMACS_ROOT)\nt\inc\sys\param.h \
540 $(CC) $(CFLAGS) -D__STDC__ -Fo$@ gmalloc.c
542 $(BLD)\hftctl.obj : \
544 $(EMACS_ROOT)\src\s\windowsnt.h \
545 $(EMACS_ROOT)\src\m\intel386.h \
546 $(EMACS_ROOT)\src\config.h \
547 $(EMACS_ROOT)\nt\inc\sys\ioctl.h
549 $(BLD)\indent.obj : \
551 $(EMACS_ROOT)\src\s\windowsnt.h \
552 $(EMACS_ROOT)\src\m\intel386.h \
553 $(EMACS_ROOT)\src\config.h \
562 $(SRC)\dispextern.h \
564 $(SRC)\region-cache.h
566 $(BLD)\insdel.obj : \
568 $(EMACS_ROOT)\src\s\windowsnt.h \
569 $(EMACS_ROOT)\src\m\intel386.h \
570 $(EMACS_ROOT)\src\config.h \
572 $(SRC)\dispextern.h \
578 $(BLD)\intervals.obj : \
580 $(EMACS_ROOT)\src\s\windowsnt.h \
581 $(EMACS_ROOT)\src\m\intel386.h \
582 $(EMACS_ROOT)\src\config.h \
584 $(SRC)\dispextern.h \
588 $(CC) $(CFLAGS) -Fo$@ intervals.c
590 $(BLD)\keyboard.obj : \
592 $(EMACS_ROOT)\src\s\windowsnt.h \
593 $(EMACS_ROOT)\src\m\intel386.h \
594 $(EMACS_ROOT)\src\config.h \
606 $(SRC)\dispextern.h \
608 $(SRC)\blockinput.h \
611 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
612 $(EMACS_ROOT)\nt\inc\sys\file.h \
618 $(BLD)\keymap.obj : \
620 $(EMACS_ROOT)\src\s\windowsnt.h \
621 $(EMACS_ROOT)\src\m\intel386.h \
622 $(EMACS_ROOT)\src\config.h \
630 $(BLD)\lastfile.obj : \
635 $(EMACS_ROOT)\src\s\windowsnt.h \
636 $(EMACS_ROOT)\src\m\intel386.h \
637 $(EMACS_ROOT)\src\config.h \
638 $(EMACS_ROOT)\nt\inc\sys\file.h \
641 $(EMACS_ROOT)\src\paths.h \
647 $(BLD)\macros.obj : \
649 $(EMACS_ROOT)\src\s\windowsnt.h \
650 $(EMACS_ROOT)\src\m\intel386.h \
651 $(EMACS_ROOT)\src\config.h \
658 $(BLD)\marker.obj : \
660 $(EMACS_ROOT)\src\s\windowsnt.h \
661 $(EMACS_ROOT)\src\m\intel386.h \
662 $(EMACS_ROOT)\src\config.h \
666 $(BLD)\minibuf.obj : \
668 $(EMACS_ROOT)\src\s\windowsnt.h \
669 $(EMACS_ROOT)\src\m\intel386.h \
670 $(EMACS_ROOT)\src\config.h \
674 $(SRC)\dispextern.h \
679 $(BLD)\mocklisp.obj : \
681 $(EMACS_ROOT)\src\s\windowsnt.h \
682 $(EMACS_ROOT)\src\m\intel386.h \
683 $(EMACS_ROOT)\src\config.h \
689 $(SRC)\s\windowsnt.h \
690 $(SRC)\m\intel386.h \
693 $(EMACS_ROOT)\nt\inc\pwd.h \
696 $(BLD)\ntheap.obj : \
700 $(BLD)\ntinevt.obj : \
702 $(SRC)\s\windowsnt.h \
703 $(SRC)\m\intel386.h \
707 $(SRC)\blockinput.h \
710 $(BLD)\ntproc.obj : \
712 $(SRC)\s\windowsnt.h \
713 $(SRC)\m\intel386.h \
720 $(BLD)\ntterm.obj : \
722 $(SRC)\s\windowsnt.h \
723 $(SRC)\m\intel386.h \
731 $(BLD)\prefix-args.obj : \
736 $(EMACS_ROOT)\src\s\windowsnt.h \
737 $(EMACS_ROOT)\src\m\intel386.h \
738 $(EMACS_ROOT)\src\config.h \
745 $(SRC)\dispextern.h \
748 $(BLD)\process.obj : \
750 $(EMACS_ROOT)\src\s\windowsnt.h \
751 $(EMACS_ROOT)\src\m\intel386.h \
752 $(EMACS_ROOT)\src\config.h \
753 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
754 $(EMACS_ROOT)\nt\inc\sys\file.h \
770 $(BLD)\ralloc.obj : \
772 $(EMACS_ROOT)\src\s\windowsnt.h \
773 $(EMACS_ROOT)\src\m\intel386.h \
774 $(EMACS_ROOT)\src\config.h \
776 $(SRC)\s\windowsnt.h \
777 $(SRC)\m\intel386.h \
779 $(EMACS_ROOT)\nt\inc\sys\param.h \
784 $(EMACS_ROOT)\src\s\windowsnt.h \
785 $(EMACS_ROOT)\src\m\intel386.h \
786 $(EMACS_ROOT)\src\config.h \
787 $(SRC)\s\windowsnt.h \
788 $(SRC)\m\intel386.h \
795 $(BLD)\region-cache.obj : \
796 $(SRC)\region-cache.c \
797 $(EMACS_ROOT)\src\s\windowsnt.h \
798 $(EMACS_ROOT)\src\m\intel386.h \
799 $(EMACS_ROOT)\src\config.h \
802 $(SRC)\region-cache.h
804 $(BLD)\scroll.obj : \
806 $(EMACS_ROOT)\src\s\windowsnt.h \
807 $(EMACS_ROOT)\src\m\intel386.h \
808 $(EMACS_ROOT)\src\config.h \
811 $(SRC)\dispextern.h \
814 $(BLD)\search.obj : \
816 $(EMACS_ROOT)\src\s\windowsnt.h \
817 $(EMACS_ROOT)\src\m\intel386.h \
818 $(EMACS_ROOT)\src\config.h \
823 $(SRC)\blockinput.h \
825 $(SRC)\region-cache.h
827 $(BLD)\strftime.obj : \
829 $(EMACS_ROOT)\src\s\windowsnt.h \
830 $(EMACS_ROOT)\src\m\intel386.h \
831 $(EMACS_ROOT)\src\config.h
832 $(CC) $(CFLAGS) -Dstrftime=emacs_strftime -Fo$@ strftime.c
834 $(BLD)\sunfns.obj : \
836 $(EMACS_ROOT)\src\s\windowsnt.h \
837 $(EMACS_ROOT)\src\m\intel386.h \
838 $(EMACS_ROOT)\src\config.h \
844 $(BLD)\syntax.obj : \
846 $(EMACS_ROOT)\src\s\windowsnt.h \
847 $(EMACS_ROOT)\src\m\intel386.h \
848 $(EMACS_ROOT)\src\config.h \
854 $(BLD)\sysdep.obj : \
856 $(EMACS_ROOT)\src\s\windowsnt.h \
857 $(EMACS_ROOT)\src\m\intel386.h \
858 $(EMACS_ROOT)\src\config.h \
860 $(SRC)\blockinput.h \
863 $(EMACS_ROOT)\nt\inc\sys\param.h \
864 $(EMACS_ROOT)\nt\inc\sys\file.h \
865 $(EMACS_ROOT)\nt\inc\sys\ioctl.h \
866 $(EMACS_ROOT)\nt\inc\sys\file.h \
875 $(SRC)\dispextern.h \
884 $(EMACS_ROOT)\src\acldef.h \
885 $(EMACS_ROOT)\src\chpdef.h
889 $(EMACS_ROOT)\src\s\windowsnt.h \
890 $(EMACS_ROOT)\src\m\intel386.h \
891 $(EMACS_ROOT)\src\config.h \
901 $(BLD)\termcap.obj : \
903 $(EMACS_ROOT)\src\s\windowsnt.h \
904 $(EMACS_ROOT)\src\m\intel386.h \
905 $(EMACS_ROOT)\src\config.h \
906 $(EMACS_ROOT)\nt\inc\sys\file.h
908 $(BLD)\terminfo.obj : \
911 $(BLD)\textprop.obj : \
913 $(EMACS_ROOT)\src\s\windowsnt.h \
914 $(EMACS_ROOT)\src\m\intel386.h \
915 $(EMACS_ROOT)\src\config.h \
917 $(SRC)\dispextern.h \
922 $(BLD)\tparam.obj : \
924 $(EMACS_ROOT)\src\s\windowsnt.h \
925 $(EMACS_ROOT)\src\m\intel386.h \
926 $(EMACS_ROOT)\src\config.h
930 $(EMACS_ROOT)\src\s\windowsnt.h \
931 $(EMACS_ROOT)\src\m\intel386.h \
932 $(EMACS_ROOT)\src\config.h \
937 $(BLD)\unexnt.obj : \
941 $(BLD)\vm-limit.obj : \
943 $(EMACS_ROOT)\src\s\windowsnt.h \
944 $(EMACS_ROOT)\src\m\intel386.h \
945 $(EMACS_ROOT)\src\config.h \
948 $(BLD)\widget.obj : \
950 $(EMACS_ROOT)\src\s\windowsnt.h \
951 $(EMACS_ROOT)\src\m\intel386.h \
952 $(EMACS_ROOT)\src\config.h \
956 $(SRC)\dispextern.h \
960 $(BLD)\window.obj : \
962 $(EMACS_ROOT)\src\s\windowsnt.h \
963 $(EMACS_ROOT)\src\m\intel386.h \
964 $(EMACS_ROOT)\src\config.h \
977 $(EMACS_ROOT)\src\s\windowsnt.h \
978 $(EMACS_ROOT)\src\m\intel386.h \
979 $(EMACS_ROOT)\src\config.h \
990 $(SRC)\dispextern.h \