Trailing whitespace deleted.
[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)\ebrowse.exe \
38 $(BLD)\movemail.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 ebrowse: $(BLD) $(BLD)\ebrowse.exe
65 hexl: $(BLD) $(BLD)\hexl.exe
66 movemail: $(BLD) $(BLD)\movemail.exe
67 fakemail: $(BLD) $(BLD)\fakemail.exe
68
69 GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
70 GETOPTDEPS = $(GETOPTOBJS) getopt.h
71 MOVEMAILOBJS = $(BLD)\movemail.obj \
72 $(BLD)\pop.obj \
73 $(BLD)\ntlib.obj \
74 $(GETOPTOBJS)
75
76 $(BLD)\movemail.exe: $(MOVEMAILOBJS) getopt.h
77 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
78 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
79
80 ETAGSOBJ = $(BLD)\etags.obj \
81 $(BLD)\getopt.obj \
82 $(BLD)\getopt1.obj \
83 $(BLD)\ntlib.obj \
84 $(BLD)\regex.obj
85
86
87 $(BLD)\etags.exe: $(ETAGSOBJ)
88 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
89
90
91 $(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
92 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
93 ../src/regex.c -Fo$@
94
95 ETAGS_CFLAGS = -DETAGS_REGEXPS -DHAVE_GETCWD
96 $(BLD)\etags.obj: etags.c
97 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
98
99 CTAGSOBJ = $(BLD)\ctags.obj \
100 $(BLD)\getopt.obj \
101 $(BLD)\getopt1.obj \
102 $(BLD)\ntlib.obj \
103 $(BLD)\regex.obj
104
105 $(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
106 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
107
108 ctags.c: etags.c
109 - $(DEL) ctags.c
110 copy etags.c ctags.c
111
112 CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
113 $(BLD)\ctags.obj: ctags.c
114 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
115
116 EBROWSE_OBJ = $(BLD)\ebrowse.obj \
117 $(BLD)\getopt.obj \
118 $(BLD)\getopt1.obj \
119 $(BLD)\ntlib.obj
120
121 $(BLD)\ebrowse.exe: $(EBROWSE_OBJ)
122 $(LINK) -out:$@ $(LINK_FLAGS) $(EBROWSE_OBJ) $(LIBS)
123
124 $(BLD)\ebrowse.obj: ebrowse.c ..\src\config.h
125 $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -Fo$@ ebrowse.c
126 #
127 # don't know what to do with these yet...
128 #
129 # $(BLD)\sorted-doc.exe: $(BLD)\sorted-doc.obj
130 # $(BLD)\yow.exe: $(BLD)\yow.obj
131 # $(BLD)\emacstool.exe: $(BLD)\emacstool.obj
132 # $(BLD)\leditcfns.exe: $(BLD)\leditcfns.obj
133 # $(BLD)\server.exe: $(BLD)\server.obj
134 # $(BLD)\cvtmail.exe: $(BLD)\cvtmail.obj
135 # $(BLD)\digest-doc.exe: $(BLD)\digest-doc.obj
136 # $(BLD)\emacsclient.exe: $(BLD)\emacsclient.obj
137 # $(BLD)\test-distrib.exe: $(BLD)\test-distrib.obj
138
139 #
140 # From ..\src\makefile.nt.
141 #
142 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 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
143
144 #
145 # These are the lisp files that are loaded up in loadup.el
146 #
147 lispsource = ../lisp/
148
149 FACE_SUPPORT = $(lispsource)facemenu.elc
150 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
151 FLOAT_SUPPORT = $(lispsource)float-sup.elc
152 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
153
154 lisp= \
155 $(lispsource)abbrev.elc \
156 $(lispsource)buff-menu.elc \
157 $(lispsource)byte-run.elc \
158 $(lispsource)cus-start.el \
159 $(lispsource)custom.elc \
160 $(lispsource)disp-table.elc \
161 $(lispsource)faces.elc \
162 $(lispsource)files.elc \
163 $(lispsource)textmodes/fill.elc \
164 $(lispsource)format.elc \
165 $(FACE_SUPPORT) \
166 $(MOUSE_SUPPORT) \
167 $(FLOAT_SUPPORT) \
168 $(lispsource)frame.elc\
169 $(X_WINDOWS_SUPPORT) \
170 $(lispsource)help.elc \
171 $(lispsource)indent.elc \
172 $(lispsource)isearch.elc \
173 $(lispsource)emacs-lisp/lisp-mode.elc \
174 $(lispsource)emacs-lisp/lisp.elc \
175 $(lispsource)loadup.el \
176 $(lispsource)loaddefs.el \
177 $(lispsource)bindings.el \
178 $(lispsource)map-ynp.elc \
179 $(lispsource)menu-bar.elc \
180 $(lispsource)international/mule.elc \
181 $(lispsource)international/mule-conf.el \
182 $(lispsource)international/mule-cmds.elc \
183 $(lispsource)international/characters.elc \
184 $(lispsource)international/ccl.elc \
185 $(lispsource)international/codepage.elc \
186 $(lispsource)international/utf-8.elc \
187 $(lispsource)case-table.elc \
188 $(lispsource)language/chinese.elc \
189 $(lispsource)language/cyrillic.elc \
190 $(lispsource)language/devanagari.elc \
191 $(lispsource)language/english.elc \
192 $(lispsource)language/ethiopic.elc \
193 $(lispsource)language/european.elc \
194 $(lispsource)language/czech.elc \
195 $(lispsource)language/slovak.elc \
196 $(lispsource)language/romanian.elc \
197 $(lispsource)language/greek.elc \
198 $(lispsource)language/hebrew.elc \
199 $(lispsource)language/indian.elc \
200 $(lispsource)language/japanese.elc \
201 $(lispsource)language/korean.elc \
202 $(lispsource)language/lao.elc \
203 $(lispsource)language/thai.elc \
204 $(lispsource)language/tibetan.elc \
205 $(lispsource)language/vietnamese.elc \
206 $(lispsource)language/misc-lang.elc \
207 $(lispsource)textmodes/page.elc \
208 $(lispsource)textmodes/paragraphs.elc \
209 $(lispsource)paths.el \
210 $(lispsource)register.elc \
211 $(lispsource)replace.elc \
212 $(lispsource)simple.elc \
213 $(lispsource)startup.elc \
214 $(lispsource)subr.elc \
215 $(lispsource)term/tty-colors.elc \
216 $(lispsource)textmodes/text-mode.elc \
217 $(lispsource)vc-hooks.elc \
218 $(lispsource)ediff-hook.elc \
219 $(VMS_SUPPORT) \
220 $(MSDOS_SUPPORT) \
221 $(WINNT_SUPPORT) \
222 $(lispsource)widget.elc \
223 $(lispsource)window.elc \
224 $(lispsource)version.el
225
226
227 DOC = DOC
228 $(DOC): $(BLD)\make-docfile.exe
229 - $(DEL) $(DOC)
230 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
231 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
232 $(CP) $(DOC) ..\etc\DOC-X
233 - mkdir ..\src\$(OBJDIR)
234 - mkdir ..\src\$(OBJDIR)\etc
235 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
236
237 {$(BLD)}.obj{$(BLD)}.exe:
238 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
239
240 #
241 # Build the executables
242 #
243 all: $(BLD) $(ALL) $(DOC)
244
245 #
246 # Assuming INSTALL_DIR is defined, build and install emacs in it.
247 #
248 INSTALL_FILES = $(ALL)
249 install: $(INSTALL_FILES)
250 - mkdir $(INSTALL_DIR)\bin
251 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
252 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
253 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
254 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
255 - mkdir $(INSTALL_DIR)\etc
256 $(CP) $(DOC) $(INSTALL_DIR)\etc
257
258 # Don't install fakemail by default, as it sends mail into a
259 # blackhole if /bin/mail is not installed.
260 # $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
261
262 #
263 # Maintenance
264 #
265 clean:; - $(DEL) *~ *.pdb DOC*
266 - $(DEL) *.orig *.rej *.crlf ctags.c
267 - $(DEL_TREE) deleted
268 - $(DEL_TREE) obj
269 - $(DEL_TREE) obj-spd
270
271 #
272 # Headers we would preprocess if we could.
273 #
274 ..\src\config.h: ..\nt\$(CONFIG_H)
275 $(CP) $** $@
276 ..\src\paths.h: ..\nt\paths.h
277 $(CP) $** $@
278
279 ### DEPENDENCIES ###
280
281 EMACS_ROOT = ..
282 SRC = .
283
284 $(BLD)\b2m.obj : \
285 $(SRC)\b2m.c \
286 $(EMACS_ROOT)\src\s\ms-w32.h \
287 $(EMACS_ROOT)\src\m\intel386.h \
288 $(EMACS_ROOT)\lib-src\..\src\config.h
289
290 $(BLD)\ctags.obj : \
291 $(SRC)\ctags.c \
292 $(EMACS_ROOT)\nt\inc\sys\param.h \
293 $(EMACS_ROOT)\src\s\ms-w32.h \
294 $(EMACS_ROOT)\src\m\intel386.h \
295 $(EMACS_ROOT)\lib-src\..\src\config.h \
296 $(SRC)\ntlib.h \
297 $(SRC)\getopt.h
298
299 $(BLD)\cvtmail.obj : \
300 $(SRC)\cvtmail.c
301
302 $(BLD)\digest-doc.obj : \
303 $(SRC)\digest-doc.c
304
305 $(BLD)\emacsclient.obj : \
306 $(SRC)\emacsclient.c \
307 $(EMACS_ROOT)\src\s\ms-w32.h \
308 $(EMACS_ROOT)\src\m\intel386.h \
309 $(EMACS_ROOT)\lib-src\..\src\config.h
310
311 $(BLD)\emacstool.obj : \
312 $(SRC)\emacstool.c \
313 $(EMACS_ROOT)\nt\inc\sys\file.h
314
315 $(BLD)\etags.obj : \
316 $(SRC)\etags.c \
317 $(EMACS_ROOT)\nt\inc\sys\param.h \
318 $(EMACS_ROOT)\src\s\ms-w32.h \
319 $(EMACS_ROOT)\src\m\intel386.h \
320 $(EMACS_ROOT)\lib-src\..\src\config.h \
321 $(SRC)\ntlib.h \
322 $(SRC)\getopt.h
323
324 $(BLD)\fakemail.obj : \
325 $(SRC)\fakemail.c \
326 $(SRC)\ntlib.h \
327 $(EMACS_ROOT)\src\s\ms-w32.h \
328 $(EMACS_ROOT)\src\m\intel386.h \
329 $(EMACS_ROOT)\lib-src\..\src\config.h \
330 $(EMACS_ROOT)\nt\inc\pwd.h
331
332 $(BLD)\getdate.obj : \
333 $(SRC)\getdate.c \
334 $(EMACS_ROOT)\src\s\ms-w32.h \
335 $(EMACS_ROOT)\src\m\intel386.h \
336 $(EMACS_ROOT)\src\config.h \
337 $(MSTOOLS_SYS)\types.h
338
339 $(BLD)\getopt.obj : \
340 $(SRC)\getopt.c \
341 $(EMACS_ROOT)\src\s\ms-w32.h \
342 $(EMACS_ROOT)\src\m\intel386.h \
343 $(EMACS_ROOT)\src\config.h \
344 $(SRC)\ntlib.h \
345 $(SRC)\getopt.h
346
347 $(BLD)\getopt1.obj : \
348 $(SRC)\getopt1.c \
349 $(EMACS_ROOT)\src\s\ms-w32.h \
350 $(EMACS_ROOT)\src\m\intel386.h \
351 $(EMACS_ROOT)\src\config.h \
352 $(SRC)\getopt.h
353
354 $(BLD)\hexl.obj : \
355 $(SRC)\hexl.c
356
357 $(BLD)\leditcfns.obj : \
358 $(SRC)\leditcfns.c
359
360 $(BLD)\make-docfile.obj : \
361 $(SRC)\make-docfile.c \
362 $(EMACS_ROOT)\src\config.h
363
364 $(BLD)\make-path.obj : \
365 $(SRC)\make-path.c
366
367 $(BLD)\movemail.obj : \
368 $(SRC)\movemail.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)\nt\inc\sys\file.h \
373 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
374 $(EMACS_ROOT)\nt\inc\pwd.h \
375 $(SRC)\ntlib.h
376 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
377
378 $(BLD)\ntlib.obj : \
379 $(SRC)\ntlib.c \
380 $(SRC)\ntlib.h \
381 $(EMACS_ROOT)\nt\inc\pwd.h
382
383 $(BLD)\pop.obj : \
384 $(SRC)\pop.c \
385 $(SRC)\pop.h \
386 $(SRC)\ntlib.h
387
388 $(BLD)\profile.obj : \
389 $(SRC)\profile.c \
390 $(EMACS_ROOT)\src\s\ms-w32.h \
391 $(EMACS_ROOT)\src\m\intel386.h \
392 $(EMACS_ROOT)\lib-src\..\src\config.h \
393 $(EMACS_ROOT)\lib-src\..\src\systime.h
394
395 $(BLD)\qsort.obj : \
396 $(SRC)\qsort.c
397
398 $(BLD)\sorted-doc.obj : \
399 $(SRC)\sorted-doc.c
400
401 $(BLD)\tcp.obj : \
402 $(SRC)\tcp.c
403
404 $(BLD)\test-distrib.obj : \
405 $(SRC)\test-distrib.c
406
407 $(BLD)\timer.obj : \
408 $(SRC)\timer.c \
409 $(EMACS_ROOT)\src\s\ms-w32.h \
410 $(EMACS_ROOT)\src\m\intel386.h \
411 $(EMACS_ROOT)\lib-src\..\src\config.h
412
413 $(BLD)\yow.obj : \
414 $(SRC)\yow.c \
415 $(EMACS_ROOT)\lib-src\..\src\paths.h