]> code.delx.au - gnu-emacs/blob - lib-src/makefile.w32-in
(lisp): Synchronize with src/Makefile.in.
[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 $(lispsource)mouse.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)disp-table.elc \
149 $(lispsource)faces.elc \
150 $(lispsource)files.elc \
151 $(lispsource)textmodes/fill.elc \
152 $(lispsource)format.elc \
153 $(FACE_SUPPORT) \
154 $(MOUSE_SUPPORT) \
155 $(FLOAT_SUPPORT) \
156 $(lispsource)frame.elc\
157 $(X_WINDOWS_SUPPORT) \
158 $(lispsource)help.elc \
159 $(lispsource)indent.elc \
160 $(lispsource)isearch.elc \
161 $(lispsource)emacs-lisp/lisp-mode.elc \
162 $(lispsource)emacs-lisp/lisp.elc \
163 $(lispsource)loadup.el \
164 $(lispsource)loaddefs.el \
165 $(lispsource)bindings.el \
166 $(lispsource)map-ynp.elc \
167 $(lispsource)menu-bar.elc \
168 $(lispsource)international/mule.elc \
169 $(lispsource)international/mule-conf.el \
170 $(lispsource)international/mule-cmds.elc \
171 $(lispsource)international/characters.elc \
172 $(lispsource)international/ccl.elc \
173 $(lispsource)international/codepage.elc \
174 $(lispsource)international/utf-8.elc \
175 $(lispsource)case-table.elc \
176 $(lispsource)language/chinese.elc \
177 $(lispsource)language/cyrillic.elc \
178 $(lispsource)language/devanagari.elc \
179 $(lispsource)language/english.elc \
180 $(lispsource)language/ethiopic.elc \
181 $(lispsource)language/european.elc \
182 $(lispsource)language/czech.elc \
183 $(lispsource)language/slovak.elc \
184 $(lispsource)language/romanian.elc \
185 $(lispsource)language/greek.elc \
186 $(lispsource)language/hebrew.elc \
187 $(lispsource)language/indian.elc \
188 $(lispsource)language/japanese.elc \
189 $(lispsource)language/korean.elc \
190 $(lispsource)language/lao.elc \
191 $(lispsource)language/thai.elc \
192 $(lispsource)language/tibetan.elc \
193 $(lispsource)language/vietnamese.elc \
194 $(lispsource)language/misc-lang.elc \
195 $(lispsource)textmodes/page.elc \
196 $(lispsource)textmodes/paragraphs.elc \
197 $(lispsource)paths.el \
198 $(lispsource)register.elc \
199 $(lispsource)replace.elc \
200 $(lispsource)simple.elc \
201 $(lispsource)startup.elc \
202 $(lispsource)subr.elc \
203 $(lispsource)term/tty-colors.elc \
204 $(lispsource)textmodes/text-mode.elc \
205 $(lispsource)vc-hooks.elc \
206 $(lispsource)ediff-hook.elc \
207 $(VMS_SUPPORT) \
208 $(MSDOS_SUPPORT) \
209 $(WINNT_SUPPORT) \
210 $(lispsource)widget.elc \
211 $(lispsource)window.elc \
212 $(lispsource)version.el
213
214
215 DOC = DOC
216 $(DOC): $(BLD)/make-docfile.exe
217 - $(DEL) $(DOC)
218 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(obj) > $(DOC)
219 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(lisp) >> $(DOC)
220 $(CP) $(DOC) ../etc/DOC-X
221 - mkdir "../src/$(OBJDIR)"
222 - mkdir "../src/$(OBJDIR)/etc"
223 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
224
225 {$(BLD)}.$(O){$(BLD)}.exe:
226 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
227
228 #
229 # Build the executables
230 #
231 all: $(BLD) $(ALL) $(DOC)
232
233 #
234 # Assuming INSTALL_DIR is defined, build and install emacs in it.
235 #
236 INSTALL_FILES = $(ALL)
237 install: $(INSTALL_FILES)
238 - mkdir "$(INSTALL_DIR)/bin"
239 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
240 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
241 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
242 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
243 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
244 $(CP) $(BLD)/fakemail.exe $(INSTALL_DIR)/bin
245 - mkdir "$(INSTALL_DIR)/etc"
246 $(CP) $(DOC) $(INSTALL_DIR)/etc
247
248 #
249 # Maintenance
250 #
251 clean:
252 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
253 - $(DEL) ctags.c
254 - $(DEL_TREE) $(OBJDIR)
255
256 cleanall: clean
257 - $(DEL_TREE) obj
258 - $(DEL_TREE) obj-spd
259 - $(DEL_TREE) oo
260 - $(DEL_TREE) oo-spd
261
262 #
263 # Headers we would preprocess if we could.
264 #
265 ../src/config.h: ../nt/$(CONFIG_H)
266 $(CP) $(ALL_DEPS) $@
267 ../src/paths.h: ../nt/paths.h
268 $(CP) $(ALL_DEPS) $@
269
270 ### DEPENDENCIES ###
271
272 EMACS_ROOT = ..
273 SRC = .
274
275 $(BLD)/alloca.$(O) : \
276 $(SRC)/alloca.c \
277 $(EMACS_ROOT)/src/s/ms-w32.h \
278 $(EMACS_ROOT)/src/m/intel386.h \
279 $(EMACS_ROOT)/src/config.h \
280 $(EMACS_ROOT)/src/blockinput.h
281
282 $(BLD)/b2m.$(O) : \
283 $(SRC)/b2m.c \
284 $(EMACS_ROOT)/src/s/ms-w32.h \
285 $(EMACS_ROOT)/src/m/intel386.h \
286 $(EMACS_ROOT)/lib-src/../src/config.h
287
288 $(BLD)/ctags.$(O) : \
289 $(SRC)/ctags.c \
290 $(EMACS_ROOT)/nt/inc/sys/param.h \
291 $(EMACS_ROOT)/src/s/ms-w32.h \
292 $(EMACS_ROOT)/src/m/intel386.h \
293 $(EMACS_ROOT)/lib-src/../src/config.h \
294 $(SRC)/ntlib.h \
295 $(SRC)/getopt.h
296
297 $(BLD)/cvtmail.$(O) : \
298 $(SRC)/cvtmail.c
299
300 $(BLD)/digest-doc.$(O) : \
301 $(SRC)/digest-doc.c
302
303 $(BLD)/emacsclient.$(O) : \
304 $(SRC)/emacsclient.c \
305 $(EMACS_ROOT)/src/s/ms-w32.h \
306 $(EMACS_ROOT)/src/m/intel386.h \
307 $(EMACS_ROOT)/lib-src/../src/config.h
308
309 $(BLD)/emacsserver.$(O) : \
310 $(SRC)/emacsserver.c \
311 $(EMACS_ROOT)/src/s/ms-w32.h \
312 $(EMACS_ROOT)/src/m/intel386.h \
313 $(EMACS_ROOT)/lib-src/../src/config.h \
314 $(EMACS_ROOT)/nt/inc/sys/file.h
315
316 $(BLD)/emacstool.$(O) : \
317 $(SRC)/emacstool.c \
318 $(EMACS_ROOT)/nt/inc/sys/file.h
319
320 $(BLD)/etags.$(O) : \
321 $(SRC)/etags.c \
322 $(EMACS_ROOT)/nt/inc/sys/param.h \
323 $(EMACS_ROOT)/src/s/ms-w32.h \
324 $(EMACS_ROOT)/src/m/intel386.h \
325 $(EMACS_ROOT)/lib-src/../src/config.h \
326 $(SRC)/ntlib.h \
327 $(SRC)/getopt.h
328
329 $(BLD)/fakemail.$(O) : \
330 $(SRC)/fakemail.c \
331 $(SRC)/ntlib.h \
332 $(EMACS_ROOT)/src/s/ms-w32.h \
333 $(EMACS_ROOT)/src/m/intel386.h \
334 $(EMACS_ROOT)/lib-src/../src/config.h \
335 $(EMACS_ROOT)/nt/inc/pwd.h
336
337 $(BLD)/getdate.$(O) : \
338 $(SRC)/getdate.c \
339 $(EMACS_ROOT)/src/s/ms-w32.h \
340 $(EMACS_ROOT)/src/m/intel386.h \
341 $(EMACS_ROOT)/src/config.h \
342 $(MSTOOLS_SYS)/types.h
343
344 $(BLD)/getopt.$(O) : \
345 $(SRC)/getopt.c \
346 $(EMACS_ROOT)/src/s/ms-w32.h \
347 $(EMACS_ROOT)/src/m/intel386.h \
348 $(EMACS_ROOT)/src/config.h \
349 $(SRC)/ntlib.h \
350 $(SRC)/getopt.h
351
352 $(BLD)/getopt1.$(O) : \
353 $(SRC)/getopt1.c \
354 $(EMACS_ROOT)/src/s/ms-w32.h \
355 $(EMACS_ROOT)/src/m/intel386.h \
356 $(EMACS_ROOT)/src/config.h \
357 $(SRC)/getopt.h
358
359 $(BLD)/hexl.$(O) : \
360 $(SRC)/hexl.c
361
362 $(BLD)/leditcfns.$(O) : \
363 $(SRC)/leditcfns.c
364
365 $(BLD)/make-docfile.$(O) : \
366 $(SRC)/make-docfile.c \
367 $(EMACS_ROOT)/src/config.h
368
369 $(BLD)/make-path.$(O) : \
370 $(SRC)/make-path.c
371
372 $(BLD)/movemail.$(O) : \
373 $(SRC)/movemail.c \
374 $(EMACS_ROOT)/src/s/ms-w32.h \
375 $(EMACS_ROOT)/src/m/intel386.h \
376 $(EMACS_ROOT)/lib-src/../src/config.h \
377 $(EMACS_ROOT)/nt/inc/sys/file.h \
378 $(EMACS_ROOT)/lib-src/../src/syswait.h \
379 $(EMACS_ROOT)/nt/inc/pwd.h \
380 $(SRC)/ntlib.h
381 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
382
383 $(BLD)/ntlib.$(O) : \
384 $(SRC)/ntlib.c \
385 $(SRC)/ntlib.h \
386 $(EMACS_ROOT)/nt/inc/pwd.h
387
388 $(BLD)/pop.$(O) : \
389 $(SRC)/pop.c \
390 $(SRC)/pop.h \
391 $(SRC)/ntlib.h
392
393 $(BLD)/profile.$(O) : \
394 $(SRC)/profile.c \
395 $(EMACS_ROOT)/src/s/ms-w32.h \
396 $(EMACS_ROOT)/src/m/intel386.h \
397 $(EMACS_ROOT)/lib-src/../src/config.h \
398 $(EMACS_ROOT)/lib-src/../src/systime.h
399
400 $(BLD)/qsort.$(O) : \
401 $(SRC)/qsort.c
402
403 $(BLD)/sorted-doc.$(O) : \
404 $(SRC)/sorted-doc.c
405
406 $(BLD)/tcp.$(O) : \
407 $(SRC)/tcp.c
408
409 $(BLD)/test-distrib.$(O) : \
410 $(SRC)/test-distrib.c
411
412 $(BLD)/timer.$(O) : \
413 $(SRC)/timer.c \
414 $(EMACS_ROOT)/src/s/ms-w32.h \
415 $(EMACS_ROOT)/src/m/intel386.h \
416 $(EMACS_ROOT)/lib-src/../src/config.h
417
418 $(BLD)/yow.$(O) : \
419 $(SRC)/yow.c \
420 $(EMACS_ROOT)/lib-src/../src/paths.h