1 ############################################################
3 ## common prefix for all Makefile.in in the Kerberos V5 tree.
13 distclean:: distclean-$(WHAT)
15 install:: install-$(WHAT)
19 install-headers:: install-headers-$(WHAT)
21 ##############################
22 # Recursion rule support
25 # The commands for the recursion targets live in config/post.in.
27 # General form of recursion rules:
29 # Each recursive target foo-unix has related targets: foo-prerecurse,
30 # foo-recurse, and foo-postrecurse
32 # The foo-recurse rule is in post.in. It is what actually recursively
35 # foo-recurse depends on foo-prerecurse, so any targets that must be
36 # built before descending into subdirectories must be dependencies of
39 # foo-postrecurse depends on foo-recurse, but targets that must be
40 # built after descending into subdirectories should be have
41 # foo-recurse as dependencies in addition to being listed under
42 # foo-postrecurse, to avoid ordering issues.
44 # The foo-prerecurse, foo-recurse, and foo-postrecurse rules are all
45 # single-colon rules, to avoid nasty ordering problems with
57 # will result in "bar", "foo", "baz" on AIX, and possibly others.
58 all-unix:: all-postrecurse
59 all-postrecurse: all-recurse
60 all-recurse: all-prerecurse
65 clean-unix:: clean-postrecurse
66 clean-postrecurse: clean-recurse
67 clean-recurse: clean-prerecurse
72 distclean-unix: distclean-postrecurse
73 distclean-postrecurse: distclean-recurse
74 distclean-recurse: distclean-prerecurse
77 distclean-postrecurse:
79 install-unix:: install-postrecurse
80 install-postrecurse: install-recurse
81 install-recurse: install-prerecurse
86 install-headers-unix:: install-headers-postrecurse
87 install-headers-postrecurse: install-headers-recurse
88 install-headers-recurse: install-headers-prerecurse
90 install-headers-prerecurse:
91 install-headers-postrecurse:
93 check-unix:: check-postrecurse
94 check-postrecurse: check-recurse
95 check-recurse: check-prerecurse
100 Makefiles: Makefiles-postrecurse
101 Makefiles-postrecurse: Makefiles-recurse
102 Makefiles-recurse: Makefiles-prerecurse
104 Makefiles-prerecurse:
105 Makefiles-postrecurse:
108 # end recursion rule support
109 ##############################
113 # begin relative path
115 # this is magic... should only be used for preceding a program invocation
117 # "/" for UNIX, "\" for Windows; *sigh*
120 SUBDIRS = @subdirs@ $(LOCAL_SUBDIRS)
122 SRCTOP = @srcdir@/$(BUILDTOP)
124 CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
126 FAKEDEST=$(BUILDTOP)/util/fakedest
127 FAKEPREFIX=$(FAKEDEST)/$(prefix)
128 FAKELIBDIR=$(FAKEPREFIX)/lib
130 # DEFS set by configure
131 # DEFINES set by local Makefile.in
132 # LOCALINCLUDES set by local Makefile.in
133 # CPPFLAGS user override
134 # CFLAGS user override but starts off set by configure
135 ALL_CFLAGS = $(DEFS) $(DEFINES) $(KRB_INCLUDES) $(LOCALINCLUDES) \
136 $(CPPFLAGS) $(CFLAGS)
139 CPPFLAGS = @CPPFLAGS@
144 KRB_INCLUDES = -I$(BUILDTOP)/include -I$(SRCTOP)/include \
145 -I$(BUILDTOP)/include/krb5 -I$(SRCTOP)/include/krb5
147 LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
148 LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
152 SRVDEPLIBS = @SRVDEPLIBS@
153 CLNTLIBS = @CLNTLIBS@
154 CLNTDEPLIBS = @CLNTDEPLIBS@
158 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
159 INSTALL_DATA=@INSTALL_DATA@
160 INSTALL_SHLIB=@INSTALL_SHLIB@
161 INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
162 ## This is needed because autoconf will sometimes define @exec_prefix@ to be
165 INSTALL_PREFIX=$(prefix)
166 INSTALL_EXEC_PREFIX=@exec_prefix@
167 exec_prefix=@exec_prefix@
168 SHLIB_TAIL_COMP=@SHLIB_TAIL_COMP@
170 KRB5MANROOT = @mandir@
171 ADMIN_BINDIR = @sbindir@
172 SERVER_BINDIR = @sbindir@
173 CLIENT_BINDIR =@bindir@
174 ADMIN_MANDIR = $(KRB5MANROOT)/man8
175 SERVER_MANDIR = $(KRB5MANROOT)/man8
176 CLIENT_MANDIR = $(KRB5MANROOT)/man1
177 FILE_MANDIR = $(KRB5MANROOT)/man5
178 KRB5_LIBDIR = @libdir@
179 KRB5_SHLIBDIR = @libdir@$(SHLIB_TAIL_COMP)
180 KRB5_INCDIR = @includedir@
182 $(KRB5_INCDIR)/gssapi \
183 $(KRB5_INCDIR)/kerberosIV
186 # Macros used by the KADM5 (OV-based) unit test system.
187 # XXX check which of these are actually used!
189 TESTDIR = $(BUILDTOP)/kadmin/testing
190 STESTDIR = $(SRCTOP)/kadmin/testing
191 COMPARE_DUMP = $(TESTDIR)/scripts/compare_dump.pl
192 FIX_CONF_FILES = $(TESTDIR)/scripts/fixup-conf-files.pl
193 INITDB = $(STESTDIR)/scripts/init_db
194 MAKE_KEYTAB = $(TESTDIR)/scripts/make-host-keytab.pl
195 LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl
196 RESTORE_FILES = $(STESTDIR)/scripts/restore_files.sh
197 SAVE_FILES = $(STESTDIR)/scripts/save_files.sh
198 ENV_SETUP = $(TESTDIR)/scripts/env-setup.sh
199 CLNTTCL = $(TESTDIR)/util/ovsec_kadm_clnt_tcl
200 SRVTCL = $(TESTDIR)/util/ovsec_kadm_srv_tcl
202 # We have to set the host with --host so that setup_xfail will work.
203 # If we don't set it, then the host type used is "native", which
204 # doesn't match "*-*-*".
206 DEJAFLAGS = $(DEJALFLAGS) $(CLFLAGS) --debug --srcdir $(srcdir) --host \
208 RUNTEST = runtest $(DEJAFLAGS)
210 START_SERVERS = $(STESTDIR)/scripts/start_servers $(TEST_SERVER) $(TEST_PATH)
211 START_SERVERS_LOCAL = $(STESTDIR)/scripts/start_servers_local
213 STOP_SERVERS = $(STESTDIR)/scripts/stop_servers $(TEST_SERVER) $(TEST_PATH)
214 STOP_SERVERS_LOCAL = $(STESTDIR)/scripts/stop_servers_local
216 # End of macros for the KADM5 unit test system.
219 transform = @program_transform_name@
233 AUTOCONF = @AUTOCONF@
234 AUTOCONFFLAGS = @AUTOCONFFLAGS@
235 AUTOCONFINCFLAGS = @AUTOCONFINCFLAGS@
236 AUTOHEADER = @AUTOHEADER@
237 AUTOHEADERFLAGS = @AUTOHEADERFLAGS@
239 HOST_TYPE = @HOST_TYPE@
243 DO_MAKE_SHLIB = @DO_MAKE_SHLIB@
244 SHLIB_STATIC_TARGET=@SHLIB_STATIC_TARGET@
246 TOPLIBD = $(BUILDTOP)/lib
253 # variables for libraries, for use in linking programs
254 # -- this may want to get broken out into a separate frag later
257 # Note: the following variables must be set in any Makefile.in that
258 # uses KRB5_BUILD_PROGRAM
260 # PROG_LIBPATH list of dirs, in -Ldir form, to search for libraries at link
261 # PROG_RPATH list of dirs, in dir1:dir2 form, for rpath purposes
263 # invocation is like:
264 # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
265 # $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
270 # prefix (with no spaces after) for rpath flag to cc
271 RPATH_FLAG=@RPATH_FLAG@
273 # this gets set by configure to either $(STLIBEXT) or $(SHLIBEXT),
274 # depending on whether we're building with shared libraries.
275 DEPLIBEXT=@DEPLIBEXT@
277 KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
278 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
279 KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
280 DB_DEPLIB = $(DB_DEPLIB-@DB_VERSION@)
281 DB_DEPLIB-k5 = $(TOPLIBD)/libdb$(DEPLIBEXT)
283 GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
284 GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
285 KRB4_DEPLIB = @KRB4_DEPLIB@ # $(TOPLIBD)/libkrb4$(DEPLIBEXT)
286 DES425_DEPLIB = @DES425_DEPLIB@ # $(TOPLIBD)/libdes425$(DEPLIBEXT)
287 KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
288 CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
289 COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
290 COM_ERR_DEPLIB-sys = # empty
291 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
293 # These are forced to use ".a" as an extension because they're never
295 SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
296 SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
298 PTY_DEPLIB = $(TOPLIBD)/libpty.a
300 KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB)
301 KRB4COMPAT_DEPLIBS = $(KRB4_DEPLIB) $(DES425_DEPLIB) $(KRB5_BASE_DEPLIBS)
302 KDB5_DEPLIBS = $(KDB5_DEPLIB)
303 GSS_DEPLIBS = $(GSS_DEPLIB)
304 GSSRPC_DEPLIBS = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS)
305 KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
306 KADMSRV_DEPLIBS = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
307 KADMCLNT_DEPLIBS = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
309 # Header file dependencies we might override.
310 # See util/depfix.sed.
311 # Also see depend-verify-* in post.in, which wants to confirm that we're using
312 # the in-tree versions.
313 COM_ERR_VERSION = @COM_ERR_VERSION@
314 COM_ERR_DEPS = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
316 COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
317 SS_VERSION = @SS_VERSION@
318 SS_DEPS = $(SS_DEPS-@SS_VERSION@)
320 SS_DEPS-k5 = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
321 DB_VERSION = @DB_VERSION@
322 DB_DEPS = $(DB_DEPS-@DB_HEADER_VERSION@)
324 DB_DEPS-k5 = $(BUILDTOP)/include/db.h $(BUILDTOP)/include/db-config.h
325 DB_DEPS-redirect = $(BUILDTOP)/include/db.h
327 # Header file dependencies that might depend on whether krb4 support
330 KRB_ERR_H_DEP = @KRB_ERR_H_DEP@
332 # LIBS gets substituted in... e.g. -lnsl -lsocket
334 # GEN_LIB is -lgen if needed for regexp
337 SS_LIB = $(SS_LIB-@SS_VERSION@)
338 SS_LIB-sys = @SS_LIB@
339 SS_LIB-k5 = $(TOPLIBD)/libss.a
342 KDB5_DB_LIB = @KDB5_DB_LIB@
345 K5CRYPTO_LIB = -lk5crypto
346 COM_ERR_LIB = -lcom_err
347 GSS_KRB5_LIB = -lgssapi_krb5
349 # KRB4_LIB is -lkrb4 if building --with-krb4
350 # needs fixing if ever used on Mac OS X!
351 KRB4_LIB = @KRB4_LIB@
353 # DES425_LIB is -ldes425 if building --with-krb4
354 # needs fixing if ever used on Mac OS X!
355 DES425_LIB = @DES425_LIB@
357 # HESIOD_LIBS is -lhesiod...
358 HESIOD_LIBS = @HESIOD_LIBS@
360 KRB5_BASE_LIBS = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(GEN_LIB) $(LIBS)
361 KRB4COMPAT_LIBS = $(KRB4_LIB) $(DES425_LIB) $(KRB5_BASE_LIBS)
362 KDB5_LIBS = $(KDB5_LIB) $(KDB5_DB_LIB)
363 GSS_LIBS = $(GSS_KRB5_LIB)
364 # needs fixing if ever used on Mac OS X!
365 GSSRPC_LIBS = -lgssrpc $(GSS_LIBS)
366 KADM_COMM_LIBS = $(GSSRPC_LIBS)
367 # need fixing if ever used on Mac OS X!
368 KADMSRV_LIBS = -lkadm5srv $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS)
369 KADMCLNT_LIBS = -lkadm5clnt $(KADM_COMM_LIBS)
371 # need fixing if ever used on Mac OS X!
375 # some more stuff for --with-krb4
376 KRB4_LIBPATH = @KRB4_LIBPATH@
377 KRB4_INCLUDES = @KRB4_INCLUDES@
380 # variables for --with-tcl=
381 TCL_LIBS = @TCL_LIBS@
382 TCL_LIBPATH = @TCL_LIBPATH@
383 TCL_RPATH = @TCL_RPATH@
384 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
385 TCL_INCLUDES = @TCL_INCLUDES@
389 ### /* these are invoked as $(...) foo.et, which works, but could be better */
390 COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
391 COMPILE_ET-sys= compile_et
392 COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
394 .SUFFIXES: .h .c .et .ct
396 # These versions cause both .c and .h files to be generated at once.
397 # But GNU make doesn't understand this, and parallel builds can trigger
398 # both of them at once, causing them to stomp on each other. The versions
399 # below only update one of the files, so compile_et has to get run twice,
400 # but it won't break parallel builds.
401 #.et.h: ; $(COMPILE_ET) $<
402 #.et.c: ; $(COMPILE_ET) $<
405 d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.h $*.h) ; \
406 e=$$? ; rm -f $$d.* ; exit $$e
409 d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.c $*.c) ; \
410 e=$$? ; rm -f $$d.* ; exit $$e
412 # rule to make object files
416 $(CC) $(ALL_CFLAGS) -c $<
418 # ss command table rules
420 MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
421 MAKE_COMMANDS-sys= mk_cmds
422 MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds
427 ## Parameters to be set by configure for use in lib.in:
433 # Set to "lib$(LIB)$(STEXT) lib$(LIB)$(SHEXT) lib$(LIB)$(PFEXT)" or
434 # some subset thereof by configure; determines which types of libs get
438 # Set by configure; list of library symlinks to make to $(TOPLIBD)
441 # Set by configure; list of install targets
442 LIBINSTLIST=@LIBINSTLIST@
444 # Some of these should really move to pre.in, since programs will need
445 # it too. (e.g. stuff that has dependencies on the libraries)
450 # usually .so.$(LIBMAJOR).$(LIBMINOR)
451 SHLIBVEXT=@SHLIBVEXT@
453 # usually .so.$(LIBMAJOR) (to allow for major-version compat)
454 SHLIBSEXT=@SHLIBSEXT@
462 # "cc -G", "ld -Bshareable", etc.
463 LDCOMBINE=@LDCOMBINE@
465 # Misc args to tack on the tail of LDCOMBINE
466 LDCOMBINE_TAIL=@LDCOMBINE_TAIL@
468 # flags for explicit libraries depending on this one,
469 # e.g. "-R$(SHLIB_RPATH) $(SHLIB_SHLIB_DIRFLAGS) $(SHLIB_EXPLIBS)"
470 SHLIB_EXPFLAGS=@SHLIB_EXPFLAGS@
472 ## Parameters to be set by configure for use in libobj.in:
474 # Set to "OBJS.ST OBJS.SH OBJS.PF" or some subset thereof by
475 # configure; determines which types of object files get built.
478 # Note that $(LIBSRCS) *cannot* contain any variable references, or
479 # the suffix substitution will break on some platforms!
480 SHLIBOBJS=$(STLIBOBJS:.o=@SHOBJEXT@)
481 PFLIBOBJS=$(STLIBOBJS:.o=@PFOBJEXT@)
483 # "$(CC) -G", "$(LD) -Bshareable", etc.
484 LDCOMBINE=@LDCOMBINE@
486 # "-h $@", "-h lib$(LIBNAME).$(LIBMAJOR)", etc.
490 # rules to make various types of object files
493 PROFFLAGS=@PROFFLAGS@
499 ############################################################