aboutsummaryrefslogtreecommitdiff
path: root/src/config/pre.in
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-05-16 14:21:12 -0400
committerGreg Hudson <ghudson@mit.edu>2013-05-16 20:09:27 -0400
commit4b0985f8573840838bcfa8ec1df3dcd39a3dbf15 (patch)
treea9ac284b8ef9000f968cb610cc8ff79061e8293b /src/config/pre.in
parent780b34cd19c0360458395e87f35550e9803a5194 (diff)
downloadkrb5-4b0985f8573840838bcfa8ec1df3dcd39a3dbf15.zip
krb5-4b0985f8573840838bcfa8ec1df3dcd39a3dbf15.tar.gz
krb5-4b0985f8573840838bcfa8ec1df3dcd39a3dbf15.tar.bz2
Reduce boilerplate in makefiles
Provide default values in pre.in for PROG_LIBPATH, PROG_RPATH, SHLIB_DIRS, SHLIB_RDIRS, and STOBJLISTS so that they don't have to be specified in the common case. Rename KRB5_RUN_ENV and KRB5_RUN_VARS to RUN_SETUP (already the most commonly used name) and RUN_VARS. Make sure to use DEFINES for local defines (not DEFS). Remove some other unnecessary makefile content.
Diffstat (limited to 'src/config/pre.in')
-rw-r--r--src/config/pre.in30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/config/pre.in b/src/config/pre.in
index bf6c93b..fbc5c11 100644
--- a/src/config/pre.in
+++ b/src/config/pre.in
@@ -275,21 +275,31 @@ EXEEXT =
# variables for libraries, for use in linking programs
# -- this may want to get broken out into a separate frag later
#
-#
-# Note: the following variables must be set in any Makefile.in that
-# uses KRB5_BUILD_PROGRAM
-#
-# PROG_LIBPATH list of dirs, in -Ldir form, to search for libraries at link
-# PROG_RPATH list of dirs, in dir1:dir2 form, for rpath purposes
-#
# invocation is like:
# prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
# $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
-
CC_LINK=@CC_LINK@
CXX_LINK=@CXX_LINK@
+# Makefile.in files which build programs can override the list of
+# directories to look for dependent libraries in (in the form -Ldir1
+# -Ldir2 ...) and also the list of rpath directories to search (in the
+# form dir1:dir2:...).
+PROG_LIBPATH=-L$(TOPLIBD)
+PROG_RPATH=$(KRB5_LIBDIR)
+
+# Library Makefile.in files can override this list of directories to
+# look for dependent libraries in (in the form -Ldir1 -Ldir2 ...) and
+# also the list of rpath directories to search (in the form
+# dir1:dir2:...)
+SHLIB_DIRS=-L$(TOPLIBD)
+SHLIB_RDIRS=$(KRB5_LIBDIR)
+
+# Multi-directory library Makefile.in files should override this list
+# of object files with the full list.
+STOBJLISTS=OBJS.ST
+
# prefix (with no spaces after) for rpath flag to cc
RPATH_FLAG=@RPATH_FLAG@
@@ -398,8 +408,8 @@ KADMCLNT_LIBS = -lkadm5clnt_mit $(KADM_COMM_LIBS)
APPUTILS_LIB = -lapputils
# So test programs can find their libraries without "make install", etc.
-KRB5_RUN_ENV=@KRB5_RUN_ENV@
-KRB5_RUN_VARS=@KRB5_RUN_VARS@
+RUN_SETUP=@KRB5_RUN_ENV@
+RUN_VARS=@KRB5_RUN_VARS@
#
# variables for --with-tcl=