1 ############################################################
3 ## common prefix for all Makefile.in in the Kerberos V5 tree.
6 # These are set per-directory by autoconf 2.52 and 2.53:
8 # top_srcdir=@top_srcdir@
9 # but these are only set by autoconf 2.53, and thus not useful to us on
10 # Mac OS X yet (as of 10.2):
11 # abs_srcdir=@abs_srcdir@
12 # abs_top_srcdir=@abs_top_srcdir@
14 # abs_builddir=@abs_builddir@
15 # top_builddir=@top_builddir@
16 # abs_top_builddir=@abs_top_builddir@
17 # The "top" variables refer to the directory with the configure (or
18 # config.status) script.
27 distclean:: distclean-$(WHAT)
29 install:: install-$(WHAT)
33 install-headers:: install-headers-$(WHAT)
35 ##############################
36 # Recursion rule support
39 # The commands for the recursion targets live in config/post.in.
41 # General form of recursion rules:
43 # Each recursive target foo-unix has related targets: foo-prerecurse,
44 # foo-recurse, and foo-postrecurse
46 # The foo-recurse rule is in post.in. It is what actually recursively
49 # foo-recurse depends on foo-prerecurse, so any targets that must be
50 # built before descending into subdirectories must be dependencies of
53 # foo-postrecurse depends on foo-recurse, but targets that must be
54 # built after descending into subdirectories should be have
55 # foo-recurse as dependencies in addition to being listed under
56 # foo-postrecurse, to avoid ordering issues.
58 # The foo-prerecurse, foo-recurse, and foo-postrecurse rules are all
59 # single-colon rules, to avoid nasty ordering problems with
71 # will result in "bar", "foo", "baz" on AIX, and possibly others.
72 all-unix:: all-postrecurse
73 all-postrecurse: all-recurse
74 all-recurse: all-prerecurse
79 clean-unix:: clean-postrecurse
80 clean-postrecurse: clean-recurse
81 clean-recurse: clean-prerecurse
86 distclean-unix: distclean-postrecurse
87 distclean-postrecurse: distclean-recurse
88 distclean-recurse: distclean-prerecurse
91 distclean-postrecurse:
93 install-unix:: install-postrecurse
94 install-postrecurse: install-recurse
95 install-recurse: install-prerecurse
100 install-headers-unix:: install-headers-postrecurse
101 install-headers-postrecurse: install-headers-recurse
102 install-headers-recurse: install-headers-prerecurse
104 install-headers-prerecurse:
105 install-headers-postrecurse:
107 check-unix:: check-postrecurse
108 check-postrecurse: check-recurse
109 check-recurse: check-prerecurse
114 Makefiles: Makefiles-postrecurse
115 Makefiles-postrecurse: Makefiles-recurse
116 Makefiles-recurse: Makefiles-prerecurse
118 Makefiles-prerecurse:
119 Makefiles-postrecurse:
121 generate-files-mac: generate-files-mac-postrecurse
122 generate-files-mac-postrecurse: generate-files-mac-recurse
123 generate-files-mac-recurse: generate-files-mac-prerecurse
124 generate-files-mac-prerecurse:
127 # end recursion rule support
128 ##############################
132 # begin relative path
134 # this is magic... should only be used for preceding a program invocation
136 # "/" for UNIX, "\" for Windows; *sigh*
141 top_srcdir = @top_srcdir@
143 CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
145 # DEFS set by configure
146 # DEFINES set by local Makefile.in
147 # LOCALINCLUDES set by local Makefile.in
148 # CPPFLAGS user override
149 # CFLAGS user override but starts off set by configure
150 # WARN_CFLAGS user override but starts off set by configure
151 # PTHREAD_CFLAGS set by configure, not included in CFLAGS so that we
152 # don't pull the pthreads library into shared libraries
153 ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
154 -DKRB5_DEPRECATED=1 \
156 $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(PTHREAD_CFLAGS)
157 ALL_CXXFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
158 -DKRB5_DEPRECATED=1 \
160 $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(PTHREAD_CFLAGS)
163 CXXFLAGS = @CXXFLAGS@
164 WARN_CFLAGS = @WARN_CFLAGS@
165 WARN_CXXFLAGS = @WARN_CXXFLAGS@
166 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
167 PTHREAD_LIBS = @PTHREAD_LIBS@
168 THREAD_LINKOPTS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
169 CPPFLAGS = @CPPFLAGS@
175 KRB_INCLUDES = -I$(BUILDTOP)/include -I$(top_srcdir)/include
177 LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
178 LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
184 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
185 INSTALL_SCRIPT=@INSTALL_PROGRAM@
186 INSTALL_DATA=@INSTALL_DATA@
187 INSTALL_SHLIB=@INSTALL_SHLIB@
188 INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
189 ## This is needed because autoconf will sometimes define @exec_prefix@ to be
192 INSTALL_PREFIX=$(prefix)
193 INSTALL_EXEC_PREFIX=@exec_prefix@
194 exec_prefix=@exec_prefix@
195 datarootdir=@datarootdir@
196 SHLIB_TAIL_COMP=@SHLIB_TAIL_COMP@
199 EXAMPLEDIR = $(datadir)/examples/krb5
201 KRB5MANROOT = @mandir@
202 ADMIN_BINDIR = @sbindir@
203 SERVER_BINDIR = @sbindir@
204 CLIENT_BINDIR =@bindir@
205 ADMIN_MANDIR = $(KRB5MANROOT)/man8
206 SERVER_MANDIR = $(KRB5MANROOT)/man8
207 CLIENT_MANDIR = $(KRB5MANROOT)/man1
208 FILE_MANDIR = $(KRB5MANROOT)/man5
209 ADMIN_CATDIR = $(KRB5MANROOT)/cat8
210 SERVER_CATDIR = $(KRB5MANROOT)/cat8
211 CLIENT_CATDIR = $(KRB5MANROOT)/cat1
212 FILE_CATDIR = $(KRB5MANROOT)/cat5
213 KRB5_LIBDIR = @libdir@
214 KRB5_SHLIBDIR = @libdir@$(SHLIB_TAIL_COMP)
215 KRB5_INCDIR = @includedir@
216 MODULE_DIR = @libdir@/krb5/plugins
217 KRB5_DB_MODULE_DIR = $(MODULE_DIR)/kdb
218 KRB5_PA_MODULE_DIR = $(MODULE_DIR)/preauth
219 KRB5_AD_MODULE_DIR = $(MODULE_DIR)/authdata
220 KRB5_LIBKRB5_MODULE_DIR = $(MODULE_DIR)/libkrb5
221 KRB5_LOCALEDIR = @localedir@
222 GSS_MODULE_DIR = @libdir@/gss
224 $(KRB5_INCDIR)/kadm5 \
225 $(KRB5_INCDIR)/krb5 \
226 $(KRB5_INCDIR)/gssapi \
227 $(KRB5_INCDIR)/gssrpc
230 # Macros used by the KADM5 (OV-based) unit test system.
231 # XXX check which of these are actually used!
233 TESTDIR = $(BUILDTOP)/kadmin/testing
234 STESTDIR = $(top_srcdir)/kadmin/testing
235 COMPARE_DUMP = $(TESTDIR)/scripts/compare_dump.pl
236 INITDB = $(STESTDIR)/scripts/init_db
237 MAKE_KEYTAB = $(TESTDIR)/scripts/make-host-keytab.pl
238 LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl
239 ENV_SETUP = $(TESTDIR)/scripts/env-setup.sh
240 CLNTTCL = $(TESTDIR)/util/kadm5_clnt_tcl
241 SRVTCL = $(TESTDIR)/util/kadm5_srv_tcl
243 # We have to set the host with --host so that setup_xfail will work.
244 # If we don't set it, then the host type used is "native", which
245 # doesn't match "*-*-*".
247 DEJAFLAGS = --debug --srcdir $(srcdir) --host $(host)
248 RUNTEST = runtest $(DEJAFLAGS)
250 RUNPYTEST = PYTHONPATH=$(top_srcdir)/util VALGRIND="$(VALGRIND)" \
253 START_SERVERS = $(STESTDIR)/scripts/start_servers $(TEST_SERVER) $(TEST_PATH)
254 START_SERVERS_LOCAL = $(STESTDIR)/scripts/start_servers_local
256 STOP_SERVERS = $(STESTDIR)/scripts/stop_servers $(TEST_SERVER) $(TEST_PATH)
257 STOP_SERVERS_LOCAL = $(STESTDIR)/scripts/stop_servers_local
259 # End of macros for the KADM5 unit test system.
262 transform = @program_transform_name@
280 AUTOHEADER = autoheader
282 MOVEIFCHANGED = $(top_srcdir)/config/move-if-changed
288 TOPLIBD = $(BUILDTOP)/lib
295 # variables for libraries, for use in linking programs
296 # -- this may want to get broken out into a separate frag later
299 # Note: the following variables must be set in any Makefile.in that
300 # uses KRB5_BUILD_PROGRAM
302 # PROG_LIBPATH list of dirs, in -Ldir form, to search for libraries at link
303 # PROG_RPATH list of dirs, in dir1:dir2 form, for rpath purposes
305 # invocation is like:
306 # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
307 # $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
313 # prefix (with no spaces after) for rpath flag to cc
314 RPATH_FLAG=@RPATH_FLAG@
316 # link flags to add PROG_RPATH to the rpath
317 PROG_RPATH_FLAGS=@PROG_RPATH_FLAGS@
319 # this gets set by configure to either $(STLIBEXT) or $(SHLIBEXT),
320 # depending on whether we're building with shared libraries.
321 DEPLIBEXT=@DEPLIBEXT@
323 KDB5_PLUGIN_DEPLIBS = @KDB5_PLUGIN_DEPLIBS@
324 KDB5_PLUGIN_LIBS = @KDB5_PLUGIN_LIBS@
326 KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt_mit$(DEPLIBEXT)
327 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv_mit$(DEPLIBEXT)
328 KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
329 GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
330 GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
331 KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
332 CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
333 COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
334 COM_ERR_DEPLIB-sys = # empty
335 COM_ERR_DEPLIB-intlsys = # empty
336 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
337 SUPPORT_LIBNAME=krb5support
338 SUPPORT_DEPLIB = $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(DEPLIBEXT)
340 # These are forced to use ".a" as an extension because they're never
342 SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
343 SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
345 APPUTILS_DEPLIB = $(TOPLIBD)/libapputils.a
347 KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB)
348 KDB5_DEPLIBS = $(KDB5_DEPLIB) $(KDB5_PLUGIN_DEPLIBS)
349 GSS_DEPLIBS = $(GSS_DEPLIB)
350 GSSRPC_DEPLIBS = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS)
351 KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
352 KADMSRV_DEPLIBS = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
353 KADMCLNT_DEPLIBS = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
355 # Header file dependencies we might override.
356 # See util/depfix.sed.
357 # Also see depend-verify-* in post.in, which wants to confirm that we're using
358 # the in-tree versions.
359 COM_ERR_VERSION = @COM_ERR_VERSION@
360 COM_ERR_DEPS = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
362 COM_ERR_DEPS-intlsys =
363 COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
364 SS_VERSION = @SS_VERSION@
365 SS_DEPS = $(SS_DEPS-@SS_VERSION@)
367 SS_DEPS-k5 = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
368 VERTO_VERSION = @VERTO_VERSION@
369 VERTO_DEPS = $(VERTO_DEPS-@VERTO_VERSION@)
371 VERTO_DEPS-k5 = $(BUILDTOP)/include/verto.h
372 VERTO_K5EV_DEPS = $(VERTO_K5EV_DEPS-@VERTO_VERSION@)
373 VERTO_K5EV_DEPS-sys =
374 VERTO_K5EV_DEPS-k5 = $(BUILDTOP)/include/verto-k5ev.h
376 # LIBS gets substituted in... e.g. -lnsl -lsocket
378 # GEN_LIB is -lgen if needed for regexp
381 # Editline or readline flags and libraries.
382 RL_CFLAGS = @RL_CFLAGS@
385 SS_LIB = $(SS_LIB-@SS_VERSION@)
386 SS_LIB-sys = @SS_LIB@
387 SS_LIB-k5 = $(TOPLIBD)/libss.a $(RL_LIBS)
388 KDB5_LIB = -lkdb5 $(KDB5_PLUGIN_LIBS)
390 VERTO_DEPLIB = $(VERTO_DEPLIB-@VERTO_VERSION@)
391 VERTO_DEPLIB-sys = # empty
392 VERTO_DEPLIB-k5 = $(TOPLIBD)/libverto-k5ev$(DEPLIBEXT) $(TOPLIBD)/libverto$(DEPLIBEXT)
393 VERTO_CFLAGS = @VERTO_CFLAGS@
394 VERTO_LIBS = @VERTO_LIBS@
398 LDAP_LIBS = @LDAP_LIBS@
401 K5CRYPTO_LIB = -lk5crypto
402 COM_ERR_LIB = -lcom_err
403 GSS_KRB5_LIB = -lgssapi_krb5
404 SUPPORT_LIB = -l$(SUPPORT_LIBNAME)
406 # HESIOD_LIBS is -lhesiod...
407 HESIOD_LIBS = @HESIOD_LIBS@
409 KRB5_BASE_LIBS = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(GEN_LIB) $(LIBS) $(DL_LIB)
410 KDB5_LIBS = $(KDB5_LIB) $(GSSRPC_LIBS)
411 GSS_LIBS = $(GSS_KRB5_LIB)
412 # needs fixing if ever used on Mac OS X!
413 GSSRPC_LIBS = -lgssrpc $(GSS_LIBS)
414 KADM_COMM_LIBS = $(GSSRPC_LIBS)
415 # need fixing if ever used on Mac OS X!
416 KADMSRV_LIBS = -lkadm5srv_mit $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS)
417 KADMCLNT_LIBS = -lkadm5clnt_mit $(KADM_COMM_LIBS)
419 # libutil for NetBSD, et al. for openpty(), etc.
420 UTIL_LIB = @UTIL_LIB@
422 # Misc stuff for linking server programs (and maybe some others,
423 # eventually) but which we don't want to install.
424 APPUTILS_LIB = -lapputils
426 # So test programs can find their libraries without "make install", etc.
427 KRB5_RUN_ENV=@KRB5_RUN_ENV@
428 KRB5_RUN_VARS=@KRB5_RUN_VARS@
431 # variables for --with-tcl=
432 TCL_LIBS = @TCL_LIBS@
433 TCL_LIBPATH = @TCL_LIBPATH@
434 TCL_RPATH = @TCL_RPATH@
435 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
436 TCL_INCLUDES = @TCL_INCLUDES@
438 # Crypto and PRNG back-end selections
439 CRYPTO_IMPL = @CRYPTO_IMPL@
440 PRNG_ALG = @PRNG_ALG@
442 # Crypto back-end selection and flags for PKINIT
443 PKINIT_CRYPTO_IMPL = @PKINIT_CRYPTO_IMPL@
444 PKINIT_CRYPTO_IMPL_CFLAGS = @PKINIT_CRYPTO_IMPL_CFLAGS@
445 PKINIT_CRYPTO_IMPL_LIBS = @PKINIT_CRYPTO_IMPL_LIBS@
449 ### /* these are invoked as $(...) foo.et, which works, but could be better */
450 COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
451 COMPILE_ET-sys= compile_et
452 COMPILE_ET-intlsys= compile_et --textdomain mit-krb5
453 COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(top_srcdir)/util/et \
454 --textdomain mit-krb5
456 .SUFFIXES: .h .c .et .ct
458 # These versions cause both .c and .h files to be generated at once.
459 # But GNU make doesn't understand this, and parallel builds can trigger
460 # both of them at once, causing them to stomp on each other. The versions
461 # below only update one of the files, so compile_et has to get run twice,
462 # but it won't break parallel builds.
463 #.et.h: ; $(COMPILE_ET) $<
464 #.et.c: ; $(COMPILE_ET) $<
467 $(RM) et-h-$*.et et-h-$*.c et-h-$*.h
469 $(COMPILE_ET) et-h-$*.et
471 $(RM) et-h-$*.et et-h-$*.c
473 $(RM) et-c-$*.et et-c-$*.c et-c-$*.h
475 $(COMPILE_ET) et-c-$*.et
477 $(RM) et-c-$*.et et-c-$*.h
479 # rule to make object files
481 .SUFFIXES: .cpp .c .o
483 $(CC) $(ALL_CFLAGS) -c $<
484 # Use .cpp because that's what autoconf uses in its test.
485 # If the compiler doesn't accept a .cpp suffix here, it wouldn't
486 # have accepted it when autoconf tested it.
488 $(CXX) $(ALL_CXXFLAGS) -c $<
490 # ss command table rules
492 MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
493 MAKE_COMMANDS-sys= mk_cmds
494 MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
499 ## Parameters to be set by configure for use in lib.in:
502 # These settings are for building shared libraries only. Including
503 # libpriv.in will override with values appropriate for static
504 # libraries that we don't install. Some values will depend on whether
505 # the platform supports major and minor version number extensions on
506 # shared libraries, hence the FOO_@@ settings.
511 # Set to "lib$(LIBBASE)$(STEXT) lib$(LIBBASE)$(SHEXT) lib$(LIBBASE)$(PFEXT)" or
512 # some subset thereof by configure; determines which types of libs get
516 # Set by configure; list of library symlinks to make to $(TOPLIBD)
519 # Set by configure; name of plugin module to build (libfoo.a or foo.so)
522 # Set by configure; symlink for plugin module for static plugin linking
523 PLUGINLINK=@PLUGINLINK@
525 # Set by configure; list of install targets for libraries
526 LIBINSTLIST=@LIBINSTLIST@
528 # Set by configure; install target
529 PLUGININST=@PLUGININST@
531 # Some of these should really move to pre.in, since programs will need
532 # it too. (e.g. stuff that has dependencies on the libraries)
537 # usually .so.$(LIBMAJOR).$(LIBMINOR)
538 SHLIBVEXT=@SHLIBVEXT@
540 # usually .so.$(LIBMAJOR) (to allow for major-version compat)
541 SHLIBSEXT=@SHLIBSEXT@
550 DYNOBJEXT=@DYNOBJEXT@
551 MAKE_DYNOBJ_COMMAND=@MAKE_DYNOBJ_COMMAND@
552 DYNOBJ_EXPDEPS=@DYNOBJ_EXPDEPS@
553 DYNOBJ_EXPFLAGS=@DYNOBJ_EXPFLAGS@
555 # File with symbol names to be exported, both functions and data,
556 # currently not distinguished.
557 SHLIB_EXPORT_FILE=$(srcdir)/$(LIBPREFIX)$(LIBBASE).exports
559 # File that needs to be current for building the shared library,
560 # usually SHLIB_EXPORT_FILE, but not always, if we have to convert
561 # it to another, intermediate form for the linker.
562 SHLIB_EXPORT_FILE_DEP=@SHLIB_EXPORT_FILE_DEP@
564 # Command to run to build a shared library.
565 # In systems that require multiple commands, like AIX, it may need
566 # to change to rearrange where the various parameters fit in.
567 MAKE_SHLIB_COMMAND=@MAKE_SHLIB_COMMAND@
569 # run path flags for explicit libraries depending on this one,
570 # e.g. "-R$(SHLIB_RPATH)"
571 SHLIB_RPATH_FLAGS=@SHLIB_RPATH_FLAGS@
573 # flags for explicit libraries depending on this one,
574 # e.g. "$(SHLIB_RPATH_FLAGS) $(SHLIB_SHLIB_DIRFLAGS) $(SHLIB_EXPLIBS)"
575 SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
577 ## Parameters to be set by configure for use in libobj.in:
579 # Set to "OBJS.ST OBJS.SH OBJS.PF" or some subset thereof by
580 # configure; determines which types of object files get built.
583 # Note that $(LIBSRCS) *cannot* contain any variable references, or
584 # the suffix substitution will break on some platforms!
585 SHLIBOBJS=$(STLIBOBJS:.o=@SHOBJEXT@)
586 PFLIBOBJS=$(STLIBOBJS:.o=@PFOBJEXT@)
588 # "$(CC) -G", "$(LD) -Bshareable", etc.
589 LDCOMBINE=@LDCOMBINE@
592 # rules to make various types of object files
595 PROFFLAGS=@PROFFLAGS@
597 # platform-dependent temporary files that should get cleaned up
598 EXTRA_FILES=@EXTRA_FILES@
601 # Need absolute paths here because under kshd or ftpd we may run programs
602 # while in other directories.
603 VALGRIND_LOGDIR = `cd $(BUILDTOP)&&pwd`
604 VALGRIND1 = valgrind --tool=memcheck --log-file=$(VALGRIND_LOGDIR)/vg.%p --trace-children=yes --leak-check=yes --suppressions=`cd $(top_srcdir)&&pwd`/util/valgrind-suppressions
606 # Set OFFLINE=yes to disable tests that assume network connectivity.
607 # (Specifically, this concerns the ability to fetch DNS data for
608 # mit.edu, to verify that SRV queries are working.) Note that other
609 # tests still assume that the local hostname can be resolved into
610 # something that looks like an FQDN, with an IPv4 address.
613 # Used when running Python tests.
618 ############################################################