(PURESIZE) [!MULTI_FRAME]: Increase to 200000.
[emacs.git] / lib-src / Makefile.in
blob934298f53756d85094ddd9831cb2c8d2f2312f7d
1 /* Makefile for lib-src subdirectory in GNU Emacs.
2 Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 #define NO_SHORTNAMES
21 #define THIS_IS_YMAKEFILE
22 #define NOT_C_CODE
23 #include "../src/config.h"
25 /* Some s/*.h files define this to request special libraries. */
26 #ifndef LIBS_SYSTEM
27 #define LIBS_SYSTEM
28 #endif
30 /* Some m/*.h files define this to request special libraries. */
31 #ifndef LIBS_MACHINE
32 #define LIBS_MACHINE
33 #endif
35 /* Avoid trouble on systems where the `SHELL' variable might be
36 inherited from the environment. */
37 SHELL = /bin/sh
39 /* ==================== Things `configure' will edit ==================== */
41 CC=@CC@
42 CFLAGS=@CFLAGS@
43 ALLOCA=@ALLOCA@
44 C_SWITCH_SYSTEM=@c_switch_system@
45 C_SWITCH_MACHINE=@c_switch_machine@
46 LOADLIBES=LIBS_SYSTEM LIBS_MACHINE
47 YACC=@YACC@
48 version=@version@
49 configname=@configuration@
51 /* ==================== Where To Install Things ==================== */
53 /* The default location for installation. Everything is placed in
54 subdirectories of this directory. The default values for many of
55 the variables below are expressed in terms of this one, so you may
56 not need to change them. This is set with the --prefix option to
57 `../configure'. */
58 prefix=@prefix@
60 /* Like `prefix', but used for architecture-specific files. This is
61 set with the --exec-prefix option to `../configure'. */
62 exec_prefix=@exec_prefix@
64 /* Where to install Emacs and other binaries that people will want to
65 run directly (like etags). This is set with the --bindir option
66 to `../configure'. */
67 bindir=@bindir@
69 /* Where to install and expect executable files to be run by Emacs
70 rather than directly by users, and other architecture-dependent
71 data. ${archlibdir} is usually below this. This is set with the
72 --libdir option to `../configure'. */
73 libdir=@libdir@
75 /* Where to find the source code. This is set by the configure
76 script's `--srcdir' option. However, the value of ${srcdir} in
77 this makefile is not identical to what was specified with --srcdir,
78 since the variable here has `/lib-src' added at the end. */
79 srcdir=@srcdir@
80 VPATH=@srcdir@
82 /* ==================== Emacs-specific directories ==================== */
84 /* These variables hold the values Emacs will actually use. They are
85 based on the values of the standard Make variables above. */
87 /* Where to put executables to be run by Emacs rather than the user.
88 This path usually includes the Emacs version and configuration name,
89 so that multiple configurations for multiple versions of Emacs may
90 be installed at once. This can be set with the --archlibdir option
91 to `../configure'. */
92 archlibdir=@archlibdir@
94 /* ==================== Utility Programs for the Build ================= */
96 /* ../configure figures out the correct values for these. */
97 INSTALL = @INSTALL@
98 INSTALL_PROGRAM = @INSTALL_PROGRAM@
99 INSTALL_DATA = @INSTALL_DATA@
101 /* ============================= Targets ============================== */
103 /* Things that a user might actually run,
104 which should be installed in bindir. */
105 INSTALLABLES = etags ctags emacsclient b2m
106 INSTALLABLE_SCRIPTS = rcs-checkin
108 /* Things that Emacs runs internally, or during the build process,
109 which should not be installed in bindir. */
110 UTILITIES= test-distrib make-path wakeup profile make-docfile digest-doc \
111 sorted-doc movemail cvtmail fakemail yow emacsserver hexl timer
113 /* Like UTILITIES, but they're not system-dependent, and should not be
114 deleted by the distclean target. */
115 SCRIPTS= rcs2log vcdiff
117 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
119 SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
120 makedoc.com *.[chy] rcs2log vcdiff
122 /* We need to #define emacs to get the right versions of some files.
123 Some other files - those shared with other GNU utilities - need
124 HAVE_CONFIG_H #defined before they know they can take advantage of
125 the information in ../src/config.h. */
126 ALL_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
127 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
128 LINK_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
129 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
130 CPP_CFLAGS = ${C_SWITCH_SYSTEM} ${C_SWITCH_MACHINE} -Demacs -DHAVE_CONFIG_H \
131 -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
133 /* This is the default compilation command.
134 But we should never rely on it, because some make version
135 failed to find it for getopt.o.
136 Using an explicit command made it work. */
137 .c.o:
138 ${CC} -c ${CPP_CFLAGS} $<
140 all: ${UTILITIES} ${INSTALLABLES}
142 /* Install the internal utilities. Until they are installed, we can
143 just run them directly from lib-src. */
144 ${archlibdir}: all
145 @echo
146 @echo "Installing utilities run internally by Emacs."
147 ./make-path ${archlibdir}
148 if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
149 for file in ${UTILITIES}; do \
150 (cd ..; $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; \
151 done ; \
152 for file in ${SCRIPTS}; do \
153 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); \
154 done ; \
157 /* We don't need to install `wakeup' explicitly, because it will be
158 copied when this whole directory is copied. */
159 install: ${archlibdir}
160 @echo
161 @echo "Installing utilities for users to run."
162 for file in ${INSTALLABLES} ; do \
163 (cd ..; $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
164 done
165 for file in ${INSTALLABLE_SCRIPTS} ; do \
166 (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
167 done
169 uninstall:
170 (cd ${bindir}; \
171 rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
172 (cd ${archlibdir}; \
173 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
175 mostlyclean:
176 -rm -f core *.o
178 clean: mostlyclean
179 -rm -f ${INSTALLABLES} ${UTILITIES}
181 distclean: clean
182 -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS
184 realclean: distclean
185 true
187 extraclean: realclean
188 -rm -f *~ \#*
190 unlock:
191 chmod u+w $(SOURCES)
193 relock:
194 chmod u-w $(SOURCES)
196 /* Test the contents of the directory. */
197 check:
198 @echo "We don't have any tests for GNU Emacs yet."
200 TAGS: etags
201 etags *.[ch]
203 /* This verifies that the non-ASCII characters in the file `testfile'
204 have not been clobbered by whatever means were used to copy and
205 distribute Emacs. If they were clobbered, all the .elc files were
206 clobbered too. */
207 test-distrib: ${srcdir}/test-distrib.c
208 $(CC) -o test-distrib ${srcdir}/test-distrib.c
209 ./test-distrib ${srcdir}/testfile
211 GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
212 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
213 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
214 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
215 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
216 ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
218 etags: ${srcdir}/etags.c $(GETOPTDEPS) ../src/config.h
219 $(CC) ${ALL_CFLAGS} -DVERSION=${version} ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
221 /* We depend on etags to assure that parallel makes don't write two
222 etags.o files on top of each other. */
223 ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
224 $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION=${version} ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
226 wakeup: ${srcdir}/wakeup.c
227 $(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
229 profile: ${srcdir}/profile.c
230 $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
232 make-docfile: ${srcdir}/make-docfile.c
233 $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
235 digest-doc: ${srcdir}/digest-doc.c
236 $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
238 sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
239 $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
241 b2m: ${srcdir}/b2m.c ../src/config.h
242 $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m
244 movemail: ${srcdir}/movemail.c ../src/config.h
245 $(CC) ${ALL_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail
247 cvtmail: ${srcdir}/cvtmail.c
248 $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
250 fakemail: ${srcdir}/fakemail.c ../src/config.h
251 $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
253 yow: ${srcdir}/yow.c ../src/paths.h
254 $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
256 emacsserver: ${srcdir}/emacsserver.c ../src/config.h
257 $(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
259 emacsclient: ${srcdir}/emacsclient.c ../src/config.h
260 $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
262 hexl: ${srcdir}/hexl.c
263 $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
265 TIMEROBJS=getdate.o timer.o $(ALLOCA)
266 getdate.o: ${srcdir}/getdate.y ../src/config.h
267 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
268 $(CC) $(CPP_CFLAGS) -c y.tab.c
269 mv y.tab.o getdate.o
270 timer.o: ${srcdir}/timer.c ../src/config.h
271 $(CC) -c $(CPP_CFLAGS) ${srcdir}/timer.c
272 timer: ${TIMEROBJS}
273 $(CC) $(LINK_CFLAGS) ${TIMEROBJS} $(LOADLIBES) -o timer
275 make-path: ${srcdir}/make-path.c ../src/config.h
276 $(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path
278 /* These are NOT included in INSTALLABLES or UTILITIES.
279 See ../src/ymakefile. */
280 emacstool: ${srcdir}/emacstool.c
281 $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \
282 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
284 /* For SUN Japanese Language Environment. */
285 nemacstool: ${srcdir}/emacstool.c
286 $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \
287 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
289 xvetool: ${srcdir}/emacstool.c
290 $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \
291 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
292 $(LOADLIBES)
294 xveterm: ${srcdir}/emacstool.c
295 $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
296 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
297 $(LOADLIBES)
299 aixcc: ${srcdir}/aixcc.c
300 $(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c
302 aixcc.c: ${srcdir}/aixcc.lex
303 lex ${srcdir}/aixcc.lex
304 mv lex.yy.c aixcc.c