1 # Makefile for GNU Emacs on the Microsoft W32 API.
2 # Copyright (c) 2000-2001 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)
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
26 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
27 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
30 # don't know what (if) to do with these yet...
32 # $(BLD)/sorted-doc.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) \
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) \
76 $(BLD)/etags.exe: $(ETAGSOBJ)
77 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
80 EBROWSEOBJ = $(BLD)/ebrowse.$(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) \
102 $(BLD)/ctags.exe: $(CTAGSOBJ)
103 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
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 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 mocklisp.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
132 # These are the lisp files that are loaded up in loadup.el
134 lispsource = ../lisp/
136 FACE_SUPPORT = $(lispsource)facemenu.elc
137 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
138 FLOAT_SUPPORT = $(lispsource)float-sup.elc
139 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
142 $(lispsource)abbrev.elc \
143 $(lispsource)buff-menu.elc \
144 $(lispsource)byte-run.elc \
145 $(lispsource)cus-start.el \
146 $(lispsource)custom.elc \
147 $(lispsource)disp-table.elc \
148 $(lispsource)faces.elc \
149 $(lispsource)files.elc \
150 $(lispsource)textmodes/fill.elc \
151 $(lispsource)format.elc \
155 $(lispsource)frame.elc\
156 $(X_WINDOWS_SUPPORT) \
157 $(lispsource)help.elc \
158 $(lispsource)indent.elc \
159 $(lispsource)isearch.elc \
160 $(lispsource)emacs-lisp/lisp-mode.elc \
161 $(lispsource)emacs-lisp/lisp.elc \
162 $(lispsource)loadup.el \
163 $(lispsource)loaddefs.el \
164 $(lispsource)bindings.el \
165 $(lispsource)map-ynp.elc \
166 $(lispsource)menu-bar.elc \
167 $(lispsource)international/mule.elc \
168 $(lispsource)international/mule-conf.el \
169 $(lispsource)international/mule-cmds.elc \
170 $(lispsource)international/characters.elc \
171 $(lispsource)international/ccl.elc \
172 $(lispsource)international/codepage.elc \
173 $(lispsource)international/utf-8.elc \
174 $(lispsource)case-table.elc \
175 $(lispsource)language/chinese.elc \
176 $(lispsource)language/cyrillic.elc \
177 $(lispsource)language/devanagari.elc \
178 $(lispsource)language/english.elc \
179 $(lispsource)language/ethiopic.elc \
180 $(lispsource)language/european.elc \
181 $(lispsource)language/czech.elc \
182 $(lispsource)language/slovak.elc \
183 $(lispsource)language/romanian.elc \
184 $(lispsource)language/greek.elc \
185 $(lispsource)language/hebrew.elc \
186 $(lispsource)language/indian.elc \
187 $(lispsource)language/japanese.elc \
188 $(lispsource)language/korean.elc \
189 $(lispsource)language/lao.elc \
190 $(lispsource)language/thai.elc \
191 $(lispsource)language/tibetan.elc \
192 $(lispsource)language/vietnamese.elc \
193 $(lispsource)language/misc-lang.elc \
194 $(lispsource)textmodes/page.elc \
195 $(lispsource)textmodes/paragraphs.elc \
196 $(lispsource)paths.el \
197 $(lispsource)register.elc \
198 $(lispsource)replace.elc \
199 $(lispsource)simple.elc \
200 $(lispsource)startup.elc \
201 $(lispsource)subr.elc \
202 $(lispsource)term/tty-colors.elc \
203 $(lispsource)textmodes/text-mode.elc \
204 $(lispsource)vc-hooks.elc \
205 $(lispsource)ediff-hook.elc \
209 $(lispsource)widget.elc \
210 $(lispsource)window.elc \
211 $(lispsource)version.el
215 $(DOC): $(BLD)/make-docfile.exe
217 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(obj) > $(DOC)
218 "$(THISDIR)/$(BLD)/make-docfile" -d ../src $(lisp) >> $(DOC)
219 $(CP) $(DOC) ../etc/DOC-X
220 - mkdir "../src/$(OBJDIR)"
221 - mkdir "../src/$(OBJDIR)/etc"
222 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
224 {$(BLD)}.$(O){$(BLD)}.exe:
225 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
228 # Build the executables
230 all: $(BLD) $(ALL) $(DOC)
233 # Assuming INSTALL_DIR is defined, build and install emacs in it.
235 INSTALL_FILES = $(ALL)
236 install: $(INSTALL_FILES)
237 - mkdir "$(INSTALL_DIR)/bin"
238 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
239 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
240 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
241 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
242 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
243 - mkdir "$(INSTALL_DIR)/etc"
244 $(CP) $(DOC) $(INSTALL_DIR)/etc
250 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
252 - $(DEL_TREE) $(OBJDIR)
256 - $(DEL_TREE) obj-spd
261 # Headers we would preprocess if we could.
263 ../src/config.h: ../nt/$(CONFIG_H)
265 ../src/paths.h: ../nt/paths.h
273 $(BLD)/alloca.$(O) : \
275 $(EMACS_ROOT)/src/s/ms-w32.h \
276 $(EMACS_ROOT)/src/m/intel386.h \
277 $(EMACS_ROOT)/src/config.h \
278 $(EMACS_ROOT)/src/blockinput.h
282 $(EMACS_ROOT)/src/s/ms-w32.h \
283 $(EMACS_ROOT)/src/m/intel386.h \
284 $(EMACS_ROOT)/lib-src/../src/config.h
286 $(BLD)/ctags.$(O) : \
288 $(EMACS_ROOT)/nt/inc/sys/param.h \
289 $(EMACS_ROOT)/src/s/ms-w32.h \
290 $(EMACS_ROOT)/src/m/intel386.h \
291 $(EMACS_ROOT)/lib-src/../src/config.h \
295 $(BLD)/cvtmail.$(O) : \
298 $(BLD)/digest-doc.$(O) : \
301 $(BLD)/emacsclient.$(O) : \
302 $(SRC)/emacsclient.c \
303 $(EMACS_ROOT)/src/s/ms-w32.h \
304 $(EMACS_ROOT)/src/m/intel386.h \
305 $(EMACS_ROOT)/lib-src/../src/config.h
307 $(BLD)/emacsserver.$(O) : \
308 $(SRC)/emacsserver.c \
309 $(EMACS_ROOT)/src/s/ms-w32.h \
310 $(EMACS_ROOT)/src/m/intel386.h \
311 $(EMACS_ROOT)/lib-src/../src/config.h \
312 $(EMACS_ROOT)/nt/inc/sys/file.h
314 $(BLD)/emacstool.$(O) : \
316 $(EMACS_ROOT)/nt/inc/sys/file.h
318 $(BLD)/etags.$(O) : \
320 $(EMACS_ROOT)/nt/inc/sys/param.h \
321 $(EMACS_ROOT)/src/s/ms-w32.h \
322 $(EMACS_ROOT)/src/m/intel386.h \
323 $(EMACS_ROOT)/lib-src/../src/config.h \
327 $(BLD)/fakemail.$(O) : \
330 $(EMACS_ROOT)/src/s/ms-w32.h \
331 $(EMACS_ROOT)/src/m/intel386.h \
332 $(EMACS_ROOT)/lib-src/../src/config.h \
333 $(EMACS_ROOT)/nt/inc/pwd.h
335 $(BLD)/getdate.$(O) : \
337 $(EMACS_ROOT)/src/s/ms-w32.h \
338 $(EMACS_ROOT)/src/m/intel386.h \
339 $(EMACS_ROOT)/src/config.h \
340 $(MSTOOLS_SYS)/types.h
342 $(BLD)/getopt.$(O) : \
344 $(EMACS_ROOT)/src/s/ms-w32.h \
345 $(EMACS_ROOT)/src/m/intel386.h \
346 $(EMACS_ROOT)/src/config.h \
350 $(BLD)/getopt1.$(O) : \
352 $(EMACS_ROOT)/src/s/ms-w32.h \
353 $(EMACS_ROOT)/src/m/intel386.h \
354 $(EMACS_ROOT)/src/config.h \
360 $(BLD)/leditcfns.$(O) : \
363 $(BLD)/make-docfile.$(O) : \
364 $(SRC)/make-docfile.c \
365 $(EMACS_ROOT)/src/config.h
367 $(BLD)/make-path.$(O) : \
370 $(BLD)/movemail.$(O) : \
372 $(EMACS_ROOT)/src/s/ms-w32.h \
373 $(EMACS_ROOT)/src/m/intel386.h \
374 $(EMACS_ROOT)/lib-src/../src/config.h \
375 $(EMACS_ROOT)/nt/inc/sys/file.h \
376 $(EMACS_ROOT)/lib-src/../src/syswait.h \
377 $(EMACS_ROOT)/nt/inc/pwd.h \
379 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
381 $(BLD)/ntlib.$(O) : \
384 $(EMACS_ROOT)/nt/inc/pwd.h
391 $(BLD)/profile.$(O) : \
393 $(EMACS_ROOT)/src/s/ms-w32.h \
394 $(EMACS_ROOT)/src/m/intel386.h \
395 $(EMACS_ROOT)/lib-src/../src/config.h \
396 $(EMACS_ROOT)/lib-src/../src/systime.h
398 $(BLD)/qsort.$(O) : \
401 $(BLD)/sorted-doc.$(O) : \
407 $(BLD)/test-distrib.$(O) : \
408 $(SRC)/test-distrib.c
410 $(BLD)/timer.$(O) : \
412 $(EMACS_ROOT)/src/s/ms-w32.h \
413 $(EMACS_ROOT)/src/m/intel386.h \
414 $(EMACS_ROOT)/lib-src/../src/config.h
418 $(EMACS_ROOT)/lib-src/../src/paths.h