Commit | Line | Data |
---|---|---|
eb4252f7 | 1 | # Makefile for lib-src subdirectory in GNU Emacs. |
108c7c97 AS |
2 | # Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003 |
3 | # Free Software Foundation, Inc. | |
29ed0542 | 4 | |
eb4252f7 | 5 | # This file is part of GNU Emacs. |
29ed0542 | 6 | |
eb4252f7 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. | |
29ed0542 | 11 | |
eb4252f7 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. | |
29ed0542 | 16 | |
eb4252f7 RS |
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 | |
3b7ad313 EN |
19 | # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | # Boston, MA 02111-1307, USA. | |
29ed0542 | 21 | |
eb4252f7 RS |
22 | # Avoid trouble on systems where the `SHELL' variable might be |
23 | # inherited from the environment. | |
f7dbcf3c JB |
24 | SHELL = /bin/sh |
25 | ||
eb4252f7 | 26 | # ==================== Things `configure' will edit ==================== |
c71beb75 | 27 | |
b93f2493 BF |
28 | CC=@CC@ |
29 | CFLAGS=@CFLAGS@ | |
30 | ALLOCA=@ALLOCA@ | |
b93f2493 | 31 | version=@version@ |
cf770692 | 32 | configuration=@configuration@ |
108c7c97 | 33 | EXEEXT=@EXEEXT@ |
c71beb75 | 34 | |
a4663fed PJ |
35 | # Program name transformation. |
36 | TRANSFORM = @program_transform_name@ | |
37 | ||
eb4252f7 | 38 | # ==================== Where To Install Things ==================== |
c71beb75 | 39 | |
eb4252f7 RS |
40 | # The default location for installation. Everything is placed in |
41 | # subdirectories of this directory. The default values for many of | |
42 | # the variables below are expressed in terms of this one, so you may | |
43 | # not need to change them. This is set with the --prefix option to | |
44 | # `../configure'. | |
b93f2493 | 45 | prefix=@prefix@ |
c71beb75 | 46 | |
eb4252f7 RS |
47 | # Like `prefix', but used for architecture-specific files. This is |
48 | # set with the --exec-prefix option to `../configure'. | |
b93f2493 | 49 | exec_prefix=@exec_prefix@ |
c71beb75 | 50 | |
eb4252f7 RS |
51 | # Where to install Emacs and other binaries that people will want to |
52 | # run directly (like etags). This is set with the --bindir option | |
53 | # to `../configure'. | |
b93f2493 | 54 | bindir=@bindir@ |
c71beb75 | 55 | |
eb4252f7 RS |
56 | # Where to install and expect executable files to be run by Emacs |
57 | # rather than directly by users, and other architecture-dependent | |
58 | # data. ${archlibdir} is usually below this. This is set with the | |
424b6d2b RS |
59 | # --libexecdir option to `../configure'. |
60 | libexecdir=@libexecdir@ | |
c71beb75 | 61 | |
712eaee0 AS |
62 | # Directory for local state files for all programs. |
63 | localstatedir=@localstatedir@ | |
64 | ||
eb4252f7 RS |
65 | # Where to find the source code. This is set by the configure |
66 | # script's `--srcdir' option. However, the value of ${srcdir} in | |
67 | # this makefile is not identical to what was specified with --srcdir, | |
68 | # since the variable here has `/lib-src' added at the end. | |
5126d3b7 RS |
69 | |
70 | # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. | |
b93f2493 BF |
71 | srcdir=@srcdir@ |
72 | VPATH=@srcdir@ | |
c71beb75 | 73 | |
2d521ee6 DM |
74 | # The top-level source directory, also set by configure. |
75 | top_srcdir=@top_srcdir@ | |
76 | ||
eb4252f7 | 77 | # ==================== Emacs-specific directories ==================== |
c71beb75 | 78 | |
eb4252f7 RS |
79 | # These variables hold the values Emacs will actually use. They are |
80 | # based on the values of the standard Make variables above. | |
c71beb75 | 81 | |
eb4252f7 RS |
82 | # Where to put executables to be run by Emacs rather than the user. |
83 | # This path usually includes the Emacs version and configuration name, | |
84 | # so that multiple configurations for multiple versions of Emacs may | |
85 | # be installed at once. This can be set with the --archlibdir option | |
86 | # to `../configure'. | |
b93f2493 | 87 | archlibdir=@archlibdir@ |
41f86d5a | 88 | |
1ba1fb11 CW |
89 | gamedir=@gamedir@ |
90 | gameuser=@gameuser@ | |
91 | ||
eb4252f7 | 92 | # ==================== Utility Programs for the Build ================= |
c71beb75 | 93 | |
eb4252f7 | 94 | # ../configure figures out the correct values for these. |
b93f2493 | 95 | INSTALL = @INSTALL@ |
b93f2493 BF |
96 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
97 | INSTALL_DATA = @INSTALL_DATA@ | |
ae6ed0ac RS |
98 | # By default, we uphold the dignity of our programs. |
99 | INSTALL_STRIP = | |
c71beb75 | 100 | |
eb4252f7 | 101 | # ========================== Lists of Files =========================== |
f7dbcf3c | 102 | |
eb4252f7 RS |
103 | # Things that a user might actually run, |
104 | # which should be installed in bindir. | |
108c7c97 | 105 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT} |
e511d7f4 | 106 | INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog |
f7dbcf3c | 107 | |
eb4252f7 RS |
108 | # Things that Emacs runs internally, or during the build process, |
109 | # which should not be installed in bindir. | |
108c7c97 AS |
110 | UTILITIES= profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} movemail${EXEEXT} cvtmail${EXEEXT} fakemail${EXEEXT} \ |
111 | yow${EXEEXT} hexl${EXEEXT} update-game-score${EXEEXT} | |
f7dbcf3c | 112 | |
108c7c97 | 113 | DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT} |
5aae6601 | 114 | |
eb4252f7 RS |
115 | # Like UTILITIES, but they're not system-dependent, and should not be |
116 | # deleted by the distclean target. | |
b7cceaf1 JB |
117 | SCRIPTS= rcs2log vcdiff |
118 | ||
0d73e8e3 | 119 | EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} |
f7dbcf3c | 120 | |
5c579a75 | 121 | SOURCES = COPYING ChangeLog Makefile.in README emacs.csh \ |
41f86d5a ER |
122 | makedoc.com *.[chy] rcs2log vcdiff |
123 | ||
81f94052 RS |
124 | # Additional -D flags for movemail (add to MOVE_FLAGS if desired): |
125 | # MAIL_USE_POP Support mail retrieval from a POP mailbox. | |
126 | # MAIL_USE_MMDF Support MMDF mailboxes. | |
127 | # MAIL_USE_FLOCK Use flock for file locking (see the comments | |
128 | # about locking in movemail.c) | |
129 | # MAIL_UNLINK_SPOOL Unlink the user's spool mailbox after reading | |
130 | # it (instead of just emptying it). | |
131 | # KERBEROS Support Kerberized POP. | |
132 | # KRB5 Support Kerberos Version 5 pop instead of | |
133 | # Version 4 (define this in addition to | |
134 | # KERBEROS). | |
135 | # HESIOD Support Hesiod lookups of user mailboxes. | |
136 | # MAILHOST A string, the host name of the default POP | |
137 | # mail host for the site. | |
138 | MOVE_FLAGS= | |
139 | ||
eb4252f7 RS |
140 | # ========================== start of cpp stuff ======================= |
141 | /* From here on, comments must be done in C syntax. */ | |
142 | ||
143 | #define NO_SHORTNAMES | |
fcd4533c | 144 | #define THIS_IS_MAKEFILE |
eb4252f7 RS |
145 | #define NOT_C_CODE |
146 | #include "../src/config.h" | |
147 | ||
89b3f894 RS |
148 | /* We won't really call alloca; |
149 | don't let the file name alloca.c get messed up. */ | |
150 | #ifdef alloca | |
151 | #undef alloca | |
152 | #endif | |
153 | ||
67bb79b7 | 154 | /* Some machines don\'t find the standard C libraries in the usual place. */ |
5e70aa9c | 155 | #ifndef ORDINARY_LINK |
fcd4533c KH |
156 | #ifndef LIB_STANDARD_LIBSRC |
157 | #define LIB_STANDARD_LIBSRC -lc | |
5e70aa9c RS |
158 | #endif |
159 | #else | |
fcd4533c KH |
160 | #ifndef LIB_STANDARD_LIBSRC |
161 | #define LIB_STANDARD_LIBSRC | |
5e70aa9c RS |
162 | #endif |
163 | #endif | |
164 | ||
f11c1c14 | 165 | /* Some s/SYSTEM.h files define this to request special libraries. */ |
eb4252f7 RS |
166 | #ifndef LIBS_SYSTEM |
167 | #define LIBS_SYSTEM | |
168 | #endif | |
169 | ||
f11c1c14 | 170 | /* Some m/MACHINE.h files define this to request special libraries. */ |
eb4252f7 RS |
171 | #ifndef LIBS_MACHINE |
172 | #define LIBS_MACHINE | |
173 | #endif | |
174 | ||
175 | #ifndef C_SWITCH_SYSTEM | |
176 | #define C_SWITCH_SYSTEM | |
177 | #endif | |
178 | ||
179 | #ifndef C_SWITCH_MACHINE | |
180 | #define C_SWITCH_MACHINE | |
181 | #endif | |
182 | ||
183 | #undef MOVEMAIL_NEEDS_BLESSING | |
184 | #ifndef MAIL_USE_FLOCK | |
185 | #ifndef MAIL_USE_LOCKF | |
186 | #define MOVEMAIL_NEEDS_BLESSING | |
187 | #endif | |
188 | #endif | |
189 | ||
190 | #ifdef MOVEMAIL_NEEDS_BLESSING | |
191 | #define BLESSMAIL blessmail | |
192 | #else | |
193 | #define BLESSMAIL | |
194 | #endif | |
195 | ||
ae6ed0ac | 196 | #ifdef KERBEROS |
93de505d | 197 | # ifdef HAVE_LIBKRB |
f616d119 | 198 | KRB4LIB = -lkrb |
93de505d RS |
199 | # else |
200 | # ifdef HAVE_LIBKRB4 | |
f616d119 | 201 | KRB4LIB = -lkrb4 |
93de505d RS |
202 | # endif |
203 | # endif | |
204 | # ifdef HAVE_LIBDES | |
f616d119 | 205 | DESLIB = -ldes |
93de505d RS |
206 | # else |
207 | # ifdef HAVE_LIBDES425 | |
f616d119 | 208 | DESLIB = -ldes425 |
93de505d RS |
209 | # endif |
210 | # endif | |
211 | # ifdef HAVE_LIBKRB5 | |
f616d119 | 212 | KRB5LIB = -lkrb5 |
93de505d | 213 | # endif |
84e70f78 KR |
214 | # ifdef HAVE_LIBK5CRYPTO |
215 | CRYPTOLIB = -lk5crypto | |
216 | # else | |
217 | # ifdef HAVE_LIBCRYPTO | |
f616d119 | 218 | CRYPTOLIB = -lcrypto |
84e70f78 | 219 | # endif |
93de505d RS |
220 | # endif |
221 | # ifdef HAVE_LIBCOM_ERR | |
f616d119 | 222 | COM_ERRLIB = -lcom_err |
93de505d | 223 | # endif |
665eba9d | 224 | #endif /* KERBEROS */ |
ae6ed0ac | 225 | |
bbcac09c | 226 | /* If HESIOD is defined, set this to "-lhesiod". */ |
84e70f78 KR |
227 | #ifdef HAVE_LIBHESIOD |
228 | # ifdef HAVE_LIBRESOLV | |
229 | HESIODLIB= -lhesiod -lresolv | |
230 | # else | |
231 | HESIODLIB= -lhesiod | |
232 | # endif | |
233 | #endif | |
ae6ed0ac | 234 | |
c0e38e32 | 235 | LIBS_MOVE=$(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(HESIODLIB) |
6fd14a09 | 236 | |
dfb7bcda DL |
237 | #ifdef HAVE_LIBLOCKFILE |
238 | LIBS_MAIL=-llockfile | |
239 | #else | |
6e3dda29 | 240 | #ifdef HAVE_LIBMAIL |
c0e38e32 | 241 | LIBS_MAIL=-lmail |
6e3dda29 | 242 | #endif |
dfb7bcda | 243 | #endif |
6e3dda29 | 244 | |
fcd4533c | 245 | LOADLIBES=LIBS_SYSTEM LIBS_MACHINE LIB_STANDARD_LIBSRC |
eb4252f7 | 246 | |
29ed0542 RS |
247 | /* We need to #define emacs to get the right versions of some files. |
248 | Some other files - those shared with other GNU utilities - need | |
249 | HAVE_CONFIG_H #defined before they know they can take advantage of | |
250 | the information in ../src/config.h. */ | |
56bdb2f5 | 251 | ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
3e883207 | 252 | -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} |
56bdb2f5 | 253 | LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
3e883207 | 254 | -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} |
56bdb2f5 | 255 | CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
b2d7a9c7 | 256 | -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
56bdb2f5 RS |
257 | /* This was all of CPP_CFLAGS except -Demacs. |
258 | Now that -Demacs has been deleted from CPP_CFLAGS, | |
67bb79b7 | 259 | this is actually the same as CPP_CFLAGS, but let\'s not delete it yet. */ |
1d0b600d | 260 | BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ |
20cda85b | 261 | -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} |
29ed0542 RS |
262 | \f |
263 | /* This is the default compilation command. | |
264 | But we should never rely on it, because some make version | |
265 | failed to find it for getopt.o. | |
266 | Using an explicit command made it work. */ | |
c38a040d | 267 | .c.o: |
5293b432 | 268 | ${CC} -c ${CPP_CFLAGS} $< |
c71beb75 | 269 | |
ee978ec9 RS |
270 | all: ${DONT_INSTALL} ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} |
271 | ||
c5c92751 MR |
272 | /* These targets copy the scripts into the build directory |
273 | so that they can be run from there in an uninstalled Emacs. */ | |
ee978ec9 RS |
274 | rcs2log: $(srcdir)/rcs2log |
275 | cp -p $(srcdir)/rcs2log rcs2log | |
276 | ||
277 | rcs-checkin: $(srcdir)/rcs-checkin | |
278 | cp -p $(srcdir)/rcs-checkin rcs-checkin | |
279 | ||
280 | grep-changelog: $(srcdir)/grep-changelog | |
281 | cp -p $(srcdir)/grep-changelog grep-changelog | |
282 | ||
283 | vcdiff: $(srcdir)/vcdiff | |
284 | cp -p $(srcdir)/vcdiff vcdiff | |
c71beb75 | 285 | |
c6207d0d | 286 | #ifdef MOVEMAIL_NEEDS_BLESSING |
f675ecb5 | 287 | blessmail: |
828524de | 288 | ../src/emacs -batch -l $(srcdir)/../lisp/mail/blessmail.el |
c6207d0d KH |
289 | chmod +x blessmail |
290 | #endif | |
291 | ||
d19f95fe RS |
292 | maybe-blessmail: BLESSMAIL |
293 | #ifdef MOVEMAIL_NEEDS_BLESSING | |
67bb79b7 | 294 | /* Don\'t charge ahead and do it! Let the installer decide. |
108c7c97 | 295 | ./blessmail ${archlibdir}/movemail${EXEEXT} */ |
d19f95fe RS |
296 | @if [ `wc -l <blessmail` != 2 ] ; then \ |
297 | dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ | |
298 | echo Assuming $$dir is really the mail spool directory, you should; \ | |
108c7c97 AS |
299 | echo run lib-src/blessmail ${archlibdir}/movemail${EXEEXT}; \ |
300 | echo as root, to give movemail${EXEEXT} appropriate permissions.; \ | |
eb4252f7 | 301 | echo Do that after running make install.; \ |
d19f95fe RS |
302 | fi |
303 | #endif | |
304 | ||
29ed0542 RS |
305 | /* Install the internal utilities. Until they are installed, we can |
306 | just run them directly from lib-src. */ | |
d19f95fe | 307 | ${archlibdir}: all |
c71beb75 JB |
308 | @echo |
309 | @echo "Installing utilities run internally by Emacs." | |
2d521ee6 | 310 | $(top_srcdir)/mkinstalldirs ${archlibdir} |
f7d3e7d0 | 311 | if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ |
544d556f | 312 | for file in ${UTILITIES}; do \ |
ae6ed0ac | 313 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file ${archlibdir}/$$file ; \ |
544d556f | 314 | done ; \ |
ad600343 | 315 | fi |
67bb79b7 AS |
316 | $(top_srcdir)/mkinstalldirs ${gamedir} |
317 | touch ${gamedir}/snake-scores | |
318 | touch ${gamedir}/tetris-scores | |
7451222f CW |
319 | /* If the following commands fail, that is not a big deal. |
320 | update-game-score will detect at runtime that it is not setuid, | |
321 | and handle things accordingly. */ | |
d17b3095 | 322 | -if chown ${gameuser} ${archlibdir}/update-game-score && chmod u+s ${archlibdir}/update-game-score; then \ |
7451222f CW |
323 | chown ${gameuser} ${gamedir}; \ |
324 | chmod u=rwx,g=rwx,o=rx ${gamedir}; \ | |
7451222f | 325 | fi |
ad600343 RS |
326 | if [ `(cd ${archlibdir} && /bin/pwd)` \ |
327 | != `(cd ${srcdir} && /bin/pwd)` ]; then \ | |
544d556f | 328 | for file in ${SCRIPTS}; do \ |
c61a529e | 329 | $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file; \ |
c71beb75 | 330 | done ; \ |
0268f19b | 331 | fi |
f7dbcf3c | 332 | |
c71beb75 JB |
333 | install: ${archlibdir} |
334 | @echo | |
335 | @echo "Installing utilities for users to run." | |
b70cff71 | 336 | for file in ${INSTALLABLES} ; do \ |
a4663fed PJ |
337 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ |
338 | chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \ | |
0268f19b | 339 | done |
b70cff71 | 340 | for file in ${INSTALLABLE_SCRIPTS} ; do \ |
a4663fed PJ |
341 | $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ |
342 | chmod a+rx ${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \ | |
0268f19b | 343 | done |
f7dbcf3c | 344 | |
39b649dd JB |
345 | uninstall: |
346 | (cd ${bindir}; \ | |
a4663fed PJ |
347 | for file in ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}; do \ |
348 | rm -f ${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \ | |
349 | done) | |
39b649dd JB |
350 | (cd ${archlibdir}; \ |
351 | rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}) | |
352 | ||
a17d2c25 RS |
353 | mostlyclean: |
354 | -rm -f core *.o | |
355 | ||
356 | clean: mostlyclean | |
5aae6601 | 357 | -rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} |
1405e9d0 | 358 | -rm -f fns*.el *.tab.c *.tab.h |
f7dbcf3c | 359 | |
39b649dd | 360 | distclean: clean |
5c579a75 | 361 | -rm -f TAGS |
b2959c9d | 362 | -rm -f Makefile Makefile.c blessmail |
f7dbcf3c | 363 | |
26873b72 | 364 | maintainer-clean: distclean |
39b649dd | 365 | true |
c71beb75 | 366 | |
a01c76d7 | 367 | extraclean: maintainer-clean |
c71beb75 | 368 | -rm -f *~ \#* |
f7dbcf3c | 369 | |
41f86d5a ER |
370 | unlock: |
371 | chmod u+w $(SOURCES) | |
372 | ||
373 | relock: | |
374 | chmod u-w $(SOURCES) | |
375 | ||
29ed0542 | 376 | /* Test the contents of the directory. */ |
f7dbcf3c JB |
377 | check: |
378 | @echo "We don't have any tests for GNU Emacs yet." | |
379 | ||
93548af1 | 380 | tags: TAGS |
108c7c97 | 381 | TAGS: etags${EXEEXT} |
f7dbcf3c JB |
382 | etags *.[ch] |
383 | ||
67bb79b7 | 384 | /* This verifies that the non-ASCII characters in the file \`testfile\' |
29ed0542 RS |
385 | have not been clobbered by whatever means were used to copy and |
386 | distribute Emacs. If they were clobbered, all the .elc files were | |
387 | clobbered too. */ | |
108c7c97 | 388 | test-distrib${EXEEXT}: ${srcdir}/test-distrib.c |
c88a7f88 | 389 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c |
0d73e8e3 | 390 | ./test-distrib ${srcdir}/testfile |
f7dbcf3c | 391 | |
c38a040d | 392 | GETOPTOBJS = getopt.o getopt1.o $(ALLOCA) |
0d73e8e3 | 393 | GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h |
b90589d8 | 394 | getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h |
0268f19b | 395 | ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c |
b90589d8 | 396 | getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h |
0268f19b | 397 | ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c |
20cda85b | 398 | alloca.o: ${srcdir}/alloca.c |
32b4c0e9 | 399 | ${CC} -Demacs -c ${BASE_CFLAGS} ${srcdir}/alloca.c |
f7dbcf3c | 400 | |
e63ceebf RS |
401 | #ifdef REGEXP_IN_LIBC |
402 | REGEXPOBJ = | |
403 | REGEXPDEPS = | |
404 | #else | |
66ab94d9 | 405 | REGEXPOBJ = regex.o |
5126d3b7 | 406 | REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h |
e63ceebf RS |
407 | #endif |
408 | ||
5126d3b7 | 409 | regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h |
1d0b600d | 410 | ${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c |
66ab94d9 | 411 | |
108c7c97 | 412 | etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h |
0b532ca2 | 413 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags |
f7dbcf3c | 414 | |
108c7c97 | 415 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h |
adb0a8d3 GM |
416 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse |
417 | ||
67bb79b7 | 418 | /* We depend on etags to assure that parallel makes don\'t write two |
29ed0542 | 419 | etags.o files on top of each other. */ |
108c7c97 | 420 | ctags${EXEEXT}: etags${EXEEXT} |
59aacecb | 421 | $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags |
f7dbcf3c | 422 | |
108c7c97 | 423 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h |
379fb9c8 RS |
424 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile |
425 | ||
108c7c97 | 426 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h |
3e883207 | 427 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile |
f7dbcf3c | 428 | |
108c7c97 | 429 | digest-doc${EXEEXT}: ${srcdir}/digest-doc.c |
c60ee5e7 | 430 | $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc |
f7dbcf3c | 431 | |
108c7c97 | 432 | sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c ${ALLOCA} |
3e883207 | 433 | $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc |
f7dbcf3c | 434 | |
108c7c97 | 435 | b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) |
1817145f | 436 | $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \ |
c60ee5e7 | 437 | $(GETOPTOBJS) $(LOADLIBES) -o b2m |
f7dbcf3c | 438 | |
108c7c97 | 439 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) |
c0e38e32 | 440 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail |
81f94052 RS |
441 | |
442 | movemail.o: ${srcdir}/movemail.c ../src/config.h | |
56bdb2f5 | 443 | $(CC) -c ${CPP_CFLAGS} -Demacs ${MOVE_FLAGS} ${srcdir}/movemail.c |
81f94052 | 444 | |
93c8d183 | 445 | pop.o: ${srcdir}/pop.c ../src/config.h |
81f94052 | 446 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
f7dbcf3c | 447 | |
108c7c97 | 448 | cvtmail${EXEEXT}: ${srcdir}/cvtmail.c |
3e883207 | 449 | $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail |
f7dbcf3c | 450 | |
108c7c97 | 451 | fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h |
3e883207 | 452 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail |
f7dbcf3c | 453 | |
108c7c97 | 454 | yow${EXEEXT}: ${srcdir}/yow.c ../src/epaths.h |
3e883207 | 455 | $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow |
f7dbcf3c | 456 | |
108c7c97 | 457 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) |
deec6f99 RS |
458 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ |
459 | -DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \ | |
460 | $(LOADLIBES) -o emacsclient | |
f7dbcf3c | 461 | |
108c7c97 | 462 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h |
3e883207 | 463 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
f7dbcf3c | 464 | |
108c7c97 | 465 | update-game-score${EXEEXT}: ${srcdir}/update-game-score.c ../src/config.h |
67bb79b7 AS |
466 | $(CC) ${ALL_CFLAGS} ${srcdir}/update-game-score.c \ |
467 | -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ | |
468 | $(LOADLIBES) -o update-game-score | |
1ba1fb11 | 469 | |
29ed0542 | 470 | /* These are NOT included in INSTALLABLES or UTILITIES. |
b2959c9d | 471 | See ../src/Makefile.in. */ |
108c7c97 | 472 | emacstool${EXEEXT}: ${srcdir}/emacstool.c |
3e883207 | 473 | $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \ |
f7dbcf3c JB |
474 | -lsuntool -lsunwindow -lpixrect $(LOADLIBES) |
475 | ||
29ed0542 | 476 | /* For SUN Japanese Language Environment. */ |
108c7c97 | 477 | nemacstool${EXEEXT}: ${srcdir}/emacstool.c |
3e883207 | 478 | $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
f7dbcf3c JB |
479 | -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) |
480 | ||
108c7c97 | 481 | xvetool${EXEEXT}: ${srcdir}/emacstool.c |
3e883207 | 482 | $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
f7dbcf3c JB |
483 | -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
484 | $(LOADLIBES) | |
485 | ||
108c7c97 | 486 | xveterm${EXEEXT}: ${srcdir}/emacstool.c |
3e883207 | 487 | $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \ |
f7dbcf3c JB |
488 | -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ |
489 | $(LOADLIBES) |