154925bf6Swillf#
254925bf6Swillf# CDDL HEADER START
354925bf6Swillf#
454925bf6Swillf# The contents of this file are subject to the terms of the
554925bf6Swillf# Common Development and Distribution License (the "License").
654925bf6Swillf# You may not use this file except in compliance with the License.
754925bf6Swillf#
854925bf6Swillf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
954925bf6Swillf# or http://www.opensolaris.org/os/licensing.
1054925bf6Swillf# See the License for the specific language governing permissions
1154925bf6Swillf# and limitations under the License.
1254925bf6Swillf#
1354925bf6Swillf# When distributing Covered Code, include this CDDL HEADER in each
1454925bf6Swillf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1554925bf6Swillf# If applicable, add the following below this CDDL HEADER, with the
1654925bf6Swillf# fields enclosed by brackets "[]" replaced with your own identifying
1754925bf6Swillf# information: Portions Copyright [yyyy] [name of copyright owner]
1854925bf6Swillf#
1954925bf6Swillf# CDDL HEADER END
2054925bf6Swillf#
2154925bf6Swillf#
2267e3a03eSrie# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2354925bf6Swillf# Use is subject to license terms.
2454925bf6Swillf#
252944b91eSJohn Levon# Copyright 2020 Joyent, Inc.
2654925bf6Swillf#
2754925bf6Swillf
2854925bf6SwillfLIBRARY= kldap.a
2954925bf6SwillfVERS= .1
3054925bf6Swillf
3154925bf6Swillf# XXX need to set the install path to plugin dir
3254925bf6Swillf
3354925bf6Swillf# ldap plugin objects
3454925bf6SwillfLDAP_OBJS= \
3554925bf6Swillf	ldap_exp.o
3654925bf6Swillf
3754925bf6SwillfOBJECTS= $(LDAP_OBJS)
3854925bf6Swillf
3954925bf6Swillf# include library definitions
4054925bf6Swillfinclude $(SRC)/lib/krb5/Makefile.lib
4154925bf6Swillf
4254925bf6SwillfLIBS=		$(DYNLIB)
4354925bf6SwillfSRCS=	$(LDAP_OBJS:%.o=../%.c)
4454925bf6Swillf
4554925bf6Swillfinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
4654925bf6Swillf
4754925bf6Swillf#override liblink
4854925bf6SwillfINS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
4954925bf6Swillf
502944b91eSJohn LevonCPPFLAGS +=	-DHAVE_CONFIG_H \
5154925bf6Swillf		-I$(SRC)/cmd/krb5/iprop \
5254925bf6Swillf		-I$(SRC)/lib/krb5 \
5354925bf6Swillf		-I$(SRC)/lib/krb5/kdb \
5454925bf6Swillf		-I$(SRC)/lib/krb5/plugins/kdb/ldap/libkdb_ldap \
5554925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
5654925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
5754925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
5854925bf6Swillf		-I$(SRC)/uts/common/gssapi/include/ \
5954925bf6Swillf		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
6054925bf6Swillf		-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1 \
6154925bf6Swillf		-DUSE_KADM5_API_VERSION=2
6254925bf6Swillf
6354925bf6SwillfCFLAGS +=	$(CCVERBOSE)
647014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
657014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
6654925bf6Swillf
6767e3a03eSrieDYNFLAGS +=	$(KERBRUNPATH)
6854925bf6Swillf# setting -L $(ROOT)/usr/lib/gss because libkdb_ldap needs mech_krb5
69*fdd257eaSDan McDonaldLDLIBS +=	-L $(ROOT)/usr/lib/gss -L $(ROOTLIBDIR) -lkdb_ldap
7054925bf6Swillf
7154925bf6Swillf.KEEP_STATE:
7254925bf6Swillf
7354925bf6Swillfall:	$(LIBS)
7454925bf6Swillf
7554925bf6Swillf# include library targets
7654925bf6Swillfinclude $(SRC)/lib/krb5/Makefile.targ
7754925bf6Swillf
7854925bf6SwillfFRC:
79