Home | History | Annotate | Download | only in kclient
      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 
     29 PROG=		ksetpw \
     30 		kdyndns \
     31 		ksmb
     32 
     33 SHFILES=	kclient
     34 SECFILES=	pam_krb5_first \
     35 		pam_krb5_only \
     36 		pam_krb5_optional
     37 CLOBBERFILES=	$(SHFILES)
     38 
     39 KRB5SBINSHFILES=$(SHFILES:%=$(KRB5SBIN)/%)
     40 
     41 USRLIBSEC=	$(ROOT)/usr/lib/security
     42 SEC=		$(SECFILES:%=$(USRLIBSEC)/%)
     43 $(SEC):=	FILEMODE = $(LIBFILEMODE)
     44 
     45 KS_OBJS=	ksetpw.o
     46 KD_OBJS=	kdyndns.o
     47 KSMB_OBJS=	ksmb.o
     48 
     49 OBJS=		$(KS_OBJS) $(KD_OBJS) $(KSMB_OBJS)
     50 
     51 SSRCS=	kclient.sh
     52 SRCS=	$(OBJS:%.o=%.c)
     53 
     54 include ../../../Makefile.cmd
     55 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
     56 
     57 POFILE=	$(SSRCS:%.sh=%.po)
     58 
     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
     63 
     64 ksetpw:=	LDFLAGS += $(KRUNPATH)
     65 kdyndns:=	LDFLAGS += -R/usr/lib/smbsrv
     66 ksmb:=		LDFLAGS += -R/usr/lib/smbsrv
     67 
     68 KS_LDLIBS =	$(LDLIBS) $(KMECHLIB)
     69 KD_LDLIBS =	$(LDLIBS) -L$(ROOT)/usr/lib/smbsrv -lsmbns
     70 KSMB_LDLIBS =	$(LDLIBS) -L$(ROOT)/usr/lib/smbsrv -lsmb
     71 
     72 .KEEP_STATE:
     73 
     74 all: $(PROG) $(SHFILES) $(SEC)
     75 
     76 install: all $(KRB5SBIN) $(KRB5SBINSHFILES) $(KRB5LIBSHFILES) $(KRB5LIBPROG)
     77 
     78 kdyndns:	$(KD_OBJS)
     79 	$(LINK.c) $(KD_OBJS) -o $@ $(KD_LDLIBS)
     80 	$(POST_PROCESS)
     81 
     82 ksmb:		$(KSMB_OBJS)
     83 	$(LINK.c) $(KSMB_OBJS) -o $@ $(KSMB_LDLIBS)
     84 	$(POST_PROCESS)
     85 
     86 ksetpw:		$(KS_OBJS)
     87 	$(LINK.c) $(KS_OBJS) -o $@ $(KS_LDLIBS)
     88 	$(POST_PROCESS)
     89 
     90 $(KRB5SBIN):
     91 	$(INS.dir)
     92 
     93 $(USRLIBSEC)/%: %
     94 	$(INS.file)
     95 
     96 clean:
     97 	$(RM) $(PROG) $(SHFILES)
     98 
     99 lint:	lint_SRCS
    100 
    101 include ../../../Makefile.targ
    102