*** empty log message ***
[emacs.git] / lib-src / makefile.nt
blobe2a391d1e75f99b494e77304aa145aab172b18ba
1 #  Makefile for GNU Emacs lib-src directory.
2 #   Geoff Voelker (voelker@cs.washington.edu)
3 #  Copyright (C) 1994 Free Software Foundation, Inc.
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 the
19 #  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 #  Boston, MA 02111-1307, USA.
23
24 # Sets up the system dependent macros.
26 !include ..\nt\makefile.def
28 LOCAL_FLAGS     = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
29         -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I..\nt\inc -I..\src
31 LINK_FLAGS      = $(ARCH_LDFLAGS) -debug:PARTIAL -machine:$(ARCH) -subsystem:console -entry:mainCRTStartup setargv.obj
33 ALL             = $(BLD)\make-docfile.exe \
34                 $(BLD)\hexl.exe         \
35                 $(BLD)\ctags.exe        \
36                 $(BLD)\etags.exe        \
37                 $(BLD)\ebrowse.exe      \
38                 $(BLD)\movemail.exe
41 # don't know what (if) to do with these yet...
43 #               $(BLD)\sorted-doc.exe   \
44 #               $(BLD)\env.exe          \
45 #               $(BLD)\server.exe       \
46 #               $(BLD)\emacstool.exe    \
47 #               $(BLD)\leditcfns.exe    \
48 #               $(BLD)\emacsclient.exe  \
49 #               $(BLD)\cvtmail.exe      \
50 #               $(BLD)\digest-doc.exe   \
51 #               $(BLD)\test-distrib.exe \
54 LIBS          = $(BASE_LIBS)
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)
58 $(BLD)\hexl.exe:                $(BLD)\hexl.obj
59 $(BLD)\fakemail.exe:            $(BLD)\fakemail.obj $(BLD)\ntlib.obj
60                 $(LINK) -out:$@ $(LINK_FLAGS) -debug:full $(BLD)\fakemail.obj $(BLD)\ntlib.obj $(LIBS)
62 make-docfile:   $(BLD) $(BLD)\make-docfile.exe
63 etags:          $(BLD) $(BLD)\etags.exe
64 ebrowse:        $(BLD) $(BLD)\ebrowse.exe
65 hexl:           $(BLD) $(BLD)\hexl.exe
66 movemail:       $(BLD) $(BLD)\movemail.exe
67 fakemail:       $(BLD) $(BLD)\fakemail.exe
69 GETOPTOBJS = $(BLD)\getopt.obj $(BLD)\getopt1.obj
70 GETOPTDEPS = $(GETOPTOBJS) getopt.h
71 MOVEMAILOBJS =  $(BLD)\movemail.obj \
72                 $(BLD)\pop.obj \
73                 $(BLD)\ntlib.obj \
74                 $(GETOPTOBJS)
76 $(BLD)\movemail.exe:    $(MOVEMAILOBJS) getopt.h
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)
80 ETAGSOBJ      = $(BLD)\etags.obj \
81                 $(BLD)\getopt.obj \
82                 $(BLD)\getopt1.obj \
83                 $(BLD)\ntlib.obj \
84                 $(BLD)\regex.obj
87 $(BLD)\etags.exe:       $(ETAGSOBJ)
88                 $(LINK) -out:$@ $(LINK_FLAGS) $(ETAGSOBJ) $(LIBS)
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$@
95 ETAGS_CFLAGS  = -DETAGS_REGEXPS -DHAVE_GETCWD
96 $(BLD)\etags.obj: etags.c
97                 $(CC) $(CFLAGS) $(ETAGS_CFLAGS) -Fo$@ etags.c
99 CTAGSOBJ      = $(BLD)\ctags.obj \
100                 $(BLD)\getopt.obj \
101                 $(BLD)\getopt1.obj \
102                 $(BLD)\ntlib.obj \
103                 $(BLD)\regex.obj
105 $(BLD)\ctags.exe:           ctags.c $(CTAGSOBJ)
106                 $(LINK) -out:$@ $(LINK_FLAGS) $(CTAGSOBJ) $(LIBS)
108 ctags.c:        etags.c
109                 - $(DEL) ctags.c
110                 copy etags.c ctags.c
112 CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
113 $(BLD)\ctags.obj: ctags.c
114                 $(CC) $(CFLAGS) $(CTAGS_CFLAGS) -Fo$@ ctags.c
116 EBROWSE_OBJ   = $(BLD)\ebrowse.obj \
117                 $(BLD)\getopt.obj \
118                 $(BLD)\getopt1.obj \
119                 $(BLD)\ntlib.obj
121 $(BLD)\ebrowse.exe:     $(EBROWSE_OBJ)
122                 $(LINK) -out:$@ $(LINK_FLAGS) $(EBROWSE_OBJ) $(LIBS)
124 $(BLD)\ebrowse.obj: ebrowse.c ..\src\config.h
125                 $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -Fo$@ ebrowse.c
127 # don't know what to do with these yet...
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
140 # From ..\src\makefile.nt.
142 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 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 
145 # These are the lisp files that are loaded up in loadup.el
147 lispsource = ../lisp/
149 FACE_SUPPORT = $(lispsource)facemenu.elc
150 MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc
151 FLOAT_SUPPORT = $(lispsource)float-sup.elc
152 WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc
154 lisp= \
155         $(lispsource)abbrev.elc \
156         $(lispsource)buff-menu.elc \
157         $(lispsource)byte-run.elc \
158         $(lispsource)cus-start.el \
159         $(lispsource)custom.elc \
160         $(lispsource)disp-table.elc \
161         $(lispsource)faces.elc \
162         $(lispsource)files.elc \
163         $(lispsource)textmodes/fill.elc \
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 \
173         $(lispsource)emacs-lisp/lisp-mode.elc \
174         $(lispsource)emacs-lisp/lisp.elc \
175         $(lispsource)loadup.el \
176         $(lispsource)loaddefs.el \
177         $(lispsource)bindings.el \
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 \
184         $(lispsource)international/ccl.elc \
185         $(lispsource)international/codepage.elc \
186         $(lispsource)international/utf-8.elc \
187         $(lispsource)case-table.elc \
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 \
194         $(lispsource)language/czech.elc \
195         $(lispsource)language/slovak.elc \
196         $(lispsource)language/romanian.elc \
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 \
207         $(lispsource)textmodes/page.elc \
208         $(lispsource)textmodes/paragraphs.elc \
209         $(lispsource)paths.el \
210         $(lispsource)register.elc \
211         $(lispsource)replace.elc \
212         $(lispsource)simple.elc \
213         $(lispsource)startup.elc \
214         $(lispsource)subr.elc \
215         $(lispsource)term/tty-colors.elc \
216         $(lispsource)textmodes/text-mode.elc \
217         $(lispsource)vc-hooks.elc \
218         $(lispsource)ediff-hook.elc \
219         $(VMS_SUPPORT) \
220         $(MSDOS_SUPPORT) \
221         $(WINNT_SUPPORT) \
222         $(lispsource)widget.elc \
223         $(lispsource)window.elc \
224         $(lispsource)version.el
227 DOC           = DOC 
228 $(DOC):         $(BLD)\make-docfile.exe
229                 - $(DEL) $(DOC)
230                 $(BLD)\make-docfile -d ..\src $(obj) > $(DOC)
231                 $(BLD)\make-docfile -d ..\src $(lisp) >> $(DOC)
232                 $(CP) $(DOC) ..\etc\DOC-X
233                 - mkdir ..\src\$(OBJDIR)
234                 - mkdir ..\src\$(OBJDIR)\etc
235                 $(CP) $(DOC) ..\src\$(OBJDIR)\etc\DOC-X
237 {$(BLD)}.obj{$(BLD)}.exe:
238                 $(LINK) -out:$@ $(LINK_FLAGS) $*.obj $(LIBS)
241 # Build the executables
243 all:            $(BLD) $(ALL) $(DOC)
246 # Assuming INSTALL_DIR is defined, build and install emacs in it.
248 INSTALL_FILES = $(ALL)
249 install:        $(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
254                 $(CP) $(BLD)\movemail.exe $(INSTALL_DIR)\bin
255                 - mkdir $(INSTALL_DIR)\etc
256                 $(CP) $(DOC) $(INSTALL_DIR)\etc
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
263 # Maintenance
265 clean:;         - $(DEL) *~ *.pdb DOC*
266                 - $(DEL) *.orig *.rej *.crlf ctags.c
267                 - $(DEL_TREE) deleted
268                 - $(DEL_TREE) obj
269                 - $(DEL_TREE) obj-spd
272 # Headers we would preprocess if we could.
274 ..\src\config.h:        ..\nt\$(CONFIG_H)
275                         $(CP) $** $@
276 ..\src\paths.h:         ..\nt\paths.h
277                         $(CP) $** $@
279 ### DEPENDENCIES ###
281 EMACS_ROOT      = ..
282 SRC             = .
284 $(BLD)\b2m.obj : \
285         $(SRC)\b2m.c \
286         $(EMACS_ROOT)\src\s\ms-w32.h \
287         $(EMACS_ROOT)\src\m\intel386.h \
288         $(EMACS_ROOT)\lib-src\..\src\config.h
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
299 $(BLD)\cvtmail.obj : \
300         $(SRC)\cvtmail.c
302 $(BLD)\digest-doc.obj : \
303         $(SRC)\digest-doc.c
305 $(BLD)\emacsclient.obj : \
306         $(SRC)\emacsclient.c \
307         $(EMACS_ROOT)\src\s\ms-w32.h \
308         $(EMACS_ROOT)\src\m\intel386.h \
309         $(EMACS_ROOT)\lib-src\..\src\config.h
311 $(BLD)\emacsserver.obj : \
312         $(SRC)\emacsserver.c \
313         $(EMACS_ROOT)\src\s\ms-w32.h \
314         $(EMACS_ROOT)\src\m\intel386.h \
315         $(EMACS_ROOT)\lib-src\..\src\config.h \
316         $(EMACS_ROOT)\nt\inc\sys\file.h
318 $(BLD)\emacstool.obj : \
319         $(SRC)\emacstool.c \
320         $(EMACS_ROOT)\nt\inc\sys\file.h
322 $(BLD)\etags.obj : \
323         $(SRC)\etags.c \
324         $(EMACS_ROOT)\nt\inc\sys\param.h \
325         $(EMACS_ROOT)\src\s\ms-w32.h \
326         $(EMACS_ROOT)\src\m\intel386.h \
327         $(EMACS_ROOT)\lib-src\..\src\config.h \
328         $(SRC)\ntlib.h \
329         $(SRC)\getopt.h
331 $(BLD)\fakemail.obj : \
332         $(SRC)\fakemail.c \
333         $(SRC)\ntlib.h \
334         $(EMACS_ROOT)\src\s\ms-w32.h \
335         $(EMACS_ROOT)\src\m\intel386.h \
336         $(EMACS_ROOT)\lib-src\..\src\config.h \
337         $(EMACS_ROOT)\nt\inc\pwd.h
339 $(BLD)\getdate.obj : \
340         $(SRC)\getdate.c \
341         $(EMACS_ROOT)\src\s\ms-w32.h \
342         $(EMACS_ROOT)\src\m\intel386.h \
343         $(EMACS_ROOT)\src\config.h \
344         $(MSTOOLS_SYS)\types.h
346 $(BLD)\getopt.obj : \
347         $(SRC)\getopt.c \
348         $(EMACS_ROOT)\src\s\ms-w32.h \
349         $(EMACS_ROOT)\src\m\intel386.h \
350         $(EMACS_ROOT)\src\config.h \
351         $(SRC)\ntlib.h \
352         $(SRC)\getopt.h
354 $(BLD)\getopt1.obj : \
355         $(SRC)\getopt1.c \
356         $(EMACS_ROOT)\src\s\ms-w32.h \
357         $(EMACS_ROOT)\src\m\intel386.h \
358         $(EMACS_ROOT)\src\config.h \
359         $(SRC)\getopt.h
361 $(BLD)\hexl.obj : \
362         $(SRC)\hexl.c
364 $(BLD)\leditcfns.obj : \
365         $(SRC)\leditcfns.c
367 $(BLD)\make-docfile.obj : \
368         $(SRC)\make-docfile.c \
369         $(EMACS_ROOT)\src\config.h
371 $(BLD)\make-path.obj : \
372         $(SRC)\make-path.c
374 $(BLD)\movemail.obj : \
375         $(SRC)\movemail.c \
376         $(EMACS_ROOT)\src\s\ms-w32.h \
377         $(EMACS_ROOT)\src\m\intel386.h \
378         $(EMACS_ROOT)\lib-src\..\src\config.h \
379         $(EMACS_ROOT)\nt\inc\sys\file.h \
380         $(EMACS_ROOT)\lib-src\..\src\syswait.h \
381         $(EMACS_ROOT)\nt\inc\pwd.h \
382         $(SRC)\ntlib.h
383                 $(CC) $(CFLAGS) -DUSG -Fo$@ movemail.c
385 $(BLD)\ntlib.obj : \
386         $(SRC)\ntlib.c \
387         $(SRC)\ntlib.h \
388         $(EMACS_ROOT)\nt\inc\pwd.h
390 $(BLD)\pop.obj : \
391         $(SRC)\pop.c \
392         $(SRC)\pop.h \
393         $(SRC)\ntlib.h
395 $(BLD)\profile.obj : \
396         $(SRC)\profile.c \
397         $(EMACS_ROOT)\src\s\ms-w32.h \
398         $(EMACS_ROOT)\src\m\intel386.h \
399         $(EMACS_ROOT)\lib-src\..\src\config.h \
400         $(EMACS_ROOT)\lib-src\..\src\systime.h
402 $(BLD)\qsort.obj : \
403         $(SRC)\qsort.c
405 $(BLD)\sorted-doc.obj : \
406         $(SRC)\sorted-doc.c
408 $(BLD)\tcp.obj : \
409         $(SRC)\tcp.c
411 $(BLD)\test-distrib.obj : \
412         $(SRC)\test-distrib.c
414 $(BLD)\timer.obj : \
415         $(SRC)\timer.c \
416         $(EMACS_ROOT)\src\s\ms-w32.h \
417         $(EMACS_ROOT)\src\m\intel386.h \
418         $(EMACS_ROOT)\lib-src\..\src\config.h
420 $(BLD)\yow.obj : \
421         $(SRC)\yow.c \
422         $(EMACS_ROOT)\lib-src\..\src\paths.h