(help-map): Move initialization into declaration.
[emacs.git] / lib-src / makefile.w32-in
bloba1a96098bd87dc07ac9168af17a99e280e005c16
1 #  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 #  Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 #                2005 Free Software Foundation, Inc.
5 #  This file is part of GNU Emacs.
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.
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.
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.
23 ALL           = make-docfile hexl ctags etags movemail ebrowse
25 .PHONY: $(ALL)
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
31 # don't know what (if) to do with these yet...
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 \
43 LIBS          = $(BASE_LIBS) $(ADVAPI32)
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)
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
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)
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)
71 ETAGSOBJ      = $(BLD)/etags.$(O) \
72                 $(BLD)/getopt.$(O) \
73                 $(BLD)/getopt1.$(O) \
74                 $(BLD)/ntlib.$(O) \
75                 $(BLD)/regex.$(O)
77 $(BLD)/etags.exe:       $(ETAGSOBJ)
78                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
81 EBROWSEOBJ    = $(BLD)/ebrowse.$(O) \
82                 $(BLD)/getopt.$(O) \
83                 $(BLD)/getopt1.$(O) \
84                 $(BLD)/ntlib.$(O)
86 $(BLD)/ebrowse.exe:     $(EBROWSEOBJ)
87                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
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)$@
93 ETAGS_CFLAGS  = -DHAVE_GETCWD
94 $(BLD)/etags.$(O): etags.c
95                 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
97 CTAGSOBJ      = $(BLD)/ctags.$(O) \
98                 $(BLD)/getopt.$(O) \
99                 $(BLD)/getopt1.$(O) \
100                 $(BLD)/ntlib.$(O) \
101                 $(BLD)/regex.$(O)
103 $(BLD)/ctags.exe:  $(CTAGSOBJ)
104                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
106 ctags.c:        etags.c
107                 - $(DEL) ctags.c
108                 $(CP) etags.c ctags.c
110 CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
111 $(BLD)/ctags.$(O): ctags.c
112                 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
115 # don't know what to do with these yet...
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)
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.
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
153 # These are the lisp files that are loaded up in loadup.el
155 lispsource = ../lisp/
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
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
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)international/ucs-tables.elc \
195         $(lispsource)international/utf-8.elc \
196         $(lispsource)international/latin-1.el \
197         $(lispsource)international/latin-2.el \
198         $(lispsource)international/latin-3.el \
199         $(lispsource)international/latin-4.el \
200         $(lispsource)international/latin-5.el \
201         $(lispsource)international/latin-8.el \
202         $(lispsource)international/latin-9.el \
203         $(lispsource)case-table.elc
205 lisp2 = \
206         $(lispsource)language/chinese.elc \
207         $(lispsource)language/cyrillic.elc \
208         $(lispsource)language/indian.elc \
209         $(lispsource)language/devanagari.el \
210         $(lispsource)language/malayalam.el \
211         $(lispsource)language/tamil.el \
212         $(lispsource)language/english.el \
213         $(lispsource)language/ethiopic.elc \
214         $(lispsource)language/european.elc \
215         $(lispsource)language/czech.el \
216         $(lispsource)language/slovak.el \
217         $(lispsource)language/romanian.el \
218         $(lispsource)language/greek.el \
219         $(lispsource)language/hebrew.el \
220         $(lispsource)language/japanese.el \
221         $(lispsource)language/korean.el \
222         $(lispsource)language/lao.el \
223         $(lispsource)language/thai.el \
224         $(lispsource)language/tibetan.elc \
225         $(lispsource)language/vietnamese.elc \
226         $(lispsource)language/misc-lang.el \
227         $(lispsource)language/utf-8-lang.el \
228         $(lispsource)language/georgian.el \
229         $(lispsource)paths.el \
230         $(lispsource)register.elc \
231         $(lispsource)replace.elc \
232         $(lispsource)simple.elc \
233         $(lispsource)startup.elc \
234         $(lispsource)subr.elc \
235         $(lispsource)term/tty-colors.elc \
236         $(lispsource)font-core.elc \
237         $(lispsource)textmodes/fill.elc \
238         $(lispsource)textmodes/page.elc \
239         $(lispsource)textmodes/paragraphs.elc \
240         $(lispsource)textmodes/text-mode.elc \
241         $(lispsource)vc-hooks.elc \
242         $(lispsource)ediff-hook.elc \
243         $(VMS_SUPPORT) \
244         $(MSDOS_SUPPORT) \
245         $(WINNT_SUPPORT) \
246         $(lispsource)widget.elc \
247         $(lispsource)window.elc \
248         $(lispsource)version.el
251 DOC           = DOC
252 $(DOC):         $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
253                 - $(DEL) $(DOC)
254                 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
255                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
256                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
257                 $(CP) $(DOC) ../etc/DOC-X
258                 - mkdir "../src/$(OBJDIR)"
259                 - mkdir "../src/$(OBJDIR)/etc"
260                 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
262 {$(BLD)}.$(O){$(BLD)}.exe:
263                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
266 # Build the executables
268 all:            $(BLD) $(ALL) $(DOC)
271 # Assuming INSTALL_DIR is defined, build and install emacs in it.
273 INSTALL_FILES = $(ALL)
274 install:        $(INSTALL_FILES)
275                 - mkdir "$(INSTALL_DIR)/bin"
276                 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
277                 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
278                 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
279                 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
280                 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
281                 - mkdir "$(INSTALL_DIR)/etc"
282                 $(CP) $(DOC) $(INSTALL_DIR)/etc
285 # Maintenance
287 clean:
288                 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
289                 - $(DEL) ctags.c
290                 - $(DEL) getopt.h
291                 - $(DEL_TREE) $(OBJDIR)
293 cleanall:       clean
294                 - $(DEL_TREE) obj
295                 - $(DEL_TREE) obj-spd
296                 - $(DEL_TREE) oo
297                 - $(DEL_TREE) oo-spd
300 # Headers we would preprocess if we could.
302 ../src/config.h:        ../nt/$(CONFIG_H)
303                         echo config.h has changed. Re-run configure.bat.
304                         exit -1
306 getopt.h:               getopt_.h
307                         $(CP) $(ALL_DEPS) $@
309 ### DEPENDENCIES ###
311 EMACS_ROOT      = ..
312 SRC             = .
314 $(BLD)/alloca.$(O) : \
315         $(SRC)/alloca.c \
316         $(EMACS_ROOT)/src/s/ms-w32.h \
317         $(EMACS_ROOT)/src/m/intel386.h \
318         $(EMACS_ROOT)/src/config.h \
319         $(EMACS_ROOT)/src/blockinput.h
321 $(BLD)/b2m.$(O) : \
322         $(SRC)/b2m.c \
323         $(EMACS_ROOT)/src/s/ms-w32.h \
324         $(EMACS_ROOT)/src/m/intel386.h \
325         $(EMACS_ROOT)/lib-src/../src/config.h
327 $(BLD)/ctags.$(O) : \
328         $(SRC)/ctags.c \
329         $(EMACS_ROOT)/nt/inc/sys/param.h \
330         $(EMACS_ROOT)/src/s/ms-w32.h \
331         $(EMACS_ROOT)/src/m/intel386.h \
332         $(EMACS_ROOT)/lib-src/../src/config.h \
333         $(SRC)/ntlib.h \
334         $(SRC)/getopt.h
336 $(BLD)/cvtmail.$(O) : \
337         $(SRC)/cvtmail.c
339 $(BLD)/digest-doc.$(O) : \
340         $(SRC)/digest-doc.c
342 $(BLD)/emacsclient.$(O) : \
343         $(SRC)/emacsclient.c \
344         $(EMACS_ROOT)/src/s/ms-w32.h \
345         $(EMACS_ROOT)/src/m/intel386.h \
346         $(EMACS_ROOT)/lib-src/../src/config.h
348 $(BLD)/emacstool.$(O) : \
349         $(SRC)/emacstool.c \
350         $(EMACS_ROOT)/nt/inc/sys/file.h
352 $(BLD)/etags.$(O) : \
353         $(SRC)/etags.c \
354         $(EMACS_ROOT)/nt/inc/sys/param.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         $(SRC)/ntlib.h \
359         $(SRC)/getopt.h
361 $(BLD)/fakemail.$(O) : \
362         $(SRC)/fakemail.c \
363         $(SRC)/ntlib.h \
364         $(EMACS_ROOT)/src/s/ms-w32.h \
365         $(EMACS_ROOT)/src/m/intel386.h \
366         $(EMACS_ROOT)/lib-src/../src/config.h \
367         $(EMACS_ROOT)/nt/inc/pwd.h
369 $(BLD)/getdate.$(O) : \
370         $(SRC)/getdate.c \
371         $(EMACS_ROOT)/src/s/ms-w32.h \
372         $(EMACS_ROOT)/src/m/intel386.h \
373         $(EMACS_ROOT)/src/config.h \
374         $(MSTOOLS_SYS)/types.h
376 $(BLD)/getopt.$(O) : \
377         $(SRC)/getopt.c \
378         $(EMACS_ROOT)/src/s/ms-w32.h \
379         $(EMACS_ROOT)/src/m/intel386.h \
380         $(EMACS_ROOT)/src/config.h \
381         $(SRC)/ntlib.h \
382         $(SRC)/getopt.h
384 $(BLD)/getopt1.$(O) : \
385         $(SRC)/getopt1.c \
386         $(EMACS_ROOT)/src/s/ms-w32.h \
387         $(EMACS_ROOT)/src/m/intel386.h \
388         $(EMACS_ROOT)/src/config.h \
389         $(SRC)/getopt.h
391 $(BLD)/hexl.$(O) : \
392         $(SRC)/hexl.c
394 $(BLD)/leditcfns.$(O) : \
395         $(SRC)/leditcfns.c
397 $(BLD)/make-docfile.$(O) : \
398         $(SRC)/make-docfile.c \
399         $(EMACS_ROOT)/src/config.h
401 $(BLD)/make-path.$(O) : \
402         $(SRC)/make-path.c
404 $(BLD)/movemail.$(O) : \
405         $(SRC)/movemail.c \
406         $(EMACS_ROOT)/src/s/ms-w32.h \
407         $(EMACS_ROOT)/src/m/intel386.h \
408         $(EMACS_ROOT)/lib-src/../src/config.h \
409         $(EMACS_ROOT)/nt/inc/sys/file.h \
410         $(EMACS_ROOT)/lib-src/../src/syswait.h \
411         $(EMACS_ROOT)/nt/inc/pwd.h \
412         $(SRC)/ntlib.h
413                 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
415 $(BLD)/ntlib.$(O) : \
416         $(SRC)/ntlib.c \
417         $(SRC)/ntlib.h \
418         $(EMACS_ROOT)/nt/inc/pwd.h
420 $(BLD)/pop.$(O) : \
421         $(SRC)/pop.c \
422         $(SRC)/pop.h \
423         $(SRC)/ntlib.h
425 $(BLD)/profile.$(O) : \
426         $(SRC)/profile.c \
427         $(EMACS_ROOT)/src/s/ms-w32.h \
428         $(EMACS_ROOT)/src/m/intel386.h \
429         $(EMACS_ROOT)/lib-src/../src/config.h \
430         $(EMACS_ROOT)/lib-src/../src/systime.h
432 $(BLD)/qsort.$(O) : \
433         $(SRC)/qsort.c
435 $(BLD)/sorted-doc.$(O) : \
436         $(SRC)/sorted-doc.c
438 $(BLD)/tcp.$(O) : \
439         $(SRC)/tcp.c
441 $(BLD)/test-distrib.$(O) : \
442         $(SRC)/test-distrib.c
444 $(BLD)/timer.$(O) : \
445         $(SRC)/timer.c \
446         $(EMACS_ROOT)/src/s/ms-w32.h \
447         $(EMACS_ROOT)/src/m/intel386.h \
448         $(EMACS_ROOT)/lib-src/../src/config.h
450 $(BLD)/yow.$(O) : \
451         $(SRC)/yow.c \
452         $(EMACS_ROOT)/lib-src/../src/paths.h