1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006 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)
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
27 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
28 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
31 # don't know what (if) to do with these yet...
33 # $(BLD)/sorted-doc.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) \
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) \
77 $(BLD)/etags.exe: $(ETAGSOBJ)
78 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
81 EBROWSEOBJ = $(BLD)/ebrowse.$(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) \
103 $(BLD)/ctags.exe: $(CTAGSOBJ)
104 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
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 $(lispsource)tooltip.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
165 $(lispsource)abbrev.elc \
166 $(lispsource)buff-menu.elc \
167 $(lispsource)button.elc \
168 $(lispsource)emacs-lisp/byte-run.elc \
169 $(lispsource)cus-face.elc \
170 $(lispsource)cus-start.elc \
171 $(lispsource)custom.elc \
172 $(lispsource)emacs-lisp/backquote.elc \
173 $(lispsource)emacs-lisp/lisp-mode.elc \
174 $(lispsource)emacs-lisp/lisp.elc \
175 $(lispsource)facemenu.elc \
177 $(lispsource)faces.elc \
178 $(lispsource)files.elc \
179 $(lispsource)emacs-lisp/float-sup.elc \
180 $(lispsource)format.elc \
181 $(lispsource)frame.elc \
182 $(lispsource)help.elc \
183 $(lispsource)indent.elc \
184 $(lispsource)isearch.elc \
185 $(lispsource)rfn-eshadow.elc \
186 $(lispsource)loadup.el \
187 $(lispsource)loaddefs.el \
188 $(lispsource)bindings.elc \
189 $(lispsource)emacs-lisp/map-ynp.elc \
190 $(lispsource)env.elc \
191 $(lispsource)international/mule.elc \
192 $(lispsource)international/mule-conf.el \
193 $(lispsource)international/mule-cmds.elc \
194 $(lispsource)international/characters.elc \
195 $(lispsource)international/ucs-tables.elc \
196 $(lispsource)international/utf-8.elc \
197 $(lispsource)international/utf-16.elc \
198 $(lispsource)international/latin-1.el \
199 $(lispsource)international/latin-2.el \
200 $(lispsource)international/latin-3.el \
201 $(lispsource)international/latin-4.el \
202 $(lispsource)international/latin-5.el \
203 $(lispsource)international/latin-8.el \
204 $(lispsource)international/latin-9.el \
205 $(lispsource)image.elc \
206 $(lispsource)international/fontset.elc \
207 $(lispsource)dnd.elc \
208 $(lispsource)mwheel.elc \
209 $(lispsource)tool-bar.elc \
210 $(lispsource)case-table.elc
213 $(lispsource)language/chinese.elc \
214 $(lispsource)language/cyrillic.elc \
215 $(lispsource)language/indian.elc \
216 $(lispsource)language/devanagari.el \
217 $(lispsource)language/kannada.el \
218 $(lispsource)language/malayalam.el \
219 $(lispsource)language/tamil.el \
220 $(lispsource)language/english.el \
221 $(lispsource)language/ethiopic.elc \
222 $(lispsource)language/european.elc \
223 $(lispsource)language/czech.el \
224 $(lispsource)language/slovak.el \
225 $(lispsource)language/romanian.el \
226 $(lispsource)language/greek.el \
227 $(lispsource)language/hebrew.el \
228 $(lispsource)language/japanese.el \
229 $(lispsource)language/korean.el \
230 $(lispsource)language/lao.el \
231 $(lispsource)language/thai.el \
232 $(lispsource)language/tibetan.elc \
233 $(lispsource)language/vietnamese.elc \
234 $(lispsource)language/misc-lang.el \
235 $(lispsource)language/utf-8-lang.el \
236 $(lispsource)language/georgian.el \
237 $(lispsource)menu-bar.elc \
238 $(lispsource)paths.el \
239 $(lispsource)register.elc \
240 $(lispsource)replace.elc \
241 $(lispsource)simple.elc \
242 $(lispsource)startup.elc \
243 $(lispsource)subr.elc \
244 $(lispsource)term/tty-colors.elc \
245 $(lispsource)font-core.elc \
246 $(lispsource)emacs-lisp/syntax.elc \
247 $(lispsource)font-lock.elc \
248 $(lispsource)jit-lock.elc \
249 $(lispsource)textmodes/fill.elc \
250 $(lispsource)textmodes/page.elc \
251 $(lispsource)textmodes/paragraphs.elc \
252 $(lispsource)textmodes/text-mode.elc \
253 $(lispsource)emacs-lisp/timer.elc \
254 $(lispsource)vc-hooks.elc \
255 $(lispsource)jka-cmpr-hook.elc \
256 $(lispsource)ediff-hook.elc \
260 $(lispsource)widget.elc \
261 $(lispsource)window.elc \
262 $(lispsource)version.el
266 $(DOC): $(BLD) $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(lisp2)
268 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
269 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
270 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
271 $(CP) $(DOC) ../etc/DOC-X
272 - mkdir "../src/$(OBJDIR)"
273 - mkdir "../src/$(OBJDIR)/etc"
274 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
276 {$(BLD)}.$(O){$(BLD)}.exe:
277 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
280 # Build the executables
282 all: $(BLD) $(ALL) $(DOC)
285 # Assuming INSTALL_DIR is defined, build and install emacs in it.
287 INSTALL_FILES = $(ALL)
288 install: $(INSTALL_FILES)
289 - mkdir "$(INSTALL_DIR)/bin"
290 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
291 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
292 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
293 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
294 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
295 - mkdir "$(INSTALL_DIR)/etc"
296 $(CP) $(DOC) $(INSTALL_DIR)/etc
302 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
305 - $(DEL_TREE) $(OBJDIR)
309 - $(DEL_TREE) obj-spd
314 # Headers we would preprocess if we could.
316 ../src/config.h: ../nt/$(CONFIG_H)
317 echo config.h has changed. Re-run configure.bat.
328 $(BLD)/alloca.$(O) : \
330 $(EMACS_ROOT)/src/s/ms-w32.h \
331 $(EMACS_ROOT)/src/m/intel386.h \
332 $(EMACS_ROOT)/src/config.h \
333 $(EMACS_ROOT)/src/blockinput.h
337 $(EMACS_ROOT)/src/s/ms-w32.h \
338 $(EMACS_ROOT)/src/m/intel386.h \
339 $(EMACS_ROOT)/lib-src/../src/config.h
341 $(BLD)/ctags.$(O) : \
343 $(EMACS_ROOT)/nt/inc/sys/param.h \
344 $(EMACS_ROOT)/src/s/ms-w32.h \
345 $(EMACS_ROOT)/src/m/intel386.h \
346 $(EMACS_ROOT)/lib-src/../src/config.h \
350 $(BLD)/cvtmail.$(O) : \
353 $(BLD)/digest-doc.$(O) : \
356 $(BLD)/emacsclient.$(O) : \
357 $(SRC)/emacsclient.c \
358 $(EMACS_ROOT)/src/s/ms-w32.h \
359 $(EMACS_ROOT)/src/m/intel386.h \
360 $(EMACS_ROOT)/lib-src/../src/config.h
362 $(BLD)/emacstool.$(O) : \
364 $(EMACS_ROOT)/nt/inc/sys/file.h
366 $(BLD)/etags.$(O) : \
368 $(EMACS_ROOT)/nt/inc/sys/param.h \
369 $(EMACS_ROOT)/src/s/ms-w32.h \
370 $(EMACS_ROOT)/src/m/intel386.h \
371 $(EMACS_ROOT)/lib-src/../src/config.h \
375 $(BLD)/fakemail.$(O) : \
378 $(EMACS_ROOT)/src/s/ms-w32.h \
379 $(EMACS_ROOT)/src/m/intel386.h \
380 $(EMACS_ROOT)/lib-src/../src/config.h \
381 $(EMACS_ROOT)/nt/inc/pwd.h
383 $(BLD)/getdate.$(O) : \
385 $(EMACS_ROOT)/src/s/ms-w32.h \
386 $(EMACS_ROOT)/src/m/intel386.h \
387 $(EMACS_ROOT)/src/config.h \
388 $(MSTOOLS_SYS)/types.h
390 $(BLD)/getopt.$(O) : \
392 $(EMACS_ROOT)/src/s/ms-w32.h \
393 $(EMACS_ROOT)/src/m/intel386.h \
394 $(EMACS_ROOT)/src/config.h \
398 $(BLD)/getopt1.$(O) : \
400 $(EMACS_ROOT)/src/s/ms-w32.h \
401 $(EMACS_ROOT)/src/m/intel386.h \
402 $(EMACS_ROOT)/src/config.h \
408 $(BLD)/leditcfns.$(O) : \
411 $(BLD)/make-docfile.$(O) : \
412 $(SRC)/make-docfile.c \
413 $(EMACS_ROOT)/src/config.h
415 $(BLD)/make-path.$(O) : \
418 $(BLD)/movemail.$(O) : \
420 $(EMACS_ROOT)/src/s/ms-w32.h \
421 $(EMACS_ROOT)/src/m/intel386.h \
422 $(EMACS_ROOT)/lib-src/../src/config.h \
423 $(EMACS_ROOT)/nt/inc/sys/file.h \
424 $(EMACS_ROOT)/lib-src/../src/syswait.h \
425 $(EMACS_ROOT)/nt/inc/pwd.h \
427 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
429 $(BLD)/ntlib.$(O) : \
432 $(EMACS_ROOT)/nt/inc/pwd.h
439 $(BLD)/profile.$(O) : \
441 $(EMACS_ROOT)/src/s/ms-w32.h \
442 $(EMACS_ROOT)/src/m/intel386.h \
443 $(EMACS_ROOT)/lib-src/../src/config.h \
444 $(EMACS_ROOT)/lib-src/../src/systime.h
446 $(BLD)/qsort.$(O) : \
449 $(BLD)/sorted-doc.$(O) : \
455 $(BLD)/test-distrib.$(O) : \
456 $(SRC)/test-distrib.c
458 $(BLD)/timer.$(O) : \
460 $(EMACS_ROOT)/src/s/ms-w32.h \
461 $(EMACS_ROOT)/src/m/intel386.h \
462 $(EMACS_ROOT)/lib-src/../src/config.h
466 $(EMACS_ROOT)/lib-src/../src/paths.h