]> code.delx.au - gnu-emacs/blob - lib-src/makefile.w32-in
(ALL): Add sorted-doc and digest-doc.
[gnu-emacs] / lib-src / makefile.w32-in
1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006 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., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
21 #
22
23 ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc
24
25 .PHONY: $(ALL)
26
27 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
28 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
29 -I../src
30
31 # don't know what (if) to do with these yet...
32 #
33 # $(BLD)/server.exe \
34 # $(BLD)/emacstool.exe \
35 # $(BLD)/emacsclient.exe \
36 # $(BLD)/cvtmail.exe \
37
38 LIBS = $(BASE_LIBS) $(ADVAPI32)
39
40 $(BLD)/make-docfile.exe: $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O)
41 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS)
42 $(BLD)/hexl.exe: $(BLD)/hexl.$(O)
43 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS)
44 $(BLD)/fakemail.exe: $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O)
45 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LIBS)
46 $(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O)
47 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/sorted-doc.$(O) $(LIBS)
48 $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O)
49 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/digest-doc.$(O) $(LIBS)
50 $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O)
51 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS)
52
53 make-docfile: $(BLD) $(BLD)/make-docfile.exe
54 ctags: $(BLD) $(BLD)/ctags.exe
55 etags: $(BLD) $(BLD)/etags.exe
56 ebrowse: $(BLD) $(BLD)/ebrowse.exe
57 hexl: $(BLD) $(BLD)/hexl.exe
58 movemail: $(BLD) $(BLD)/movemail.exe
59 fakemail: $(BLD) $(BLD)/fakemail.exe
60 sorted-doc: $(BLD) $(BLD)/sorted-doc.exe
61 digest-doc: $(BLD) $(BLD)/digest-doc.exe
62
63 test-distrib: $(BLD) $(BLD)/test-distrib.exe
64 "$(BLD)/test-distrib.exe" "$(SRC)/testfile"
65
66 GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O)
67 GETOPTDEPS = $(GETOPTOBJS) getopt.h
68 MOVEMAILOBJS = $(BLD)/movemail.$(O) \
69 $(BLD)/pop.$(O) \
70 $(BLD)/ntlib.$(O) \
71 $(GETOPTOBJS)
72
73 $(BLD)/movemail.exe: $(MOVEMAILOBJS) getopt.h
74 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
75 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS)
76
77 ETAGSOBJ = $(BLD)/etags.$(O) \
78 $(BLD)/getopt.$(O) \
79 $(BLD)/getopt1.$(O) \
80 $(BLD)/ntlib.$(O) \
81 $(BLD)/regex.$(O)
82
83 $(BLD)/etags.exe: $(ETAGSOBJ)
84 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
85
86
87 EBROWSEOBJ = $(BLD)/ebrowse.$(O) \
88 $(BLD)/getopt.$(O) \
89 $(BLD)/getopt1.$(O) \
90 $(BLD)/ntlib.$(O)
91
92 $(BLD)/ebrowse.exe: $(EBROWSEOBJ)
93 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
94
95 $(BLD)/regex.$(O): ../src/regex.c ../src/regex.h ../src/config.h
96 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
97 ../src/regex.c $(CC_OUT)$@
98
99 ETAGS_CFLAGS = -DHAVE_GETCWD
100 $(BLD)/etags.$(O): etags.c
101 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
102
103 CTAGSOBJ = $(BLD)/ctags.$(O) \
104 $(BLD)/getopt.$(O) \
105 $(BLD)/getopt1.$(O) \
106 $(BLD)/ntlib.$(O) \
107 $(BLD)/regex.$(O)
108
109 $(BLD)/ctags.exe: $(CTAGSOBJ)
110 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
111
112 ctags.c: etags.c
113 - $(DEL) ctags.c
114 $(CP) etags.c ctags.c
115
116 CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
117 $(BLD)/ctags.$(O): ctags.c
118 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
119
120 #
121 # don't know what to do with these yet...
122 #
123 # $(BLD)/yow.exe: $(BLD)/yow.$(O)
124 # $(BLD)/emacstool.exe: $(BLD)/emacstool.$(O)
125 # $(BLD)/server.exe: $(BLD)/server.$(O)
126 # $(BLD)/cvtmail.exe: $(BLD)/cvtmail.$(O)
127 # $(BLD)/emacsclient.exe: $(BLD)/emacsclient.$(O)
128
129 #
130 # From ..\src\Makefile.in
131 # It doesn't matter if the real name is *.obj for the files in this list,
132 # make-docfile blindly replaces .o with .c anyway. Keep .o in this list
133 # as it is required by code in doc.c.
134 #
135 obj= sunfns.o dosfns.o msdos.o \
136 xterm.o xfns.o xmenu.o xselect.o xrdb.o fringe.o image.o \
137 mac.o macterm.o macfns.o macmenu.o fontset.o \
138 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \
139 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
140 dispnew.o frame.o scroll.o xdisp.o window.o \
141 charset.o coding.o category.o ccl.o \
142 cm.o term.o xfaces.o \
143 emacs.o keyboard.o macros.o keymap.o sysdep.o \
144 buffer.o filelock.o insdel.o marker.o \
145 minibuf.o fileio.o dired.o filemode.o \
146 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
147 alloc.o data.o doc.o editfns.o callint.o \
148 eval.o floatfns.o fns.o print.o lread.o \
149 abbrev.o syntax.o bytecode.o \
150 process.o callproc.o \
151 region-cache.o sound.o atimer.o \
152 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o
153
154 #
155 # These are the lisp files that are loaded up in loadup.el
156 #
157 lispsource = ../lisp/
158
159 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc $(lispsource)tooltip.elc
160 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc
161
162 # lisp files that are loaded up on other platforms
163 MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
164 VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
165
166 lisp1= \
167 $(lispsource)abbrev.elc \
168 $(lispsource)buff-menu.elc \
169 $(lispsource)button.elc \
170 $(lispsource)emacs-lisp/byte-run.elc \
171 $(lispsource)cus-face.elc \
172 $(lispsource)cus-start.elc \
173 $(lispsource)custom.elc \
174 $(lispsource)emacs-lisp/backquote.elc \
175 $(lispsource)emacs-lisp/lisp-mode.elc \
176 $(lispsource)emacs-lisp/lisp.elc \
177 $(lispsource)facemenu.elc \
178 $(MOUSE_SUPPORT) \
179 $(lispsource)faces.elc \
180 $(lispsource)files.elc \
181 $(lispsource)emacs-lisp/float-sup.elc \
182 $(lispsource)format.elc \
183 $(lispsource)frame.elc \
184 $(lispsource)help.elc \
185 $(lispsource)indent.elc \
186 $(lispsource)isearch.elc \
187 $(lispsource)rfn-eshadow.elc \
188 $(lispsource)loadup.el \
189 $(lispsource)loaddefs.el \
190 $(lispsource)bindings.elc \
191 $(lispsource)emacs-lisp/map-ynp.elc \
192 $(lispsource)env.elc \
193 $(lispsource)international/mule.elc \
194 $(lispsource)international/mule-conf.el \
195 $(lispsource)international/mule-cmds.elc \
196 $(lispsource)international/characters.elc \
197 $(lispsource)international/ucs-tables.elc \
198 $(lispsource)international/utf-8.elc \
199 $(lispsource)international/utf-16.elc \
200 $(lispsource)international/latin-1.el \
201 $(lispsource)international/latin-2.el \
202 $(lispsource)international/latin-3.el \
203 $(lispsource)international/latin-4.el \
204 $(lispsource)international/latin-5.el \
205 $(lispsource)international/latin-8.el \
206 $(lispsource)international/latin-9.el \
207 $(lispsource)fringe.elc \
208 $(lispsource)image.elc \
209 $(lispsource)international/fontset.elc \
210 $(lispsource)dnd.elc \
211 $(lispsource)mwheel.elc \
212 $(lispsource)tool-bar.elc \
213 $(lispsource)case-table.elc
214
215 lisp2 = \
216 $(lispsource)language/chinese.elc \
217 $(lispsource)language/cyrillic.elc \
218 $(lispsource)language/indian.elc \
219 $(lispsource)language/devanagari.el \
220 $(lispsource)language/kannada.el \
221 $(lispsource)language/malayalam.el \
222 $(lispsource)language/tamil.el \
223 $(lispsource)language/english.el \
224 $(lispsource)language/ethiopic.elc \
225 $(lispsource)language/european.elc \
226 $(lispsource)language/czech.el \
227 $(lispsource)language/slovak.el \
228 $(lispsource)language/romanian.el \
229 $(lispsource)language/greek.el \
230 $(lispsource)language/hebrew.el \
231 $(lispsource)language/japanese.el \
232 $(lispsource)language/korean.el \
233 $(lispsource)language/lao.el \
234 $(lispsource)language/thai.el \
235 $(lispsource)language/tibetan.elc \
236 $(lispsource)language/vietnamese.elc \
237 $(lispsource)language/misc-lang.el \
238 $(lispsource)language/utf-8-lang.el \
239 $(lispsource)language/georgian.el \
240 $(lispsource)menu-bar.elc \
241 $(lispsource)paths.el \
242 $(lispsource)register.elc \
243 $(lispsource)replace.elc \
244 $(lispsource)simple.elc \
245 $(lispsource)startup.elc \
246 $(lispsource)subr.elc \
247 $(lispsource)term/tty-colors.elc \
248 $(lispsource)font-core.elc \
249 $(lispsource)emacs-lisp/syntax.elc \
250 $(lispsource)font-lock.elc \
251 $(lispsource)jit-lock.elc \
252 $(lispsource)textmodes/fill.elc \
253 $(lispsource)textmodes/page.elc \
254 $(lispsource)textmodes/paragraphs.elc \
255 $(lispsource)textmodes/text-mode.elc \
256 $(lispsource)emacs-lisp/timer.elc \
257 $(lispsource)vc-hooks.elc \
258 $(lispsource)jka-cmpr-hook.elc \
259 $(lispsource)ediff-hook.elc \
260 $(VMS_SUPPORT) \
261 $(MSDOS_SUPPORT) \
262 $(WINNT_SUPPORT) \
263 $(lispsource)widget.elc \
264 $(lispsource)window.elc \
265 $(lispsource)version.el
266
267
268 DOC = DOC
269 $(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
270 - $(DEL) $(DOC)
271 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
272 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
273 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
274 $(CP) $(DOC) ../etc/DOC-X
275 - mkdir "../src/$(OBJDIR)"
276 - mkdir "../src/$(OBJDIR)/etc"
277 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
278
279 {$(BLD)}.$(O){$(BLD)}.exe:
280 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
281
282 #
283 # Build the executables
284 #
285 all: $(BLD) $(ALL) $(DOC)
286
287 #
288 # Assuming INSTALL_DIR is defined, build and install emacs in it.
289 #
290 INSTALL_FILES = $(ALL)
291 install: $(INSTALL_FILES)
292 - mkdir "$(INSTALL_DIR)/bin"
293 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
294 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
295 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
296 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
297 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
298 $(CP) $(BLD)/sorted-doc.exe $(INSTALL_DIR)/bin
299 $(CP) $(BLD)/digest-doc.exe $(INSTALL_DIR)/bin
300 - mkdir "$(INSTALL_DIR)/etc"
301 $(CP) $(DOC) $(INSTALL_DIR)/etc
302
303 #
304 # Maintenance
305 #
306 clean:
307 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
308 - $(DEL) ctags.c
309 - $(DEL) getopt.h
310 - $(DEL_TREE) $(OBJDIR)
311
312 cleanall: clean
313 - $(DEL_TREE) obj
314 - $(DEL_TREE) obj-spd
315 - $(DEL_TREE) oo
316 - $(DEL_TREE) oo-spd
317
318 #
319 # Headers we would preprocess if we could.
320 #
321 ../src/config.h: ../nt/$(CONFIG_H)
322 echo config.h has changed. Re-run configure.bat.
323 exit -1
324
325 getopt.h: getopt_.h
326 $(CP) $(ALL_DEPS) $@
327
328 ### DEPENDENCIES ###
329
330 EMACS_ROOT = ..
331 SRC = .
332
333 $(BLD)/alloca.$(O) : \
334 $(SRC)/alloca.c \
335 $(EMACS_ROOT)/src/s/ms-w32.h \
336 $(EMACS_ROOT)/src/m/intel386.h \
337 $(EMACS_ROOT)/src/config.h \
338 $(EMACS_ROOT)/src/blockinput.h
339
340 $(BLD)/b2m.$(O) : \
341 $(SRC)/b2m.c \
342 $(EMACS_ROOT)/src/s/ms-w32.h \
343 $(EMACS_ROOT)/src/m/intel386.h \
344 $(EMACS_ROOT)/lib-src/../src/config.h
345
346 $(BLD)/ctags.$(O) : \
347 $(SRC)/ctags.c \
348 $(EMACS_ROOT)/nt/inc/sys/param.h \
349 $(EMACS_ROOT)/src/s/ms-w32.h \
350 $(EMACS_ROOT)/src/m/intel386.h \
351 $(EMACS_ROOT)/lib-src/../src/config.h \
352 $(SRC)/ntlib.h \
353 $(SRC)/getopt.h
354
355 $(BLD)/cvtmail.$(O) : \
356 $(SRC)/cvtmail.c
357
358 $(BLD)/digest-doc.$(O) : \
359 $(SRC)/digest-doc.c
360
361 $(BLD)/emacsclient.$(O) : \
362 $(SRC)/emacsclient.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
367 $(BLD)/emacstool.$(O) : \
368 $(SRC)/emacstool.c \
369 $(EMACS_ROOT)/nt/inc/sys/file.h
370
371 $(BLD)/etags.$(O) : \
372 $(SRC)/etags.c \
373 $(EMACS_ROOT)/nt/inc/sys/param.h \
374 $(EMACS_ROOT)/src/s/ms-w32.h \
375 $(EMACS_ROOT)/src/m/intel386.h \
376 $(EMACS_ROOT)/lib-src/../src/config.h \
377 $(SRC)/ntlib.h \
378 $(SRC)/getopt.h
379
380 $(BLD)/fakemail.$(O) : \
381 $(SRC)/fakemail.c \
382 $(SRC)/ntlib.h \
383 $(EMACS_ROOT)/src/s/ms-w32.h \
384 $(EMACS_ROOT)/src/m/intel386.h \
385 $(EMACS_ROOT)/lib-src/../src/config.h \
386 $(EMACS_ROOT)/nt/inc/pwd.h
387
388 $(BLD)/getdate.$(O) : \
389 $(SRC)/getdate.c \
390 $(EMACS_ROOT)/src/s/ms-w32.h \
391 $(EMACS_ROOT)/src/m/intel386.h \
392 $(EMACS_ROOT)/src/config.h \
393 $(MSTOOLS_SYS)/types.h
394
395 $(BLD)/getopt.$(O) : \
396 $(SRC)/getopt.c \
397 $(EMACS_ROOT)/src/s/ms-w32.h \
398 $(EMACS_ROOT)/src/m/intel386.h \
399 $(EMACS_ROOT)/src/config.h \
400 $(SRC)/ntlib.h \
401 $(SRC)/getopt.h
402
403 $(BLD)/getopt1.$(O) : \
404 $(SRC)/getopt1.c \
405 $(EMACS_ROOT)/src/s/ms-w32.h \
406 $(EMACS_ROOT)/src/m/intel386.h \
407 $(EMACS_ROOT)/src/config.h \
408 $(SRC)/getopt.h
409
410 $(BLD)/hexl.$(O) : \
411 $(SRC)/hexl.c
412
413 $(BLD)/leditcfns.$(O) : \
414 $(SRC)/leditcfns.c
415
416 $(BLD)/make-docfile.$(O) : \
417 $(SRC)/make-docfile.c \
418 $(EMACS_ROOT)/src/config.h
419
420 $(BLD)/make-path.$(O) : \
421 $(SRC)/make-path.c
422
423 $(BLD)/movemail.$(O) : \
424 $(SRC)/movemail.c \
425 $(EMACS_ROOT)/src/s/ms-w32.h \
426 $(EMACS_ROOT)/src/m/intel386.h \
427 $(EMACS_ROOT)/lib-src/../src/config.h \
428 $(EMACS_ROOT)/nt/inc/sys/file.h \
429 $(EMACS_ROOT)/lib-src/../src/syswait.h \
430 $(EMACS_ROOT)/nt/inc/pwd.h \
431 $(SRC)/ntlib.h
432 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
433
434 $(BLD)/ntlib.$(O) : \
435 $(SRC)/ntlib.c \
436 $(SRC)/ntlib.h \
437 $(EMACS_ROOT)/nt/inc/pwd.h
438
439 $(BLD)/pop.$(O) : \
440 $(SRC)/pop.c \
441 $(SRC)/pop.h \
442 $(SRC)/ntlib.h
443
444 $(BLD)/profile.$(O) : \
445 $(SRC)/profile.c \
446 $(EMACS_ROOT)/src/s/ms-w32.h \
447 $(EMACS_ROOT)/src/m/intel386.h \
448 $(EMACS_ROOT)/lib-src/../src/config.h \
449 $(EMACS_ROOT)/lib-src/../src/systime.h
450
451 $(BLD)/qsort.$(O) : \
452 $(SRC)/qsort.c
453
454 $(BLD)/sorted-doc.$(O) : \
455 $(SRC)/sorted-doc.c \
456 $(EMACS_ROOT)/src/s/ms-w32.h \
457 $(EMACS_ROOT)/src/m/intel386.h \
458 $(EMACS_ROOT)/src/config.h \
459
460 $(BLD)/tcp.$(O) : \
461 $(SRC)/tcp.c
462
463 $(BLD)/test-distrib.$(O) : \
464 $(SRC)/test-distrib.c
465
466 $(BLD)/timer.$(O) : \
467 $(SRC)/timer.c \
468 $(EMACS_ROOT)/src/s/ms-w32.h \
469 $(EMACS_ROOT)/src/m/intel386.h \
470 $(EMACS_ROOT)/lib-src/../src/config.h
471
472 $(BLD)/yow.$(O) : \
473 $(SRC)/yow.c \
474 $(EMACS_ROOT)/lib-src/../src/paths.h