xref: /titanic_51/usr/src/cmd/krb5/ldap_util/Makefile (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28PROG= kdb5_ldap_util
29
30OBJS	= \
31	kdb5_ldap_list.o \
32	kdb5_ldap_policy.o \
33	kdb5_ldap_realm.o \
34	kdb5_ldap_services.o \
35	kdb5_ldap_util.o
36
37GETDATE	= $(SRC)/cmd/krb5/kadmin/cli/getdate.o
38
39SRCS	= $(OBJS:.o=.c)
40
41DEFS =  -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_PWD_H=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1
42
43include $(SRC)/cmd/Makefile.cmd
44include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
45
46TEXT_DOMAIN = SUNW_OST_OSCMD
47POFILE = kdb5_ldap_util.po
48POFILES = generic.po
49
50DEFS = -DHAVE_PWD_H -DUSE_KADM5_API_VERSION=2
51
52CPPFLAGS += \
53		-I$(SRC)/lib/gss_mechs/mech_krb5 \
54		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
55		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
56		-I$(SRC)/lib/krb5 \
57		-I$(SRC)/lib/krb5/kdb \
58		-I$(SRC)/lib/krb5/plugins/kdb/ldap/libkdb_ldap \
59		-I$(SRC)/cmd/krb5/kadmin/cli \
60		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
61		-I$(SRC)/uts/common/gssapi/mechs/krb5/include/krb5 \
62		-I../kwarn \
63		$(DEFS)
64
65LDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
66LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb -lkdb_ldap \
67	-lmech_krb5
68
69.KEEP_STATE:
70
71all: $(PROG)
72
73$(PROG):       $(OBJS) $(GETDATE)
74	$(LINK.c) $(OBJS) $(GETDATE) -o $@ $(LDLIBS)
75	$(POST_PROCESS)
76
77install: $(KRB5SBINPROG)
78
79clean:
80	$(RM) $(OBJS)
81
82lint: lint_SRCS
83
84include $(SRC)/cmd/Makefile.targ
85
86$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
87	$(RM) $@
88	$(CAT) $(POFILES) > $@
89
90generic.po:
91	$(RM) messages.po
92	$(XGETTEXT) $(XGETFLAGS) `($(GREP) -l gettext *.[ch] || echo /dev/null)`
93	$(SED) "/^domain/d" messages.po > $@
94	$(RM) messages.po
95