xref: /titanic_44/usr/src/lib/krb5/kdb/Makefile.com (revision b6c3f7863936abeae522e48a13887dddeb691a45)
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 2007 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_default.o \
39	kdb_log.o \
40	kdb5.o
41
42DERIVED_OBJS= \
43	iprop_xdr.o
44
45# Definitions needed to rpcgen iprop-related files
46ISRCHDR= ../iprop.h
47ISRCXDR= ../iprop_xdr.c
48KRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
49CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
50
51# libkdb5 needs to link against some files from kadm5
52KADM5DIR=       $(SRC)/lib/krb5/kadm5
53KADM5OBJS= alt_prof.o str_conv.o
54KADM5SRCS= $(KADM5DIR)/$(KADM5OBJS:%.o=%.c)
55
56OBJECTS= $(KDBOBJS) $(KADM5OBJS) $(DERIVED_OBJS)
57
58# include library definitions
59include ../../Makefile.lib
60
61SRCS=		$(KDBOBJS:%.o=../%.c)
62SRCS+=		$(DERIVED_OBJS:%.o=../%.c)
63SRCS+=		$(KADM5SRCS)
64
65LIBS=		$(DYNLIB)
66
67include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
68
69POFILE = $(LIBRARY:%.a=%.po)
70POFILES = generic.po
71
72# override liblink
73INS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
74
75CPPFLAGS +=	-DHAVE_CONFIG_H -DHAVE_BT_RSEQ \
76		-I$(KRB5IPROPDIR) \
77		-I$(SRC)/lib/krb5 \
78		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
79		-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
80		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
81		-I$(SRC)/uts/common/gssapi/include/ \
82		-I$(SRC)/uts/common/gssapi/mechs/krb5/include
83
84CFLAGS +=	$(CCVERBOSE) -I..
85
86DYNFLAGS +=	$(KRUNPATH) $(KMECHLIB)
87LDLIBS +=	-lc -lnsl
88
89.KEEP_STATE:
90
91all:	$(LIBS)
92
93# Rules to rpcgen-erate derived files from the iprop.x spec file
94$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
95	$(RM)	$@
96	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
97
98$(ISRCXDR):	$(ISRCHDR) $(KRB5IPROPDIR)/iprop.x
99	$(RM) $@
100	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
101
102CLEANFILES +=	$(ISRCHDR) $(ISRCXDR)
103
104# Explicitly state the dependancy on iprop.h
105$(LIBS): $(ISRCHDR)
106
107# We turn off ptr-cast warnings, since we're doing mmapping in kdb_log
108LINTFLAGS +=	-erroff=E_BAD_PTR_CAST_ALIGN
109
110lint:	lintcheck
111
112# include library targets
113include ../../Makefile.targ
114
115FRC:
116
117generic.po: FRC
118	$(RM) messages.po
119	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
120	$(SED) "/^domain/d" messages.po > $@
121	$(RM) messages.po
122