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