(Reverting): Add anchor.
[emacs.git] / lib-src / makefile.w32-in
blob663d08e6f13616eed064258adcd6384762b96866
1 #  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 #  Copyright (c) 2000-2001, 2004 Free Software Foundation, Inc.
4 #  This file is part of GNU Emacs.
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.
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.
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.
22 ALL           = make-docfile hexl ctags etags movemail ebrowse
24 .PHONY: $(ALL)
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
30 # don't know what (if) to do with these yet...
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 \
42 LIBS          = $(BASE_LIBS) $(ADVAPI32)
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)
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
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)
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)
70 ETAGSOBJ      = $(BLD)/etags.$(O) \
71                 $(BLD)/getopt.$(O) \
72                 $(BLD)/getopt1.$(O) \
73                 $(BLD)/ntlib.$(O) \
74                 $(BLD)/regex.$(O)
76 $(BLD)/etags.exe:       $(ETAGSOBJ)
77                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
80 EBROWSEOBJ    = $(BLD)/ebrowse.$(O) \
81                 $(BLD)/getopt.$(O) \
82                 $(BLD)/getopt1.$(O) \
83                 $(BLD)/ntlib.$(O)
85 $(BLD)/ebrowse.exe:     $(EBROWSEOBJ)
86                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
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)$@
92 ETAGS_CFLAGS  = -DHAVE_GETCWD
93 $(BLD)/etags.$(O): etags.c
94                 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
96 CTAGSOBJ      = $(BLD)/ctags.$(O) \
97                 $(BLD)/getopt.$(O) \
98                 $(BLD)/getopt1.$(O) \
99                 $(BLD)/ntlib.$(O) \
100                 $(BLD)/regex.$(O)
102 $(BLD)/ctags.exe:  $(CTAGSOBJ)
103                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
105 ctags.c:        etags.c
106                 - $(DEL) ctags.c
107                 $(CP) etags.c ctags.c
109 CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
110 $(BLD)/ctags.$(O): ctags.c
111                 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
114 # don't know what to do with these yet...
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)
127 # From ..\src\makefile.nt.
129 obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c casetab.c category.c ccl.c charset.c cm.c cmds.c coding.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c floatfns.c fns.c fontset.c frame.c fringe.c gmalloc.c image.c indent.c insdel.c intervals.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c print.c process.c ralloc.c regex.c region-cache.c scroll.c search.c sound.c strftime.c syntax.c sysdep.c term.c termcap.c textprop.c tparam.c undo.c unexw32.c vm-limit.c w32.c w32console.c w32fns.c w32heap.c w32inevt.c w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c window.c xdisp.c xfaces.c xfaces.c
131 # These are the lisp files that are loaded up in loadup.el
133 lispsource = ../lisp/
135 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
136 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc
138 # lisp files that are loaded up on other platforms
139 MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
140 VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
142 lisp1= \
143         $(lispsource)abbrev.elc \
144         $(lispsource)buff-menu.elc \
145         $(lispsource)button.elc \
146         $(lispsource)emacs-lisp/byte-run.elc \
147         $(lispsource)cus-start.elc \
148         $(lispsource)custom.elc \
149         $(lispsource)emacs-lisp/backquote.elc \
150         $(lispsource)emacs-lisp/lisp-mode.elc \
151         $(lispsource)emacs-lisp/lisp.elc \
152         $(lispsource)env.elc \
153         $(lispsource)faces.elc \
154         $(lispsource)files.elc \
155         $(lispsource)format.elc \
156         $(lispsource)facemenu.elc \
157         $(MOUSE_SUPPORT) \
158         $(lispsource)emacs-lisp/float-sup.elc \
159         $(lispsource)frame.elc \
160         $(lispsource)help.elc \
161         $(lispsource)indent.elc \
162         $(lispsource)isearch.elc \
163         $(lispsource)loadup.el \
164         $(lispsource)loaddefs.el \
165         $(lispsource)bindings.elc \
166         $(lispsource)emacs-lisp/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/ucs-tables.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
183 lisp2 = \
184         $(lispsource)language/chinese.elc \
185         $(lispsource)language/cyrillic.elc \
186         $(lispsource)language/indian.elc \
187         $(lispsource)language/devanagari.el \
188         $(lispsource)language/malayalam.el \
189         $(lispsource)language/tamil.el \
190         $(lispsource)language/english.el \
191         $(lispsource)language/ethiopic.elc \
192         $(lispsource)language/european.elc \
193         $(lispsource)language/czech.el \
194         $(lispsource)language/slovak.el \
195         $(lispsource)language/romanian.el \
196         $(lispsource)language/greek.el \
197         $(lispsource)language/hebrew.el \
198         $(lispsource)language/japanese.el \
199         $(lispsource)language/korean.el \
200         $(lispsource)language/lao.el \
201         $(lispsource)language/thai.el \
202         $(lispsource)language/tibetan.elc \
203         $(lispsource)language/vietnamese.elc \
204         $(lispsource)language/misc-lang.el \
205         $(lispsource)language/utf-8-lang.el \
206         $(lispsource)language/georgian.el \
207         $(lispsource)paths.el \
208         $(lispsource)register.elc \
209         $(lispsource)replace.elc \
210         $(lispsource)simple.elc \
211         $(lispsource)startup.elc \
212         $(lispsource)subr.elc \
213         $(lispsource)term/tty-colors.elc \
214         $(lispsource)font-core.elc \
215         $(lispsource)textmodes/fill.elc \
216         $(lispsource)textmodes/page.elc \
217         $(lispsource)textmodes/paragraphs.elc \
218         $(lispsource)textmodes/text-mode.elc \
219         $(lispsource)vc-hooks.elc \
220         $(lispsource)ediff-hook.elc \
221         $(VMS_SUPPORT) \
222         $(MSDOS_SUPPORT) \
223         $(WINNT_SUPPORT) \
224         $(lispsource)widget.elc \
225         $(lispsource)window.elc \
226         $(lispsource)version.el
229 DOC           = DOC
230 $(DOC):         make-docfile
231                 - $(DEL) $(DOC)
232                 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
233                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
234                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
235                 $(CP) $(DOC) ../etc/DOC-X
236                 - mkdir "../src/$(OBJDIR)"
237                 - mkdir "../src/$(OBJDIR)/etc"
238                 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
240 {$(BLD)}.$(O){$(BLD)}.exe:
241                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
244 # Build the executables
246 all:            $(BLD) $(ALL) $(DOC)
249 # Assuming INSTALL_DIR is defined, build and install emacs in it.
251 INSTALL_FILES = $(ALL)
252 install:        $(INSTALL_FILES)
253                 - mkdir "$(INSTALL_DIR)/bin"
254                 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
255                 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
256                 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
257                 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
258                 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
259                 - mkdir "$(INSTALL_DIR)/etc"
260                 $(CP) $(DOC) $(INSTALL_DIR)/etc
263 # Maintenance
265 clean:
266                 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
267                 - $(DEL) ctags.c
268                 - $(DEL_TREE) $(OBJDIR)
270 cleanall:       clean
271                 - $(DEL_TREE) obj
272                 - $(DEL_TREE) obj-spd
273                 - $(DEL_TREE) oo
274                 - $(DEL_TREE) oo-spd
277 # Headers we would preprocess if we could.
279 ../src/config.h:        ../nt/$(CONFIG_H)
280                         $(CP) $(ALL_DEPS) $@
281 ../src/paths.h:         ../nt/paths.h
282                         $(CP) $(ALL_DEPS) $@
284 ### DEPENDENCIES ###
286 EMACS_ROOT      = ..
287 SRC             = .
289 $(BLD)/alloca.$(O) : \
290         $(SRC)/alloca.c \
291         $(EMACS_ROOT)/src/s/ms-w32.h \
292         $(EMACS_ROOT)/src/m/intel386.h \
293         $(EMACS_ROOT)/src/config.h \
294         $(EMACS_ROOT)/src/blockinput.h
296 $(BLD)/b2m.$(O) : \
297         $(SRC)/b2m.c \
298         $(EMACS_ROOT)/src/s/ms-w32.h \
299         $(EMACS_ROOT)/src/m/intel386.h \
300         $(EMACS_ROOT)/lib-src/../src/config.h
302 $(BLD)/ctags.$(O) : \
303         $(SRC)/ctags.c \
304         $(EMACS_ROOT)/nt/inc/sys/param.h \
305         $(EMACS_ROOT)/src/s/ms-w32.h \
306         $(EMACS_ROOT)/src/m/intel386.h \
307         $(EMACS_ROOT)/lib-src/../src/config.h \
308         $(SRC)/ntlib.h \
309         $(SRC)/getopt.h
311 $(BLD)/cvtmail.$(O) : \
312         $(SRC)/cvtmail.c
314 $(BLD)/digest-doc.$(O) : \
315         $(SRC)/digest-doc.c
317 $(BLD)/emacsclient.$(O) : \
318         $(SRC)/emacsclient.c \
319         $(EMACS_ROOT)/src/s/ms-w32.h \
320         $(EMACS_ROOT)/src/m/intel386.h \
321         $(EMACS_ROOT)/lib-src/../src/config.h
323 $(BLD)/emacstool.$(O) : \
324         $(SRC)/emacstool.c \
325         $(EMACS_ROOT)/nt/inc/sys/file.h
327 $(BLD)/etags.$(O) : \
328         $(SRC)/etags.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)/fakemail.$(O) : \
337         $(SRC)/fakemail.c \
338         $(SRC)/ntlib.h \
339         $(EMACS_ROOT)/src/s/ms-w32.h \
340         $(EMACS_ROOT)/src/m/intel386.h \
341         $(EMACS_ROOT)/lib-src/../src/config.h \
342         $(EMACS_ROOT)/nt/inc/pwd.h
344 $(BLD)/getdate.$(O) : \
345         $(SRC)/getdate.c \
346         $(EMACS_ROOT)/src/s/ms-w32.h \
347         $(EMACS_ROOT)/src/m/intel386.h \
348         $(EMACS_ROOT)/src/config.h \
349         $(MSTOOLS_SYS)/types.h
351 $(BLD)/getopt.$(O) : \
352         $(SRC)/getopt.c \
353         $(EMACS_ROOT)/src/s/ms-w32.h \
354         $(EMACS_ROOT)/src/m/intel386.h \
355         $(EMACS_ROOT)/src/config.h \
356         $(SRC)/ntlib.h \
357         $(SRC)/getopt.h
359 $(BLD)/getopt1.$(O) : \
360         $(SRC)/getopt1.c \
361         $(EMACS_ROOT)/src/s/ms-w32.h \
362         $(EMACS_ROOT)/src/m/intel386.h \
363         $(EMACS_ROOT)/src/config.h \
364         $(SRC)/getopt.h
366 $(BLD)/hexl.$(O) : \
367         $(SRC)/hexl.c
369 $(BLD)/leditcfns.$(O) : \
370         $(SRC)/leditcfns.c
372 $(BLD)/make-docfile.$(O) : \
373         $(SRC)/make-docfile.c \
374         $(EMACS_ROOT)/src/config.h
376 $(BLD)/make-path.$(O) : \
377         $(SRC)/make-path.c
379 $(BLD)/movemail.$(O) : \
380         $(SRC)/movemail.c \
381         $(EMACS_ROOT)/src/s/ms-w32.h \
382         $(EMACS_ROOT)/src/m/intel386.h \
383         $(EMACS_ROOT)/lib-src/../src/config.h \
384         $(EMACS_ROOT)/nt/inc/sys/file.h \
385         $(EMACS_ROOT)/lib-src/../src/syswait.h \
386         $(EMACS_ROOT)/nt/inc/pwd.h \
387         $(SRC)/ntlib.h
388                 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
390 $(BLD)/ntlib.$(O) : \
391         $(SRC)/ntlib.c \
392         $(SRC)/ntlib.h \
393         $(EMACS_ROOT)/nt/inc/pwd.h
395 $(BLD)/pop.$(O) : \
396         $(SRC)/pop.c \
397         $(SRC)/pop.h \
398         $(SRC)/ntlib.h
400 $(BLD)/profile.$(O) : \
401         $(SRC)/profile.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)/lib-src/../src/systime.h
407 $(BLD)/qsort.$(O) : \
408         $(SRC)/qsort.c
410 $(BLD)/sorted-doc.$(O) : \
411         $(SRC)/sorted-doc.c
413 $(BLD)/tcp.$(O) : \
414         $(SRC)/tcp.c
416 $(BLD)/test-distrib.$(O) : \
417         $(SRC)/test-distrib.c
419 $(BLD)/timer.$(O) : \
420         $(SRC)/timer.c \
421         $(EMACS_ROOT)/src/s/ms-w32.h \
422         $(EMACS_ROOT)/src/m/intel386.h \
423         $(EMACS_ROOT)/lib-src/../src/config.h
425 $(BLD)/yow.$(O) : \
426         $(SRC)/yow.c \
427         $(EMACS_ROOT)/lib-src/../src/paths.h