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