(C_DEBUG_SWITCH) [not __GNUC__]: New definition.
[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..\src
28 OBJDIR = obj
29 BLD = $(OBJDIR)\$(ARCH)
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)\wakeup.exe \
36 $(BLD)\ctags.exe \
37 $(BLD)\etags.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)\fakemail.exe \
47 # $(BLD)\leditcfns.exe \
48 # $(BLD)\movemail.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
58 $(BLD)\hexl.exe: $(BLD)\hexl.obj
59 $(BLD)\wakeup.exe: $(BLD)\wakeup.obj $(BLD)\ntlib.obj
60 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\wakeup.obj \
61 $(BLD)\ntlib.obj $(LIBS)
62
63 make-docfile: $(BLD) $(BLD)\make-docfile.exe
64 wakeup: $(BLD) $(BLD)\wakeup.exe
65 etags: $(BLD) $(BLD)\etags.exe
66 hexl: $(BLD) $(BLD)\hexl.exe
67
68 ETAGSOBJ = $(BLD)\etags.obj \
69 $(BLD)\getopt.obj \
70 $(BLD)\getopt1.obj \
71 $(BLD)\ntlib.obj \
72 $(BLD)\regex.obj \
73 $(BLD)\alloca.obj
74
75 $(BLD)\etags.exe: $(ETAGSOBJ)
76 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
77
78
79 $(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
80 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
81 ../src/regex.c -Fo$@
82
83 $(BLD)\etags.obj: etags.c
84 $(CC) $(CFLAGS) -DETAGS_REGEXPS -Fo$@ etags.c
85
86 CTAGSOBJ = $(BLD)\ctags.obj \
87 $(BLD)\getopt.obj \
88 $(BLD)\getopt1.obj \
89 $(BLD)\ntlib.obj
90
91 $(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
92 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
93
94 ctags.c: etags.c
95 - del ctags.c
96 copy etags.c ctags.c
97
98 $(BLD)\ctags.obj: ctags.c
99 $(CC) $(CFLAGS) -DCTAGS -Fo$@ ctags.c
100
101 #
102 # don't know what to do with these yet...
103 #
104 # $(BLD)\sorted-doc.exe: $(LIBS) $(BLD)\sorted-doc.obj
105 # $(BLD)\yow.exe: $(LIBS) $(BLD)\yow.obj
106 # $(BLD)\emacstool.exe: $(LIBS) $(BLD)\emacstool.obj
107 # $(BLD)\env.exe: $(LIBS) $(BLD)\env.obj
108 # $(BLD)\fakemail.exe: $(LIBS) $(BLD)\fakemail.obj
109 # $(BLD)\leditcfns.exe: $(LIBS) $(BLD)\leditcfns.obj
110 # $(BLD)\server.exe: $(LIBS) $(BLD)\server.obj
111 # $(BLD)\wakeup.exe: $(LIBS) $(BLD)\wakeup.obj
112 # $(BLD)\movemail.exe: $(LIBS) $(BLD)\movemail.obj
113 # $(BLD)\cvtmail.exe: $(LIBS) $(BLD)\cvtmail.obj
114 # $(BLD)\digest-doc.exe: $(LIBS) $(BLD)\digest-doc.obj
115 # $(BLD)\emacsclient.exe: $(LIBS) $(BLD)\emacsclient.obj
116 # $(BLD)\qsort.exe: $(LIBS) $(BLD)\qsort.obj
117 # $(BLD)\test-distrib.exe: $(LIBS) $(BLD)\test-distrib.obj
118
119 #
120 # From ..\src\makefile.nt.
121 #
122 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
123
124 lispdir = ..\lisp
125
126 #
127 # These are the lisp files that are loaded up in loadup.el
128 #
129 lisp= \
130 $(lispdir)\subr.elc \
131 $(lispdir)\byte-run.elc \
132 $(lispdir)\map-ynp.elc \
133 $(lispdir)\loaddefs.el \
134 $(lispdir)\simple.elc \
135 $(lispdir)\help.elc \
136 $(lispdir)\files.elc \
137 $(lispdir)\format.elc \
138 $(lispdir)\indent.elc \
139 $(lispdir)\window.elc \
140 $(lispdir)\frame.elc \
141 $(lispdir)\mouse.elc \
142 $(lispdir)\menu-bar.elc \
143 $(lispdir)\scroll-bar.elc \
144 $(lispdir)\select.elc \
145 $(lispdir)\paths.el \
146 $(lispdir)\startup.elc \
147 $(lispdir)\lisp.elc \
148 $(lispdir)\page.elc \
149 $(lispdir)\register.elc \
150 $(lispdir)\paragraphs.elc \
151 $(lispdir)\lisp-mode.elc \
152 $(lispdir)\text-mode.elc \
153 $(lispdir)\fill.elc \
154 $(lispdir)\c-mode.elc \
155 $(lispdir)\isearch.elc \
156 $(lispdir)\replace.elc \
157 $(lispdir)\abbrev.elc \
158 $(lispdir)\buff-menu.elc \
159 $(lispdir)\ls-lisp.elc \
160 $(lispdir)\winnt.elc \
161 $(lispdir)\float-sup.elc \
162 $(lispdir)\vc-hooks.elc \
163 $(lispdir)\version.el
164
165 DOC = DOC
166 $(DOC): $(BLD)\make-docfile.exe
167 - del $(DOC)
168 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
169 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
170 $(CP) $(DOC) ..\etc\DOC-X
171 - mkdir ..\src\$(OBJDIR)
172 - mkdir ..\src\$(OBJDIR)\etc
173 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
174
175 {$(BLD)}.obj{$(BLD)}.exe:
176 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
177
178 .c{$(BLD)}.obj:
179 $(CC) $(CFLAGS) -Fo$@ $<
180
181 #
182 # Build the executables
183 #
184 all: $(BLD) $(ALL) $(DOC)
185
186 #
187 # Assuming INSTALL_DIR is defined, build and install emacs in it.
188 #
189 INSTALL_FILES = $(ALL)
190 install: $(INSTALL_FILES)
191 - mkdir $(INSTALL_DIR)\bin
192 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
193 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
194 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
195 $(CP) $(BLD)\wakeup.exe $(INSTALL_DIR)\bin
196 - mkdir $(INSTALL_DIR)\etc
197 $(CP) $(DOC) $(INSTALL_DIR)\etc
198
199 #
200 # Maintenance
201 #
202 clean:; - del *~ *.pdb
203 - $(DEL_TREE) deleted
204 - $(DEL_TREE) obj
205 - del DOC*
206
207 #
208 # Headers we would preprocess if we could.
209 #
210 ..\src\config.h: ..\nt\$(CONFIG_H)
211 $(CP) $** $@
212 ..\src\paths.h: ..\nt\paths.h
213 $(CP) $** $@
214
215 ### DEPENDENCIES ###
216
217 EMACS_ROOT = ..
218 SRC = .
219
220 $(BLD)\alloca.obj : \
221 $(SRC)\alloca.c \
222 $(EMACS_ROOT)\src\s\windowsnt.h \
223 $(EMACS_ROOT)\src\m\intel386.h \
224 $(EMACS_ROOT)\src\config.h \
225 $(EMACS_ROOT)\src\blockinput.h
226
227 $(BLD)\b2m.obj : \
228 $(SRC)\b2m.c \
229 $(EMACS_ROOT)\src\s\windowsnt.h \
230 $(EMACS_ROOT)\src\m\intel386.h \
231 $(EMACS_ROOT)\lib-src\..\src\config.h
232
233 $(BLD)\cvtmail.obj : \
234 $(SRC)\cvtmail.c
235
236 $(BLD)\digest-doc.obj : \
237 $(SRC)\digest-doc.c
238
239 $(BLD)\emacsclient.obj : \
240 $(SRC)\emacsclient.c \
241 $(EMACS_ROOT)\src\s\windowsnt.h \
242 $(EMACS_ROOT)\src\m\intel386.h \
243 $(EMACS_ROOT)\lib-src\..\src\config.h
244
245 $(BLD)\emacsserver.obj : \
246 $(SRC)\emacsserver.c \
247 $(EMACS_ROOT)\src\s\windowsnt.h \
248 $(EMACS_ROOT)\src\m\intel386.h \
249 $(EMACS_ROOT)\lib-src\..\src\config.h \
250 $(EMACS_ROOT)\nt\inc\sys\file.h
251
252 $(BLD)\emacstool.obj : \
253 $(SRC)\emacstool.c \
254 $(EMACS_ROOT)\nt\inc\sys\file.h
255
256 $(BLD)\etags.obj : \
257 $(SRC)\etags.c \
258 $(EMACS_ROOT)\nt\inc\sys\param.h \
259 $(EMACS_ROOT)\src\s\windowsnt.h \
260 $(EMACS_ROOT)\src\m\intel386.h \
261 $(EMACS_ROOT)\lib-src\..\src\config.h \
262 $(SRC)\getopt.h
263
264 $(BLD)\fakemail.obj : \
265 $(SRC)\fakemail.c \
266 $(EMACS_ROOT)\src\s\windowsnt.h \
267 $(EMACS_ROOT)\src\m\intel386.h \
268 $(EMACS_ROOT)\lib-src\..\src\config.h \
269 $(EMACS_ROOT)\nt\inc\pwd.h
270
271 $(BLD)\getdate.obj : \
272 $(SRC)\getdate.c \
273 $(EMACS_ROOT)\src\s\windowsnt.h \
274 $(EMACS_ROOT)\src\m\intel386.h \
275 $(EMACS_ROOT)\src\config.h \
276 $(MSTOOLS_SYS)\types.h
277
278 $(BLD)\getopt.obj : \
279 $(SRC)\getopt.c \
280 $(EMACS_ROOT)\src\s\windowsnt.h \
281 $(EMACS_ROOT)\src\m\intel386.h \
282 $(EMACS_ROOT)\src\config.h \
283 $(SRC)\getopt.h
284
285 $(BLD)\getopt1.obj : \
286 $(SRC)\getopt1.c \
287 $(EMACS_ROOT)\src\s\windowsnt.h \
288 $(EMACS_ROOT)\src\m\intel386.h \
289 $(EMACS_ROOT)\src\config.h \
290 $(SRC)\getopt.h
291
292 $(BLD)\hexl.obj : \
293 $(SRC)\hexl.c
294
295 $(BLD)\leditcfns.obj : \
296 $(SRC)\leditcfns.c
297
298 $(BLD)\make-docfile.obj : \
299 $(SRC)\make-docfile.c \
300 $(EMACS_ROOT)\src\config.h
301
302 $(BLD)\make-path.obj : \
303 $(SRC)\make-path.c
304
305 $(BLD)\movemail.obj : \
306 $(SRC)\movemail.c \
307 $(EMACS_ROOT)\src\s\windowsnt.h \
308 $(EMACS_ROOT)\src\m\intel386.h \
309 $(EMACS_ROOT)\lib-src\..\src\config.h \
310 $(EMACS_ROOT)\nt\inc\sys\file.h \
311 $(EMACS_ROOT)\src\vmsproc.h \
312 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
313 $(EMACS_ROOT)\nt\inc\pwd.h
314
315 $(BLD)\profile.obj : \
316 $(SRC)\profile.c \
317 $(EMACS_ROOT)\src\s\windowsnt.h \
318 $(EMACS_ROOT)\src\m\intel386.h \
319 $(EMACS_ROOT)\lib-src\..\src\config.h \
320 $(EMACS_ROOT)\src\vmstime.h \
321 $(EMACS_ROOT)\lib-src\..\src\systime.h
322
323 $(BLD)\qsort.obj : \
324 $(SRC)\qsort.c
325
326 $(BLD)\sorted-doc.obj : \
327 $(SRC)\sorted-doc.c
328
329 $(BLD)\tcp.obj : \
330 $(SRC)\tcp.c
331
332 $(BLD)\test-distrib.obj : \
333 $(SRC)\test-distrib.c
334
335 $(BLD)\timer.obj : \
336 $(SRC)\timer.c \
337 $(EMACS_ROOT)\src\s\windowsnt.h \
338 $(EMACS_ROOT)\src\m\intel386.h \
339 $(EMACS_ROOT)\lib-src\..\src\config.h
340
341 $(BLD)\wakeup.obj : \
342 $(SRC)\wakeup.c \
343 $(EMACS_ROOT)\src\s\windowsnt.h \
344 $(EMACS_ROOT)\src\m\intel386.h \
345 $(EMACS_ROOT)\src\config.h
346
347 $(BLD)\yow.obj : \
348 $(SRC)\yow.c \
349 $(EMACS_ROOT)\lib-src\..\src\paths.h