* xdisp.c (Vresize_mini_windows): Incredibly minor doc fix (Bug#3300).
[emacs.git] / lib-src / makefile.w32-in
blob07f6170afe4349f67ccec465fb0ad50c9239b891
1 #  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000-2011 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 3 of the License, or
9 # (at your option) 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.  If not, see <http://www.gnu.org/licenses/>.
20 ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient
22 .PHONY: $(ALL)
24 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
25                   -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \
26                   -I../nt/inc -I../src
28 LIBS            = $(BASE_LIBS) $(ADVAPI32)
30 $(BLD)/make-docfile.exe:        $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O)
31                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS)
32 $(BLD)/hexl.exe:                $(BLD)/hexl.$(O)
33                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS)
34 $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O)
35                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS)
37 make-docfile:   stamp_BLD $(BLD)/make-docfile.exe
38 ctags:          stamp_BLD $(BLD)/ctags.exe
39 etags:          stamp_BLD $(BLD)/etags.exe
40 ebrowse:        stamp_BLD $(BLD)/ebrowse.exe
41 hexl:           stamp_BLD $(BLD)/hexl.exe
42 movemail:       stamp_BLD $(BLD)/movemail.exe
43 emacsclient:    stamp_BLD $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe
45 test-distrib:   stamp_BLD $(BLD)/test-distrib.exe
46         "$(BLD)/test-distrib.exe" "$(SRC)/testfile"
48 MOVEMAILOBJS =  $(BLD)/movemail.$(O) \
49                 $(BLD)/pop.$(O) \
50                 ../lib/$(BLD)/libgnu.$(A) \
51                 $(BLD)/ntlib.$(O)
53 $(BLD)/movemail.exe:    $(MOVEMAILOBJS) ../lib/getopt.h
54 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
55                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS)
57 ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR
58 ECLIENTOBJS =   $(BLD)/emacsclient.$(O) \
59                 $(BLD)/ntlib.$(O) \
60                 ../lib/$(BLD)/libgnu.$(A)
61 CLIENTRES =     ../nt/$(BLD)/emacsclient.res
63 $(CLIENTRES):   ../nt/emacsclient.rc
64         @echo Emacsclient resource file must be built from nt directory
65         @exit -1
67 $(BLD)/emacsclient.exe:         $(ECLIENTOBJS)
68 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
69                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
71 $(BLD)/emacsclientw.exe:        $(ECLIENTOBJS) $(CLIENTRES)
72 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
73                 $(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
75 $(BLD)/emacsclient.$(O):        emacsclient.c
76                 $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c
78 ETAGSOBJ      = $(BLD)/etags.$(O) \
79                 ../lib/$(BLD)/libgnu.$(A) \
80                 $(BLD)/ntlib.$(O) \
81                 $(BLD)/regex.$(O)
83 $(BLD)/etags.exe:       $(ETAGSOBJ)
84                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
87 EBROWSEOBJ    = $(BLD)/ebrowse.$(O) \
88                 ../lib/$(BLD)/libgnu.$(A) \
89                 $(BLD)/ntlib.$(O)
91 $(BLD)/ebrowse.exe:     $(EBROWSEOBJ)
92                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(EBROWSEOBJ) $(LIBS)
94 $(BLD)/regex.$(O): ../src/regex.c ../src/regex.h ../src/config.h
95                 $(CC)  $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
96                 ../src/regex.c $(CC_OUT)$@
98 ETAGS_CFLAGS  = -DHAVE_GETCWD -DEMACS_NAME="\"GNU Emacs\""
99 $(BLD)/etags.$(O): etags.c
100                 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c
102 CTAGSOBJ      = $(BLD)/ctags.$(O) \
103                 ../lib/$(BLD)/libgnu.$(A) \
104                 $(BLD)/ntlib.$(O) \
105                 $(BLD)/regex.$(O)
107 $(BLD)/ctags.exe:  $(CTAGSOBJ)
108                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
110 ctags.c:        etags.c
111                 - $(DEL) ctags.c
112                 $(CP) etags.c ctags.c
114 CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS) -DEMACS_NAME="\"GNU Emacs\""
115 $(BLD)/ctags.$(O): ctags.c
116                 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
119 # From ..\src\Makefile.in
120 # It doesn't matter if the real name is *.obj for the files in this list,
121 # make-docfile blindly replaces .o with .c anyway.  Keep .o in this list
122 # as it is required by code in doc.c.
124 obj =   dosfns.o msdos.o \
125         xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
126         fontset.o menu.o \
127         w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
128         w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
129         font.o w32font.o w32uniscribe.o \
130         dispnew.o frame.o scroll.o xdisp.o window.o bidi.o \
131         charset.o coding.o category.o ccl.o character.o chartab.o \
132         cm.o term.o terminal.o xfaces.o \
133         emacs.o keyboard.o macros.o keymap.o sysdep.o \
134         buffer.o filelock.o insdel.o marker.o \
135         minibuf.o fileio.o dired.o \
136         cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
137         alloc.o data.o doc.o editfns.o callint.o \
138         eval.o floatfns.o fns.o print.o lread.o \
139         syntax.o bytecode.o \
140         process.o callproc.o unexw32.o \
141         region-cache.o sound.o atimer.o \
142         doprnt.o intervals.o textprop.o composite.o \
143         gnutls.o
146 # These are the lisp files that are loaded up in loadup.el
148 lispsource = ../lisp/
150 MOUSE_SUPPORT = \
151         $(lispsource)select.elc \
152         $(lispsource)scroll-bar.elc \
153         $(lispsource)mouse.elc
154 WINNT_SUPPORT = \
155         $(lispsource)ls-lisp.elc \
156         $(lispsource)disp-table.elc \
157         $(lispsource)w32-fns.elc \
158         $(lispsource)dos-w32.elc \
159         $(lispsource)w32-vars.elc \
160         $(lispsource)term/common-win.elc \
161         $(lispsource)term/w32-win.elc
162 TOOLTIP_SUPPORT = $(lispsource)tooltip.elc
163 WINDOW_SUPPORT = \
164         $(lispsource)fringe.elc \
165         $(lispsource)image.elc \
166         $(lispsource)international/fontset.elc \
167         $(lispsource)dnd.elc \
168         $(lispsource)tool-bar.elc \
169         $(lispsource)mwheel.elc
171 # lisp files that are loaded up on other platforms
172 OTHER_PLATFORM_SUPPORT = \
173         $(lispsource)dos-fns.elc \
174         $(lispsource)dos-vars.elc \
175         $(lispsource)term/internal.elc \
176         $(lispsource)term/pc-win.elc \
177         $(lispsource)x-dnd.elc \
178         $(lispsource)term/x-win.elc \
179         $(lispsource)term/ns-win.elc
182 lisp1= \
183         $(lispsource)abbrev.elc \
184         $(lispsource)buff-menu.elc \
185         $(lispsource)button.elc \
186         $(lispsource)emacs-lisp/byte-run.elc \
187         $(lispsource)composite.elc \
188         $(lispsource)cus-face.elc \
189         $(lispsource)cus-start.elc \
190         $(lispsource)custom.elc \
191         $(lispsource)emacs-lisp/backquote.elc \
192         $(lispsource)emacs-lisp/lisp-mode.elc \
193         $(lispsource)emacs-lisp/lisp.elc \
194         $(lispsource)env.elc \
195         $(lispsource)faces.elc \
196         $(lispsource)files.elc \
197         $(lispsource)format.elc \
198         $(lispsource)facemenu.elc \
199         $(MOUSE_SUPPORT) \
200         $(lispsource)emacs-lisp/float-sup.elc \
201         $(lispsource)frame.elc \
202         $(lispsource)help.elc \
203         $(lispsource)indent.elc \
204         $(lispsource)isearch.elc \
205         $(lispsource)rfn-eshadow.elc \
206         $(lispsource)loadup.el \
207         $(lispsource)loaddefs.el \
208         $(lispsource)bindings.elc \
209         $(lispsource)emacs-lisp/map-ynp.elc \
210         $(lispsource)menu-bar.elc \
211         $(lispsource)international/mule.elc \
212         $(lispsource)international/mule-conf.el \
213         $(lispsource)international/mule-cmds.elc \
214         $(lispsource)international/characters.elc \
215         $(lispsource)international/charprop.el \
216         $(lispsource)case-table.elc
218 lisp2 = \
219         $(lispsource)language/chinese.el \
220         $(lispsource)language/cyrillic.el \
221         $(lispsource)language/indian.el \
222         $(lispsource)language/sinhala.el \
223         $(lispsource)language/english.el \
224         $(lispsource)language/ethiopic.elc \
225         $(lispsource)language/european.elc \
226         $(lispsource)language/czech.el \
227         $(lispsource)language/slovak.el \
228         $(lispsource)language/romanian.el \
229         $(lispsource)language/greek.el \
230         $(lispsource)language/hebrew.elc \
231         $(lispsource)language/japanese.el \
232         $(lispsource)language/korean.el \
233         $(lispsource)language/lao.el \
234         $(lispsource)language/cham.el \
235         $(lispsource)language/tai-viet.el \
236         $(lispsource)language/thai.el \
237         $(lispsource)language/tibetan.elc \
238         $(lispsource)language/vietnamese.el \
239         $(lispsource)language/misc-lang.el \
240         $(lispsource)language/utf-8-lang.el \
241         $(lispsource)language/georgian.el \
242         $(lispsource)language/khmer.el \
243         $(lispsource)language/burmese.el \
244         $(lispsource)paths.el \
245         $(lispsource)register.elc \
246         $(lispsource)replace.elc \
247         $(lispsource)simple.elc \
248         $(lispsource)minibuffer.elc \
249         $(lispsource)startup.elc \
250         $(lispsource)subr.elc \
251         $(lispsource)term/tty-colors.elc \
252         $(lispsource)font-core.elc \
253         $(lispsource)emacs-lisp/syntax.elc \
254         $(lispsource)font-lock.elc \
255         $(lispsource)jit-lock.elc \
256         $(lispsource)textmodes/fill.elc \
257         $(lispsource)textmodes/page.elc \
258         $(lispsource)textmodes/paragraphs.elc \
259         $(lispsource)textmodes/text-mode.elc \
260         $(lispsource)emacs-lisp/timer.elc \
261         $(lispsource)jka-cmpr-hook.elc \
262         $(lispsource)vc/vc-hooks.elc \
263         $(lispsource)vc/ediff-hook.elc \
264         $(lispsource)epa-hook.elc \
265         $(TOOLTIP_SUPPORT) \
266         $(WINNT_SUPPORT) \
267         $(WINDOW_SUPPORT) \
268         $(lispsource)widget.elc \
269         $(lispsource)window.elc \
270         $(lispsource)version.el
272 # This is needed the first time we build the tree, since temacs.exe
273 # does not exist yet, and the DOC rule needs it to rebuild DOC whenever
274 # Emacs is rebuilt.
275 ../src/$(BLD)/temacs.exe:
276         - mkdir "../src/$(OBJDIR)"
277         - mkdir "../src/$(BLD)"
278         @echo temacs > temacs.exe
279         $(CP) temacs.exe ../src/$(BLD)
280         - $(DEL) temacs.exe
282 DOC           = DOC
283 $(DOC):         stamp_BLD $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2) $(OTHER_PLATFORM_SUPPORT)
284                 - $(DEL) $(DOC)
285                 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
286                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
287                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
288                 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(OTHER_PLATFORM_SUPPORT)
289                 $(CP) $(DOC) ../etc/DOC-X
290                 - mkdir "../src/$(OBJDIR)"
291                 - mkdir "../src/$(OBJDIR)/etc"
292                 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
294 {$(BLD)}.$(O){$(BLD)}.exe:
295                 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
298 # Build the executables
300 all:            stamp_BLD $(ALL) $(DOC)
303 # Assuming INSTALL_DIR is defined, build and install emacs in it.
305 INSTALL_FILES = $(ALL)
306 install:        $(INSTALL_FILES)
307                 - mkdir "$(INSTALL_DIR)/bin"
308                 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
309                 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
310                 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
311                 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
312                 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
313                 $(CP) $(BLD)/emacsclient.exe $(INSTALL_DIR)/bin
314                 $(CP) $(BLD)/emacsclientw.exe $(INSTALL_DIR)/bin
315                 - mkdir "$(INSTALL_DIR)/etc"
316                 $(CP) $(DOC) $(INSTALL_DIR)/etc
319 # Maintenance
321 # We used to delete *~ here, but that might inadvertently remove
322 # precious files if it happens to match their short 8+3 aliases.
323 clean:
324                 - $(DEL) DOC* $(COMPILER_TEMP_FILES)
325                 - $(DEL) ctags.c
326                 - $(DEL_TREE) $(OBJDIR)
327                 - $(DEL) stamp_BLD
329 distclean: cleanall
330         - $(DEL) TAGS
331         - $(DEL) Makefile
333 maintainer-clean: distclean
335 cleanall:       clean
336                 - $(DEL_TREE) obj
337                 - $(DEL_TREE) obj-spd
338                 - $(DEL_TREE) oo
339                 - $(DEL_TREE) oo-spd
342 # Headers we would preprocess if we could.
344 ../src/config.h:        ../nt/$(CONFIG_H)
345                         $(DEL) $@
346                         echo $(CONFIG_H) has changed.  Re-run configure.bat.
347                         exit -1
349 ### TAGS ###
351 TAGS: $(BLD)/etags.exe *.c *.h
352         $(BLD)/etags.exe *.c *.h
354 ### DEPENDENCIES ###
356 EMACS_ROOT      = ..
357 SRC             = .
359 $(BLD)/alloca.$(O) : \
360         $(SRC)/alloca.c \
361         $(EMACS_ROOT)/src/s/ms-w32.h \
362         $(EMACS_ROOT)/src/m/intel386.h \
363         $(EMACS_ROOT)/src/config.h \
364         $(EMACS_ROOT)/src/blockinput.h
366 $(BLD)/ctags.$(O) : \
367         $(SRC)/ctags.c \
368         $(EMACS_ROOT)/nt/inc/sys/param.h \
369         $(EMACS_ROOT)/nt/inc/sys/stat.h \
370         $(EMACS_ROOT)/src/s/ms-w32.h \
371         $(EMACS_ROOT)/src/m/intel386.h \
372         $(EMACS_ROOT)/lib-src/../src/config.h \
373         $(SRC)/ntlib.h \
374         $(EMACS_ROOT)/lib/getopt.h
376 $(BLD)/ebrowse.$(O) : \
377         $(SRC)/ebrowse.c \
378         $(EMACS_ROOT)/lib/min-max.h \
379         $(EMACS_ROOT)/src/s/ms-w32.h \
380         $(EMACS_ROOT)/src/m/intel386.h \
381         $(EMACS_ROOT)/lib-src/../src/config.h
383 $(BLD)/emacsclient.$(O) : \
384         $(SRC)/emacsclient.c \
385         $(EMACS_ROOT)/nt/inc/sys/stat.h \
386         $(EMACS_ROOT)/src/s/ms-w32.h \
387         $(EMACS_ROOT)/src/m/intel386.h \
388         $(EMACS_ROOT)/lib-src/../src/config.h
390 $(BLD)/etags.$(O) : \
391         $(SRC)/etags.c \
392         $(EMACS_ROOT)/nt/inc/sys/param.h \
393         $(EMACS_ROOT)/nt/inc/sys/stat.h \
394         $(EMACS_ROOT)/src/s/ms-w32.h \
395         $(EMACS_ROOT)/src/m/intel386.h \
396         $(EMACS_ROOT)/lib-src/../src/config.h \
397         $(SRC)/ntlib.h \
398         $(EMACS_ROOT)/lib/getopt.h
400 $(BLD)/getdate.$(O) : \
401         $(SRC)/getdate.c \
402         $(EMACS_ROOT)/src/s/ms-w32.h \
403         $(EMACS_ROOT)/src/m/intel386.h \
404         $(EMACS_ROOT)/src/config.h \
405         $(MSTOOLS_SYS)/types.h
407 $(BLD)/hexl.$(O) : \
408         $(SRC)/hexl.c
410 $(BLD)/leditcfns.$(O) : \
411         $(SRC)/leditcfns.c
413 $(BLD)/make-docfile.$(O) : \
414         $(SRC)/make-docfile.c \
415         $(EMACS_ROOT)/src/config.h
417 $(BLD)/make-path.$(O) : \
418         $(SRC)/make-path.c
420 $(BLD)/movemail.$(O) : \
421         $(SRC)/movemail.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         $(EMACS_ROOT)/nt/inc/sys/file.h \
426         $(EMACS_ROOT)/nt/inc/sys/stat.h \
427         $(EMACS_ROOT)/lib-src/../src/syswait.h \
428         $(EMACS_ROOT)/nt/inc/pwd.h \
429         $(SRC)/ntlib.h
430         $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
432 $(BLD)/ntlib.$(O) : \
433         $(SRC)/ntlib.c \
434         $(SRC)/ntlib.h \
435         $(EMACS_ROOT)/nt/inc/sys/stat.h \
436         $(EMACS_ROOT)/nt/inc/pwd.h
438 $(BLD)/pop.$(O) : \
439         $(SRC)/pop.c \
440         $(SRC)/pop.h \
441         $(EMACS_ROOT)/lib/min-max.h \
442         $(SRC)/ntlib.h
444 $(BLD)/profile.$(O) : \
445         $(SRC)/profile.c \
446         $(EMACS_ROOT)/src/s/ms-w32.h \
447         $(EMACS_ROOT)/src/m/intel386.h \
448         $(EMACS_ROOT)/lib-src/../src/config.h \
449         $(EMACS_ROOT)/lib-src/../src/systime.h
451 $(BLD)/qsort.$(O) : \
452         $(SRC)/qsort.c
454 $(BLD)/tcp.$(O) : \
455         $(SRC)/tcp.c
457 $(BLD)/test-distrib.$(O) : \
458         $(SRC)/test-distrib.c
460 $(BLD)/timer.$(O) : \
461         $(SRC)/timer.c \
462         $(EMACS_ROOT)/src/s/ms-w32.h \
463         $(EMACS_ROOT)/src/m/intel386.h \
464         $(EMACS_ROOT)/lib-src/../src/config.h
466 # The following dependencies are for supporting parallel builds, where
467 # we must make sure $(BLD) exists before any compilation starts.
469 $(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O): stamp_BLD
471 $(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD
473 $(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD
475 $(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O): stamp_BLD