(Vpreloaded_file_list): New variable.
[emacs.git] / lib-src / makefile.nt
blob3cb64ef3ba457acc6a3d4a37a29a8c7049ef6ccc
1 #  Makefile for GNU Emacs lib-src directory.
2 #   Geoff Voelker (voelker@cs.washington.edu)
3 #  Copyright (C) 1994 Free Software Foundation, Inc.
5 #  This file is part of GNU Emacs.
6 #  
7 #  GNU Emacs is free software; you can redistribute it and/or modify
8 #  it under the terms of the GNU General Public License as published by
9 #  the Free Software Foundation; either version 2, or (at your option)
10 #  any later version.
11 #  
12 #  GNU Emacs is distributed in the hope that it will be useful,
13 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #  GNU General Public License for more details.
16 #  
17 #  You should have received a copy of the GNU General Public License
18 #  along with GNU Emacs; see the file COPYING.  If not, write to the
19 #  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 #  Boston, MA 02111-1307, USA.
23
24 # Sets up the system dependent macros.
26 !include ..\nt\makefile.def
28 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -I..\nt\inc -I..\src
30 LINK_FLAGS      = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
32 ALL             = $(BLD)\make-docfile.exe \
33                 $(BLD)\hexl.exe         \
34                 $(BLD)\ctags.exe        \
35                 $(BLD)\etags.exe        \
36                 $(BLD)\movemail.exe     \
37                 $(BLD)\fakemail.exe     \
39                 
40 # don't know what (if) to do with these yet...
42 #               $(BLD)\sorted-doc.exe   \
43 #               $(BLD)\env.exe          \
44 #               $(BLD)\server.exe       \
45 #               $(BLD)\emacstool.exe    \
46 #               $(BLD)\leditcfns.exe    \
47 #               $(BLD)\emacsclient.exe  \
48 #               $(BLD)\cvtmail.exe      \
49 #               $(BLD)\digest-doc.exe   \
50 #               $(BLD)\test-distrib.exe \
53 LIBS          = $(BASE_LIBS)
55 $(BLD)\make-docfile.exe:        $(BLD)\make-docfile.obj $(BLD)\ntlib.obj
56                 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
57 $(BLD)\hexl.exe:                $(BLD)\hexl.obj
58 $(BLD)\fakemail.exe:            $(BLD)\fakemail.obj $(BLD)\ntlib.obj
59                 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
61 make-docfile:   $(BLD) $(BLD)\make-docfile.exe
62 etags:          $(BLD) $(BLD)\etags.exe
63 hexl:           $(BLD) $(BLD)\hexl.exe
64 movemail:       $(BLD) $(BLD)\movemail.exe
65 fakemail:       $(BLD) $(BLD)\fakemail.exe
67 GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
68 GETOPTDEPS = $(GETOPTOBJS) getopt.h
69 MOVEMAILOBJS =  $(BLD)\movemail.obj \
70                 $(BLD)\pop.obj \
71                 $(BLD)\ntlib.obj \
72                 $(GETOPTOBJS)
74 $(BLD)\movemail.exe:    $(MOVEMAILOBJS) getopt.h
75                 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) $(LIBS) wsock32.lib
77 ETAGSOBJ      = $(BLD)\etags.obj \
78                 $(BLD)\getopt.obj \
79                 $(BLD)\getopt1.obj \
80                 $(BLD)\ntlib.obj \
81                 $(BLD)\regex.obj \
82                 $(BLD)\alloca.obj
85 $(BLD)\etags.exe:       $(ETAGSOBJ)
86                 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
89 $(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
90                 $(CC)  $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
91                 ../src/regex.c -Fo$@
93 ETAGS_CFLAGS  = -DETAGS_REGEXPS -DHAVE_GETCWD
94 $(BLD)\etags.obj: etags.c
95                 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
97 CTAGSOBJ      = $(BLD)\ctags.obj \
98                 $(BLD)\getopt.obj \
99                 $(BLD)\getopt1.obj \
100                 $(BLD)\ntlib.obj \
101                 $(BLD)\regex.obj \
102                 $(BLD)\alloca.obj
104 $(BLD)\ctags.exe:           ctags.c $(CTAGSOBJ)
105                 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
107 ctags.c:        etags.c
108                 - $(DEL) ctags.c
109                 copy etags.c ctags.c
111 CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
112 $(BLD)\ctags.obj: ctags.c
113                 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
116 # don't know what to do with these yet...
118 # $(BLD)\sorted-doc.exe:        $(BLD)\sorted-doc.obj
119 # $(BLD)\yow.exe:               $(BLD)\yow.obj
120 # $(BLD)\emacstool.exe:         $(BLD)\emacstool.obj
121 # $(BLD)\leditcfns.exe:         $(BLD)\leditcfns.obj
122 # $(BLD)\server.exe:            $(BLD)\server.obj
123 # $(BLD)\cvtmail.exe:           $(BLD)\cvtmail.obj
124 # $(BLD)\digest-doc.exe:        $(BLD)\digest-doc.obj
125 # $(BLD)\emacsclient.exe:       $(BLD)\emacsclient.obj
126 # $(BLD)\test-distrib.exe:      $(BLD)\test-distrib.obj
129 # From ..\src\makefile.nt.
131 obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c cm.c cmds.c charset.c coding.c category.c ccl.c data.c dired.c dispnew.c doc.c  doprnt.c editfns.c eval.c fileio.c filelock.c filemode.c fns.c fontset.c indent.c insdel.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c xfaces.c mocklisp.c print.c process.c regex.c scroll.c search.c syntax.c sysdep.c term.c termcap.c tparam.c undo.c unexw32.c window.c xdisp.c casetab.c floatfns.c frame.c gmalloc.c intervals.c ralloc.c textprop.c vm-limit.c region-cache.c strftime.c w32.c w32console.c w32faces.c w32fns.c w32heap.c w32inevt.c w32proc.c w32reg.c w32menu.c w32select.c w32term.c w32xfns.c 
134 # These are the lisp files that are loaded up in loadup.el
136 lispsource = ../lisp/
138 FACE_SUPPORT = $(lispsource)facemenu.elc
139 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc
140 FLOAT_SUPPORT = $(lispsource)float-sup.elc
141 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
143 lisp= \
144         $(lispsource)abbrev.elc \
145         $(lispsource)buff-menu.elc \
146         $(lispsource)byte-run.elc \
147         $(lispsource)cus-start.el \
148         $(lispsource)custom.elc \
149         $(lispsource)faces.elc \
150         $(lispsource)files.elc \
151         $(lispsource)fill.elc \
152         $(lispsource)format.elc \
153         $(FACE_SUPPORT) \
154         $(MOUSE_SUPPORT) \
155         $(FLOAT_SUPPORT) \
156         $(lispsource)frame.elc\
157         $(X_WINDOWS_SUPPORT) \
158         $(lispsource)help.elc \
159         $(lispsource)indent.elc \
160         $(lispsource)isearch.elc \
161         $(lispsource)lisp-mode.elc \
162         $(lispsource)lisp.elc \
163         $(lispsource)loadup.el \
164         $(lispsource)loaddefs.el \
165         $(lispsource)map-ynp.elc \
166         $(lispsource)menu-bar.elc \
167         $(lispsource)international/mule.elc \
168         $(lispsource)international/mule-conf.el \
169         $(lispsource)international/mule-cmds.elc \
170         $(lispsource)international/characters.elc \
171         $(lispsource)language/chinese.elc \
172         $(lispsource)language/cyrillic.elc \
173         $(lispsource)language/devanagari.elc \
174         $(lispsource)language/english.elc \
175         $(lispsource)language/ethiopic.elc \
176         $(lispsource)language/european.elc \
177         $(lispsource)language/greek.elc \
178         $(lispsource)language/hebrew.elc \
179         $(lispsource)language/indian.elc \
180         $(lispsource)language/japanese.elc \
181         $(lispsource)language/korean.elc \
182         $(lispsource)language/lao.elc \
183         $(lispsource)language/thai.elc \
184         $(lispsource)language/tibetan.elc \
185         $(lispsource)language/vietnamese.elc \
186         $(lispsource)language/misc-lang.elc \
187         $(lispsource)page.elc \
188         $(lispsource)paragraphs.elc \
189         $(lispsource)paths.el \
190         $(lispsource)register.elc \
191         $(lispsource)replace.elc \
192         $(lispsource)simple.elc \
193         $(lispsource)startup.elc \
194         $(lispsource)subr.elc \
195         $(lispsource)text-mode.elc \
196         $(lispsource)vc-hooks.elc \
197         $(lispsource)ediff-hook.elc \
198         $(VMS_SUPPORT) \
199         $(MSDOS_SUPPORT) \
200         $(WINNT_SUPPORT) \
201         $(lispsource)window.elc \
202         $(lispsource)version.el
205 DOC           = DOC 
206 $(DOC):         $(BLD)\make-docfile.exe
207                 - $(DEL) $(DOC)
208                 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
209                 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
210                 $(CP) $(DOC) ..\etc\DOC-X
211                 - mkdir ..\src\$(OBJDIR)
212                 - mkdir ..\src\$(OBJDIR)\etc
213                 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
215 {$(BLD)}.obj{$(BLD)}.exe:
216                 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
218 .c{$(BLD)}.obj:
219                 $(CC) $(CFLAGS) -Fo$@ $<
222 # Build the executables
224 all:            $(BLD) $(ALL) $(DOC)
227 # Assuming INSTALL_DIR is defined, build and install emacs in it.
229 INSTALL_FILES = $(ALL)
230 install:        $(INSTALL_FILES)
231                 - mkdir $(INSTALL_DIR)\bin
232                 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
233                 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
234                 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
235                 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
236                 $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
237                 - mkdir $(INSTALL_DIR)\etc
238                 $(CP) $(DOC) $(INSTALL_DIR)\etc
241 # Maintenance
243 clean:;         - $(DEL) *~ *.pdb DOC*
244                 - $(DEL_TREE) deleted
245                 - $(DEL_TREE) $(OBJDIR)
248 # Headers we would preprocess if we could.
250 ..\src\config.h:        ..\nt\$(CONFIG_H)
251                         $(CP) $** $@
252 ..\src\paths.h:         ..\nt\paths.h
253                         $(CP) $** $@
255 ### DEPENDENCIES ###
257 EMACS_ROOT      = ..
258 SRC             = .
260 $(BLD)\alloca.obj : \
261         $(SRC)\alloca.c \
262         $(EMACS_ROOT)\src\s\ms-w32.h \
263         $(EMACS_ROOT)\src\m\intel386.h \
264         $(EMACS_ROOT)\src\config.h \
265         $(EMACS_ROOT)\src\blockinput.h
267 $(BLD)\b2m.obj : \
268         $(SRC)\b2m.c \
269         $(EMACS_ROOT)\src\s\ms-w32.h \
270         $(EMACS_ROOT)\src\m\intel386.h \
271         $(EMACS_ROOT)\lib-src\..\src\config.h
273 $(BLD)\cvtmail.obj : \
274         $(SRC)\cvtmail.c
276 $(BLD)\digest-doc.obj : \
277         $(SRC)\digest-doc.c
279 $(BLD)\emacsclient.obj : \
280         $(SRC)\emacsclient.c \
281         $(EMACS_ROOT)\src\s\ms-w32.h \
282         $(EMACS_ROOT)\src\m\intel386.h \
283         $(EMACS_ROOT)\lib-src\..\src\config.h
285 $(BLD)\emacsserver.obj : \
286         $(SRC)\emacsserver.c \
287         $(EMACS_ROOT)\src\s\ms-w32.h \
288         $(EMACS_ROOT)\src\m\intel386.h \
289         $(EMACS_ROOT)\lib-src\..\src\config.h \
290         $(EMACS_ROOT)\nt\inc\sys\file.h
292 $(BLD)\emacstool.obj : \
293         $(SRC)\emacstool.c \
294         $(EMACS_ROOT)\nt\inc\sys\file.h
296 $(BLD)\etags.obj : \
297         $(SRC)\etags.c \
298         $(EMACS_ROOT)\nt\inc\sys\param.h \
299         $(EMACS_ROOT)\src\s\ms-w32.h \
300         $(EMACS_ROOT)\src\m\intel386.h \
301         $(EMACS_ROOT)\lib-src\..\src\config.h \
302         $(SRC)\getopt.h
304 $(BLD)\fakemail.obj : \
305         $(SRC)\fakemail.c \
306         $(SRC)\ntlib.h \
307         $(EMACS_ROOT)\src\s\ms-w32.h \
308         $(EMACS_ROOT)\src\m\intel386.h \
309         $(EMACS_ROOT)\lib-src\..\src\config.h \
310         $(EMACS_ROOT)\nt\inc\pwd.h
312 $(BLD)\getdate.obj : \
313         $(SRC)\getdate.c \
314         $(EMACS_ROOT)\src\s\ms-w32.h \
315         $(EMACS_ROOT)\src\m\intel386.h \
316         $(EMACS_ROOT)\src\config.h \
317         $(MSTOOLS_SYS)\types.h
319 $(BLD)\getopt.obj : \
320         $(SRC)\getopt.c \
321         $(EMACS_ROOT)\src\s\ms-w32.h \
322         $(EMACS_ROOT)\src\m\intel386.h \
323         $(EMACS_ROOT)\src\config.h \
324         $(SRC)\getopt.h
326 $(BLD)\getopt1.obj : \
327         $(SRC)\getopt1.c \
328         $(EMACS_ROOT)\src\s\ms-w32.h \
329         $(EMACS_ROOT)\src\m\intel386.h \
330         $(EMACS_ROOT)\src\config.h \
331         $(SRC)\getopt.h
333 $(BLD)\hexl.obj : \
334         $(SRC)\hexl.c
336 $(BLD)\leditcfns.obj : \
337         $(SRC)\leditcfns.c
339 $(BLD)\make-docfile.obj : \
340         $(SRC)\make-docfile.c \
341         $(EMACS_ROOT)\src\config.h
343 $(BLD)\make-path.obj : \
344         $(SRC)\make-path.c
346 $(BLD)\movemail.obj : \
347         $(SRC)\movemail.c \
348         $(EMACS_ROOT)\src\s\ms-w32.h \
349         $(EMACS_ROOT)\src\m\intel386.h \
350         $(EMACS_ROOT)\lib-src\..\src\config.h \
351         $(EMACS_ROOT)\nt\inc\sys\file.h \
352         $(EMACS_ROOT)\src\vmsproc.h \
353         $(EMACS_ROOT)\lib-src\..\src\syswait.h \
354         $(EMACS_ROOT)\nt\inc\pwd.h
355                 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
357 $(BLD)\ntlib.obj : \
358         $(SRC)\ntlib.c \
359         $(SRC)\ntlib.h \
360         $(EMACS_ROOT)\nt\inc\pwd.h
362 $(BLD)\pop.obj : \
363         $(SRC)\pop.c \
364         $(SRC)\pop.h \
365         $(SRC)\ntlib.h
367 $(BLD)\profile.obj : \
368         $(SRC)\profile.c \
369         $(EMACS_ROOT)\src\s\ms-w32.h \
370         $(EMACS_ROOT)\src\m\intel386.h \
371         $(EMACS_ROOT)\lib-src\..\src\config.h \
372         $(EMACS_ROOT)\src\vmstime.h \
373         $(EMACS_ROOT)\lib-src\..\src\systime.h
375 $(BLD)\qsort.obj : \
376         $(SRC)\qsort.c
378 $(BLD)\sorted-doc.obj : \
379         $(SRC)\sorted-doc.c
381 $(BLD)\tcp.obj : \
382         $(SRC)\tcp.c
384 $(BLD)\test-distrib.obj : \
385         $(SRC)\test-distrib.c
387 $(BLD)\timer.obj : \
388         $(SRC)\timer.c \
389         $(EMACS_ROOT)\src\s\ms-w32.h \
390         $(EMACS_ROOT)\src\m\intel386.h \
391         $(EMACS_ROOT)\lib-src\..\src\config.h
393 $(BLD)\yow.obj : \
394         $(SRC)\yow.c \
395         $(EMACS_ROOT)\lib-src\..\src\paths.h