xref: /titanic_41/usr/src/lib/krb5/kdb/Makefile.com (revision ea8dc4b6d2251b437950c0056bc626b311c73c27)
1#
2# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7# lib/krb5/kdb/Makefile.com
8#
9
10LIBRARY= libkdb.a
11VERS= .1
12
13# kdb
14KDBOBJS= \
15        keytab.o \
16        encrypt_key.o \
17        decrypt_key.o \
18	kdb_convert.o \
19        kdb_cpw.o \
20        kdb_db2.o \
21	kdb_log.o \
22        kdb_xdr.o \
23        verify_mky.o \
24        fetch_mkey.o \
25        setup_mkey.o \
26        store_mkey.o
27
28DERIVED_OBJS= \
29	iprop_xdr.o
30
31# Definitions needed to rpcgen iprop-related files
32ISRCHDR= ../iprop.h
33ISRCXDR= ../iprop_xdr.c
34KRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
35CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
36
37# libkdb5 needs to link against some files from kadm5
38KADM5DIR=       $(SRC)/lib/krb5/kadm5
39KADM5OBJS= alt_prof.o str_conv.o
40KADM5SRCS= $(KADM5DIR)/$(KADM5OBJS:%.o=%.c)
41
42OBJECTS= $(KDBOBJS) $(KADM5OBJS) $(DERIVED_OBJS)
43
44# include library definitions
45include ../../Makefile.lib
46
47SRCS=		$(KDBOBJS:%.o=../%.c)
48SRCS+=		$(DERIVED_OBJS:%.o=../%.c)
49SRCS+=		$(KADM5SRCS)
50
51LIBS=		$(DYNLIB)
52
53include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
54
55POFILE = $(LIBRARY:%.a=%.po)
56POFILES = generic.po
57
58# override liblink
59INS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
60
61CPPFLAGS +=	-DHAVE_CONFIG_H \
62		-I$(KRB5IPROPDIR) \
63		-I$(SRC)/lib/krb5 \
64		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
65		-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
66		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
67		-I$(SRC)/uts/common/gssapi/include/ \
68		-I$(SRC)/uts/common/gssapi/mechs/krb5/include
69
70CFLAGS +=	$(CCVERBOSE) -I..
71
72DYNFLAGS +=	$(KRUNPATH) $(KMECHLIB)
73LDLIBS +=	-L $(ROOTLIBDIR) -ldb2 -lc -lnsl
74
75.KEEP_STATE:
76
77all:	$(LIBS)
78
79# Rules to rpcgen-erate derived files from the iprop.x spec file
80$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
81	$(RM)	$@
82	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
83
84$(ISRCXDR):	$(ISRCHDR) $(KRB5IPROPDIR)/iprop.x
85	$(RM) $@
86	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
87
88CLEANFILES +=	$(ISRCHDR) $(ISRCXDR)
89
90# Explicitly state the dependancy on iprop.h
91$(LIBS): $(ISRCHDR)
92
93# We turn off ptr-cast warnings, since we're doing mmapping in kdb_log
94LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN
95
96lint:	lintcheck
97
98$(DYNLIB):	$(MAPFILE)
99
100$(MAPFILE):
101	@cd $(MAPDIR); $(MAKE) mapfile
102
103# include library targets
104include ../../Makefile.targ
105
106FRC:
107
108generic.po: FRC
109	$(RM) messages.po
110	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
111	$(SED) "/^domain/d" messages.po > $@
112	$(RM) messages.po
113