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)
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.in
128 # It doesn't matter if the real name is *.obj for the files in this list,
129 # make-docfile blindly replaces .o with .c anyway. Keep .o in this list
130 # as it is required by code in doc.c.
132 obj= sunfns.o dosfns.o msdos.o \
133 xterm.o xfns.o xmenu.o xselect.o xrdb.o fringe.o image.o \
134 mac.o macterm.o macfns.o macmenu.o fontset.o \
135 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \
136 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
137 dispnew.o frame.o scroll.o xdisp.o window.o \
138 charset.o coding.o category.o ccl.o \
139 cm.o term.o xfaces.o \
140 emacs.o keyboard.o macros.o keymap.o sysdep.o \
141 buffer.o filelock.o insdel.o marker.o \
142 minibuf.o fileio.o dired.o filemode.o \
143 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
144 alloc.o data.o doc.o editfns.o callint.o \
145 eval.o floatfns.o fns.o print.o lread.o \
146 abbrev.o syntax.o bytecode.o \
147 process.o callproc.o \
148 region-cache.o sound.o atimer.o \
149 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o
152 # These are the lisp files that are loaded up in loadup.el
154 lispsource = ../lisp/
156 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
157 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc
159 # lisp files that are loaded up on other platforms
160 MSDOS_SUPPORT = $(lispsource)dos-fns.elc $(lispsource)dos-vars.elc $(lispsource)international/ccl.elc $(lispsource)international/codepage.elc
161 VMS_SUPPORT = $(lispsource)vmsproc.elc $(lispsource)vms-patch.elc
164 $(lispsource)abbrev.elc \
165 $(lispsource)buff-menu.elc \
166 $(lispsource)button.elc \
167 $(lispsource)emacs-lisp/byte-run.elc \
168 $(lispsource)cus-start.elc \
169 $(lispsource)custom.elc \
170 $(lispsource)emacs-lisp/backquote.elc \
171 $(lispsource)emacs-lisp/lisp-mode.elc \
172 $(lispsource)emacs-lisp/lisp.elc \
173 $(lispsource)env.elc \
174 $(lispsource)faces.elc \
175 $(lispsource)files.elc \
176 $(lispsource)format.elc \
177 $(lispsource)facemenu.elc \
179 $(lispsource)emacs-lisp/float-sup.elc \
180 $(lispsource)frame.elc \
181 $(lispsource)help.elc \
182 $(lispsource)indent.elc \
183 $(lispsource)isearch.elc \
184 $(lispsource)loadup.el \
185 $(lispsource)loaddefs.el \
186 $(lispsource)bindings.elc \
187 $(lispsource)emacs-lisp/map-ynp.elc \
188 $(lispsource)menu-bar.elc \
189 $(lispsource)international/mule.elc \
190 $(lispsource)international/mule-conf.el \
191 $(lispsource)international/mule-cmds.elc \
192 $(lispsource)international/characters.elc \
193 $(lispsource)international/ucs-tables.elc \
194 $(lispsource)international/utf-8.elc \
195 $(lispsource)international/latin-1.el \
196 $(lispsource)international/latin-2.el \
197 $(lispsource)international/latin-3.el \
198 $(lispsource)international/latin-4.el \
199 $(lispsource)international/latin-5.el \
200 $(lispsource)international/latin-8.el \
201 $(lispsource)international/latin-9.el \
202 $(lispsource)case-table.elc
205 $(lispsource)language/chinese.elc \
206 $(lispsource)language/cyrillic.elc \
207 $(lispsource)language/indian.elc \
208 $(lispsource)language/devanagari.el \
209 $(lispsource)language/malayalam.el \
210 $(lispsource)language/tamil.el \
211 $(lispsource)language/english.el \
212 $(lispsource)language/ethiopic.elc \
213 $(lispsource)language/european.elc \
214 $(lispsource)language/czech.el \
215 $(lispsource)language/slovak.el \
216 $(lispsource)language/romanian.el \
217 $(lispsource)language/greek.el \
218 $(lispsource)language/hebrew.el \
219 $(lispsource)language/japanese.el \
220 $(lispsource)language/korean.el \
221 $(lispsource)language/lao.el \
222 $(lispsource)language/thai.el \
223 $(lispsource)language/tibetan.elc \
224 $(lispsource)language/vietnamese.elc \
225 $(lispsource)language/misc-lang.el \
226 $(lispsource)language/utf-8-lang.el \
227 $(lispsource)language/georgian.el \
228 $(lispsource)paths.el \
229 $(lispsource)register.elc \
230 $(lispsource)replace.elc \
231 $(lispsource)simple.elc \
232 $(lispsource)startup.elc \
233 $(lispsource)subr.elc \
234 $(lispsource)term/tty-colors.elc \
235 $(lispsource)font-core.elc \
236 $(lispsource)textmodes/fill.elc \
237 $(lispsource)textmodes/page.elc \
238 $(lispsource)textmodes/paragraphs.elc \
239 $(lispsource)textmodes/text-mode.elc \
240 $(lispsource)vc-hooks.elc \
241 $(lispsource)ediff-hook.elc \
245 $(lispsource)widget.elc \
246 $(lispsource)window.elc \
247 $(lispsource)version.el
253 "$(THISDIR)/$(BLD)/make-docfile" -o $(DOC) -d ../src $(obj)
254 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
255 "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
256 $(CP) $(DOC) ../etc/DOC-X
257 - mkdir "../src/$(OBJDIR)"
258 - mkdir "../src/$(OBJDIR)/etc"
259 $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
261 {$(BLD)}.$(O){$(BLD)}.exe:
262 $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)
265 # Build the executables
267 all: $(BLD) $(ALL) $(DOC)
270 # Assuming INSTALL_DIR is defined, build and install emacs in it.
272 INSTALL_FILES = $(ALL)
273 install: $(INSTALL_FILES)
274 - mkdir "$(INSTALL_DIR)/bin"
275 $(CP) $(BLD)/etags.exe $(INSTALL_DIR)/bin
276 $(CP) $(BLD)/ebrowse.exe $(INSTALL_DIR)/bin
277 $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin
278 $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin
279 $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
280 - mkdir "$(INSTALL_DIR)/etc"
281 $(CP) $(DOC) $(INSTALL_DIR)/etc
287 - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES)
289 - $(DEL_TREE) $(OBJDIR)
293 - $(DEL_TREE) obj-spd
298 # Headers we would preprocess if we could.
300 ../src/config.h: ../nt/$(CONFIG_H)
302 ../src/paths.h: ../nt/paths.h
310 $(BLD)/alloca.$(O) : \
312 $(EMACS_ROOT)/src/s/ms-w32.h \
313 $(EMACS_ROOT)/src/m/intel386.h \
314 $(EMACS_ROOT)/src/config.h \
315 $(EMACS_ROOT)/src/blockinput.h
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)/ctags.$(O) : \
325 $(EMACS_ROOT)/nt/inc/sys/param.h \
326 $(EMACS_ROOT)/src/s/ms-w32.h \
327 $(EMACS_ROOT)/src/m/intel386.h \
328 $(EMACS_ROOT)/lib-src/../src/config.h \
332 $(BLD)/cvtmail.$(O) : \
335 $(BLD)/digest-doc.$(O) : \
338 $(BLD)/emacsclient.$(O) : \
339 $(SRC)/emacsclient.c \
340 $(EMACS_ROOT)/src/s/ms-w32.h \
341 $(EMACS_ROOT)/src/m/intel386.h \
342 $(EMACS_ROOT)/lib-src/../src/config.h
344 $(BLD)/emacstool.$(O) : \
346 $(EMACS_ROOT)/nt/inc/sys/file.h
348 $(BLD)/etags.$(O) : \
350 $(EMACS_ROOT)/nt/inc/sys/param.h \
351 $(EMACS_ROOT)/src/s/ms-w32.h \
352 $(EMACS_ROOT)/src/m/intel386.h \
353 $(EMACS_ROOT)/lib-src/../src/config.h \
357 $(BLD)/fakemail.$(O) : \
360 $(EMACS_ROOT)/src/s/ms-w32.h \
361 $(EMACS_ROOT)/src/m/intel386.h \
362 $(EMACS_ROOT)/lib-src/../src/config.h \
363 $(EMACS_ROOT)/nt/inc/pwd.h
365 $(BLD)/getdate.$(O) : \
367 $(EMACS_ROOT)/src/s/ms-w32.h \
368 $(EMACS_ROOT)/src/m/intel386.h \
369 $(EMACS_ROOT)/src/config.h \
370 $(MSTOOLS_SYS)/types.h
372 $(BLD)/getopt.$(O) : \
374 $(EMACS_ROOT)/src/s/ms-w32.h \
375 $(EMACS_ROOT)/src/m/intel386.h \
376 $(EMACS_ROOT)/src/config.h \
380 $(BLD)/getopt1.$(O) : \
382 $(EMACS_ROOT)/src/s/ms-w32.h \
383 $(EMACS_ROOT)/src/m/intel386.h \
384 $(EMACS_ROOT)/src/config.h \
390 $(BLD)/leditcfns.$(O) : \
393 $(BLD)/make-docfile.$(O) : \
394 $(SRC)/make-docfile.c \
395 $(EMACS_ROOT)/src/config.h
397 $(BLD)/make-path.$(O) : \
400 $(BLD)/movemail.$(O) : \
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)/nt/inc/sys/file.h \
406 $(EMACS_ROOT)/lib-src/../src/syswait.h \
407 $(EMACS_ROOT)/nt/inc/pwd.h \
409 $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
411 $(BLD)/ntlib.$(O) : \
414 $(EMACS_ROOT)/nt/inc/pwd.h
421 $(BLD)/profile.$(O) : \
423 $(EMACS_ROOT)/src/s/ms-w32.h \
424 $(EMACS_ROOT)/src/m/intel386.h \
425 $(EMACS_ROOT)/lib-src/../src/config.h \
426 $(EMACS_ROOT)/lib-src/../src/systime.h
428 $(BLD)/qsort.$(O) : \
431 $(BLD)/sorted-doc.$(O) : \
437 $(BLD)/test-distrib.$(O) : \
438 $(SRC)/test-distrib.c
440 $(BLD)/timer.$(O) : \
442 $(EMACS_ROOT)/src/s/ms-w32.h \
443 $(EMACS_ROOT)/src/m/intel386.h \
444 $(EMACS_ROOT)/lib-src/../src/config.h
448 $(EMACS_ROOT)/lib-src/../src/paths.h