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