17c478bd9Sstevel@tonic-gate#
2f808c858Sraf# CDDL HEADER START
3f808c858Sraf#
4f808c858Sraf# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
7f808c858Sraf#
8f808c858Sraf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f808c858Sraf# or http://www.opensolaris.org/os/licensing.
10f808c858Sraf# See the License for the specific language governing permissions
11f808c858Sraf# and limitations under the License.
12f808c858Sraf#
13f808c858Sraf# When distributing Covered Code, include this CDDL HEADER in each
14f808c858Sraf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f808c858Sraf# If applicable, add the following below this CDDL HEADER, with the
16f808c858Sraf# fields enclosed by brackets "[]" replaced with your own identifying
17f808c858Sraf# information: Portions Copyright [yyyy] [name of copyright owner]
18f808c858Sraf#
19f808c858Sraf# CDDL HEADER END
20f808c858Sraf#
21f808c858Sraf#
22ba7b222eSGlenn Barry# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
2505ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateLIBRARY= libkadm5clnt.a
287c478bd9Sstevel@tonic-gateVERS= .1
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateCLNT_OBJS = clnt_policy.o \
317c478bd9Sstevel@tonic-gate	client_rpc.o \
327c478bd9Sstevel@tonic-gate	client_principal.o \
337c478bd9Sstevel@tonic-gate	client_init.o \
347c478bd9Sstevel@tonic-gate	clnt_privs.o \
357c478bd9Sstevel@tonic-gate	clnt_chpass_util.o \
367c478bd9Sstevel@tonic-gate	logger.o \
377c478bd9Sstevel@tonic-gate	changepw.o \
387c478bd9Sstevel@tonic-gate	chpw.o
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateSHARED_OBJS = \
417c478bd9Sstevel@tonic-gate	alt_prof.o \
427c478bd9Sstevel@tonic-gate	chpass_util.o \
437c478bd9Sstevel@tonic-gate	kadm_rpc_xdr.o \
447c478bd9Sstevel@tonic-gate	misc_free.o \
457c478bd9Sstevel@tonic-gate	kadm_host_srv_names.o \
467c478bd9Sstevel@tonic-gate	str_conv.o
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateOBJECTS= $(CLNT_OBJS) $(SHARED_OBJS)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateISRCHDR= ../iprop.h
517c478bd9Sstevel@tonic-gateKRB5IPROPDIR=	$(SRC)/cmd/krb5/iprop
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gate# include library definitions
547c478bd9Sstevel@tonic-gateinclude ../../../Makefile.lib
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gateSRCS=		$(CLNT_OBJS:%.o=../%.c) \
577c478bd9Sstevel@tonic-gate		$(SHARED_OBJS:%.o=../../%.c)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateLIBS=		$(DYNLIB)
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gatePOFILE = $(LIBRARY:%.a=%.po)
647c478bd9Sstevel@tonic-gatePOFILES = generic.po
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate#override liblink
677c478bd9Sstevel@tonic-gateINS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateCPPFLAGS += -I.. -I../.. -I../../.. -I$(SRC)/lib/gss_mechs/mech_krb5/include \
707c478bd9Sstevel@tonic-gate	-I$(SRC)/lib/krb5 \
717c478bd9Sstevel@tonic-gate	-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
72ba7b222eSGlenn Barry	-I$(SRC)/uts/common/gssapi/ \
737c478bd9Sstevel@tonic-gate	-I$(SRC)/uts/common/gssapi/include/ \
747c478bd9Sstevel@tonic-gate	-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
757c478bd9Sstevel@tonic-gate	-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
767c478bd9Sstevel@tonic-gate	-I$(KRB5IPROPDIR) \
777c478bd9Sstevel@tonic-gate	-DHAVE_STDLIB_H -DUSE_SOLARIS_SHARED_LIBRARIES \
787c478bd9Sstevel@tonic-gate	-DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DSETRPCENT_TYPE=void \
797c478bd9Sstevel@tonic-gate	-DENDRPCENT_TYPE=void -DHAVE_SYS_ERRLIST=1 -DNEED_SYS_ERRLIST=1 \
807c478bd9Sstevel@tonic-gate	-DHAVE_SYSLOG_H=1 -DHAVE_OPENLOG=1 -DHAVE_SYSLOG=1 -DHAVE_CLOSELOG=1 \
8156a424ccSmp	-DHAVE_STRFTIME=1 -DHAVE_VSPRINTF=1 -DUSE_KADM5_API_VERSION=2
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gateCFLAGS +=	$(CCVERBOSE) -I..
847014882cSRichard Lowe
857014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
867014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
877014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
88*d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
897014882cSRichard Lowe
9005ede3dbSJohn LevonSMOFF += all_func_returns,indenting,no_if_block
9105ede3dbSJohn Levon
927c478bd9Sstevel@tonic-gateLDLIBS +=	-lc
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate.KEEP_STATE:
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gateall:	$(LIBS)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gate# Rpcgen-erate iprop.h from the iprop.x spec file
997c478bd9Sstevel@tonic-gate$(ISRCHDR):	$(KRB5IPROPDIR)/iprop.x
1007c478bd9Sstevel@tonic-gate	$(RM)	$@
1017c478bd9Sstevel@tonic-gate	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gate# Explicitly state the dependancy on iprop.h
1047c478bd9Sstevel@tonic-gate$(LIBS): $(ISRCHDR)
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gateCLEANFILES +=	$(ISRCHDR)
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate# include library targets
1107c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gatepics/%.o: ../../%.c
1137c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1147c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gateFRC:
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gategeneric.po: FRC
1197c478bd9Sstevel@tonic-gate	$(RM) messages.po
1207c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch] ../../*.[ch]`
1217c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
1227c478bd9Sstevel@tonic-gate	$(RM) messages.po
123