]> code.delx.au - gnu-emacs/blob - lib-src/makefile.w32-in
Fix copyright notice.
[gnu-emacs] / lib-src / makefile.w32-in
1 # Makefile for GNU Emacs on the Microsoft W32 API.
2 # Copyright (c) 2000-2001 Free Software Foundation, Inc.
3 #
4 # This file is part of GNU Emacs.
5 #
6 # GNU Emacs is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10 #
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs; see the file COPYING. If not, write to the
18 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
20 #
21
22 ALL = make-docfile hexl ctags etags movemail fakemail ebrowse
23
24 .PHONY: $(ALL)
25
26 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
27 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
28 -I../src
29
30 # don't know what (if) to do with these yet...
31 #
32 # $(BLD)/sorted-doc.exe \
33 # $(BLD)/env.exe \
34 # $(BLD)/server.exe \
35 # $(BLD)/emacstool.exe \
36 # $(BLD)/leditcfns.exe \
37 # $(BLD)/emacsclient.exe \
38 # $(BLD)/cvtmail.exe \
39 # $(BLD)/digest-doc.exe \
40 # $(BLD)/test-distrib.exe \
41
42
43 LIBS = $(BASE_LIBS) $(ADVAPI32)
44
45 $(BLD)/make-docfile.exe: $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O)
46 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS)
47 $(BLD)/hexl.exe: $(BLD)/hexl.$(O)
48 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS)
49 $(BLD)/fakemail.exe: $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O)
50 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LIBS)
51
52 make-docfile: $(BLD) $(BLD)/make-docfile.exe
53 ctags: $(BLD) $(BLD)/ctags.exe
54 etags: $(BLD) $(BLD)/etags.exe
55 ebrowse: $(BLD) $(BLD)/ebrowse.exe
56 hexl: $(BLD) $(BLD)/hexl.exe
57 movemail: $(BLD) $(BLD)/movemail.exe
58 fakemail: $(BLD) $(BLD)/fakemail.exe
59
60 GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O)
61 GETOPTDEPS = $(GETOPTOBJS) getopt.h
62 MOVEMAILOBJS = $(BLD)/movemail.$(O) \
63 $(BLD)/pop.$(O) \
64 $(BLD)/ntlib.$(O) \
65 $(GETOPTOBJS)
66
67 $(BLD)/movemail.exe: $(MOVEMAILOBJS) getopt.h
68 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
69 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS)
70
71 ETAGSOBJ = $(BLD)/etags.$(O) \
72 $(BLD)/getopt.$(O) \
73 $(BLD)/getopt1.$(O) \
74 $(BLD)/ntlib.$(O) \
75 $(BLD)/regex.$(O)
76
77 $(BLD)/etags.exe: $(ETAGSOBJ)
78 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
79
80
81 EBROWSEOBJ = $(BLD)/ebrowse.$(O) \
82 $(BLD)/getopt.$(O) \
83 $(BLD)/getopt1.$(O) \
84 $(BLD)/ntlib.$(O)
85
86 $(BLD)/ebrowse.exe: $(EBROWSEOBJ)
87 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
88
89 $(BLD)/regex.$(O): ../src/regex.c ../src/regex.h ../src/config.h
90 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
91 ../src/regex.c $(CC_OUT)$@
92
93 ETAGS_CFLAGS = -DHAVE_GETCWD
94 $(BLD)/etags.$(O): etags.c
95 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
96
97 CTAGSOBJ = $(BLD)/ctags.$(O) \
98 $(BLD)/getopt.$(O) \
99 $(BLD)/getopt1.$(O) \
100 $(BLD)/ntlib.$(O) \
101 $(BLD)/regex.$(O)
102
103 $(BLD)/ctags.exe: $(CTAGSOBJ)
104 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
105
106 ctags.c: etags.c
107 - $(DEL) ctags.c
108 $(CP) etags.c ctags.c
109
110 CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
111 $(BLD)/ctags.$(O): ctags.c
112 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
113
114 #
115 # don't know what to do with these yet...
116 #
117 # $(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O)
118 # $(BLD)/yow.exe: $(BLD)/yow.$(O)
119 # $(BLD)/emacstool.exe: $(BLD)/emacstool.$(O)
120 # $(BLD)/leditcfns.exe: $(BLD)/leditcfns.$(O)
121 # $(BLD)/server.exe: $(BLD)/server.$(O)
122 # $(BLD)/cvtmail.exe: $(BLD)/cvtmail.$(O)
123 # $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O)
124 # $(BLD)/emacsclient.exe: $(BLD)/emacsclient.$(O)
125 # $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O)
126
127 #
128 # From ..\src\makefile.nt.
129 #
130 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 xfaces.c w32fns.c w32heap.c w32inevt.c w32proc.c w32reg.c w32menu.c w32select.c w32term.c w32xfns.c
131
132 #
133 # These are the lisp files that are loaded up in loadup.el
134 #
135 lispsource = ../lisp/
136
137 FACE_SUPPORT = $(lispsource)facemenu.elc
138 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc
139 FLOAT_SUPPORT = $(lispsource)float-sup.elc
140 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
141
142 lisp= \
143 $(lispsource)abbrev.elc \
144 $(lispsource)buff-menu.elc \
145 $(lispsource)byte-run.elc \
146 $(lispsource)cus-start.el \
147 $(lispsource)custom.elc \
148 $(lispsource)faces.elc \
149 $(lispsource)files.elc \
150 $(lispsource)textmodes/fill.elc \
151 $(lispsource)format.elc \
152 $(FACE_SUPPORT) \
153 $(MOUSE_SUPPORT) \
154 $(FLOAT_SUPPORT) \
155 $(lispsource)frame.elc\
156 $(X_WINDOWS_SUPPORT) \
157 $(lispsource)help.elc \
158 $(lispsource)indent.elc \
159 $(lispsource)isearch.elc \
160 $(lispsource)emacs-lisp/lisp-mode.elc \
161 $(lispsource)emacs-lisp/lisp.elc \
162 $(lispsource)loadup.el \
163 $(lispsource)loaddefs.el \
164 $(lispsource)map-ynp.elc \
165 $(lispsource)menu-bar.elc \
166 $(lispsource)international/mule.elc \
167 $(lispsource)international/mule-conf.el \
168 $(lispsource)international/mule-cmds.elc \
169 $(lispsource)international/characters.elc \
170 $(lispsource)language/chinese.elc \
171 $(lispsource)language/cyrillic.elc \
172 $(lispsource)language/devanagari.elc \
173 $(lispsource)language/english.elc \
174 $(lispsource)language/ethiopic.elc \
175 $(lispsource)language/european.elc \
176 $(lispsource)language/greek.elc \
177 $(lispsource)language/hebrew.elc \
178 $(lispsource)language/indian.elc \
179 $(lispsource)language/japanese.elc \
180 $(lispsource)language/korean.elc \
181 $(lispsource)language/lao.elc \
182 $(lispsource)language/thai.elc \
183 $(lispsource)language/tibetan.elc \
184 $(lispsource)language/vietnamese.elc \
185 $(lispsource)language/misc-lang.elc \
186 $(lispsource)textmodes/page.elc \
187 $(lispsource)textmodes/paragraphs.elc \
188 $(lispsource)paths.el \
189 $(lispsource)register.elc \
190 $(lispsource)replace.elc \
191 $(lispsource)simple.elc \
192 $(lispsource)startup.elc \
193 $(lispsource)subr.elc \
194 $(lispsource)textmodes/text-mode.elc \
195 $(lispsource)vc-hooks.elc \
196 $(lispsource)ediff-hook.elc \
197 $(VMS_SUPPORT) \
198 $(MSDOS_SUPPORT) \
199 $(WINNT_SUPPORT) \
200 $(lispsource)window.elc \
201 $(lispsource)version.el
202
203
204 DOC = DOC
205 $(DOC): $(BLD)/make-docfile.exe
206 - $(DEL) $(DOC)
207 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(obj) > $(DOC)
208 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(lisp) >> $(DOC)
209 $(CP) $(DOC) ../etc/DOC-X
210 - mkdir "../src/$(OBJDIR)"
211 - mkdir "../src/$(OBJDIR)/etc"
212 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
213
214 {$(BLD)}.$(O){$(BLD)}.exe:
215 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
216
217 #
218 # Build the executables
219 #
220 all: $(BLD) $(ALL) $(DOC)
221
222 #
223 # Assuming INSTALL_DIR is defined, build and install emacs in it.
224 #
225 INSTALL_FILES = $(ALL)
226 install: $(INSTALL_FILES)
227 - mkdir "$(INSTALL_DIR)/bin"
228 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
229 $(CP) $(BLD)/ebrowse.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:
241 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
242 - $(DEL) ctags.c
243 - $(DEL_TREE) $(OBJDIR)
244
245 cleanall: clean
246 - $(DEL_TREE) obj
247 - $(DEL_TREE) obj-spd
248 - $(DEL_TREE) oo
249 - $(DEL_TREE) oo-spd
250
251 #
252 # Headers we would preprocess if we could.
253 #
254 ../src/config.h: ../nt/$(CONFIG_H)
255 $(CP) $(ALL_DEPS) $@
256 ../src/paths.h: ../nt/paths.h
257 $(CP) $(ALL_DEPS) $@
258
259 ### DEPENDENCIES ###
260
261 EMACS_ROOT = ..
262 SRC = .
263
264 $(BLD)/alloca.$(O) : \
265 $(SRC)/alloca.c \
266 $(EMACS_ROOT)/src/s/ms-w32.h \
267 $(EMACS_ROOT)/src/m/intel386.h \
268 $(EMACS_ROOT)/src/config.h \
269 $(EMACS_ROOT)/src/blockinput.h
270
271 $(BLD)/b2m.$(O) : \
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.$(O) : \
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.$(O) : \
287 $(SRC)/cvtmail.c
288
289 $(BLD)/digest-doc.$(O) : \
290 $(SRC)/digest-doc.c
291
292 $(BLD)/emacsclient.$(O) : \
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.$(O) : \
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.$(O) : \
306 $(SRC)/emacstool.c \
307 $(EMACS_ROOT)/nt/inc/sys/file.h
308
309 $(BLD)/etags.$(O) : \
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.$(O) : \
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.$(O) : \
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.$(O) : \
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.$(O) : \
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.$(O) : \
349 $(SRC)/hexl.c
350
351 $(BLD)/leditcfns.$(O) : \
352 $(SRC)/leditcfns.c
353
354 $(BLD)/make-docfile.$(O) : \
355 $(SRC)/make-docfile.c \
356 $(EMACS_ROOT)/src/config.h
357
358 $(BLD)/make-path.$(O) : \
359 $(SRC)/make-path.c
360
361 $(BLD)/movemail.$(O) : \
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)/lib-src/../src/syswait.h \
368 $(EMACS_ROOT)/nt/inc/pwd.h \
369 $(SRC)/ntlib.h
370 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
371
372 $(BLD)/ntlib.$(O) : \
373 $(SRC)/ntlib.c \
374 $(SRC)/ntlib.h \
375 $(EMACS_ROOT)/nt/inc/pwd.h
376
377 $(BLD)/pop.$(O) : \
378 $(SRC)/pop.c \
379 $(SRC)/pop.h \
380 $(SRC)/ntlib.h
381
382 $(BLD)/profile.$(O) : \
383 $(SRC)/profile.c \
384 $(EMACS_ROOT)/src/s/ms-w32.h \
385 $(EMACS_ROOT)/src/m/intel386.h \
386 $(EMACS_ROOT)/lib-src/../src/config.h \
387 $(EMACS_ROOT)/lib-src/../src/systime.h
388
389 $(BLD)/qsort.$(O) : \
390 $(SRC)/qsort.c
391
392 $(BLD)/sorted-doc.$(O) : \
393 $(SRC)/sorted-doc.c
394
395 $(BLD)/tcp.$(O) : \
396 $(SRC)/tcp.c
397
398 $(BLD)/test-distrib.$(O) : \
399 $(SRC)/test-distrib.c
400
401 $(BLD)/timer.$(O) : \
402 $(SRC)/timer.c \
403 $(EMACS_ROOT)/src/s/ms-w32.h \
404 $(EMACS_ROOT)/src/m/intel386.h \
405 $(EMACS_ROOT)/lib-src/../src/config.h
406
407 $(BLD)/yow.$(O) : \
408 $(SRC)/yow.c \
409 $(EMACS_ROOT)/lib-src/../src/paths.h