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# 22# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# Copyright (c) 2018, Joyent, Inc. 26 27LIBRARY= libkdb.a 28VERS= .1 29 30# kdb 31KDBOBJS= \ 32 keytab.o \ 33 encrypt_key.o \ 34 decrypt_key.o \ 35 kdb_convert.o \ 36 kdb_cpw.o \ 37 kdb_default.o \ 38 kdb_log.o \ 39 kdb5.o 40 41DERIVED_OBJS= \ 42 iprop_xdr.o 43 44# Definitions needed to rpcgen iprop-related files 45ISRCHDR= ../iprop.h 46ISRCXDR= ../iprop_xdr.c 47KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 48CMD= grep -v "usr/src/cmd/krb5/iprop" > $@ 49 50# libkdb5 needs to link against some files from kadm5 51KADM5DIR= $(SRC)/lib/krb5/kadm5 52KADM5OBJS= alt_prof.o str_conv.o 53KADM5SRCS= $(KADM5DIR)/$(KADM5OBJS:%.o=%.c) 54 55OBJECTS= $(KDBOBJS) $(KADM5OBJS) $(DERIVED_OBJS) 56 57# include library definitions 58include ../../Makefile.lib 59 60SRCS= $(KDBOBJS:%.o=../%.c) 61SRCS+= $(DERIVED_OBJS:%.o=../%.c) 62SRCS+= $(KADM5SRCS) 63 64LIBS= $(DYNLIB) 65 66include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 67 68POFILE = $(LIBRARY:%.a=%.po) 69POFILES = generic.po 70 71# override liblink 72INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@ 73 74CPPFLAGS += -DHAVE_CONFIG_H -DHAVE_BT_RSEQ \ 75 -I$(KRB5IPROPDIR) \ 76 -I$(SRC)/lib/krb5 \ 77 -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 78 -I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \ 79 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \ 80 -I$(SRC)/uts/common/gssapi/include/ \ 81 -I$(SRC)/uts/common/gssapi/mechs/krb5/include 82 83CFLAGS += $(CCVERBOSE) -I.. 84 85CERRWARN += -_gcc=-Wno-unused-variable 86CERRWARN += -_gcc=-Wno-unused-function 87CERRWARN += -_gcc=-Wno-type-limits 88CERRWARN += -_gcc=-Wno-uninitialized 89CERRWARN += -_gcc=-Wno-parentheses 90 91SMOFF += indenting,all_func_returns,deref_check,signed 92 93DYNFLAGS += $(KRUNPATH) $(KMECHLIB) 94LDLIBS += -lc -lnsl 95 96.KEEP_STATE: 97 98all: $(LIBS) 99 100# Rules to rpcgen-erate derived files from the iprop.x spec file 101$(ISRCHDR): $(KRB5IPROPDIR)/iprop.x 102 $(RM) $@ 103 $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 104 105$(ISRCXDR): $(ISRCHDR) $(KRB5IPROPDIR)/iprop.x 106 $(RM) $@ 107 $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD) 108 109CLEANFILES += $(ISRCHDR) $(ISRCXDR) 110 111# Explicitly state the dependancy on iprop.h 112$(LIBS): $(ISRCHDR) 113 114# We turn off ptr-cast warnings, since we're doing mmapping in kdb_log 115LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 116 117lint: lintcheck 118 119# include library targets 120include ../../Makefile.targ 121 122FRC: 123 124generic.po: FRC 125 $(RM) messages.po 126 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]` 127 $(SED) "/^domain/d" messages.po > $@ 128 $(RM) messages.po 129