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 SRCTOP = @srcdir@/$(BUILDTOP)
142 top_srcdir = @top_srcdir@
144 CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
146 FAKEDEST=$(BUILDTOP)/util/fakedest
147 FAKEPREFIX=$(FAKEDEST)/$(prefix)
148 FAKELIBDIR=$(FAKEPREFIX)/lib
150 # DEFS set by configure
151 # DEFINES set by local Makefile.in
152 # LOCALINCLUDES set by local Makefile.in
153 # CPPFLAGS user override
154 # CFLAGS user override but starts off set by configure
155 # WARN_CFLAGS user override but starts off set by configure
156 # PTHREAD_CFLAGS set by configure, not included in CFLAGS so that we
157 # don't pull the pthreads library into shared libraries
158 ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
159 -DKRB5_DEPRECATED=1 \
160 $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(PTHREAD_CFLAGS)
161 ALL_CXXFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
162 -DKRB5_DEPRECATED=1 \
163 $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(PTHREAD_CFLAGS)
166 CXXFLAGS = @CXXFLAGS@
167 WARN_CFLAGS = @WARN_CFLAGS@
168 WARN_CXXFLAGS = @WARN_CXXFLAGS@
169 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
170 PTHREAD_LIBS = @PTHREAD_LIBS@
171 THREAD_LINKOPTS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
172 CPPFLAGS = @CPPFLAGS@
178 KRB_INCLUDES = -I$(BUILDTOP)/include -I$(SRCTOP)/include
180 LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
181 LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
187 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
188 INSTALL_SCRIPT=@INSTALL_PROGRAM@
189 INSTALL_DATA=@INSTALL_DATA@
190 INSTALL_SHLIB=@INSTALL_SHLIB@
191 INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
192 ## This is needed because autoconf will sometimes define @exec_prefix@ to be
195 INSTALL_PREFIX=$(prefix)
196 INSTALL_EXEC_PREFIX=@exec_prefix@
197 exec_prefix=@exec_prefix@
198 datarootdir=@datarootdir@
199 SHLIB_TAIL_COMP=@SHLIB_TAIL_COMP@
202 EXAMPLEDIR = $(datadir)/examples/krb5
204 KRB5MANROOT = @mandir@
205 ADMIN_BINDIR = @sbindir@
206 SERVER_BINDIR = @sbindir@
207 CLIENT_BINDIR =@bindir@
208 ADMIN_MANDIR = $(KRB5MANROOT)/man8
209 SERVER_MANDIR = $(KRB5MANROOT)/man8
210 CLIENT_MANDIR = $(KRB5MANROOT)/man1
211 FILE_MANDIR = $(KRB5MANROOT)/man5
212 KRB5_LIBDIR = @libdir@
213 KRB5_SHLIBDIR = @libdir@$(SHLIB_TAIL_COMP)
214 KRB5_INCDIR = @includedir@
215 MODULE_DIR = @libdir@/krb5/plugins
216 KRB5_DB_MODULE_DIR = $(MODULE_DIR)/kdb
217 KRB5_PA_MODULE_DIR = $(MODULE_DIR)/preauth
218 KRB5_AD_MODULE_DIR = $(MODULE_DIR)/authdata
219 KRB5_LIBKRB5_MODULE_DIR = $(MODULE_DIR)/libkrb5
220 GSS_MODULE_DIR = @libdir@/gss
222 $(KRB5_INCDIR)/kadm5 \
223 $(KRB5_INCDIR)/krb5 \
224 $(KRB5_INCDIR)/gssapi \
225 $(KRB5_INCDIR)/gssrpc
228 # Macros used by the KADM5 (OV-based) unit test system.
229 # XXX check which of these are actually used!
231 TESTDIR = $(BUILDTOP)/kadmin/testing
232 STESTDIR = $(SRCTOP)/kadmin/testing
233 COMPARE_DUMP = $(TESTDIR)/scripts/compare_dump.pl
234 INITDB = $(STESTDIR)/scripts/init_db
235 MAKE_KEYTAB = $(TESTDIR)/scripts/make-host-keytab.pl
236 LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl
237 ENV_SETUP = $(TESTDIR)/scripts/env-setup.sh
238 CLNTTCL = $(TESTDIR)/util/ovsec_kadm_clnt_tcl
239 SRVTCL = $(TESTDIR)/util/ovsec_kadm_srv_tcl
241 # We have to set the host with --host so that setup_xfail will work.
242 # If we don't set it, then the host type used is "native", which
243 # doesn't match "*-*-*".
245 DEJAFLAGS = $(DEJALFLAGS) $(CLFLAGS) --debug --srcdir $(srcdir) --host \
247 RUNTEST = runtest $(DEJAFLAGS)
249 START_SERVERS = $(STESTDIR)/scripts/start_servers $(TEST_SERVER) $(TEST_PATH)
250 START_SERVERS_LOCAL = $(STESTDIR)/scripts/start_servers_local
252 STOP_SERVERS = $(STESTDIR)/scripts/stop_servers $(TEST_SERVER) $(TEST_PATH)
253 STOP_SERVERS_LOCAL = $(STESTDIR)/scripts/stop_servers_local
255 # End of macros for the KADM5 unit test system.
258 transform = @program_transform_name@
275 AUTOHEADER = autoheader
277 MOVEIFCHANGED = $(SRCTOP)/config/move-if-changed
283 TOPLIBD = $(BUILDTOP)/lib
290 # variables for libraries, for use in linking programs
291 # -- this may want to get broken out into a separate frag later
294 # Note: the following variables must be set in any Makefile.in that
295 # uses KRB5_BUILD_PROGRAM
297 # PROG_LIBPATH list of dirs, in -Ldir form, to search for libraries at link
298 # PROG_RPATH list of dirs, in dir1:dir2 form, for rpath purposes
300 # invocation is like:
301 # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
302 # $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
308 # prefix (with no spaces after) for rpath flag to cc
309 RPATH_FLAG=@RPATH_FLAG@
311 # link flags to add PROG_RPATH to the rpath
312 PROG_RPATH_FLAGS=@PROG_RPATH_FLAGS@
314 # this gets set by configure to either $(STLIBEXT) or $(SHLIBEXT),
315 # depending on whether we're building with shared libraries.
316 DEPLIBEXT=@DEPLIBEXT@
318 KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
319 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
320 KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
321 GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
322 GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
323 KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
324 CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
325 COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
326 COM_ERR_DEPLIB-sys = # empty
327 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
328 SUPPORT_LIBNAME=krb5support
329 SUPPORT_DEPLIB = $(TOPLIBD)/lib$(SUPPORT_LIBNAME)$(DEPLIBEXT)
331 # These are forced to use ".a" as an extension because they're never
333 SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
334 SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
336 PTY_DEPLIB = $(TOPLIBD)/libpty.a
337 APPUTILS_DEPLIB = $(TOPLIBD)/libapputils.a
339 KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB)
340 KDB5_DEPLIBS = $(KDB5_DEPLIB)
341 GSS_DEPLIBS = $(GSS_DEPLIB)
342 GSSRPC_DEPLIBS = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS)
343 KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
344 KADMSRV_DEPLIBS = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
345 KADMCLNT_DEPLIBS = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
347 # Header file dependencies we might override.
348 # See util/depfix.sed.
349 # Also see depend-verify-* in post.in, which wants to confirm that we're using
350 # the in-tree versions.
351 COM_ERR_VERSION = @COM_ERR_VERSION@
352 COM_ERR_DEPS = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
354 COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
355 SS_VERSION = @SS_VERSION@
356 SS_DEPS = $(SS_DEPS-@SS_VERSION@)
358 SS_DEPS-k5 = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
360 # LIBS gets substituted in... e.g. -lnsl -lsocket
362 # GEN_LIB is -lgen if needed for regexp
365 SS_LIB = $(SS_LIB-@SS_VERSION@)
366 SS_LIB-sys = @SS_LIB@
367 SS_LIB-k5 = $(TOPLIBD)/libss.a
373 K5CRYPTO_LIB = -lk5crypto
374 COM_ERR_LIB = -lcom_err
375 GSS_KRB5_LIB = -lgssapi_krb5
376 SUPPORT_LIB = -l$(SUPPORT_LIBNAME)
378 # HESIOD_LIBS is -lhesiod...
379 HESIOD_LIBS = @HESIOD_LIBS@
381 KRB5_BASE_LIBS = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(GEN_LIB) $(LIBS) $(DL_LIB)
382 KDB5_LIBS = $(KDB5_LIB) $(GSSRPC_LIBS)
383 GSS_LIBS = $(GSS_KRB5_LIB)
384 # needs fixing if ever used on Mac OS X!
385 GSSRPC_LIBS = -lgssrpc $(GSS_LIBS)
386 KADM_COMM_LIBS = $(GSSRPC_LIBS)
387 # need fixing if ever used on Mac OS X!
388 KADMSRV_LIBS = -lkadm5srv $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS)
389 KADMCLNT_LIBS = -lkadm5clnt $(KADM_COMM_LIBS)
391 # need fixing if ever used on Mac OS X!
394 # libutil for NetBSD, et al. for openpty(), etc.
395 UTIL_LIB = @UTIL_LIB@
397 # Misc stuff for linking server programs (and maybe some others,
398 # eventually) but which we don't want to install.
399 APPUTILS_LIB = -lapputils
402 # variables for --with-tcl=
403 TCL_LIBS = @TCL_LIBS@
404 TCL_LIBPATH = @TCL_LIBPATH@
405 TCL_RPATH = @TCL_RPATH@
406 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
407 TCL_INCLUDES = @TCL_INCLUDES@
411 ### /* these are invoked as $(...) foo.et, which works, but could be better */
412 COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
413 COMPILE_ET-sys= compile_et
414 COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
416 .SUFFIXES: .h .c .et .ct
418 # These versions cause both .c and .h files to be generated at once.
419 # But GNU make doesn't understand this, and parallel builds can trigger
420 # both of them at once, causing them to stomp on each other. The versions
421 # below only update one of the files, so compile_et has to get run twice,
422 # but it won't break parallel builds.
423 #.et.h: ; $(COMPILE_ET) $<
424 #.et.c: ; $(COMPILE_ET) $<
427 $(RM) et-h-$*.et et-h-$*.c et-h-$*.h
429 $(COMPILE_ET) et-h-$*.et
431 $(RM) et-h-$*.et et-h-$*.c
433 $(RM) et-c-$*.et et-c-$*.c et-c-$*.h
435 $(COMPILE_ET) et-c-$*.et
437 $(RM) et-c-$*.et et-c-$*.h
439 # rule to make object files
441 .SUFFIXES: .cpp .c .o
443 $(CC) $(ALL_CFLAGS) -c $<
444 # Use .cpp because that's what autoconf uses in its test.
445 # If the compiler doesn't accept a .cpp suffix here, it wouldn't
446 # have accepted it when autoconf tested it.
448 $(CXX) $(ALL_CXXFLAGS) -c $<
450 # ss command table rules
452 MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
453 MAKE_COMMANDS-sys= mk_cmds
454 MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
459 ## Parameters to be set by configure for use in lib.in:
462 # These settings are for building shared libraries only. Including
463 # libpriv.in will override with values appropriate for static
464 # libraries that we don't install. Some values will depend on whether
465 # the platform supports major and minor version number extensions on
466 # shared libraries, hence the FOO_@@ settings.
471 # Set to "lib$(LIBBASE)$(STEXT) lib$(LIBBASE)$(SHEXT) lib$(LIBBASE)$(PFEXT)" or
472 # some subset thereof by configure; determines which types of libs get
474 LIBLIST=$(LIBLIST_@SHLIB_HAVE_MINOR_VERS@)
475 LIBLIST_yes=lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT)
476 LIBLIST_no=lib$(LIBBASE)$(SHLIBEXT)
478 # Set by configure; list of library symlinks to make to $(TOPLIBD)
479 LIBLINKS=$(LIBLINKS_@SHLIB_HAVE_MINOR_VERS@)
480 LIBLINKS_yes=$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)
481 LIBLINKS_no=$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)
483 # Set by configure; list of install targets
484 LIBINSTLIST=$(LIBINSTLIST_@SHLIB_HAVE_MINOR_VERS@)
485 LIBINSTLIST_yes=install-shlib-soname
486 LIBINSTLIST_no=install-shared
488 # Some of these should really move to pre.in, since programs will need
489 # it too. (e.g. stuff that has dependencies on the libraries)
492 STLIBEXT_if_static=@STLIBEXT@
495 # usually .so.$(LIBMAJOR).$(LIBMINOR)
496 SHLIBVEXT=@SHLIBVEXT@
498 # usually .so.$(LIBMAJOR) (to allow for major-version compat)
499 SHLIBSEXT=@SHLIBSEXT@
508 DYNOBJEXT=@DYNOBJEXT@
509 MAKE_DYNOBJ_COMMAND=@MAKE_DYNOBJ_COMMAND@
510 DYNOBJ_EXPDEPS=@DYNOBJ_EXPDEPS@
511 DYNOBJ_EXPFLAGS=@DYNOBJ_EXPFLAGS@
513 # File with symbol names to be exported, both functions and data,
514 # currently not distinguished.
515 SHLIB_EXPORT_FILE=$(srcdir)/$(LIBPREFIX)$(LIBBASE).exports
517 # File that needs to be current for building the shared library,
518 # usually SHLIB_EXPORT_FILE, but not always, if we have to convert
519 # it to another, intermediate form for the linker.
520 SHLIB_EXPORT_FILE_DEP=@SHLIB_EXPORT_FILE_DEP@
522 # Command to run to build a shared library.
523 # In systems that require multiple commands, like AIX, it may need
524 # to change to rearrange where the various parameters fit in.
525 MAKE_SHLIB_COMMAND=@MAKE_SHLIB_COMMAND@
527 # run path flags for explicit libraries depending on this one,
528 # e.g. "-R$(SHLIB_RPATH)"
529 SHLIB_RPATH_FLAGS=@SHLIB_RPATH_FLAGS@
531 # flags for explicit libraries depending on this one,
532 # e.g. "$(SHLIB_RPATH_FLAGS) $(SHLIB_SHLIB_DIRFLAGS) $(SHLIB_EXPLIBS)"
533 SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
535 ## Parameters to be set by configure for use in libobj.in:
537 # Set to "OBJS.ST OBJS.SH OBJS.PF" or some subset thereof by
538 # configure; determines which types of object files get built.
541 # Note that $(LIBSRCS) *cannot* contain any variable references, or
542 # the suffix substitution will break on some platforms!
543 SHLIBOBJS=$(STLIBOBJS:.o=@SHOBJEXT@)
544 PFLIBOBJS=$(STLIBOBJS:.o=@PFOBJEXT@)
546 # "$(CC) -G", "$(LD) -Bshareable", etc.
547 LDCOMBINE=@LDCOMBINE@
550 # rules to make various types of object files
553 PROFFLAGS=@PROFFLAGS@
555 # platform-dependent temporary files that should get cleaned up
556 EXTRA_FILES=@EXTRA_FILES@
559 # Need absolute paths here because under kshd or ftpd we may run programs
560 # while in other directories.
561 VALGRIND_LOGDIR = `cd $(BUILDTOP)&&pwd`
562 VALGRIND1 = valgrind --tool=memcheck --log-file=$(VALGRIND_LOGDIR)/vg --trace-children=yes -v --leak-check=yes --suppressions=`cd $(SRCTOP)&&pwd`/util/valgrind-suppressions
566 ############################################################