Add arch taglines
[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.
177c0ea7 6#
95ed0025
RS
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.
177c0ea7 11#
95ed0025
RS
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.
177c0ea7 16#
95ed0025 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
177c0ea7 23#
95ed0025
RS
24# Sets up the system dependent macros.
25#
26!include ..\nt\makefile.def
27
65ae11d9
AI
28LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
29 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I..\nt\inc -I..\src
95ed0025 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 \
95ed0025 35 $(BLD)\ctags.exe \
c81ebaba 36 $(BLD)\etags.exe \
d4bd593f 37 $(BLD)\ebrowse.exe \
295c4869 38 $(BLD)\movemail.exe
95ed0025 39
3191b142 40
95ed0025
RS
41# don't know what (if) to do with these yet...
42#
43# $(BLD)\sorted-doc.exe \
44# $(BLD)\env.exe \
45# $(BLD)\server.exe \
46# $(BLD)\emacstool.exe \
95ed0025 47# $(BLD)\leditcfns.exe \
95ed0025
RS
48# $(BLD)\emacsclient.exe \
49# $(BLD)\cvtmail.exe \
50# $(BLD)\digest-doc.exe \
51# $(BLD)\test-distrib.exe \
52
53
85212e67 54LIBS = $(BASE_LIBS)
95ed0025 55
c81ebaba
GV
56$(BLD)\make-docfile.exe: $(BLD)\make-docfile.obj $(BLD)\ntlib.obj
57 $(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
85212e67 58$(BLD)\hexl.exe: $(BLD)\hexl.obj
c81ebaba
GV
59$(BLD)\fakemail.exe: $(BLD)\fakemail.obj $(BLD)\ntlib.obj
60 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
95ed0025 61
48717ed4 62make-docfile: $(BLD) $(BLD)\make-docfile.exe
48717ed4 63etags: $(BLD) $(BLD)\etags.exe
d4bd593f 64ebrowse: $(BLD) $(BLD)\ebrowse.exe
48717ed4 65hexl: $(BLD) $(BLD)\hexl.exe
c81ebaba
GV
66movemail: $(BLD) $(BLD)\movemail.exe
67fakemail: $(BLD) $(BLD)\fakemail.exe
95ed0025 68
896d5821
GV
69GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
70GETOPTDEPS = $(GETOPTOBJS) getopt.h
71MOVEMAILOBJS = $(BLD)\movemail.obj \
72 $(BLD)\pop.obj \
73 $(BLD)\ntlib.obj \
74 $(GETOPTOBJS)
75
76$(BLD)\movemail.exe: $(MOVEMAILOBJS) getopt.h
90eef3d9
GV
77# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
78 $(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
896d5821 79
95ed0025
RS
80ETAGSOBJ = $(BLD)\etags.obj \
81 $(BLD)\getopt.obj \
82 $(BLD)\getopt1.obj \
48717ed4 83 $(BLD)\ntlib.obj \
3191b142 84 $(BLD)\regex.obj
95ed0025 85
f1d5eaf9 86
48717ed4 87$(BLD)\etags.exe: $(ETAGSOBJ)
ebd67b8e 88 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
95ed0025 89
48717ed4
GV
90
91$(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
92 $(CC) $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
93 ../src/regex.c -Fo$@
94
73bff96e 95ETAGS_CFLAGS = -DETAGS_REGEXPS -DHAVE_GETCWD
48717ed4 96$(BLD)\etags.obj: etags.c
f1d5eaf9 97 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
48717ed4
GV
98
99CTAGSOBJ = $(BLD)\ctags.obj \
100 $(BLD)\getopt.obj \
101 $(BLD)\getopt1.obj \
f1d5eaf9 102 $(BLD)\ntlib.obj \
3191b142 103 $(BLD)\regex.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
d4bd593f
JR
116EBROWSE_OBJ = $(BLD)\ebrowse.obj \
117 $(BLD)\getopt.obj \
118 $(BLD)\getopt1.obj \
119 $(BLD)\ntlib.obj
120
121$(BLD)\ebrowse.exe: $(EBROWSE_OBJ)
122 $(LINK) -out:$@ $(LINK_FLAGS) $(EBROWSE_OBJ) $(LIBS)
123
124$(BLD)\ebrowse.obj: ebrowse.c ..\src\config.h
125 $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -Fo$@ ebrowse.c
95ed0025
RS
126#
127# don't know what to do with these yet...
128#
c81ebaba
GV
129# $(BLD)\sorted-doc.exe: $(BLD)\sorted-doc.obj
130# $(BLD)\yow.exe: $(BLD)\yow.obj
131# $(BLD)\emacstool.exe: $(BLD)\emacstool.obj
132# $(BLD)\leditcfns.exe: $(BLD)\leditcfns.obj
133# $(BLD)\server.exe: $(BLD)\server.obj
134# $(BLD)\cvtmail.exe: $(BLD)\cvtmail.obj
135# $(BLD)\digest-doc.exe: $(BLD)\digest-doc.obj
136# $(BLD)\emacsclient.exe: $(BLD)\emacsclient.obj
137# $(BLD)\test-distrib.exe: $(BLD)\test-distrib.obj
95ed0025
RS
138
139#
85212e67 140# From ..\src\makefile.nt.
95ed0025 141#
177c0ea7 142obj = 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 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
143
144#
145# These are the lisp files that are loaded up in loadup.el
146#
896d5821
GV
147lispsource = ../lisp/
148
149FACE_SUPPORT = $(lispsource)facemenu.elc
5ae10f4a 150MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
896d5821
GV
151FLOAT_SUPPORT = $(lispsource)float-sup.elc
152WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
153
95ed0025 154lisp= \
896d5821
GV
155 $(lispsource)abbrev.elc \
156 $(lispsource)buff-menu.elc \
157 $(lispsource)byte-run.elc \
158 $(lispsource)cus-start.el \
159 $(lispsource)custom.elc \
5ae10f4a 160 $(lispsource)disp-table.elc \
896d5821
GV
161 $(lispsource)faces.elc \
162 $(lispsource)files.elc \
44874bcb 163 $(lispsource)textmodes/fill.elc \
896d5821
GV
164 $(lispsource)format.elc \
165 $(FACE_SUPPORT) \
166 $(MOUSE_SUPPORT) \
167 $(FLOAT_SUPPORT) \
168 $(lispsource)frame.elc\
169 $(X_WINDOWS_SUPPORT) \
170 $(lispsource)help.elc \
171 $(lispsource)indent.elc \
172 $(lispsource)isearch.elc \
44874bcb
GV
173 $(lispsource)emacs-lisp/lisp-mode.elc \
174 $(lispsource)emacs-lisp/lisp.elc \
896d5821
GV
175 $(lispsource)loadup.el \
176 $(lispsource)loaddefs.el \
5ae10f4a 177 $(lispsource)bindings.el \
896d5821
GV
178 $(lispsource)map-ynp.elc \
179 $(lispsource)menu-bar.elc \
180 $(lispsource)international/mule.elc \
181 $(lispsource)international/mule-conf.el \
182 $(lispsource)international/mule-cmds.elc \
183 $(lispsource)international/characters.elc \
5ae10f4a
EZ
184 $(lispsource)international/ccl.elc \
185 $(lispsource)international/codepage.elc \
186 $(lispsource)international/utf-8.elc \
187 $(lispsource)case-table.elc \
896d5821
GV
188 $(lispsource)language/chinese.elc \
189 $(lispsource)language/cyrillic.elc \
190 $(lispsource)language/devanagari.elc \
191 $(lispsource)language/english.elc \
192 $(lispsource)language/ethiopic.elc \
193 $(lispsource)language/european.elc \
5ae10f4a
EZ
194 $(lispsource)language/czech.elc \
195 $(lispsource)language/slovak.elc \
196 $(lispsource)language/romanian.elc \
896d5821
GV
197 $(lispsource)language/greek.elc \
198 $(lispsource)language/hebrew.elc \
199 $(lispsource)language/indian.elc \
200 $(lispsource)language/japanese.elc \
201 $(lispsource)language/korean.elc \
202 $(lispsource)language/lao.elc \
203 $(lispsource)language/thai.elc \
204 $(lispsource)language/tibetan.elc \
205 $(lispsource)language/vietnamese.elc \
206 $(lispsource)language/misc-lang.elc \
44874bcb
GV
207 $(lispsource)textmodes/page.elc \
208 $(lispsource)textmodes/paragraphs.elc \
896d5821
GV
209 $(lispsource)paths.el \
210 $(lispsource)register.elc \
211 $(lispsource)replace.elc \
212 $(lispsource)simple.elc \
213 $(lispsource)startup.elc \
214 $(lispsource)subr.elc \
5ae10f4a 215 $(lispsource)term/tty-colors.elc \
44874bcb 216 $(lispsource)textmodes/text-mode.elc \
896d5821
GV
217 $(lispsource)vc-hooks.elc \
218 $(lispsource)ediff-hook.elc \
219 $(VMS_SUPPORT) \
220 $(MSDOS_SUPPORT) \
221 $(WINNT_SUPPORT) \
5ae10f4a 222 $(lispsource)widget.elc \
896d5821
GV
223 $(lispsource)window.elc \
224 $(lispsource)version.el
225
95ed0025 226
177c0ea7 227DOC = DOC
95ed0025 228$(DOC): $(BLD)\make-docfile.exe
2e17c871 229 - $(DEL) $(DOC)
95ed0025
RS
230 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
231 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
ebd67b8e 232 $(CP) $(DOC) ..\etc\DOC-X
95ed0025
RS
233 - mkdir ..\src\$(OBJDIR)
234 - mkdir ..\src\$(OBJDIR)\etc
ebd67b8e 235 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
95ed0025
RS
236
237{$(BLD)}.obj{$(BLD)}.exe:
238 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
239
95ed0025
RS
240#
241# Build the executables
242#
243all: $(BLD) $(ALL) $(DOC)
244
245#
246# Assuming INSTALL_DIR is defined, build and install emacs in it.
247#
248INSTALL_FILES = $(ALL)
249install: $(INSTALL_FILES)
250 - mkdir $(INSTALL_DIR)\bin
251 $(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
252 $(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
253 $(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
c81ebaba 254 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
95ed0025
RS
255 - mkdir $(INSTALL_DIR)\etc
256 $(CP) $(DOC) $(INSTALL_DIR)\etc
257
d5c5d66a
JR
258# Don't install fakemail by default, as it sends mail into a
259# blackhole if /bin/mail is not installed.
260# $(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
261
95ed0025
RS
262#
263# Maintenance
177c0ea7 264#
2e17c871 265clean:; - $(DEL) *~ *.pdb DOC*
5568885b 266 - $(DEL) *.orig *.rej *.crlf ctags.c
ebd67b8e 267 - $(DEL_TREE) deleted
5568885b
GV
268 - $(DEL_TREE) obj
269 - $(DEL_TREE) obj-spd
95ed0025
RS
270
271#
272# Headers we would preprocess if we could.
273#
85212e67
GV
274..\src\config.h: ..\nt\$(CONFIG_H)
275 $(CP) $** $@
ebd67b8e 276..\src\paths.h: ..\nt\paths.h
85212e67 277 $(CP) $** $@
95ed0025
RS
278
279### DEPENDENCIES ###
280
281EMACS_ROOT = ..
282SRC = .
283
95ed0025
RS
284$(BLD)\b2m.obj : \
285 $(SRC)\b2m.c \
26d93756 286 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 287 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
288 $(EMACS_ROOT)\lib-src\..\src\config.h
289
44874bcb
GV
290$(BLD)\ctags.obj : \
291 $(SRC)\ctags.c \
292 $(EMACS_ROOT)\nt\inc\sys\param.h \
293 $(EMACS_ROOT)\src\s\ms-w32.h \
294 $(EMACS_ROOT)\src\m\intel386.h \
295 $(EMACS_ROOT)\lib-src\..\src\config.h \
296 $(SRC)\ntlib.h \
297 $(SRC)\getopt.h
298
95ed0025
RS
299$(BLD)\cvtmail.obj : \
300 $(SRC)\cvtmail.c
301
302$(BLD)\digest-doc.obj : \
303 $(SRC)\digest-doc.c
304
305$(BLD)\emacsclient.obj : \
306 $(SRC)\emacsclient.c \
26d93756 307 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 308 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
309 $(EMACS_ROOT)\lib-src\..\src\config.h
310
95ed0025
RS
311$(BLD)\emacstool.obj : \
312 $(SRC)\emacstool.c \
313 $(EMACS_ROOT)\nt\inc\sys\file.h
314
315$(BLD)\etags.obj : \
316 $(SRC)\etags.c \
317 $(EMACS_ROOT)\nt\inc\sys\param.h \
26d93756 318 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 319 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025 320 $(EMACS_ROOT)\lib-src\..\src\config.h \
44874bcb 321 $(SRC)\ntlib.h \
95ed0025
RS
322 $(SRC)\getopt.h
323
324$(BLD)\fakemail.obj : \
325 $(SRC)\fakemail.c \
c81ebaba 326 $(SRC)\ntlib.h \
26d93756 327 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 328 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
329 $(EMACS_ROOT)\lib-src\..\src\config.h \
330 $(EMACS_ROOT)\nt\inc\pwd.h
331
332$(BLD)\getdate.obj : \
333 $(SRC)\getdate.c \
26d93756 334 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 335 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
336 $(EMACS_ROOT)\src\config.h \
337 $(MSTOOLS_SYS)\types.h
338
339$(BLD)\getopt.obj : \
340 $(SRC)\getopt.c \
26d93756 341 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 342 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025 343 $(EMACS_ROOT)\src\config.h \
44874bcb 344 $(SRC)\ntlib.h \
95ed0025
RS
345 $(SRC)\getopt.h
346
347$(BLD)\getopt1.obj : \
348 $(SRC)\getopt1.c \
26d93756 349 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 350 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
351 $(EMACS_ROOT)\src\config.h \
352 $(SRC)\getopt.h
353
354$(BLD)\hexl.obj : \
355 $(SRC)\hexl.c
356
357$(BLD)\leditcfns.obj : \
358 $(SRC)\leditcfns.c
359
360$(BLD)\make-docfile.obj : \
85212e67
GV
361 $(SRC)\make-docfile.c \
362 $(EMACS_ROOT)\src\config.h
95ed0025
RS
363
364$(BLD)\make-path.obj : \
365 $(SRC)\make-path.c
366
367$(BLD)\movemail.obj : \
368 $(SRC)\movemail.c \
26d93756 369 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 370 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
371 $(EMACS_ROOT)\lib-src\..\src\config.h \
372 $(EMACS_ROOT)\nt\inc\sys\file.h \
95ed0025 373 $(EMACS_ROOT)\lib-src\..\src\syswait.h \
44874bcb
GV
374 $(EMACS_ROOT)\nt\inc\pwd.h \
375 $(SRC)\ntlib.h
c81ebaba
GV
376 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
377
378$(BLD)\ntlib.obj : \
379 $(SRC)\ntlib.c \
380 $(SRC)\ntlib.h \
381 $(EMACS_ROOT)\nt\inc\pwd.h
382
383$(BLD)\pop.obj : \
384 $(SRC)\pop.c \
385 $(SRC)\pop.h \
386 $(SRC)\ntlib.h
95ed0025
RS
387
388$(BLD)\profile.obj : \
389 $(SRC)\profile.c \
26d93756 390 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 391 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025 392 $(EMACS_ROOT)\lib-src\..\src\config.h \
95ed0025
RS
393 $(EMACS_ROOT)\lib-src\..\src\systime.h
394
395$(BLD)\qsort.obj : \
396 $(SRC)\qsort.c
397
398$(BLD)\sorted-doc.obj : \
399 $(SRC)\sorted-doc.c
400
401$(BLD)\tcp.obj : \
402 $(SRC)\tcp.c
403
404$(BLD)\test-distrib.obj : \
405 $(SRC)\test-distrib.c
406
407$(BLD)\timer.obj : \
408 $(SRC)\timer.c \
26d93756 409 $(EMACS_ROOT)\src\s\ms-w32.h \
85cdd6af 410 $(EMACS_ROOT)\src\m\intel386.h \
95ed0025
RS
411 $(EMACS_ROOT)\lib-src\..\src\config.h
412
95ed0025
RS
413$(BLD)\yow.obj : \
414 $(SRC)\yow.c \
415 $(EMACS_ROOT)\lib-src\..\src\paths.h
ab5796a9
MB
416
417# arch-tag: 59e1b54b-4cc2-4086-bb0b-ecfad4b683e9