Merge illumos-gate
[unleashed.git] / usr / src / cmd / krb5 / kadmin / kclient / Makefile
blobc13791742b73b7f7c6e10f52a70444cde843ce57
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Makefile for Kerberos client-install utility.
25 # Copyright (c) 2018, Joyent, Inc.
27 PROG= ksetpw \
28 kdyndns \
29 ksmb \
30 kconf
32 SHFILES= kclient
33 SECFILES= pam_krb5_first \
34 pam_krb5_only \
35 pam_krb5_optional
36 CLOBBERFILES += $(SHFILES)
38 KRB5SBINSHFILES=$(SHFILES:%=$(KRB5SBIN)/%)
40 USRLIBSEC= $(ROOT)/usr/lib/security
41 SEC= $(SECFILES:%=$(USRLIBSEC)/%)
42 $(SEC):= FILEMODE = $(LIBFILEMODE)
44 KS_OBJS= ksetpw.o
45 KD_OBJS= kdyndns.o
46 KSMB_OBJS= ksmb.o
47 KC_OBJS= kconf.o
49 OBJS= $(KS_OBJS) $(KD_OBJS) $(KSMB_OBJS) $(KC_OBJS)
51 SSRCS= kclient.sh
52 SRCS= $(OBJS:%.o=%.c)
54 include ../../../Makefile.cmd
55 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
57 POFILE= $(SSRCS:%.sh=%.po)
59 CPPFLAGS += -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
64 CERRWARN += -Wno-uninitialized
65 CERRWARN += -Wno-parentheses
66 CERRWARN += -Wno-unused-function
68 # not linted
69 SMATCH=off
71 ksetpw:= LDFLAGS += $(KRUNPATH)
72 kdyndns:= LDFLAGS += -R/usr/lib/smbsrv
73 ksmb:= LDFLAGS += -R/usr/lib/smbsrv
74 kconf:= LDFLAGS += $(KRUNPATH)
76 KS_LDLIBS = $(LDLIBS) $(KMECHLIB)
77 KD_LDLIBS = $(LDLIBS) -L$(ROOT)/usr/lib/smbsrv -lsmbns
78 KSMB_LDLIBS = $(LDLIBS) -L$(ROOT)/usr/lib/smbsrv -lsmb
79 KC_LDLIBS = $(LDLIBS) $(KMECHLIB)
81 .KEEP_STATE:
83 all: $(PROG) $(SHFILES) $(SEC)
85 install: all $(KRB5SBIN) $(KRB5SBINSHFILES) $(KRB5LIBSHFILES) $(KRB5LIBPROG)
87 kdyndns: $(KD_OBJS)
88 $(LINK.c) $(KD_OBJS) -o $@ $(KD_LDLIBS)
89 $(POST_PROCESS)
91 ksmb: $(KSMB_OBJS)
92 $(LINK.c) $(KSMB_OBJS) -o $@ $(KSMB_LDLIBS)
93 $(POST_PROCESS)
95 ksetpw: $(KS_OBJS)
96 $(LINK.c) $(KS_OBJS) -o $@ $(KS_LDLIBS)
97 $(POST_PROCESS)
99 kconf: $(KC_OBJS)
100 $(LINK.c) $(KC_OBJS) -o $@ $(KC_LDLIBS)
101 $(POST_PROCESS)
103 $(KRB5SBIN):
104 $(INS.dir)
106 $(USRLIBSEC)/%: %
107 $(INS.file)
109 clean:
110 $(RM) $(OBJS)
113 include ../../../Makefile.targ