(OBJDIR, BLD): Remove macro definitions.
[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
19 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #
21
22 #
23 # Sets up the system dependent macros.
24 #
25 !include ..\nt\makefile.def
26
27 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -I..\nt\inc -I..\src
28
29 LINK_FLAGS = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
30
31 ALL = $(BLD)\make-docfile.exe \
32 $(BLD)\hexl.exe \
33 $(BLD)\wakeup.exe \
34 $(BLD)\ctags.exe \
35 $(BLD)\etags.exe \
36 $(BLD)\movemail.exe \
37 $(BLD)\fakemail.exe \
38
39
40 # don't know what (if) to do with these yet...
41 #
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 \
51
52
53 LIBS = $(BASE_LIBS)
54
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)\wakeup.exe: $(BLD)\wakeup.obj $(BLD)\ntlib.obj
59 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\wakeup.obj $(BLD)\ntlib.obj $(LIBS)
60 $(BLD)\movemail.exe: $(BLD)\movemail.obj $(BLD)\pop.obj $(BLD)\ntlib.obj
61 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(BLD)\movemail.obj $(BLD)\pop.obj $(BLD)\ntlib.obj $(LIBS) wsock32.lib
62 $(BLD)\fakemail.exe: $(BLD)\fakemail.obj $(BLD)\ntlib.obj
63 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
64
65 make-docfile: $(BLD) $(BLD)\make-docfile.exe
66 wakeup: $(BLD) $(BLD)\wakeup.exe
67 etags: $(BLD) $(BLD)\etags.exe
68 hexl: $(BLD) $(BLD)\hexl.exe
69 movemail: $(BLD) $(BLD)\movemail.exe
70 fakemail: $(BLD) $(BLD)\fakemail.exe
71
72 ETAGSOBJ = $(BLD)\etags.obj \
73 $(BLD)\getopt.obj \
74 $(BLD)\getopt1.obj \
75 $(BLD)\ntlib.obj \
76 $(BLD)\regex.obj \
77 $(BLD)\alloca.obj
78
79
80 $(BLD)\etags.exe: $(ETAGSOBJ)
81 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
82
83
84 $(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
85 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
86 ../src/regex.c -Fo$@
87
88 ETAGS_CFLAGS = -DETAGS_REGEXPS
89 $(BLD)\etags.obj: etags.c
90 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
91
92 CTAGSOBJ = $(BLD)\ctags.obj \
93 $(BLD)\getopt.obj \
94 $(BLD)\getopt1.obj \
95 $(BLD)\ntlib.obj \
96 $(BLD)\regex.obj \
97 $(BLD)\alloca.obj
98
99 $(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
100 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
101
102 ctags.c: etags.c
103 - $(DEL) ctags.c
104 copy etags.c ctags.c
105
106 CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
107 $(BLD)\ctags.obj: ctags.c
108 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
109
110 #
111 # don't know what to do with these yet...
112 #
113 # $(BLD)\sorted-doc.exe: $(BLD)\sorted-doc.obj
114 # $(BLD)\yow.exe: $(BLD)\yow.obj
115 # $(BLD)\emacstool.exe: $(BLD)\emacstool.obj
116 # $(BLD)\leditcfns.exe: $(BLD)\leditcfns.obj
117 # $(BLD)\server.exe: $(BLD)\server.obj
118 # $(BLD)\cvtmail.exe: $(BLD)\cvtmail.obj
119 # $(BLD)\digest-doc.exe: $(BLD)\digest-doc.obj
120 # $(BLD)\emacsclient.exe: $(BLD)\emacsclient.obj
121 # $(BLD)\test-distrib.exe: $(BLD)\test-distrib.obj
122
123 #
124 # From ..\src\makefile.nt.
125 #
126 obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c cm.c cmds.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c eval.c fileio.c filelock.c filemode.c fns.c indent.c insdel.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c xfaces.c mocklisp.c nt.c ntheap.c ntinevt.c ntproc.c ntterm.c print.c process.c regex.c scroll.c search.c syntax.c sysdep.c term.c termcap.c tparam.c undo.c unexnt.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 w32term.c w32xfns.c w32fns.c w32faces.c w32select.c w32menu.c w32reg.c
127
128 lispdir = ..\lisp
129
130 #
131 # These are the lisp files that are loaded up in loadup.el
132 #
133 lisp= \
134 $(lispdir)\subr.elc \
135 $(lispdir)\byte-run.elc \
136 $(lispdir)\map-ynp.elc \
137 $(lispdir)\loaddefs.el \
138 $(lispdir)\simple.elc \
139 $(lispdir)\help.elc \
140 $(lispdir)\files.elc \
141 $(lispdir)\format.elc \
142 $(lispdir)\indent.elc \
143 $(lispdir)\window.elc \
144 $(lispdir)\frame.elc \
145 $(lispdir)\mouse.elc \
146 $(lispdir)\menu-bar.elc \
147 $(lispdir)\scroll-bar.elc \
148 $(lispdir)\select.elc \
149 $(lispdir)\paths.el \
150 $(lispdir)\startup.elc \
151 $(lispdir)\lisp.elc \
152 $(lispdir)\page.elc \
153 $(lispdir)\register.elc \
154 $(lispdir)\paragraphs.elc \
155 $(lispdir)\lisp-mode.elc \
156 $(lispdir)\text-mode.elc \
157 $(lispdir)\fill.elc \
158 $(lispdir)\c-mode.elc \
159 $(lispdir)\isearch.elc \
160 $(lispdir)\replace.elc \
161 $(lispdir)\abbrev.elc \
162 $(lispdir)\buff-menu.elc \
163 $(lispdir)\ls-lisp.elc \
164 $(lispdir)\winnt.elc \
165 $(lispdir)\float-sup.elc \
166 $(lispdir)\vc-hooks.elc \
167 $(lispdir)\version.el
168
169 DOC = DOC
170 $(DOC): $(BLD)\make-docfile.exe
171 - $(DEL) $(DOC)
172 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
173 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
174 $(CP) $(DOC) ..\etc\DOC-X
175 - mkdir ..\src\$(OBJDIR)
176 - mkdir ..\src\$(OBJDIR)\etc
177 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
178
179 {$(BLD)}.obj{$(BLD)}.exe:
180 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
181
182 .c{$(BLD)}.obj:
183 $(CC) $(CFLAGS) -Fo$@ $<
184
185 #
186 # Build the executables
187 #
188 all: $(BLD) $(ALL) $(DOC)
189
190 #
191 # Assuming INSTALL_DIR is defined, build and install emacs in it.
192 #
193 INSTALL_FILES = $(ALL)
194 install: $(INSTALL_FILES)
195 - mkdir $(INSTALL_DIR)\bin
196 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
197 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
198 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
199 $(CP) $(BLD)\wakeup.exe $(INSTALL_DIR)\bin
200 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
201 $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
202 - mkdir $(INSTALL_DIR)\etc
203 $(CP) $(DOC) $(INSTALL_DIR)\etc
204
205 #
206 # Maintenance
207 #
208 clean:; - $(DEL) *~ *.pdb DOC*
209 - $(DEL_TREE) deleted
210 - $(DEL_TREE) obj
211
212 #
213 # Headers we would preprocess if we could.
214 #
215 ..\src\config.h: ..\nt\$(CONFIG_H)
216 $(CP) $** $@
217 ..\src\paths.h: ..\nt\paths.h
218 $(CP) $** $@
219
220 ### DEPENDENCIES ###
221
222 EMACS_ROOT = ..
223 SRC = .
224
225 $(BLD)\alloca.obj : \
226 $(SRC)\alloca.c \
227 $(EMACS_ROOT)\src\s\windowsnt.h \
228 $(EMACS_ROOT)\src\m\intel386.h \
229 $(EMACS_ROOT)\src\config.h \
230 $(EMACS_ROOT)\src\blockinput.h
231
232 $(BLD)\b2m.obj : \
233 $(SRC)\b2m.c \
234 $(EMACS_ROOT)\src\s\windowsnt.h \
235 $(EMACS_ROOT)\src\m\intel386.h \
236 $(EMACS_ROOT)\lib-src\..\src\config.h
237
238 $(BLD)\cvtmail.obj : \
239 $(SRC)\cvtmail.c
240
241 $(BLD)\digest-doc.obj : \
242 $(SRC)\digest-doc.c
243
244 $(BLD)\emacsclient.obj : \
245 $(SRC)\emacsclient.c \
246 $(EMACS_ROOT)\src\s\windowsnt.h \
247 $(EMACS_ROOT)\src\m\intel386.h \
248 $(EMACS_ROOT)\lib-src\..\src\config.h
249
250 $(BLD)\emacsserver.obj : \
251 $(SRC)\emacsserver.c \
252 $(EMACS_ROOT)\src\s\windowsnt.h \
253 $(EMACS_ROOT)\src\m\intel386.h \
254 $(EMACS_ROOT)\lib-src\..\src\config.h \
255 $(EMACS_ROOT)\nt\inc\sys\file.h
256
257 $(BLD)\emacstool.obj : \
258 $(SRC)\emacstool.c \
259 $(EMACS_ROOT)\nt\inc\sys\file.h
260
261 $(BLD)\etags.obj : \
262 $(SRC)\etags.c \
263 $(EMACS_ROOT)\nt\inc\sys\param.h \
264 $(EMACS_ROOT)\src\s\windowsnt.h \
265 $(EMACS_ROOT)\src\m\intel386.h \
266 $(EMACS_ROOT)\lib-src\..\src\config.h \
267 $(SRC)\getopt.h
268
269 $(BLD)\fakemail.obj : \
270 $(SRC)\fakemail.c \
271 $(SRC)\ntlib.h \
272 $(EMACS_ROOT)\src\s\windowsnt.h \
273 $(EMACS_ROOT)\src\m\intel386.h \
274 $(EMACS_ROOT)\lib-src\..\src\config.h \
275 $(EMACS_ROOT)\nt\inc\pwd.h
276
277 $(BLD)\getdate.obj : \
278 $(SRC)\getdate.c \
279 $(EMACS_ROOT)\src\s\windowsnt.h \
280 $(EMACS_ROOT)\src\m\intel386.h \
281 $(EMACS_ROOT)\src\config.h \
282 $(MSTOOLS_SYS)\types.h
283
284 $(BLD)\getopt.obj : \
285 $(SRC)\getopt.c \
286 $(EMACS_ROOT)\src\s\windowsnt.h \
287 $(EMACS_ROOT)\src\m\intel386.h \
288 $(EMACS_ROOT)\src\config.h \
289 $(SRC)\getopt.h
290
291 $(BLD)\getopt1.obj : \
292 $(SRC)\getopt1.c \
293 $(EMACS_ROOT)\src\s\windowsnt.h \
294 $(EMACS_ROOT)\src\m\intel386.h \
295 $(EMACS_ROOT)\src\config.h \
296 $(SRC)\getopt.h
297
298 $(BLD)\hexl.obj : \
299 $(SRC)\hexl.c
300
301 $(BLD)\leditcfns.obj : \
302 $(SRC)\leditcfns.c
303
304 $(BLD)\make-docfile.obj : \
305 $(SRC)\make-docfile.c \
306 $(EMACS_ROOT)\src\config.h
307
308 $(BLD)\make-path.obj : \
309 $(SRC)\make-path.c
310
311 $(BLD)\movemail.obj : \
312 $(SRC)\movemail.c \
313 $(EMACS_ROOT)\src\s\windowsnt.h \
314 $(EMACS_ROOT)\src\m\intel386.h \
315 $(EMACS_ROOT)\lib-src\..\src\config.h \
316 $(EMACS_ROOT)\nt\inc\sys\file.h \
317 $(EMACS_ROOT)\src\vmsproc.h \
318 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
319 $(EMACS_ROOT)\nt\inc\pwd.h
320 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
321
322 $(BLD)\ntlib.obj : \
323 $(SRC)\ntlib.c \
324 $(SRC)\ntlib.h \
325 $(EMACS_ROOT)\nt\inc\pwd.h
326
327 $(BLD)\pop.obj : \
328 $(SRC)\pop.c \
329 $(SRC)\pop.h \
330 $(SRC)\ntlib.h
331
332 $(BLD)\profile.obj : \
333 $(SRC)\profile.c \
334 $(EMACS_ROOT)\src\s\windowsnt.h \
335 $(EMACS_ROOT)\src\m\intel386.h \
336 $(EMACS_ROOT)\lib-src\..\src\config.h \
337 $(EMACS_ROOT)\src\vmstime.h \
338 $(EMACS_ROOT)\lib-src\..\src\systime.h
339
340 $(BLD)\qsort.obj : \
341 $(SRC)\qsort.c
342
343 $(BLD)\sorted-doc.obj : \
344 $(SRC)\sorted-doc.c
345
346 $(BLD)\tcp.obj : \
347 $(SRC)\tcp.c
348
349 $(BLD)\test-distrib.obj : \
350 $(SRC)\test-distrib.c
351
352 $(BLD)\timer.obj : \
353 $(SRC)\timer.c \
354 $(EMACS_ROOT)\src\s\windowsnt.h \
355 $(EMACS_ROOT)\src\m\intel386.h \
356 $(EMACS_ROOT)\lib-src\..\src\config.h
357
358 $(BLD)\wakeup.obj : \
359 $(SRC)\wakeup.c \
360 $(EMACS_ROOT)\src\s\windowsnt.h \
361 $(EMACS_ROOT)\src\m\intel386.h \
362 $(EMACS_ROOT)\src\config.h
363
364 $(BLD)\yow.obj : \
365 $(SRC)\yow.c \
366 $(EMACS_ROOT)\lib-src\..\src\paths.h