(ETAGSOBJ): Remove reference to obsolete alloca.obj.
[bpt/emacs.git] / lib-src / makefile.nt
1 # Makefile for GNU Emacs lib-src directory.
2 # Geoff Voelker (voelker@cs.washington.edu)
3 # Copyright (C) 1994 Free Software Foundation, Inc.
4 #
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.
21 #
22
23 #
24 # Sets up the system dependent macros.
25 #
26 !include ..\nt\makefile.def
27
28 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
29 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I..\nt\inc -I..\src
30
31 LINK_FLAGS = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
32
33 ALL = $(BLD)\make-docfile.exe \
34 $(BLD)\hexl.exe \
35 $(BLD)\ctags.exe \
36 $(BLD)\etags.exe \
37 $(BLD)\movemail.exe \
38 $(BLD)\fakemail.exe \
39
40
41 # don't know what (if) to do with these yet...
42 #
43 # $(BLD)\sorted-doc.exe \
44 # $(BLD)\env.exe \
45 # $(BLD)\server.exe \
46 # $(BLD)\emacstool.exe \
47 # $(BLD)\leditcfns.exe \
48 # $(BLD)\emacsclient.exe \
49 # $(BLD)\cvtmail.exe \
50 # $(BLD)\digest-doc.exe \
51 # $(BLD)\test-distrib.exe \
52
53
54 LIBS = $(BASE_LIBS)
55
56 $(BLD)\make-docfile.exe: $(BLD)\make-docfile.obj $(BLD)\ntlib.obj
57 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
58 $(BLD)\hexl.exe: $(BLD)\hexl.obj
59 $(BLD)\fakemail.exe: $(BLD)\fakemail.obj $(BLD)\ntlib.obj
60 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
61
62 make-docfile: $(BLD) $(BLD)\make-docfile.exe
63 etags: $(BLD) $(BLD)\etags.exe
64 hexl: $(BLD) $(BLD)\hexl.exe
65 movemail: $(BLD) $(BLD)\movemail.exe
66 fakemail: $(BLD) $(BLD)\fakemail.exe
67
68 GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
69 GETOPTDEPS = $(GETOPTOBJS) getopt.h
70 MOVEMAILOBJS = $(BLD)\movemail.obj \
71 $(BLD)\pop.obj \
72 $(BLD)\ntlib.obj \
73 $(GETOPTOBJS)
74
75 $(BLD)\movemail.exe: $(MOVEMAILOBJS) getopt.h
76 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
77 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
78
79 ETAGSOBJ = $(BLD)\etags.obj \
80 $(BLD)\getopt.obj \
81 $(BLD)\getopt1.obj \
82 $(BLD)\ntlib.obj \
83 $(BLD)\regex.obj
84
85
86 $(BLD)\etags.exe: $(ETAGSOBJ)
87 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
88
89
90 $(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
91 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
92 ../src/regex.c -Fo$@
93
94 ETAGS_CFLAGS = -DETAGS_REGEXPS -DHAVE_GETCWD
95 $(BLD)\etags.obj: etags.c
96 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
97
98 CTAGSOBJ = $(BLD)\ctags.obj \
99 $(BLD)\getopt.obj \
100 $(BLD)\getopt1.obj \
101 $(BLD)\ntlib.obj \
102 $(BLD)\regex.obj
103
104 $(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
105 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
106
107 ctags.c: etags.c
108 - $(DEL) ctags.c
109 copy etags.c ctags.c
110
111 CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
112 $(BLD)\ctags.obj: ctags.c
113 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
114
115 #
116 # don't know what to do with these yet...
117 #
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
127
128 #
129 # From ..\src\makefile.nt.
130 #
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 emacs.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
132
133 #
134 # These are the lisp files that are loaded up in loadup.el
135 #
136 lispsource = ../lisp/
137
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
142
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)textmodes/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)emacs-lisp/lisp-mode.elc \
162 $(lispsource)emacs-lisp/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)textmodes/page.elc \
188 $(lispsource)textmodes/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)textmodes/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
203
204
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
214
215 {$(BLD)}.obj{$(BLD)}.exe:
216 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
217
218 #
219 # Build the executables
220 #
221 all: $(BLD) $(ALL) $(DOC)
222
223 #
224 # Assuming INSTALL_DIR is defined, build and install emacs in it.
225 #
226 INSTALL_FILES = $(ALL)
227 install: $(INSTALL_FILES)
228 - mkdir $(INSTALL_DIR)\bin
229 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
230 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
231 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
232 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
233 $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
234 - mkdir $(INSTALL_DIR)\etc
235 $(CP) $(DOC) $(INSTALL_DIR)\etc
236
237 #
238 # Maintenance
239 #
240 clean:; - $(DEL) *~ *.pdb DOC*
241 - $(DEL) *.orig *.rej *.crlf ctags.c
242 - $(DEL_TREE) deleted
243 - $(DEL_TREE) obj
244 - $(DEL_TREE) obj-spd
245
246 #
247 # Headers we would preprocess if we could.
248 #
249 ..\src\config.h: ..\nt\$(CONFIG_H)
250 $(CP) $** $@
251 ..\src\paths.h: ..\nt\paths.h
252 $(CP) $** $@
253
254 ### DEPENDENCIES ###
255
256 EMACS_ROOT = ..
257 SRC = .
258
259 $(BLD)\b2m.obj : \
260 $(SRC)\b2m.c \
261 $(EMACS_ROOT)\src\s\ms-w32.h \
262 $(EMACS_ROOT)\src\m\intel386.h \
263 $(EMACS_ROOT)\lib-src\..\src\config.h
264
265 $(BLD)\ctags.obj : \
266 $(SRC)\ctags.c \
267 $(EMACS_ROOT)\nt\inc\sys\param.h \
268 $(EMACS_ROOT)\src\s\ms-w32.h \
269 $(EMACS_ROOT)\src\m\intel386.h \
270 $(EMACS_ROOT)\lib-src\..\src\config.h \
271 $(SRC)\ntlib.h \
272 $(SRC)\getopt.h
273
274 $(BLD)\cvtmail.obj : \
275 $(SRC)\cvtmail.c
276
277 $(BLD)\digest-doc.obj : \
278 $(SRC)\digest-doc.c
279
280 $(BLD)\emacsclient.obj : \
281 $(SRC)\emacsclient.c \
282 $(EMACS_ROOT)\src\s\ms-w32.h \
283 $(EMACS_ROOT)\src\m\intel386.h \
284 $(EMACS_ROOT)\lib-src\..\src\config.h
285
286 $(BLD)\emacsserver.obj : \
287 $(SRC)\emacsserver.c \
288 $(EMACS_ROOT)\src\s\ms-w32.h \
289 $(EMACS_ROOT)\src\m\intel386.h \
290 $(EMACS_ROOT)\lib-src\..\src\config.h \
291 $(EMACS_ROOT)\nt\inc\sys\file.h
292
293 $(BLD)\emacstool.obj : \
294 $(SRC)\emacstool.c \
295 $(EMACS_ROOT)\nt\inc\sys\file.h
296
297 $(BLD)\etags.obj : \
298 $(SRC)\etags.c \
299 $(EMACS_ROOT)\nt\inc\sys\param.h \
300 $(EMACS_ROOT)\src\s\ms-w32.h \
301 $(EMACS_ROOT)\src\m\intel386.h \
302 $(EMACS_ROOT)\lib-src\..\src\config.h \
303 $(SRC)\ntlib.h \
304 $(SRC)\getopt.h
305
306 $(BLD)\fakemail.obj : \
307 $(SRC)\fakemail.c \
308 $(SRC)\ntlib.h \
309 $(EMACS_ROOT)\src\s\ms-w32.h \
310 $(EMACS_ROOT)\src\m\intel386.h \
311 $(EMACS_ROOT)\lib-src\..\src\config.h \
312 $(EMACS_ROOT)\nt\inc\pwd.h
313
314 $(BLD)\getdate.obj : \
315 $(SRC)\getdate.c \
316 $(EMACS_ROOT)\src\s\ms-w32.h \
317 $(EMACS_ROOT)\src\m\intel386.h \
318 $(EMACS_ROOT)\src\config.h \
319 $(MSTOOLS_SYS)\types.h
320
321 $(BLD)\getopt.obj : \
322 $(SRC)\getopt.c \
323 $(EMACS_ROOT)\src\s\ms-w32.h \
324 $(EMACS_ROOT)\src\m\intel386.h \
325 $(EMACS_ROOT)\src\config.h \
326 $(SRC)\ntlib.h \
327 $(SRC)\getopt.h
328
329 $(BLD)\getopt1.obj : \
330 $(SRC)\getopt1.c \
331 $(EMACS_ROOT)\src\s\ms-w32.h \
332 $(EMACS_ROOT)\src\m\intel386.h \
333 $(EMACS_ROOT)\src\config.h \
334 $(SRC)\getopt.h
335
336 $(BLD)\hexl.obj : \
337 $(SRC)\hexl.c
338
339 $(BLD)\leditcfns.obj : \
340 $(SRC)\leditcfns.c
341
342 $(BLD)\make-docfile.obj : \
343 $(SRC)\make-docfile.c \
344 $(EMACS_ROOT)\src\config.h
345
346 $(BLD)\make-path.obj : \
347 $(SRC)\make-path.c
348
349 $(BLD)\movemail.obj : \
350 $(SRC)\movemail.c \
351 $(EMACS_ROOT)\src\s\ms-w32.h \
352 $(EMACS_ROOT)\src\m\intel386.h \
353 $(EMACS_ROOT)\lib-src\..\src\config.h \
354 $(EMACS_ROOT)\nt\inc\sys\file.h \
355 $(EMACS_ROOT)\src\vmsproc.h \
356 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
357 $(EMACS_ROOT)\nt\inc\pwd.h \
358 $(SRC)\ntlib.h
359 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
360
361 $(BLD)\ntlib.obj : \
362 $(SRC)\ntlib.c \
363 $(SRC)\ntlib.h \
364 $(EMACS_ROOT)\nt\inc\pwd.h
365
366 $(BLD)\pop.obj : \
367 $(SRC)\pop.c \
368 $(SRC)\pop.h \
369 $(SRC)\ntlib.h
370
371 $(BLD)\profile.obj : \
372 $(SRC)\profile.c \
373 $(EMACS_ROOT)\src\s\ms-w32.h \
374 $(EMACS_ROOT)\src\m\intel386.h \
375 $(EMACS_ROOT)\lib-src\..\src\config.h \
376 $(EMACS_ROOT)\src\vmstime.h \
377 $(EMACS_ROOT)\lib-src\..\src\systime.h
378
379 $(BLD)\qsort.obj : \
380 $(SRC)\qsort.c
381
382 $(BLD)\sorted-doc.obj : \
383 $(SRC)\sorted-doc.c
384
385 $(BLD)\tcp.obj : \
386 $(SRC)\tcp.c
387
388 $(BLD)\test-distrib.obj : \
389 $(SRC)\test-distrib.c
390
391 $(BLD)\timer.obj : \
392 $(SRC)\timer.c \
393 $(EMACS_ROOT)\src\s\ms-w32.h \
394 $(EMACS_ROOT)\src\m\intel386.h \
395 $(EMACS_ROOT)\lib-src\..\src\config.h
396
397 $(BLD)\yow.obj : \
398 $(SRC)\yow.c \
399 $(EMACS_ROOT)\lib-src\..\src\paths.h