Spelling fix.
[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
18# along with GNU Emacs; see the file COPYING. If not, write to
19# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20#
21
22#
23# Sets up the system dependent macros.
24#
25!include ..\nt\makefile.def
26
27LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 -DNO_ARCHIVES=1 -I..\src
28OBJDIR = obj
29BLD = $(OBJDIR)\$(ARCH)
30
48717ed4 31LINK_FLAGS = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
95ed0025
RS
32
33ALL = $(BLD)\make-docfile.exe \
34 $(BLD)\hexl.exe \
35 $(BLD)\wakeup.exe \
36 $(BLD)\ctags.exe \
37 $(BLD)\etags.exe
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 \
46# $(BLD)\fakemail.exe \
47# $(BLD)\leditcfns.exe \
48# $(BLD)\movemail.exe \
49# $(BLD)\emacsclient.exe \
50# $(BLD)\cvtmail.exe \
51# $(BLD)\digest-doc.exe \
52# $(BLD)\test-distrib.exe \
53
54
85212e67 55LIBS = $(BASE_LIBS)
95ed0025 56
85212e67
GV
57$(BLD)\make-docfile.exe: $(BLD)\make-docfile.obj
58$(BLD)\hexl.exe: $(BLD)\hexl.obj
85212e67 59$(BLD)\wakeup.exe: $(BLD)\wakeup.obj $(BLD)\ntlib.obj
48717ed4
GV
60 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\wakeup.obj \
61 $(BLD)\ntlib.obj $(LIBS)
95ed0025 62
48717ed4
GV
63make-docfile: $(BLD) $(BLD)\make-docfile.exe
64wakeup: $(BLD) $(BLD)\wakeup.exe
65etags: $(BLD) $(BLD)\etags.exe
66hexl: $(BLD) $(BLD)\hexl.exe
95ed0025
RS
67
68ETAGSOBJ = $(BLD)\etags.obj \
69 $(BLD)\getopt.obj \
70 $(BLD)\getopt1.obj \
48717ed4
GV
71 $(BLD)\ntlib.obj \
72 $(BLD)\regex.obj \
73 $(BLD)\alloca.obj
95ed0025 74
f1d5eaf9 75
48717ed4 76$(BLD)\etags.exe: $(ETAGSOBJ)
ebd67b8e 77 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
95ed0025 78
48717ed4
GV
79
80$(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
81 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
82 ../src/regex.c -Fo$@
83
f1d5eaf9 84ETAGS_CFLAGS = -DETAGS_REGEXPS
48717ed4 85$(BLD)\etags.obj: etags.c
f1d5eaf9 86 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
48717ed4
GV
87
88CTAGSOBJ = $(BLD)\ctags.obj \
89 $(BLD)\getopt.obj \
90 $(BLD)\getopt1.obj \
f1d5eaf9
GV
91 $(BLD)\ntlib.obj \
92 $(BLD)\regex.obj \
93 $(BLD)\alloca.obj
48717ed4
GV
94
95$(BLD)\ctags.exe: ctags.c $(CTAGSOBJ)
96 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
97
98ctags.c: etags.c
2e17c871 99 - $(DEL) ctags.c
48717ed4
GV
100 copy etags.c ctags.c
101
f1d5eaf9 102CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS)
48717ed4 103$(BLD)\ctags.obj: ctags.c
f1d5eaf9 104 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
48717ed4 105
95ed0025
RS
106#
107# don't know what to do with these yet...
108#
109# $(BLD)\sorted-doc.exe: $(LIBS) $(BLD)\sorted-doc.obj
110# $(BLD)\yow.exe: $(LIBS) $(BLD)\yow.obj
111# $(BLD)\emacstool.exe: $(LIBS) $(BLD)\emacstool.obj
112# $(BLD)\env.exe: $(LIBS) $(BLD)\env.obj
113# $(BLD)\fakemail.exe: $(LIBS) $(BLD)\fakemail.obj
114# $(BLD)\leditcfns.exe: $(LIBS) $(BLD)\leditcfns.obj
115# $(BLD)\server.exe: $(LIBS) $(BLD)\server.obj
116# $(BLD)\wakeup.exe: $(LIBS) $(BLD)\wakeup.obj
117# $(BLD)\movemail.exe: $(LIBS) $(BLD)\movemail.obj
118# $(BLD)\cvtmail.exe: $(LIBS) $(BLD)\cvtmail.obj
119# $(BLD)\digest-doc.exe: $(LIBS) $(BLD)\digest-doc.obj
120# $(BLD)\emacsclient.exe: $(LIBS) $(BLD)\emacsclient.obj
121# $(BLD)\qsort.exe: $(LIBS) $(BLD)\qsort.obj
122# $(BLD)\test-distrib.exe: $(LIBS) $(BLD)\test-distrib.obj
123
124#
85212e67 125# From ..\src\makefile.nt.
95ed0025 126#
a3af2143 127obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c cm.c cmds.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c eval.c fileio.c filelock.c filemode.c fns.c indent.c insdel.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c xfaces.c mocklisp.c nt.c ntheap.c ntinevt.c ntproc.c ntterm.c print.c process.c regex.c scroll.c search.c syntax.c sysdep.c term.c termcap.c tparam.c undo.c unexnt.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 w32term.c w32xfns.c w32fns.c w32faces.c w32select.c w32menu.c w32reg.c
95ed0025
RS
128
129lispdir = ..\lisp
130
131#
132# These are the lisp files that are loaded up in loadup.el
133#
134lisp= \
135 $(lispdir)\subr.elc \
136 $(lispdir)\byte-run.elc \
137 $(lispdir)\map-ynp.elc \
138 $(lispdir)\loaddefs.el \
139 $(lispdir)\simple.elc \
140 $(lispdir)\help.elc \
141 $(lispdir)\files.elc \
ebd67b8e 142 $(lispdir)\format.elc \
95ed0025
RS
143 $(lispdir)\indent.elc \
144 $(lispdir)\window.elc \
145 $(lispdir)\frame.elc \
146 $(lispdir)\mouse.elc \
147 $(lispdir)\menu-bar.elc \
148 $(lispdir)\scroll-bar.elc \
149 $(lispdir)\select.elc \
150 $(lispdir)\paths.el \
151 $(lispdir)\startup.elc \
152 $(lispdir)\lisp.elc \
153 $(lispdir)\page.elc \
154 $(lispdir)\register.elc \
155 $(lispdir)\paragraphs.elc \
156 $(lispdir)\lisp-mode.elc \
157 $(lispdir)\text-mode.elc \
158 $(lispdir)\fill.elc \
159 $(lispdir)\c-mode.elc \
160 $(lispdir)\isearch.elc \
161 $(lispdir)\replace.elc \
162 $(lispdir)\abbrev.elc \
163 $(lispdir)\buff-menu.elc \
ebd67b8e 164 $(lispdir)\ls-lisp.elc \
95ed0025
RS
165 $(lispdir)\winnt.elc \
166 $(lispdir)\float-sup.elc \
167 $(lispdir)\vc-hooks.elc \
168 $(lispdir)\version.el
169
170DOC = DOC
171$(DOC): $(BLD)\make-docfile.exe
2e17c871 172 - $(DEL) $(DOC)
95ed0025
RS
173 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
174 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
ebd67b8e 175 $(CP) $(DOC) ..\etc\DOC-X
95ed0025
RS
176 - mkdir ..\src\$(OBJDIR)
177 - mkdir ..\src\$(OBJDIR)\etc
ebd67b8e 178 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
95ed0025
RS
179
180{$(BLD)}.obj{$(BLD)}.exe:
181 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
182
183.c{$(BLD)}.obj:
184 $(CC) $(CFLAGS) -Fo$@ $<
185
186#
187# Build the executables
188#
189all: $(BLD) $(ALL) $(DOC)
190
191#
192# Assuming INSTALL_DIR is defined, build and install emacs in it.
193#
194INSTALL_FILES = $(ALL)
195install: $(INSTALL_FILES)
196 - mkdir $(INSTALL_DIR)\bin
197 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
198 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
199 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
68c723aa 200 $(CP) $(BLD)\wakeup.exe $(INSTALL_DIR)\bin
95ed0025
RS
201 - mkdir $(INSTALL_DIR)\etc
202 $(CP) $(DOC) $(INSTALL_DIR)\etc
203
204#
205# Maintenance
206#
2e17c871 207clean:; - $(DEL) *~ *.pdb DOC*
ebd67b8e
KH
208 - $(DEL_TREE) deleted
209 - $(DEL_TREE) obj
95ed0025
RS
210
211#
212# Headers we would preprocess if we could.
213#
85212e67
GV
214..\src\config.h: ..\nt\$(CONFIG_H)
215 $(CP) $** $@
ebd67b8e 216..\src\paths.h: ..\nt\paths.h
85212e67 217 $(CP) $** $@
95ed0025
RS
218
219### DEPENDENCIES ###
220
221EMACS_ROOT = ..
222SRC = .
223
224$(BLD)\alloca.obj : \
225 $(SRC)\alloca.c \
85cdd6af
KH
226 $(EMACS_ROOT)\src\s\windowsnt.h \
227 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
228 $(EMACS_ROOT)\src\config.h \
229 $(EMACS_ROOT)\src\blockinput.h
230
231$(BLD)\b2m.obj : \
232 $(SRC)\b2m.c \
85cdd6af
KH
233 $(EMACS_ROOT)\src\s\windowsnt.h \
234 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
235 $(EMACS_ROOT)\lib-src\..\src\config.h
236
237$(BLD)\cvtmail.obj : \
238 $(SRC)\cvtmail.c
239
240$(BLD)\digest-doc.obj : \
241 $(SRC)\digest-doc.c
242
243$(BLD)\emacsclient.obj : \
244 $(SRC)\emacsclient.c \
85cdd6af
KH
245 $(EMACS_ROOT)\src\s\windowsnt.h \
246 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
247 $(EMACS_ROOT)\lib-src\..\src\config.h
248
249$(BLD)\emacsserver.obj : \
250 $(SRC)\emacsserver.c \
85cdd6af
KH
251 $(EMACS_ROOT)\src\s\windowsnt.h \
252 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
253 $(EMACS_ROOT)\lib-src\..\src\config.h \
254 $(EMACS_ROOT)\nt\inc\sys\file.h
255
256$(BLD)\emacstool.obj : \
257 $(SRC)\emacstool.c \
258 $(EMACS_ROOT)\nt\inc\sys\file.h
259
260$(BLD)\etags.obj : \
261 $(SRC)\etags.c \
262 $(EMACS_ROOT)\nt\inc\sys\param.h \
85cdd6af
KH
263 $(EMACS_ROOT)\src\s\windowsnt.h \
264 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
265 $(EMACS_ROOT)\lib-src\..\src\config.h \
266 $(SRC)\getopt.h
267
268$(BLD)\fakemail.obj : \
269 $(SRC)\fakemail.c \
85cdd6af
KH
270 $(EMACS_ROOT)\src\s\windowsnt.h \
271 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
272 $(EMACS_ROOT)\lib-src\..\src\config.h \
273 $(EMACS_ROOT)\nt\inc\pwd.h
274
275$(BLD)\getdate.obj : \
276 $(SRC)\getdate.c \
85cdd6af
KH
277 $(EMACS_ROOT)\src\s\windowsnt.h \
278 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
279 $(EMACS_ROOT)\src\config.h \
280 $(MSTOOLS_SYS)\types.h
281
282$(BLD)\getopt.obj : \
283 $(SRC)\getopt.c \
85cdd6af
KH
284 $(EMACS_ROOT)\src\s\windowsnt.h \
285 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
286 $(EMACS_ROOT)\src\config.h \
287 $(SRC)\getopt.h
288
289$(BLD)\getopt1.obj : \
290 $(SRC)\getopt1.c \
85cdd6af
KH
291 $(EMACS_ROOT)\src\s\windowsnt.h \
292 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
293 $(EMACS_ROOT)\src\config.h \
294 $(SRC)\getopt.h
295
296$(BLD)\hexl.obj : \
297 $(SRC)\hexl.c
298
299$(BLD)\leditcfns.obj : \
300 $(SRC)\leditcfns.c
301
302$(BLD)\make-docfile.obj : \
85212e67
GV
303 $(SRC)\make-docfile.c \
304 $(EMACS_ROOT)\src\config.h
95ed0025
RS
305
306$(BLD)\make-path.obj : \
307 $(SRC)\make-path.c
308
309$(BLD)\movemail.obj : \
310 $(SRC)\movemail.c \
85cdd6af
KH
311 $(EMACS_ROOT)\src\s\windowsnt.h \
312 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
313 $(EMACS_ROOT)\lib-src\..\src\config.h \
314 $(EMACS_ROOT)\nt\inc\sys\file.h \
315 $(EMACS_ROOT)\src\vmsproc.h \
316 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
317 $(EMACS_ROOT)\nt\inc\pwd.h
318
319$(BLD)\profile.obj : \
320 $(SRC)\profile.c \
85cdd6af
KH
321 $(EMACS_ROOT)\src\s\windowsnt.h \
322 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
323 $(EMACS_ROOT)\lib-src\..\src\config.h \
324 $(EMACS_ROOT)\src\vmstime.h \
325 $(EMACS_ROOT)\lib-src\..\src\systime.h
326
327$(BLD)\qsort.obj : \
328 $(SRC)\qsort.c
329
330$(BLD)\sorted-doc.obj : \
331 $(SRC)\sorted-doc.c
332
333$(BLD)\tcp.obj : \
334 $(SRC)\tcp.c
335
336$(BLD)\test-distrib.obj : \
337 $(SRC)\test-distrib.c
338
339$(BLD)\timer.obj : \
340 $(SRC)\timer.c \
85cdd6af
KH
341 $(EMACS_ROOT)\src\s\windowsnt.h \
342 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
343 $(EMACS_ROOT)\lib-src\..\src\config.h
344
345$(BLD)\wakeup.obj : \
346 $(SRC)\wakeup.c \
85cdd6af
KH
347 $(EMACS_ROOT)\src\s\windowsnt.h \
348 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
349 $(EMACS_ROOT)\src\config.h
350
351$(BLD)\yow.obj : \
352 $(SRC)\yow.c \
353 $(EMACS_ROOT)\lib-src\..\src\paths.h