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