Fixes to previous entries
[bpt/emacs.git] / lib-src / makefile.w32-in
CommitLineData
53b67fa0
AI
1# Makefile for GNU Emacs on the Microsoft W32 API.
2# Copyright (c) 2000-2001 Free Software Foundation, Inc.
7bbaaedd
AI
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
57854d7a 22ALL = make-docfile hexl ctags etags movemail ebrowse
7bbaaedd
AI
23
24.PHONY: $(ALL)
25
26LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
d19249e7 27 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
e260c47a 28 -I../src
7bbaaedd
AI
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
7bbaaedd
AI
42LIBS = $(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
51make-docfile: $(BLD) $(BLD)/make-docfile.exe
52ctags: $(BLD) $(BLD)/ctags.exe
53etags: $(BLD) $(BLD)/etags.exe
d19249e7 54ebrowse: $(BLD) $(BLD)/ebrowse.exe
7bbaaedd
AI
55hexl: $(BLD) $(BLD)/hexl.exe
56movemail: $(BLD) $(BLD)/movemail.exe
57fakemail: $(BLD) $(BLD)/fakemail.exe
58
59GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O)
60GETOPTDEPS = $(GETOPTOBJS) getopt.h
61MOVEMAILOBJS = $(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
70ETAGSOBJ = $(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
d19249e7
JR
80EBROWSEOBJ = $(BLD)/ebrowse.$(O) \
81 $(BLD)/getopt.$(O) \
82 $(BLD)/getopt1.$(O) \
83 $(BLD)/ntlib.$(O)
84
85$(BLD)/ebrowse.exe: $(EBROWSEOBJ)
88257bc8 86 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
d19249e7 87
7bbaaedd
AI
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
92ETAGS_CFLAGS = -DHAVE_GETCWD
93$(BLD)/etags.$(O): etags.c
94 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
95
96CTAGSOBJ = $(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
105ctags.c: etags.c
106 - $(DEL) ctags.c
107 $(CP) etags.c ctags.c
108
109CTAGS_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.nt.
128#
44eec525 129obj = 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 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
7bbaaedd
AI
130
131#
132# These are the lisp files that are loaded up in loadup.el
133#
134lispsource = ../lisp/
135
7f379e5b
JR
136MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
137WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc
138
139# lisp files that are loaded up on other platforms
140MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
141VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
7bbaaedd
AI
142
143lisp= \
7f379e5b
JR
144 $(lispsource)abbrev.elc \
145 $(lispsource)buff-menu.elc \
e63e8d3e 146 $(lispsource)button.elc \
7f379e5b
JR
147 $(lispsource)byte-run.elc \
148 $(lispsource)cus-start.elc \
149 $(lispsource)custom.elc \
150 $(lispsource)backquote.elc \
151 $(lispsource)emacs-lisp/lisp-mode.elc \
152 $(lispsource)emacs-lisp/lisp.elc \
153 $(lispsource)env.elc \
154 $(lispsource)faces.elc \
155 $(lispsource)files.elc \
156 $(lispsource)format.elc \
157 $(lispsource)facemenu.elc \
7bbaaedd 158 $(MOUSE_SUPPORT) \
7f379e5b
JR
159 $(lispsource)float-sup.elc \
160 $(lispsource)frame.elc\
161 $(lispsource)help.elc \
162 $(lispsource)indent.elc \
163 $(lispsource)isearch.elc \
7bbaaedd
AI
164 $(lispsource)loadup.el \
165 $(lispsource)loaddefs.el \
7f379e5b
JR
166 $(lispsource)bindings.elc \
167 $(lispsource)map-ynp.elc \
168 $(lispsource)menu-bar.elc \
169 $(lispsource)international/mule.elc \
7bbaaedd 170 $(lispsource)international/mule-conf.el \
7f379e5b
JR
171 $(lispsource)international/mule-cmds.elc \
172 $(lispsource)international/characters.elc \
173 $(lispsource)international/utf-8.elc \
174 $(lispsource)international/latin-1.el \
175 $(lispsource)international/latin-2.el \
176 $(lispsource)international/latin-3.el \
177 $(lispsource)international/latin-4.el \
178 $(lispsource)international/latin-5.el \
179 $(lispsource)international/latin-8.el \
180 $(lispsource)international/latin-9.el \
181 $(lispsource)case-table.elc \
182 $(lispsource)language/chinese.elc \
183 $(lispsource)language/cyrillic.elc \
184 $(lispsource)language/indian.elc \
185 $(lispsource)language/devanagari.elc \
76054cc8 186 $(lispsource)language/english.el \
7f379e5b
JR
187 $(lispsource)language/ethiopic.elc \
188 $(lispsource)language/european.elc \
76054cc8
AI
189 $(lispsource)language/czech.el \
190 $(lispsource)language/slovak.el \
191 $(lispsource)language/romanian.el \
192 $(lispsource)language/greek.el \
193 $(lispsource)language/hebrew.el \
76054cc8
AI
194 $(lispsource)language/japanese.el \
195 $(lispsource)language/korean.el \
196 $(lispsource)language/lao.el \
197 $(lispsource)language/thai.el \
7f379e5b
JR
198 $(lispsource)language/tibetan.elc \
199 $(lispsource)language/vietnamese.elc \
76054cc8 200 $(lispsource)language/misc-lang.el \
7f379e5b
JR
201 $(lispsource)language/utf-8-lang.el \
202 $(lispsource)language/georgian.el \
7bbaaedd 203 $(lispsource)paths.el \
7f379e5b
JR
204 $(lispsource)register.elc \
205 $(lispsource)replace.elc \
206 $(lispsource)simple.elc \
207 $(lispsource)startup.elc \
208 $(lispsource)subr.elc \
209 $(lispsource)term/tty-colors.elc \
210 $(lispsource)textmodes/fill.elc \
211 $(lispsource)textmodes/page.elc \
212 $(lispsource)textmodes/paragraphs.elc \
213 $(lispsource)textmodes/text-mode.elc \
214 $(lispsource)vc-hooks.elc \
215 $(lispsource)ediff-hook.elc \
7bbaaedd
AI
216 $(VMS_SUPPORT) \
217 $(MSDOS_SUPPORT) \
218 $(WINNT_SUPPORT) \
7f379e5b
JR
219 $(lispsource)widget.elc \
220 $(lispsource)window.elc \
7bbaaedd
AI
221 $(lispsource)version.el
222
223
224DOC = DOC
76054cc8 225$(DOC): make-docfile
7bbaaedd 226 - $(DEL) $(DOC)
7a095250
AI
227 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(obj) > $(DOC)
228 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(lisp) >> $(DOC)
7bbaaedd
AI
229 $(CP) $(DOC) ../etc/DOC-X
230 - mkdir "../src/$(OBJDIR)"
231 - mkdir "../src/$(OBJDIR)/etc"
232 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
233
234{$(BLD)}.$(O){$(BLD)}.exe:
235 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
236
237#
238# Build the executables
239#
240all: $(BLD) $(ALL) $(DOC)
241
242#
243# Assuming INSTALL_DIR is defined, build and install emacs in it.
244#
245INSTALL_FILES = $(ALL)
246install: $(INSTALL_FILES)
247 - mkdir "$(INSTALL_DIR)/bin"
248 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
88257bc8 249 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
7bbaaedd
AI
250 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
251 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
252 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
7bbaaedd
AI
253 - mkdir "$(INSTALL_DIR)/etc"
254 $(CP) $(DOC) $(INSTALL_DIR)/etc
255
256#
257# Maintenance
258#
259clean:
5cdd7eef 260 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
7bbaaedd
AI
261 - $(DEL) ctags.c
262 - $(DEL_TREE) $(OBJDIR)
263
264cleanall: clean
265 - $(DEL_TREE) obj
266 - $(DEL_TREE) obj-spd
267 - $(DEL_TREE) oo
268 - $(DEL_TREE) oo-spd
269
270#
271# Headers we would preprocess if we could.
272#
273../src/config.h: ../nt/$(CONFIG_H)
274 $(CP) $(ALL_DEPS) $@
275../src/paths.h: ../nt/paths.h
276 $(CP) $(ALL_DEPS) $@
277
278### DEPENDENCIES ###
279
280EMACS_ROOT = ..
281SRC = .
282
283$(BLD)/alloca.$(O) : \
284 $(SRC)/alloca.c \
285 $(EMACS_ROOT)/src/s/ms-w32.h \
286 $(EMACS_ROOT)/src/m/intel386.h \
287 $(EMACS_ROOT)/src/config.h \
288 $(EMACS_ROOT)/src/blockinput.h
289
290$(BLD)/b2m.$(O) : \
291 $(SRC)/b2m.c \
292 $(EMACS_ROOT)/src/s/ms-w32.h \
293 $(EMACS_ROOT)/src/m/intel386.h \
294 $(EMACS_ROOT)/lib-src/../src/config.h
295
296$(BLD)/ctags.$(O) : \
297 $(SRC)/ctags.c \
298 $(EMACS_ROOT)/nt/inc/sys/param.h \
299 $(EMACS_ROOT)/src/s/ms-w32.h \
300 $(EMACS_ROOT)/src/m/intel386.h \
301 $(EMACS_ROOT)/lib-src/../src/config.h \
302 $(SRC)/ntlib.h \
303 $(SRC)/getopt.h
304
305$(BLD)/cvtmail.$(O) : \
306 $(SRC)/cvtmail.c
307
308$(BLD)/digest-doc.$(O) : \
309 $(SRC)/digest-doc.c
310
311$(BLD)/emacsclient.$(O) : \
312 $(SRC)/emacsclient.c \
313 $(EMACS_ROOT)/src/s/ms-w32.h \
314 $(EMACS_ROOT)/src/m/intel386.h \
315 $(EMACS_ROOT)/lib-src/../src/config.h
316
317$(BLD)/emacsserver.$(O) : \
318 $(SRC)/emacsserver.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 $(EMACS_ROOT)/nt/inc/sys/file.h
323
324$(BLD)/emacstool.$(O) : \
325 $(SRC)/emacstool.c \
326 $(EMACS_ROOT)/nt/inc/sys/file.h
327
328$(BLD)/etags.$(O) : \
329 $(SRC)/etags.c \
330 $(EMACS_ROOT)/nt/inc/sys/param.h \
331 $(EMACS_ROOT)/src/s/ms-w32.h \
332 $(EMACS_ROOT)/src/m/intel386.h \
333 $(EMACS_ROOT)/lib-src/../src/config.h \
334 $(SRC)/ntlib.h \
335 $(SRC)/getopt.h
336
337$(BLD)/fakemail.$(O) : \
338 $(SRC)/fakemail.c \
339 $(SRC)/ntlib.h \
340 $(EMACS_ROOT)/src/s/ms-w32.h \
341 $(EMACS_ROOT)/src/m/intel386.h \
342 $(EMACS_ROOT)/lib-src/../src/config.h \
343 $(EMACS_ROOT)/nt/inc/pwd.h
344
345$(BLD)/getdate.$(O) : \
346 $(SRC)/getdate.c \
347 $(EMACS_ROOT)/src/s/ms-w32.h \
348 $(EMACS_ROOT)/src/m/intel386.h \
349 $(EMACS_ROOT)/src/config.h \
350 $(MSTOOLS_SYS)/types.h
351
352$(BLD)/getopt.$(O) : \
353 $(SRC)/getopt.c \
354 $(EMACS_ROOT)/src/s/ms-w32.h \
355 $(EMACS_ROOT)/src/m/intel386.h \
356 $(EMACS_ROOT)/src/config.h \
357 $(SRC)/ntlib.h \
358 $(SRC)/getopt.h
359
360$(BLD)/getopt1.$(O) : \
361 $(SRC)/getopt1.c \
362 $(EMACS_ROOT)/src/s/ms-w32.h \
363 $(EMACS_ROOT)/src/m/intel386.h \
364 $(EMACS_ROOT)/src/config.h \
365 $(SRC)/getopt.h
366
367$(BLD)/hexl.$(O) : \
368 $(SRC)/hexl.c
369
370$(BLD)/leditcfns.$(O) : \
371 $(SRC)/leditcfns.c
372
373$(BLD)/make-docfile.$(O) : \
374 $(SRC)/make-docfile.c \
375 $(EMACS_ROOT)/src/config.h
376
377$(BLD)/make-path.$(O) : \
378 $(SRC)/make-path.c
379
380$(BLD)/movemail.$(O) : \
381 $(SRC)/movemail.c \
382 $(EMACS_ROOT)/src/s/ms-w32.h \
383 $(EMACS_ROOT)/src/m/intel386.h \
384 $(EMACS_ROOT)/lib-src/../src/config.h \
385 $(EMACS_ROOT)/nt/inc/sys/file.h \
7bbaaedd
AI
386 $(EMACS_ROOT)/lib-src/../src/syswait.h \
387 $(EMACS_ROOT)/nt/inc/pwd.h \
388 $(SRC)/ntlib.h
389 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
390
391$(BLD)/ntlib.$(O) : \
392 $(SRC)/ntlib.c \
393 $(SRC)/ntlib.h \
394 $(EMACS_ROOT)/nt/inc/pwd.h
395
396$(BLD)/pop.$(O) : \
397 $(SRC)/pop.c \
398 $(SRC)/pop.h \
399 $(SRC)/ntlib.h
400
401$(BLD)/profile.$(O) : \
402 $(SRC)/profile.c \
403 $(EMACS_ROOT)/src/s/ms-w32.h \
404 $(EMACS_ROOT)/src/m/intel386.h \
405 $(EMACS_ROOT)/lib-src/../src/config.h \
7bbaaedd
AI
406 $(EMACS_ROOT)/lib-src/../src/systime.h
407
408$(BLD)/qsort.$(O) : \
409 $(SRC)/qsort.c
410
411$(BLD)/sorted-doc.$(O) : \
412 $(SRC)/sorted-doc.c
413
414$(BLD)/tcp.$(O) : \
415 $(SRC)/tcp.c
416
417$(BLD)/test-distrib.$(O) : \
418 $(SRC)/test-distrib.c
419
420$(BLD)/timer.$(O) : \
421 $(SRC)/timer.c \
422 $(EMACS_ROOT)/src/s/ms-w32.h \
423 $(EMACS_ROOT)/src/m/intel386.h \
424 $(EMACS_ROOT)/lib-src/../src/config.h
425
426$(BLD)/yow.$(O) : \
427 $(SRC)/yow.c \
428 $(EMACS_ROOT)/lib-src/../src/paths.h