xref: /illumos-gate/usr/src/cmd/krb5/kadmin/kclient/Makefile (revision 74a8d72a557428e11e39b309193987d43fc7d66e)
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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# ident	"%Z%%M%	%I%	%E% SMI"
25#
26# Makefile for Kerberos client-install utility.
27#
28
29PROG=		ksetpw \
30		kdyndns \
31		ksmb
32
33SHFILES=	kclient
34SECFILES=	pam_krb5_first \
35		pam_krb5_only \
36		pam_krb5_optional
37CLOBBERFILES=	$(SHFILES)
38
39KRB5SBINSHFILES=$(SHFILES:%=$(KRB5SBIN)/%)
40
41USRLIBSEC=	$(ROOT)/usr/lib/security
42SEC=		$(SECFILES:%=$(USRLIBSEC)/%)
43$(SEC):=	FILEMODE = $(LIBFILEMODE)
44
45KS_OBJS=	ksetpw.o
46KD_OBJS=	kdyndns.o
47KSMB_OBJS=	ksmb.o
48
49OBJS=		$(KS_OBJS) $(KD_OBJS) $(KSMB_OBJS)
50
51SSRCS=	kclient.sh
52SRCS=	$(OBJS:%.o=%.c)
53
54include ../../../Makefile.cmd
55include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
56
57POFILE=	$(SSRCS:%.sh=%.po)
58
59CPPFLAGS += -I$(SRC)/uts/common/gssapi/include \
60	-I$(SRC)/lib/krb5 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
61	-I$(SRC)/uts/common/gssapi/include  \
62	-I$(SRC)/uts/common/gssapi/mechs/krb5/include
63
64LDFLAGS += $(KRUNPATH)
65
66KSLDLIBS=	$(LDLIBS) $(KMECHLIB)
67KDLDLIBS=	$(LDLIBS) -L$(ROOT)/usr/lib/smbsrv
68
69DYNFLAGS +=	-R/usr/lib/smbsrv
70
71.KEEP_STATE:
72
73all: $(PROG) $(SHFILES) $(SEC)
74
75install: all $(KRB5SBIN) $(KRB5SBINSHFILES) $(KRB5LIBSHFILES) $(KRB5LIBPROG)
76
77kdyndns:	$(KD_OBJS)
78	$(LINK.c) $(KD_OBJS) -o $@ $(DYNFLAGS) $(KDLDLIBS) -lsmbns
79	$(POST_PROCESS)
80
81ksmb:		$(KSMB_OBJS)
82	$(LINK.c) $(KSMB_OBJS) -o $@ $(DYNFLAGS) $(KDLDLIBS) -lsmb
83	$(POST_PROCESS)
84
85ksetpw:		$(KS_OBJS)
86	$(LINK.c) $(KS_OBJS) -o $@ $(KSLDLIBS)
87	$(POST_PROCESS)
88
89$(KRB5SBIN):
90	$(INS.dir)
91
92$(USRLIBSEC)/%: %
93	$(INS.file)
94
95clean:
96	$(RM) $(PROG) $(SHFILES)
97
98lint:	lint_SRCS
99
100include ../../../Makefile.targ
101