2 ## common prefix for all Makefile.in in the Kerberos V5 tree.
11 install:: install-$(WHAT)
15 install-headers:: install-headers-$(WHAT)
17 all-recurse: all-prerecurse
18 all-postrecurse:: all-recurse
19 all-unix:: all-postrecurse
24 clean-unix:: clean-prerecurse
25 clean-unix:: clean-recurse
26 clean-unix:: clean-postrecurse
31 distclean-unix:: distclean-prerecurse
32 distclean-unix:: distclean-recurse
33 distclean-unix:: distclean-postrecurse
35 install-unix:: install-prerecurse
36 install-unix:: install-recurse
37 install-unix:: install-postrecurse
42 install-headers-unix:: install-headers-prerecurse
43 install-headers-unix:: install-headers-recurse
44 install-headers-unix:: install-headers-postrecurse
46 install-headers-prerecurse::
48 install-headers-postrecurse::
51 check-unix:: check-prerecurse
52 check-unix:: check-recurse
53 check-unix:: check-postrecurse
58 Makefiles:: Makefiles-prerecurse
59 Makefiles:: Makefiles-recurse
60 Makefiles:: Makefiles-postrecurse
62 Makefiles-prerecurse::
63 Makefiles-postrecurse::
69 # this is magic... should only be used for preceding a program invocation
71 # "/" for UNIX, "\" for Windows; *sigh*
74 SUBDIRS = @subdirs@ $(LOCAL_SUBDIRS)
76 SRCTOP = @srcdir@/$(BUILDTOP)
78 CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@
80 ALL_CFLAGS = $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(CPPFLAGS) $(CFLAGS)
88 LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
89 LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
93 SRVDEPLIBS = @SRVDEPLIBS@
95 CLNTDEPLIBS = @CLNTDEPLIBS@
99 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_STRIP)
100 INSTALL_DATA=@INSTALL_DATA@
101 INSTALL_SHLIB=@INSTALL_SHLIB@
102 INSTALL_SETUID=$(INSTALL) $(INSTALL_STRIP) -m 4755 -o root
103 ## This is needed because autoconf will sometimes define @exec_prefix@ to be
106 INSTALL_PREFIX=$(prefix)
107 INSTALL_EXEC_PREFIX=@exec_prefix@
108 exec_prefix=@exec_prefix@
109 SHLIB_TAIL_COMP=@SHLIB_TAIL_COMP@
111 KRB5MANROOT = @mandir@
112 ADMIN_BINDIR = @sbindir@
113 SERVER_BINDIR = @sbindir@
114 CLIENT_BINDIR =@bindir@
115 ADMIN_MANDIR = $(KRB5MANROOT)/man8
116 SERVER_MANDIR = $(KRB5MANROOT)/man8
117 CLIENT_MANDIR = $(KRB5MANROOT)/man1
118 FILE_MANDIR = $(KRB5MANROOT)/man5
119 KRB5_LIBDIR = @libdir@
120 KRB5_SHLIBDIR = @libdir@$(SHLIB_TAIL_COMP)
121 KRB5_INCDIR = @includedir@
123 $(KRB5_INCDIR)/gssapi \
124 $(KRB5_INCDIR)/kerberosIV
127 # Macros used by the KADM5 (OV-based) unit test system.
128 # XXX check which of these are actually used!
130 TESTDIR = $(BUILDTOP)/kadmin/testing
131 STESTDIR = $(SRCTOP)/kadmin/testing
132 COMPARE_DUMP = $(TESTDIR)/scripts/compare_dump.pl
133 FIX_CONF_FILES = $(TESTDIR)/scripts/fixup-conf-files.pl
134 INITDB = $(STESTDIR)/scripts/init_db
135 MAKE_KEYTAB = $(TESTDIR)/scripts/make-host-keytab.pl
136 LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl
137 RESTORE_FILES = $(STESTDIR)/scripts/restore_files.sh
138 SAVE_FILES = $(STESTDIR)/scripts/save_files.sh
139 ENV_SETUP = $(TESTDIR)/scripts/env-setup.sh
140 CLNTTCL = $(TESTDIR)/util/ovsec_kadm_clnt_tcl
141 SRVTCL = $(TESTDIR)/util/ovsec_kadm_srv_tcl
143 # We have to set the host with --host so that setup_xfail will work.
144 # If we don't set it, then the host type used is "native", which
145 # doesn't match "*-*-*".
147 DEJAFLAGS = $(DEJALFLAGS) $(CLFLAGS) --debug --srcdir $(srcdir) --host \
149 RUNTEST = runtest $(DEJAFLAGS)
151 START_SERVERS = $(STESTDIR)/scripts/start_servers $(TEST_SERVER) $(TEST_PATH)
152 START_SERVERS_LOCAL = $(STESTDIR)/scripts/start_servers_local
154 STOP_SERVERS = $(STESTDIR)/scripts/stop_servers $(TEST_SERVER) $(TEST_PATH)
155 STOP_SERVERS_LOCAL = $(STESTDIR)/scripts/stop_servers_local
157 # End of macros for the KADM5 unit test system.
160 transform = @program_transform_name@
174 AUTOCONF = @AUTOCONF@
175 AUTOCONFFLAGS = @AUTOCONFFLAGS@
176 AUTOCONFINCFLAGS = @AUTOCONFINCFLAGS@
177 AUTOHEADER = @AUTOHEADER@
178 AUTOHEADERFLAGS = @AUTOHEADERFLAGS@
180 HOST_TYPE = @HOST_TYPE@
184 DO_MAKE_SHLIB = @DO_MAKE_SHLIB@
185 SHLIB_STATIC_TARGET=@SHLIB_STATIC_TARGET@
187 TOPLIBD = $(BUILDTOP)/lib
194 # variables for libraries, for use in linking programs
195 # -- this may want to get broken out into a separate frag later
198 # Note: the following variables must be set in any Makefile.in that
199 # uses KRB5_BUILD_PROGRAM
201 # PROG_LIBPATH list of dirs, in -Ldir form, to search for libraries at link
202 # PROG_RPATH list of dirs, in dir1:dir2 form, for rpath purposes
204 # invocation is like:
205 # prog: foo.o bar.o $(KRB5_BASE_DEPLIBS)
206 # $(CC_LINK) -o $@ foo.o bar.o $(KRB5_BASE_LIBS)
211 # prefix (with no spaces after) for rpath flag to cc
212 RPATH_FLAG=@RPATH_FLAG@
214 # this gets set by configure to either $(STLIBEXT) or $(SHLIBEXT),
215 # depending on whether we're building with shared libraries.
216 DEPLIBEXT=@DEPLIBEXT@
218 KADMCLNT_DEPLIB = $(TOPLIBD)/libkadm5clnt$(DEPLIBEXT)
219 KADMSRV_DEPLIB = $(TOPLIBD)/libkadm5srv$(DEPLIBEXT)
220 KDB5_DEPLIB = $(TOPLIBD)/libkdb5$(DEPLIBEXT)
221 DB_DEPLIB = $(DB_DEPLIB-@DB_VERSION@)
222 DB_DEPLIB-k5 = $(TOPLIBD)/libdb$(DEPLIBEXT)
224 GSSRPC_DEPLIB = $(TOPLIBD)/libgssrpc$(DEPLIBEXT)
225 GSS_DEPLIB = $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
226 KRB4_DEPLIB = @KRB4_DEPLIB@ # $(TOPLIBD)/libkrb4$(DEPLIBEXT)
227 DES425_DEPLIB = @DES425_DEPLIB@ # $(TOPLIBD)/libdes425$(DEPLIBEXT)
228 KRB5_DEPLIB = $(TOPLIBD)/libkrb5$(DEPLIBEXT)
229 CRYPTO_DEPLIB = $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
230 COM_ERR_DEPLIB = $(COM_ERR_DEPLIB-@COM_ERR_VERSION@)
231 COM_ERR_DEPLIB-sys = # empty
232 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)
234 # These are forced to use ".a" as an extension because they're never
236 SS_DEPLIB = $(SS_DEPLIB-@SS_VERSION@)
237 SS_DEPLIB-k5 = $(TOPLIBD)/libss.a
239 KRB524_DEPLIB = @KRB524_DEPLIB@
240 PTY_DEPLIB = $(TOPLIBD)/libpty.a
242 KRB5_BASE_DEPLIBS = $(KRB5_DEPLIB) $(CRYPTO_DEPLIB) $(COM_ERR_DEPLIB)
243 KRB4COMPAT_DEPLIBS = $(KRB4_DEPLIB) $(DES425_DEPLIB) $(KRB5_BASE_DEPLIBS)
244 KDB5_DEPLIBS = $(KDB5_DEPLIB) $(DB_DEPLIB)
245 GSS_DEPLIBS = $(GSS_DEPLIB)
246 GSSRPC_DEPLIBS = $(GSSRPC_DEPLIB) $(GSS_DEPLIBS)
247 KADM_COMM_DEPLIBS = $(GSSRPC_DEPLIBS) $(KDB5_DEPLIBS) $(GSSRPC_DEPLIBS)
248 KADMSRV_DEPLIBS = $(KADMSRV_DEPLIB) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS)
249 KADMCLNT_DEPLIBS = $(KADMCLNT_DEPLIB) $(KADM_COMM_DEPLIBS)
251 # Header file dependencies we might override.
252 # See util/depfix.sed.
253 # Also see depend-verify-* in post.in, which wants to confirm that we're using
254 # the in-tree versions.
255 COM_ERR_VERSION = @COM_ERR_VERSION@
256 COM_ERR_DEPS = $(COM_ERR_DEPS-@COM_ERR_VERSION@)
258 COM_ERR_DEPS-k5 = $(BUILDTOP)/include/com_err.h
259 SS_VERSION = @SS_VERSION@
260 SS_DEPS = $(SS_DEPS-@SS_VERSION@)
262 SS_DEPS-k5 = $(BUILDTOP)/include/ss/ss.h $(BUILDTOP)/include/ss/ss_err.h
263 DB_VERSION = @DB_VERSION@
264 DB_DEPS = $(DB_DEPS-@DB_HEADER_VERSION@)
266 DB_DEPS-k5 = $(BUILDTOP)/include/db.h $(BUILDTOP)/include/db-config.h
267 DB_DEPS-redirect = $(BUILDTOP)/include/db.h
269 # LIBS gets substituted in... e.g. -lnsl -lsocket
271 # GEN_LIB is -lgen if needed for regexp
274 SS_LIB = $(SS_LIB-@SS_VERSION@)
275 SS_LIB-sys = @SS_LIB@
276 SS_LIB-k5 = $(TOPLIBD)/libss.a
281 K5CRYPTO_LIB = -lk5crypto
282 COM_ERR_LIB = -lcom_err
283 GSS_KRB5_LIB = -lgssapi_krb5
285 # KRB4_LIB is -lkrb4 if building --with-krb4
286 # needs fixing if ever used on Mac OS X!
287 KRB4_LIB = @KRB4_LIB@
289 # DES425_LIB is -ldes425 if building --with-krb4
290 # needs fixing if ever used on Mac OS X!
291 DES425_LIB = @DES425_LIB@
293 # KRB524_LIB is $(BUILDTOP)/krb524/libkrb524.a if building --with-krb4
294 # needs fixing if ever used on Mac OS X!
295 KRB524_LIB = @KRB524_LIB@
297 # HESIOD_LIBS is -lhesiod...
298 HESIOD_LIBS = @HESIOD_LIBS@
300 KRB5_BASE_LIBS = $(KRB5_LIB) $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(GEN_LIB) $(LIBS)
301 KRB4COMPAT_LIBS = $(KRB4_LIB) $(DES425_LIB) $(KRB5_BASE_LIBS)
302 KDB5_LIBS = $(KDB5_LIB) $(DB_LIB)
303 GSS_LIBS = $(GSS_KRB5_LIB)
304 # needs fixing if ever used on Mac OS X!
305 GSSRPC_LIBS = -lgssrpc $(GSS_LIBS)
306 KADM_COMM_LIBS = $(GSSRPC_LIBS)
307 # need fixing if ever used on Mac OS X!
308 KADMSRV_LIBS = -lkadm5srv $(HESIOD_LIBS) $(KDB5_LIBS) $(KADM_COMM_LIBS)
309 KADMCLNT_LIBS = -lkadm5clnt $(KADM_COMM_LIBS)
311 # need fixing if ever used on Mac OS X!
315 # some more stuff for --with-krb4
316 KRB4_LIBPATH = @KRB4_LIBPATH@
317 KRB4_INCLUDES = @KRB4_INCLUDES@
320 # variables for --with-tcl=
321 TCL_LIBS = @TCL_LIBS@
322 TCL_LIBPATH = @TCL_LIBPATH@
323 TCL_RPATH = @TCL_RPATH@
324 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
325 TCL_INCLUDES = @TCL_INCLUDES@
329 ### /* these are invoked as $(...) foo.et, which works, but could be better */
330 COMPILE_ET= $(COMPILE_ET-@COM_ERR_VERSION@)
331 COMPILE_ET-sys= compile_et
332 COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
334 .SUFFIXES: .h .c .et .ct
336 # These versions cause both .c and .h files to be generated at once.
337 # But GNU make doesn't understand this, and parallel builds can trigger
338 # both of them at once, causing them to stomp on each other. The versions
339 # below only update one of the files, so compile_et has to get run twice,
340 # but it won't break parallel builds.
341 #.et.h: ; $(COMPILE_ET) $<
342 #.et.c: ; $(COMPILE_ET) $<
345 d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.h $*.h) ; \
346 e=$$? ; rm -f $$d.* ; exit $$e
349 d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.c $*.c) ; \
350 e=$$? ; rm -f $$d.* ; exit $$e
352 # rule to make object files
356 $(CC) $(ALL_CFLAGS) -c $<
358 # ss command table rules
360 MAKE_COMMANDS= $(MAKE_COMMANDS-@SS_VERSION@)
361 MAKE_COMMANDS-sys= mk_cmds
362 MAKE_COMMANDS-k5= $(BUILDTOP)/util/ss/mk_cmds