xref: /titanic_52/usr/src/lib/krb5/kdb/Makefile.com (revision f808c858fa61e7769218966759510a8b1190dfcf)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY= libkdb.a
29VERS= .1
30
31# kdb
32KDBOBJS= \
33        keytab.o \
34        encrypt_key.o \
35        decrypt_key.o \
36	kdb_convert.o \
37        kdb_cpw.o \
38        kdb_db2.o \
39	kdb_log.o \
40        kdb_xdr.o \
41        verify_mky.o \
42        fetch_mkey.o \
43        setup_mkey.o \
44        store_mkey.o
45
46DERIVED_OBJS= \
47	iprop_xdr.o
48
49# Definitions needed to rpcgen iprop-related files
50ISRCHDR= ../iprop.h
51ISRCXDR= ../iprop_xdr.c
52KRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
53CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
54
55# libkdb5 needs to link against some files from kadm5
56KADM5DIR=       $(SRC)/lib/krb5/kadm5
57KADM5OBJS= alt_prof.o str_conv.o
58KADM5SRCS= $(KADM5DIR)/$(KADM5OBJS:%.o=%.c)
59
60OBJECTS= $(KDBOBJS) $(KADM5OBJS) $(DERIVED_OBJS)
61
62# include library definitions
63include ../../Makefile.lib
64
65SRCS=		$(KDBOBJS:%.o=../%.c)
66SRCS+=		$(DERIVED_OBJS:%.o=../%.c)
67SRCS+=		$(KADM5SRCS)
68
69LIBS=		$(DYNLIB)
70
71include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
72
73POFILE = $(LIBRARY:%.a=%.po)
74POFILES = generic.po
75
76# override liblink
77INS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
78
79CPPFLAGS +=	-DHAVE_CONFIG_H \
80		-I$(KRB5IPROPDIR) \
81		-I$(SRC)/lib/krb5 \
82		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
83		-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
84		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
85		-I$(SRC)/uts/common/gssapi/include/ \
86		-I$(SRC)/uts/common/gssapi/mechs/krb5/include
87
88CFLAGS +=	$(CCVERBOSE) -I..
89
90DYNFLAGS +=	$(KRUNPATH) $(KMECHLIB)
91LDLIBS +=	-L $(ROOTLIBDIR) -ldb2 -lc -lnsl
92
93.KEEP_STATE:
94
95all:	$(LIBS)
96
97# Rules to rpcgen-erate derived files from the iprop.x spec file
98$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
99	$(RM)	$@
100	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
101
102$(ISRCXDR):	$(ISRCHDR) $(KRB5IPROPDIR)/iprop.x
103	$(RM) $@
104	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
105
106CLEANFILES +=	$(ISRCHDR) $(ISRCXDR)
107
108# Explicitly state the dependancy on iprop.h
109$(LIBS): $(ISRCHDR)
110
111# We turn off ptr-cast warnings, since we're doing mmapping in kdb_log
112LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN
113
114lint:	lintcheck
115
116# include library targets
117include ../../Makefile.targ
118
119FRC:
120
121generic.po: FRC
122	$(RM) messages.po
123	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
124	$(SED) "/^domain/d" messages.po > $@
125	$(RM) messages.po
126