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#
222dd2efa5Swillf# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2354925bf6Swillf# Use is subject to license terms.
2454925bf6Swillf#
2505ede3dbSJohn Levon# Copyright (c) 2018, Joyent, Inc.
2654925bf6Swillf
2754925bf6SwillfLIBRARY= db2.a
2854925bf6SwillfVERS= .1
2954925bf6Swillf
3054925bf6Swillf# XXX need to set the install path to plugin dir
3154925bf6Swillf
3254925bf6Swillf# db2 plugin objects
3354925bf6SwillfDB2_OBJS= \
3454925bf6Swillf	adb_openclose.o \
3554925bf6Swillf	adb_policy.o \
3654925bf6Swillf	db2_exp.o \
3754925bf6Swillf	kdb_db2.o \
3854925bf6Swillf	kdb_xdr.o \
3954925bf6Swillf	pol_xdr.o
40*241c90a0SRichard Lowe
4154925bf6SwillfOBJECTS= $(DB2_OBJS)
4254925bf6Swillf
4354925bf6Swillf# include library definitions
4454925bf6Swillfinclude $(SRC)/lib/krb5/Makefile.lib
4554925bf6Swillf
4654925bf6SwillfLIBS=		$(DYNLIB)
4754925bf6SwillfSRCS=	$(DB2_OBJS:%.o=../%.c)
4854925bf6Swillf
4954925bf6Swillfinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
5054925bf6Swillf
5154925bf6SwillfPOFILE = $(LIBRARY:%.a=%.po)
5254925bf6SwillfPOFILES = generic.po
5354925bf6Swillf
5454925bf6Swillf#override liblink
5554925bf6SwillfINS.liblink=	-$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
5654925bf6Swillf
57*241c90a0SRichard LoweCPPFLAGS +=	-DHAVE_CONFIG_H -DHAVE_BT_RSEQ \
5854925bf6Swillf		-I$(SRC)/cmd/krb5/iprop \
5954925bf6Swillf		-I$(SRC)/lib/krb5 \
6054925bf6Swillf		-I$(SRC)/lib/krb5/kdb \
6154925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
6254925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
6354925bf6Swillf		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
6454925bf6Swillf		-I$(SRC)/uts/common/gssapi/include/ \
6554925bf6Swillf		-I$(SRC)/uts/common/gssapi/mechs/krb5/include
6654925bf6Swillf
6754925bf6SwillfCFLAGS +=	$(CCVERBOSE)
687014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
697014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
707014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
71d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
7254925bf6Swillf
7305ede3dbSJohn Levon# not linted
7405ede3dbSJohn LevonSMATCH=off
7505ede3dbSJohn Levon
7667e3a03eSrieDYNFLAGS +=	$(KRUNPATH) $(KERBRUNPATH) $(KMECHLIB)
7754925bf6SwillfLDLIBS +=	-L $(ROOTLIBDIR) -ldb2 -lkdb -lkadm5srv -lc -lnsl
7854925bf6Swillf
7954925bf6Swillf.KEEP_STATE:
8054925bf6Swillf
8154925bf6Swillfall:	$(LIBS)
8254925bf6Swillf
8354925bf6Swillf
8454925bf6Swillf# include library targets
8554925bf6Swillfinclude $(SRC)/lib/krb5/Makefile.targ
8654925bf6Swillf
8754925bf6SwillfFRC:
8854925bf6Swillf
8954925bf6Swillfgeneric.po: FRC
9054925bf6Swillf	$(RM) messages.po
9154925bf6Swillf	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
9254925bf6Swillf	$(SED) "/^domain/d" messages.po > $@
9354925bf6Swillf	$(RM) messages.po
94