Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-95
[bpt/emacs.git] / 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 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
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)/sorted-doc.exe \
34 # $(BLD)/env.exe \
35 # $(BLD)/server.exe \
36 # $(BLD)/emacstool.exe \
37 # $(BLD)/leditcfns.exe \
38 # $(BLD)/emacsclient.exe \
39 # $(BLD)/cvtmail.exe \
40 # $(BLD)/digest-doc.exe \
41 # $(BLD)/test-distrib.exe \
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.in
129 # It doesn't matter if the real name is *.obj for the files in this list,
130 # make-docfile blindly replaces .o with .c anyway. Keep .o in this list
131 # as it is required by code in doc.c.
132 #
133 obj= sunfns.o dosfns.o msdos.o \
134 xterm.o xfns.o xmenu.o xselect.o xrdb.o fringe.o image.o \
135 mac.o macterm.o macfns.o macmenu.o fontset.o \
136 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \
137 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
138 dispnew.o frame.o scroll.o xdisp.o window.o \
139 charset.o coding.o category.o ccl.o \
140 cm.o term.o xfaces.o \
141 emacs.o keyboard.o macros.o keymap.o sysdep.o \
142 buffer.o filelock.o insdel.o marker.o \
143 minibuf.o fileio.o dired.o filemode.o \
144 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
145 alloc.o data.o doc.o editfns.o callint.o \
146 eval.o floatfns.o fns.o print.o lread.o \
147 abbrev.o syntax.o bytecode.o \
148 process.o callproc.o \
149 region-cache.o sound.o atimer.o \
150 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o
151
152 #
153 # These are the lisp files that are loaded up in loadup.el
154 #
155 lispsource = ../lisp/
156
157 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
158 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc
159
160 # lisp files that are loaded up on other platforms
161 MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
162 VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
163
164 lisp1= \
165 $(lispsource)abbrev.elc \
166 $(lispsource)buff-menu.elc \
167 $(lispsource)button.elc \
168 $(lispsource)emacs-lisp/byte-run.elc \
169 $(lispsource)cus-start.elc \
170 $(lispsource)custom.elc \
171 $(lispsource)emacs-lisp/backquote.elc \
172 $(lispsource)emacs-lisp/lisp-mode.elc \
173 $(lispsource)emacs-lisp/lisp.elc \
174 $(lispsource)env.elc \
175 $(lispsource)faces.elc \
176 $(lispsource)files.elc \
177 $(lispsource)format.elc \
178 $(lispsource)facemenu.elc \
179 $(MOUSE_SUPPORT) \
180 $(lispsource)emacs-lisp/float-sup.elc \
181 $(lispsource)frame.elc \
182 $(lispsource)help.elc \
183 $(lispsource)indent.elc \
184 $(lispsource)isearch.elc \
185 $(lispsource)loadup.el \
186 $(lispsource)loaddefs.el \
187 $(lispsource)bindings.elc \
188 $(lispsource)emacs-lisp/map-ynp.elc \
189 $(lispsource)menu-bar.elc \
190 $(lispsource)international/mule.elc \
191 $(lispsource)international/mule-conf.el \
192 $(lispsource)international/mule-cmds.elc \
193 $(lispsource)international/characters.elc \
194 $(lispsource)case-table.elc
195
196 lisp2 = \
197 $(lispsource)language/chinese.elc \
198 $(lispsource)language/cyrillic.elc \
199 $(lispsource)language/indian.elc \
200 $(lispsource)language/devanagari.el \
201 $(lispsource)language/malayalam.el \
202 $(lispsource)language/tamil.el \
203 $(lispsource)language/english.el \
204 $(lispsource)language/ethiopic.elc \
205 $(lispsource)language/european.elc \
206 $(lispsource)language/czech.el \
207 $(lispsource)language/slovak.el \
208 $(lispsource)language/romanian.el \
209 $(lispsource)language/greek.el \
210 $(lispsource)language/hebrew.el \
211 $(lispsource)language/japanese.el \
212 $(lispsource)language/korean.el \
213 $(lispsource)language/lao.el \
214 $(lispsource)language/thai.el \
215 $(lispsource)language/tibetan.elc \
216 $(lispsource)language/vietnamese.elc \
217 $(lispsource)language/misc-lang.el \
218 $(lispsource)language/utf-8-lang.el \
219 $(lispsource)language/georgian.el \
220 $(lispsource)paths.el \
221 $(lispsource)register.elc \
222 $(lispsource)replace.elc \
223 $(lispsource)simple.elc \
224 $(lispsource)startup.elc \
225 $(lispsource)subr.elc \
226 $(lispsource)term/tty-colors.elc \
227 $(lispsource)font-core.elc \
228 $(lispsource)textmodes/fill.elc \
229 $(lispsource)textmodes/page.elc \
230 $(lispsource)textmodes/paragraphs.elc \
231 $(lispsource)textmodes/text-mode.elc \
232 $(lispsource)vc-hooks.elc \
233 $(lispsource)ediff-hook.elc \
234 $(VMS_SUPPORT) \
235 $(MSDOS_SUPPORT) \
236 $(WINNT_SUPPORT) \
237 $(lispsource)widget.elc \
238 $(lispsource)window.elc \
239 $(lispsource)version.el
240
241
242 DOC = DOC
243 $(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
244 - $(DEL) $(DOC)
245 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
246 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
247 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
248 $(CP) $(DOC) ../etc/DOC-X
249 - mkdir "../src/$(OBJDIR)"
250 - mkdir "../src/$(OBJDIR)/etc"
251 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
252
253 {$(BLD)}.$(O){$(BLD)}.exe:
254 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
255
256 #
257 # Build the executables
258 #
259 all: $(BLD) $(ALL) $(DOC)
260
261 #
262 # Assuming INSTALL_DIR is defined, build and install emacs in it.
263 #
264 INSTALL_FILES = $(ALL)
265 install: $(INSTALL_FILES)
266 - mkdir "$(INSTALL_DIR)/bin"
267 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
268 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
269 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
270 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
271 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
272 - mkdir "$(INSTALL_DIR)/etc"
273 $(CP) $(DOC) $(INSTALL_DIR)/etc
274
275 #
276 # Maintenance
277 #
278 clean:
279 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
280 - $(DEL) ctags.c
281 - $(DEL) getopt.h
282 - $(DEL_TREE) $(OBJDIR)
283
284 cleanall: clean
285 - $(DEL_TREE) obj
286 - $(DEL_TREE) obj-spd
287 - $(DEL_TREE) oo
288 - $(DEL_TREE) oo-spd
289
290 #
291 # Headers we would preprocess if we could.
292 #
293 ../src/config.h: ../nt/$(CONFIG_H)
294 echo config.h has changed. Re-run configure.bat.
295 exit -1
296
297 getopt.h: getopt_.h
298 $(CP) $(ALL_DEPS) $@
299
300 ### DEPENDENCIES ###
301
302 EMACS_ROOT = ..
303 SRC = .
304
305 $(BLD)/alloca.$(O) : \
306 $(SRC)/alloca.c \
307 $(EMACS_ROOT)/src/s/ms-w32.h \
308 $(EMACS_ROOT)/src/m/intel386.h \
309 $(EMACS_ROOT)/src/config.h \
310 $(EMACS_ROOT)/src/blockinput.h
311
312 $(BLD)/b2m.$(O) : \
313 $(SRC)/b2m.c \
314 $(EMACS_ROOT)/src/s/ms-w32.h \
315 $(EMACS_ROOT)/src/m/intel386.h \
316 $(EMACS_ROOT)/lib-src/../src/config.h
317
318 $(BLD)/ctags.$(O) : \
319 $(SRC)/ctags.c \
320 $(EMACS_ROOT)/nt/inc/sys/param.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 $(SRC)/ntlib.h \
325 $(SRC)/getopt.h
326
327 $(BLD)/cvtmail.$(O) : \
328 $(SRC)/cvtmail.c
329
330 $(BLD)/digest-doc.$(O) : \
331 $(SRC)/digest-doc.c
332
333 $(BLD)/emacsclient.$(O) : \
334 $(SRC)/emacsclient.c \
335 $(EMACS_ROOT)/src/s/ms-w32.h \
336 $(EMACS_ROOT)/src/m/intel386.h \
337 $(EMACS_ROOT)/lib-src/../src/config.h
338
339 $(BLD)/emacstool.$(O) : \
340 $(SRC)/emacstool.c \
341 $(EMACS_ROOT)/nt/inc/sys/file.h
342
343 $(BLD)/etags.$(O) : \
344 $(SRC)/etags.c \
345 $(EMACS_ROOT)/nt/inc/sys/param.h \
346 $(EMACS_ROOT)/src/s/ms-w32.h \
347 $(EMACS_ROOT)/src/m/intel386.h \
348 $(EMACS_ROOT)/lib-src/../src/config.h \
349 $(SRC)/ntlib.h \
350 $(SRC)/getopt.h
351
352 $(BLD)/fakemail.$(O) : \
353 $(SRC)/fakemail.c \
354 $(SRC)/ntlib.h \
355 $(EMACS_ROOT)/src/s/ms-w32.h \
356 $(EMACS_ROOT)/src/m/intel386.h \
357 $(EMACS_ROOT)/lib-src/../src/config.h \
358 $(EMACS_ROOT)/nt/inc/pwd.h
359
360 $(BLD)/getdate.$(O) : \
361 $(SRC)/getdate.c \
362 $(EMACS_ROOT)/src/s/ms-w32.h \
363 $(EMACS_ROOT)/src/m/intel386.h \
364 $(EMACS_ROOT)/src/config.h \
365 $(MSTOOLS_SYS)/types.h
366
367 $(BLD)/getopt.$(O) : \
368 $(SRC)/getopt.c \
369 $(EMACS_ROOT)/src/s/ms-w32.h \
370 $(EMACS_ROOT)/src/m/intel386.h \
371 $(EMACS_ROOT)/src/config.h \
372 $(SRC)/ntlib.h \
373 $(SRC)/getopt.h
374
375 $(BLD)/getopt1.$(O) : \
376 $(SRC)/getopt1.c \
377 $(EMACS_ROOT)/src/s/ms-w32.h \
378 $(EMACS_ROOT)/src/m/intel386.h \
379 $(EMACS_ROOT)/src/config.h \
380 $(SRC)/getopt.h
381
382 $(BLD)/hexl.$(O) : \
383 $(SRC)/hexl.c
384
385 $(BLD)/leditcfns.$(O) : \
386 $(SRC)/leditcfns.c
387
388 $(BLD)/make-docfile.$(O) : \
389 $(SRC)/make-docfile.c \
390 $(EMACS_ROOT)/src/config.h
391
392 $(BLD)/make-path.$(O) : \
393 $(SRC)/make-path.c
394
395 $(BLD)/movemail.$(O) : \
396 $(SRC)/movemail.c \
397 $(EMACS_ROOT)/src/s/ms-w32.h \
398 $(EMACS_ROOT)/src/m/intel386.h \
399 $(EMACS_ROOT)/lib-src/../src/config.h \
400 $(EMACS_ROOT)/nt/inc/sys/file.h \
401 $(EMACS_ROOT)/lib-src/../src/syswait.h \
402 $(EMACS_ROOT)/nt/inc/pwd.h \
403 $(SRC)/ntlib.h
404 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
405
406 $(BLD)/ntlib.$(O) : \
407 $(SRC)/ntlib.c \
408 $(SRC)/ntlib.h \
409 $(EMACS_ROOT)/nt/inc/pwd.h
410
411 $(BLD)/pop.$(O) : \
412 $(SRC)/pop.c \
413 $(SRC)/pop.h \
414 $(SRC)/ntlib.h
415
416 $(BLD)/profile.$(O) : \
417 $(SRC)/profile.c \
418 $(EMACS_ROOT)/src/s/ms-w32.h \
419 $(EMACS_ROOT)/src/m/intel386.h \
420 $(EMACS_ROOT)/lib-src/../src/config.h \
421 $(EMACS_ROOT)/lib-src/../src/systime.h
422
423 $(BLD)/qsort.$(O) : \
424 $(SRC)/qsort.c
425
426 $(BLD)/sorted-doc.$(O) : \
427 $(SRC)/sorted-doc.c
428
429 $(BLD)/tcp.$(O) : \
430 $(SRC)/tcp.c
431
432 $(BLD)/test-distrib.$(O) : \
433 $(SRC)/test-distrib.c
434
435 $(BLD)/timer.$(O) : \
436 $(SRC)/timer.c \
437 $(EMACS_ROOT)/src/s/ms-w32.h \
438 $(EMACS_ROOT)/src/m/intel386.h \
439 $(EMACS_ROOT)/lib-src/../src/config.h
440
441 $(BLD)/yow.$(O) : \
442 $(SRC)/yow.c \
443 $(EMACS_ROOT)/lib-src/../src/paths.h