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