makefile.nt 11.1 KB
Newer Older
Richard M. Stallman's avatar
Richard M. Stallman committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#  Makefile for GNU Emacs lib-src directory.
#   Geoff Voelker (voelker@cs.washington.edu)
#  Copyright (C) 1994 Free Software Foundation, Inc.
#
#  This file is part of GNU Emacs.
#  
#  GNU Emacs is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#  
#  GNU Emacs is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
Karl Heuer's avatar
Karl Heuer committed
18 19 20
#  along with GNU Emacs; see the file COPYING.  If not, write to the
#  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
#  Boston, MA 02111-1307, USA.
Richard M. Stallman's avatar
Richard M. Stallman committed
21 22 23 24 25 26 27
#

# 
# Sets up the system dependent macros.
#
!include ..\nt\makefile.def

28 29
LOCAL_FLAGS	= -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
	-DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I..\nt\inc -I..\src
Richard M. Stallman's avatar
Richard M. Stallman committed
30

31
LINK_FLAGS	= $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
Richard M. Stallman's avatar
Richard M. Stallman committed
32 33 34 35

ALL	        = $(BLD)\make-docfile.exe \
		$(BLD)\hexl.exe		\
		$(BLD)\ctags.exe	\
36 37 38
		$(BLD)\etags.exe	\
		$(BLD)\movemail.exe	\
		$(BLD)\fakemail.exe	\
Richard M. Stallman's avatar
Richard M. Stallman committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

		
# don't know what (if) to do with these yet...
#
#		$(BLD)\sorted-doc.exe	\
#		$(BLD)\env.exe		\
#		$(BLD)\server.exe	\
#		$(BLD)\emacstool.exe	\
#		$(BLD)\leditcfns.exe	\
#		$(BLD)\emacsclient.exe	\
#		$(BLD)\cvtmail.exe	\
#		$(BLD)\digest-doc.exe	\
#		$(BLD)\test-distrib.exe	\


Geoff Voelker's avatar
Geoff Voelker committed
54
LIBS	      = $(BASE_LIBS)
Richard M. Stallman's avatar
Richard M. Stallman committed
55

56 57
$(BLD)\make-docfile.exe: 	$(BLD)\make-docfile.obj $(BLD)\ntlib.obj
		$(LINK) -out:$@ $(LINK_FLAGS) $(BLD)\make-docfile.obj $(BLD)\ntlib.obj $(LIBS)
Geoff Voelker's avatar
Geoff Voelker committed
58
$(BLD)\hexl.exe:		$(BLD)\hexl.obj
59 60
$(BLD)\fakemail.exe: 		$(BLD)\fakemail.obj $(BLD)\ntlib.obj
		$(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
Richard M. Stallman's avatar
Richard M. Stallman committed
61

62 63 64
make-docfile:	$(BLD) $(BLD)\make-docfile.exe
etags:		$(BLD) $(BLD)\etags.exe
hexl:		$(BLD) $(BLD)\hexl.exe
65 66
movemail:	$(BLD) $(BLD)\movemail.exe
fakemail:	$(BLD) $(BLD)\fakemail.exe
Richard M. Stallman's avatar
Richard M. Stallman committed
67

68 69 70 71 72 73 74 75
GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
GETOPTDEPS = $(GETOPTOBJS) getopt.h
MOVEMAILOBJS =  $(BLD)\movemail.obj \
		$(BLD)\pop.obj \
		$(BLD)\ntlib.obj \
		$(GETOPTOBJS)

$(BLD)\movemail.exe:	$(MOVEMAILOBJS) getopt.h
76 77
# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
		$(LINK) -out:$@ $(LINK_FLAGS) -debug:FULL $(MOVEMAILOBJS) wsock32.lib $(LIBS)
78

Richard M. Stallman's avatar
Richard M. Stallman committed
79 80 81
ETAGSOBJ      = $(BLD)\etags.obj \
		$(BLD)\getopt.obj \
		$(BLD)\getopt1.obj \
82 83 84
		$(BLD)\ntlib.obj \
		$(BLD)\regex.obj \
		$(BLD)\alloca.obj
Richard M. Stallman's avatar
Richard M. Stallman committed
85

86

87
$(BLD)\etags.exe: 	$(ETAGSOBJ)
88
		$(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
Richard M. Stallman's avatar
Richard M. Stallman committed
89

90 91 92 93 94

$(BLD)\regex.obj: ../src/regex.c ../src/regex.h ../src/config.h
		$(CC)  $(CFLAGS) -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
		../src/regex.c -Fo$@

95
ETAGS_CFLAGS  = -DETAGS_REGEXPS -DHAVE_GETCWD
96
$(BLD)\etags.obj: etags.c
97
		$(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
98 99 100 101

CTAGSOBJ      = $(BLD)\ctags.obj \
		$(BLD)\getopt.obj \
		$(BLD)\getopt1.obj \
102 103 104
		$(BLD)\ntlib.obj \
		$(BLD)\regex.obj \
		$(BLD)\alloca.obj
105 106 107 108 109

$(BLD)\ctags.exe:           ctags.c $(CTAGSOBJ)
		$(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)

ctags.c:	etags.c
Geoff Voelker's avatar
Geoff Voelker committed
110
		- $(DEL) ctags.c
111 112
		copy etags.c ctags.c

113
CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
114
$(BLD)\ctags.obj: ctags.c
115
		$(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
116

Richard M. Stallman's avatar
Richard M. Stallman committed
117 118 119
#
# don't know what to do with these yet...
#
120 121 122 123 124 125 126 127 128
# $(BLD)\sorted-doc.exe: 	$(BLD)\sorted-doc.obj
# $(BLD)\yow.exe: 		$(BLD)\yow.obj
# $(BLD)\emacstool.exe: 	$(BLD)\emacstool.obj
# $(BLD)\leditcfns.exe: 	$(BLD)\leditcfns.obj
# $(BLD)\server.exe: 		$(BLD)\server.obj
# $(BLD)\cvtmail.exe: 		$(BLD)\cvtmail.obj
# $(BLD)\digest-doc.exe: 	$(BLD)\digest-doc.obj
# $(BLD)\emacsclient.exe: 	$(BLD)\emacsclient.obj
# $(BLD)\test-distrib.exe: 	$(BLD)\test-distrib.obj
Richard M. Stallman's avatar
Richard M. Stallman committed
129 130

#
Geoff Voelker's avatar
Geoff Voelker committed
131
# From ..\src\makefile.nt.
Richard M. Stallman's avatar
Richard M. Stallman committed
132
#
133
obj = 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 
Richard M. Stallman's avatar
Richard M. Stallman committed
134 135 136 137

#
# These are the lisp files that are loaded up in loadup.el
#
138 139 140 141 142 143 144
lispsource = ../lisp/

FACE_SUPPORT = $(lispsource)facemenu.elc
MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc
FLOAT_SUPPORT = $(lispsource)float-sup.elc
WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc

Richard M. Stallman's avatar
Richard M. Stallman committed
145
lisp= \
146 147 148 149 150 151 152
	$(lispsource)abbrev.elc \
	$(lispsource)buff-menu.elc \
	$(lispsource)byte-run.elc \
	$(lispsource)cus-start.el \
	$(lispsource)custom.elc \
	$(lispsource)faces.elc \
	$(lispsource)files.elc \
153
	$(lispsource)textmodes/fill.elc \
154 155 156 157 158 159 160 161 162
	$(lispsource)format.elc \
	$(FACE_SUPPORT) \
	$(MOUSE_SUPPORT) \
	$(FLOAT_SUPPORT) \
	$(lispsource)frame.elc\
	$(X_WINDOWS_SUPPORT) \
	$(lispsource)help.elc \
	$(lispsource)indent.elc \
	$(lispsource)isearch.elc \
163 164
	$(lispsource)emacs-lisp/lisp-mode.elc \
	$(lispsource)emacs-lisp/lisp.elc \
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
	$(lispsource)loadup.el \
	$(lispsource)loaddefs.el \
	$(lispsource)map-ynp.elc \
	$(lispsource)menu-bar.elc \
	$(lispsource)international/mule.elc \
	$(lispsource)international/mule-conf.el \
	$(lispsource)international/mule-cmds.elc \
	$(lispsource)international/characters.elc \
	$(lispsource)language/chinese.elc \
	$(lispsource)language/cyrillic.elc \
	$(lispsource)language/devanagari.elc \
	$(lispsource)language/english.elc \
	$(lispsource)language/ethiopic.elc \
	$(lispsource)language/european.elc \
	$(lispsource)language/greek.elc \
	$(lispsource)language/hebrew.elc \
	$(lispsource)language/indian.elc \
	$(lispsource)language/japanese.elc \
	$(lispsource)language/korean.elc \
	$(lispsource)language/lao.elc \
	$(lispsource)language/thai.elc \
	$(lispsource)language/tibetan.elc \
	$(lispsource)language/vietnamese.elc \
	$(lispsource)language/misc-lang.elc \
189 190
	$(lispsource)textmodes/page.elc \
	$(lispsource)textmodes/paragraphs.elc \
191 192 193 194 195 196
	$(lispsource)paths.el \
	$(lispsource)register.elc \
	$(lispsource)replace.elc \
	$(lispsource)simple.elc \
	$(lispsource)startup.elc \
	$(lispsource)subr.elc \
197
	$(lispsource)textmodes/text-mode.elc \
198 199 200 201 202 203 204 205
	$(lispsource)vc-hooks.elc \
	$(lispsource)ediff-hook.elc \
	$(VMS_SUPPORT) \
	$(MSDOS_SUPPORT) \
	$(WINNT_SUPPORT) \
	$(lispsource)window.elc \
	$(lispsource)version.el

Richard M. Stallman's avatar
Richard M. Stallman committed
206 207 208

DOC	      = DOC 
$(DOC):		$(BLD)\make-docfile.exe
Geoff Voelker's avatar
Geoff Voelker committed
209
		- $(DEL) $(DOC)
Richard M. Stallman's avatar
Richard M. Stallman committed
210 211
		$(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
		$(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
212
		$(CP) $(DOC) ..\etc\DOC-X
Richard M. Stallman's avatar
Richard M. Stallman committed
213 214
		- mkdir ..\src\$(OBJDIR)
		- mkdir ..\src\$(OBJDIR)\etc
215
		$(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
Richard M. Stallman's avatar
Richard M. Stallman committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236

{$(BLD)}.obj{$(BLD)}.exe:
		$(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)

.c{$(BLD)}.obj:
		$(CC) $(CFLAGS) -Fo$@ $<

#
# Build the executables
#
all:		$(BLD) $(ALL) $(DOC)

#
# Assuming INSTALL_DIR is defined, build and install emacs in it.
#
INSTALL_FILES = $(ALL)
install:	$(INSTALL_FILES)
		- mkdir $(INSTALL_DIR)\bin
		$(CP) $(BLD)\etags.exe $(INSTALL_DIR)\bin
		$(CP) $(BLD)\ctags.exe $(INSTALL_DIR)\bin
		$(CP) $(BLD)\hexl.exe $(INSTALL_DIR)\bin
237 238
		$(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
		$(CP) $(BLD)\fakemail.exe $(INSTALL_DIR)\bin
Richard M. Stallman's avatar
Richard M. Stallman committed
239 240 241 242 243 244
		- mkdir $(INSTALL_DIR)\etc
		$(CP) $(DOC) $(INSTALL_DIR)\etc

#
# Maintenance
# 
Geoff Voelker's avatar
Geoff Voelker committed
245
clean:;		- $(DEL) *~ *.pdb DOC*
246
		- $(DEL) *.orig *.rej *.crlf ctags.c
247
		- $(DEL_TREE) deleted
248 249
		- $(DEL_TREE) obj
		- $(DEL_TREE) obj-spd
Richard M. Stallman's avatar
Richard M. Stallman committed
250 251 252 253

#
# Headers we would preprocess if we could.
#
Geoff Voelker's avatar
Geoff Voelker committed
254 255
..\src\config.h:	..\nt\$(CONFIG_H)
			$(CP) $** $@
256
..\src\paths.h:		..\nt\paths.h
Geoff Voelker's avatar
Geoff Voelker committed
257
			$(CP) $** $@
Richard M. Stallman's avatar
Richard M. Stallman committed
258 259 260 261 262 263 264 265

### DEPENDENCIES ###

EMACS_ROOT	= ..
SRC		= .

$(BLD)\alloca.obj : \
	$(SRC)\alloca.c \
266
	$(EMACS_ROOT)\src\s\ms-w32.h \
267
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
268 269 270 271 272
	$(EMACS_ROOT)\src\config.h \
	$(EMACS_ROOT)\src\blockinput.h

$(BLD)\b2m.obj : \
	$(SRC)\b2m.c \
273
	$(EMACS_ROOT)\src\s\ms-w32.h \
274
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
275 276
	$(EMACS_ROOT)\lib-src\..\src\config.h

277 278 279 280 281 282 283 284 285
$(BLD)\ctags.obj : \
	$(SRC)\ctags.c \
	$(EMACS_ROOT)\nt\inc\sys\param.h \
	$(EMACS_ROOT)\src\s\ms-w32.h \
	$(EMACS_ROOT)\src\m\intel386.h \
	$(EMACS_ROOT)\lib-src\..\src\config.h \
	$(SRC)\ntlib.h \
	$(SRC)\getopt.h

Richard M. Stallman's avatar
Richard M. Stallman committed
286 287 288 289 290 291 292 293
$(BLD)\cvtmail.obj : \
	$(SRC)\cvtmail.c

$(BLD)\digest-doc.obj : \
	$(SRC)\digest-doc.c

$(BLD)\emacsclient.obj : \
	$(SRC)\emacsclient.c \
294
	$(EMACS_ROOT)\src\s\ms-w32.h \
295
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
296 297 298 299
	$(EMACS_ROOT)\lib-src\..\src\config.h

$(BLD)\emacsserver.obj : \
	$(SRC)\emacsserver.c \
300
	$(EMACS_ROOT)\src\s\ms-w32.h \
301
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
302 303 304 305 306 307 308 309 310 311
	$(EMACS_ROOT)\lib-src\..\src\config.h \
	$(EMACS_ROOT)\nt\inc\sys\file.h

$(BLD)\emacstool.obj : \
	$(SRC)\emacstool.c \
	$(EMACS_ROOT)\nt\inc\sys\file.h

$(BLD)\etags.obj : \
	$(SRC)\etags.c \
	$(EMACS_ROOT)\nt\inc\sys\param.h \
312
	$(EMACS_ROOT)\src\s\ms-w32.h \
313
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
314
	$(EMACS_ROOT)\lib-src\..\src\config.h \
315
	$(SRC)\ntlib.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
316 317 318 319
	$(SRC)\getopt.h

$(BLD)\fakemail.obj : \
	$(SRC)\fakemail.c \
320
	$(SRC)\ntlib.h \
321
	$(EMACS_ROOT)\src\s\ms-w32.h \
322
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
323 324 325 326 327
	$(EMACS_ROOT)\lib-src\..\src\config.h \
	$(EMACS_ROOT)\nt\inc\pwd.h

$(BLD)\getdate.obj : \
	$(SRC)\getdate.c \
328
	$(EMACS_ROOT)\src\s\ms-w32.h \
329
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
330 331 332 333 334
	$(EMACS_ROOT)\src\config.h \
	$(MSTOOLS_SYS)\types.h

$(BLD)\getopt.obj : \
	$(SRC)\getopt.c \
335
	$(EMACS_ROOT)\src\s\ms-w32.h \
336
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
337
	$(EMACS_ROOT)\src\config.h \
338
	$(SRC)\ntlib.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
339 340 341 342
	$(SRC)\getopt.h

$(BLD)\getopt1.obj : \
	$(SRC)\getopt1.c \
343
	$(EMACS_ROOT)\src\s\ms-w32.h \
344
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
345 346 347 348 349 350 351 352 353 354
	$(EMACS_ROOT)\src\config.h \
	$(SRC)\getopt.h

$(BLD)\hexl.obj : \
	$(SRC)\hexl.c

$(BLD)\leditcfns.obj : \
	$(SRC)\leditcfns.c

$(BLD)\make-docfile.obj : \
Geoff Voelker's avatar
Geoff Voelker committed
355 356
	$(SRC)\make-docfile.c \
	$(EMACS_ROOT)\src\config.h
Richard M. Stallman's avatar
Richard M. Stallman committed
357 358 359 360 361 362

$(BLD)\make-path.obj : \
	$(SRC)\make-path.c

$(BLD)\movemail.obj : \
	$(SRC)\movemail.c \
363
	$(EMACS_ROOT)\src\s\ms-w32.h \
364
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
365 366 367 368
	$(EMACS_ROOT)\lib-src\..\src\config.h \
	$(EMACS_ROOT)\nt\inc\sys\file.h \
	$(EMACS_ROOT)\src\vmsproc.h \
	$(EMACS_ROOT)\lib-src\..\src\syswait.h \
369 370
	$(EMACS_ROOT)\nt\inc\pwd.h \
	$(SRC)\ntlib.h
371 372 373 374 375 376 377 378 379 380 381
		$(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c

$(BLD)\ntlib.obj : \
	$(SRC)\ntlib.c \
	$(SRC)\ntlib.h \
	$(EMACS_ROOT)\nt\inc\pwd.h

$(BLD)\pop.obj : \
	$(SRC)\pop.c \
	$(SRC)\pop.h \
	$(SRC)\ntlib.h
Richard M. Stallman's avatar
Richard M. Stallman committed
382 383 384

$(BLD)\profile.obj : \
	$(SRC)\profile.c \
385
	$(EMACS_ROOT)\src\s\ms-w32.h \
386
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
	$(EMACS_ROOT)\lib-src\..\src\config.h \
	$(EMACS_ROOT)\src\vmstime.h \
	$(EMACS_ROOT)\lib-src\..\src\systime.h

$(BLD)\qsort.obj : \
	$(SRC)\qsort.c

$(BLD)\sorted-doc.obj : \
	$(SRC)\sorted-doc.c

$(BLD)\tcp.obj : \
	$(SRC)\tcp.c

$(BLD)\test-distrib.obj : \
	$(SRC)\test-distrib.c

$(BLD)\timer.obj : \
	$(SRC)\timer.c \
405
	$(EMACS_ROOT)\src\s\ms-w32.h \
406
	$(EMACS_ROOT)\src\m\intel386.h \
Richard M. Stallman's avatar
Richard M. Stallman committed
407 408 409 410 411
	$(EMACS_ROOT)\lib-src\..\src\config.h

$(BLD)\yow.obj : \
	$(SRC)\yow.c \
	$(EMACS_ROOT)\lib-src\..\src\paths.h