(ange-ftp-tmp-name-template): Use temporary-file-directory.
[bpt/emacs.git] / lib-src / makefile.nt
CommitLineData
95ed0025
RS
1# Makefile for GNU Emacs lib-src directory.
2# Geoff Voelker (voelker@cs.washington.edu)
3# Copyright (C) 1994 Free Software Foundation, Inc.
4#
5# This file is part of GNU Emacs.
6#
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)
10# any later version.
11#
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.
16#
17# You should have received a copy of the GNU General Public License
1fb87c77
KH
18# along with GNU Emacs; see the file COPYING. If not, write to the
19# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20# Boston, MA 02111-1307, USA.
95ed0025
RS
21#
22
23#
24# Sets up the system dependent macros.
25#
26!include ..\nt\makefile.def
27
c81ebaba 28LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -I..\nt\inc -I..\src
95ed0025 29
48717ed4 30LINK_FLAGS = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
95ed0025
RS
31
32ALL = $(BLD)\make-docfile.exe \
33 $(BLD)\hexl.exe \
95ed0025 34 $(BLD)\ctags.exe \
c81ebaba
GV
35 $(BLD)\etags.exe \
36 $(BLD)\movemail.exe \
37 $(BLD)\fakemail.exe \
95ed0025
RS
38
39
40# don't know what (if) to do with these yet...
41#
42# $(BLD)\sorted-doc.exe \
43# $(BLD)\env.exe \
44# $(BLD)\server.exe \
45# $(BLD)\emacstool.exe \
95ed0025 46# $(BLD)\leditcfns.exe \
95ed0025
RS
47# $(BLD)\emacsclient.exe \
48# $(BLD)\cvtmail.exe \
49# $(BLD)\digest-doc.exe \
50# $(BLD)\test-distrib.exe \
51
52
85212e67 53LIBS = $(BASE_LIBS)
95ed0025 54
c81ebaba
GV
55$(BLD)\make-docfile.exe: $(BLD)\make-docfile.obj $(BLD)\ntlib.obj
56 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
85212e67 57$(BLD)\hexl.exe: $(BLD)\hexl.obj
c81ebaba
GV
58$(BLD)\fakemail.exe: $(BLD)\fakemail.obj $(BLD)\ntlib.obj
59 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
95ed0025 60
48717ed4 61make-docfile: $(BLD) $(BLD)\make-docfile.exe
48717ed4
GV
62etags: $(BLD) $(BLD)\etags.exe
63hexl: $(BLD) $(BLD)\hexl.exe
c81ebaba
GV
64movemail: $(BLD) $(BLD)\movemail.exe
65fakemail: $(BLD) $(BLD)\fakemail.exe
95ed0025 66
896d5821
GV
67GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
68GETOPTDEPS = $(GETOPTOBJS) getopt.h
69MOVEMAILOBJS = $(BLD)\movemail.obj \
70 $(BLD)\pop.obj \
71 $(BLD)\ntlib.obj \
72 $(GETOPTOBJS)
73
74$(BLD)\movemail.exe: $(MOVEMAILOBJS) getopt.h
90eef3d9
GV
75# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
76 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
896d5821 77
95ed0025
RS
78ETAGSOBJ = $(BLD)\etags.obj \
79 $(BLD)\getopt.obj \
80 $(BLD)\getopt1.obj \
48717ed4
GV
81 $(BLD)\ntlib.obj \
82 $(BLD)\regex.obj \
83 $(BLD)\alloca.obj
95ed0025 84
f1d5eaf9 85
48717ed4 86$(BLD)\etags.exe: $(ETAGSOBJ)
ebd67b8e 87 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
95ed0025 88
48717ed4
GV
89
90$(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
91 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
92 ../src/regex.c -Fo$@
93
73bff96e 94ETAGS_CFLAGS = -DETAGS_REGEXPS -DHAVE_GETCWD
48717ed4 95$(BLD)\etags.obj: etags.c
f1d5eaf9 96 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
48717ed4
GV
97
98CTAGSOBJ = $(BLD)\ctags.obj \
99 $(BLD)\getopt.obj \
100 $(BLD)\getopt1.obj \
f1d5eaf9
GV
101 $(BLD)\ntlib.obj \
102 $(BLD)\regex.obj \
103 $(BLD)\alloca.obj
48717ed4
GV
104
105$(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
106 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
107
108ctags.c: etags.c
2e17c871 109 - $(DEL) ctags.c
48717ed4
GV
110 copy etags.c ctags.c
111
f1d5eaf9 112CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
48717ed4 113$(BLD)\ctags.obj: ctags.c
f1d5eaf9 114 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
48717ed4 115
95ed0025
RS
116#
117# don't know what to do with these yet...
118#
c81ebaba
GV
119# $(BLD)\sorted-doc.exe: $(BLD)\sorted-doc.obj
120# $(BLD)\yow.exe: $(BLD)\yow.obj
121# $(BLD)\emacstool.exe: $(BLD)\emacstool.obj
122# $(BLD)\leditcfns.exe: $(BLD)\leditcfns.obj
123# $(BLD)\server.exe: $(BLD)\server.obj
124# $(BLD)\cvtmail.exe: $(BLD)\cvtmail.obj
125# $(BLD)\digest-doc.exe: $(BLD)\digest-doc.obj
126# $(BLD)\emacsclient.exe: $(BLD)\emacsclient.obj
127# $(BLD)\test-distrib.exe: $(BLD)\test-distrib.obj
95ed0025
RS
128
129#
85212e67 130# From ..\src\makefile.nt.
95ed0025 131#
5568885b 132obj = 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 w32faces.c w32fns.c w32heap.c w32inevt.c w32proc.c w32reg.c w32menu.c w32select.c w32term.c w32xfns.c
95ed0025
RS
133
134#
135# These are the lisp files that are loaded up in loadup.el
136#
896d5821
GV
137lispsource = ../lisp/
138
139FACE_SUPPORT = $(lispsource)facemenu.elc
140MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc
141FLOAT_SUPPORT = $(lispsource)float-sup.elc
142WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
143
95ed0025 144lisp= \
896d5821
GV
145 $(lispsource)abbrev.elc \
146 $(lispsource)buff-menu.elc \
147 $(lispsource)byte-run.elc \
148 $(lispsource)cus-start.el \
149 $(lispsource)custom.elc \
150 $(lispsource)faces.elc \
151 $(lispsource)files.elc \
44874bcb 152 $(lispsource)textmodes/fill.elc \
896d5821
GV
153 $(lispsource)format.elc \
154 $(FACE_SUPPORT) \
155 $(MOUSE_SUPPORT) \
156 $(FLOAT_SUPPORT) \
157 $(lispsource)frame.elc\
158 $(X_WINDOWS_SUPPORT) \
159 $(lispsource)help.elc \
160 $(lispsource)indent.elc \
161 $(lispsource)isearch.elc \
44874bcb
GV
162 $(lispsource)emacs-lisp/lisp-mode.elc \
163 $(lispsource)emacs-lisp/lisp.elc \
896d5821
GV
164 $(lispsource)loadup.el \
165 $(lispsource)loaddefs.el \
166 $(lispsource)map-ynp.elc \
167 $(lispsource)menu-bar.elc \
168 $(lispsource)international/mule.elc \
169 $(lispsource)international/mule-conf.el \
170 $(lispsource)international/mule-cmds.elc \
171 $(lispsource)international/characters.elc \
172 $(lispsource)language/chinese.elc \
173 $(lispsource)language/cyrillic.elc \
174 $(lispsource)language/devanagari.elc \
175 $(lispsource)language/english.elc \
176 $(lispsource)language/ethiopic.elc \
177 $(lispsource)language/european.elc \
178 $(lispsource)language/greek.elc \
179 $(lispsource)language/hebrew.elc \
180 $(lispsource)language/indian.elc \
181 $(lispsource)language/japanese.elc \
182 $(lispsource)language/korean.elc \
183 $(lispsource)language/lao.elc \
184 $(lispsource)language/thai.elc \
185 $(lispsource)language/tibetan.elc \
186 $(lispsource)language/vietnamese.elc \
187 $(lispsource)language/misc-lang.elc \
44874bcb
GV
188 $(lispsource)textmodes/page.elc \
189 $(lispsource)textmodes/paragraphs.elc \
896d5821
GV
190 $(lispsource)paths.el \
191 $(lispsource)register.elc \
192 $(lispsource)replace.elc \
193 $(lispsource)simple.elc \
194 $(lispsource)startup.elc \
195 $(lispsource)subr.elc \
44874bcb 196 $(lispsource)textmodes/text-mode.elc \
896d5821
GV
197 $(lispsource)vc-hooks.elc \
198 $(lispsource)ediff-hook.elc \
199 $(VMS_SUPPORT) \
200 $(MSDOS_SUPPORT) \
201 $(WINNT_SUPPORT) \
202 $(lispsource)window.elc \
203 $(lispsource)version.el
204
95ed0025
RS
205
206DOC = DOC
207$(DOC): $(BLD)\make-docfile.exe
2e17c871 208 - $(DEL) $(DOC)
95ed0025
RS
209 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
210 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
ebd67b8e 211 $(CP) $(DOC) ..\etc\DOC-X
95ed0025
RS
212 - mkdir ..\src\$(OBJDIR)
213 - mkdir ..\src\$(OBJDIR)\etc
ebd67b8e 214 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
95ed0025
RS
215
216{$(BLD)}.obj{$(BLD)}.exe:
217 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
218
219.c{$(BLD)}.obj:
220 $(CC) $(CFLAGS) -Fo$@ $<
221
222#
223# Build the executables
224#
225all: $(BLD) $(ALL) $(DOC)
226
227#
228# Assuming INSTALL_DIR is defined, build and install emacs in it.
229#
230INSTALL_FILES = $(ALL)
231install: $(INSTALL_FILES)
232 - mkdir $(INSTALL_DIR)\bin
233 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
234 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
235 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
c81ebaba
GV
236 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
237 $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
95ed0025
RS
238 - mkdir $(INSTALL_DIR)\etc
239 $(CP) $(DOC) $(INSTALL_DIR)\etc
240
241#
242# Maintenance
243#
2e17c871 244clean:; - $(DEL) *~ *.pdb DOC*
5568885b 245 - $(DEL) *.orig *.rej *.crlf ctags.c
ebd67b8e 246 - $(DEL_TREE) deleted
5568885b
GV
247 - $(DEL_TREE) obj
248 - $(DEL_TREE) obj-spd
95ed0025
RS
249
250#
251# Headers we would preprocess if we could.
252#
85212e67
GV
253..\src\config.h: ..\nt\$(CONFIG_H)
254 $(CP) $** $@
ebd67b8e 255..\src\paths.h: ..\nt\paths.h
85212e67 256 $(CP) $** $@
95ed0025
RS
257
258### DEPENDENCIES ###
259
260EMACS_ROOT = ..
261SRC = .
262
263$(BLD)\alloca.obj : \
264 $(SRC)\alloca.c \
26d93756 265 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 266 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
267 $(EMACS_ROOT)\src\config.h \
268 $(EMACS_ROOT)\src\blockinput.h
269
270$(BLD)\b2m.obj : \
271 $(SRC)\b2m.c \
26d93756 272 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 273 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
274 $(EMACS_ROOT)\lib-src\..\src\config.h
275
44874bcb
GV
276$(BLD)\ctags.obj : \
277 $(SRC)\ctags.c \
278 $(EMACS_ROOT)\nt\inc\sys\param.h \
279 $(EMACS_ROOT)\src\s\ms-w32.h \
280 $(EMACS_ROOT)\src\m\intel386.h \
281 $(EMACS_ROOT)\lib-src\..\src\config.h \
282 $(SRC)\ntlib.h \
283 $(SRC)\getopt.h
284
95ed0025
RS
285$(BLD)\cvtmail.obj : \
286 $(SRC)\cvtmail.c
287
288$(BLD)\digest-doc.obj : \
289 $(SRC)\digest-doc.c
290
291$(BLD)\emacsclient.obj : \
292 $(SRC)\emacsclient.c \
26d93756 293 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 294 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
295 $(EMACS_ROOT)\lib-src\..\src\config.h
296
297$(BLD)\emacsserver.obj : \
298 $(SRC)\emacsserver.c \
26d93756 299 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 300 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
301 $(EMACS_ROOT)\lib-src\..\src\config.h \
302 $(EMACS_ROOT)\nt\inc\sys\file.h
303
304$(BLD)\emacstool.obj : \
305 $(SRC)\emacstool.c \
306 $(EMACS_ROOT)\nt\inc\sys\file.h
307
308$(BLD)\etags.obj : \
309 $(SRC)\etags.c \
310 $(EMACS_ROOT)\nt\inc\sys\param.h \
26d93756 311 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 312 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025 313 $(EMACS_ROOT)\lib-src\..\src\config.h \
44874bcb 314 $(SRC)\ntlib.h \
95ed0025
RS
315 $(SRC)\getopt.h
316
317$(BLD)\fakemail.obj : \
318 $(SRC)\fakemail.c \
c81ebaba 319 $(SRC)\ntlib.h \
26d93756 320 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 321 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
322 $(EMACS_ROOT)\lib-src\..\src\config.h \
323 $(EMACS_ROOT)\nt\inc\pwd.h
324
325$(BLD)\getdate.obj : \
326 $(SRC)\getdate.c \
26d93756 327 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 328 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
329 $(EMACS_ROOT)\src\config.h \
330 $(MSTOOLS_SYS)\types.h
331
332$(BLD)\getopt.obj : \
333 $(SRC)\getopt.c \
26d93756 334 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 335 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025 336 $(EMACS_ROOT)\src\config.h \
44874bcb 337 $(SRC)\ntlib.h \
95ed0025
RS
338 $(SRC)\getopt.h
339
340$(BLD)\getopt1.obj : \
341 $(SRC)\getopt1.c \
26d93756 342 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 343 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
344 $(EMACS_ROOT)\src\config.h \
345 $(SRC)\getopt.h
346
347$(BLD)\hexl.obj : \
348 $(SRC)\hexl.c
349
350$(BLD)\leditcfns.obj : \
351 $(SRC)\leditcfns.c
352
353$(BLD)\make-docfile.obj : \
85212e67
GV
354 $(SRC)\make-docfile.c \
355 $(EMACS_ROOT)\src\config.h
95ed0025
RS
356
357$(BLD)\make-path.obj : \
358 $(SRC)\make-path.c
359
360$(BLD)\movemail.obj : \
361 $(SRC)\movemail.c \
26d93756 362 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 363 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
364 $(EMACS_ROOT)\lib-src\..\src\config.h \
365 $(EMACS_ROOT)\nt\inc\sys\file.h \
366 $(EMACS_ROOT)\src\vmsproc.h \
367 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
44874bcb
GV
368 $(EMACS_ROOT)\nt\inc\pwd.h \
369 $(SRC)\ntlib.h
c81ebaba
GV
370 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
371
372$(BLD)\ntlib.obj : \
373 $(SRC)\ntlib.c \
374 $(SRC)\ntlib.h \
375 $(EMACS_ROOT)\nt\inc\pwd.h
376
377$(BLD)\pop.obj : \
378 $(SRC)\pop.c \
379 $(SRC)\pop.h \
380 $(SRC)\ntlib.h
95ed0025
RS
381
382$(BLD)\profile.obj : \
383 $(SRC)\profile.c \
26d93756 384 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 385 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
386 $(EMACS_ROOT)\lib-src\..\src\config.h \
387 $(EMACS_ROOT)\src\vmstime.h \
388 $(EMACS_ROOT)\lib-src\..\src\systime.h
389
390$(BLD)\qsort.obj : \
391 $(SRC)\qsort.c
392
393$(BLD)\sorted-doc.obj : \
394 $(SRC)\sorted-doc.c
395
396$(BLD)\tcp.obj : \
397 $(SRC)\tcp.c
398
399$(BLD)\test-distrib.obj : \
400 $(SRC)\test-distrib.c
401
402$(BLD)\timer.obj : \
403 $(SRC)\timer.c \
26d93756 404 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 405 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
406 $(EMACS_ROOT)\lib-src\..\src\config.h
407
95ed0025
RS
408$(BLD)\yow.obj : \
409 $(SRC)\yow.c \
410 $(EMACS_ROOT)\lib-src\..\src\paths.h