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 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# Copyright (c) 2018, Joyent, Inc. 26 27PROG= kdb5_ldap_util 28 29OBJS = \ 30 kdb5_ldap_list.o \ 31 kdb5_ldap_policy.o \ 32 kdb5_ldap_realm.o \ 33 kdb5_ldap_services.o \ 34 kdb5_ldap_util.o \ 35 getdate.o 36 37DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_PWD_H=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 38 39include $(SRC)/cmd/Makefile.cmd 40include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 41 42TEXT_DOMAIN = SUNW_OST_OSCMD 43POFILE = kdb5_ldap_util.po 44POFILES = generic.po 45 46DEFS = -DHAVE_PWD_H -DUSE_KADM5_API_VERSION=2 47 48CPPFLAGS += \ 49 -I$(SRC)/lib/gss_mechs/mech_krb5 \ 50 -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 51 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \ 52 -I$(SRC)/lib/krb5 \ 53 -I$(SRC)/lib/krb5/kdb \ 54 -I$(SRC)/lib/krb5/plugins/kdb/ldap/libkdb_ldap \ 55 -I$(SRC)/cmd/krb5/kadmin/cli \ 56 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 57 -I$(SRC)/uts/common/gssapi/mechs/krb5/include/krb5 \ 58 -I../kwarn \ 59 $(DEFS) 60 61CERRWARN += -_gcc=-Wno-unused-variable 62CERRWARN += -_gcc=-Wno-unused-function 63CERRWARN += -_gcc=-Wno-implicit-function-declaration 64 65# because of labels from yacc 66getdate.o := CERRWARN += -_gcc=-Wno-unused-label 67 68# not linted 69SMATCH=off 70 71LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) 72LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb -lkdb_ldap \ 73 -lmech_krb5 74 75.KEEP_STATE: 76 77all: $(PROG) 78 79$(PROG): $(OBJS) 80 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 81 $(POST_PROCESS) 82 83install: $(KRB5SBINPROG) 84 85clean: 86 $(RM) $(OBJS) 87 88include $(SRC)/cmd/Makefile.targ 89 90%.o: $(SRC)/cmd/krb5/kadmin/cli/%.y 91 $(YACC.y) $< 92 $(COMPILE.c) -o $@ y.tab.c $(CTFCONVERT_HOOK) 93 $(POST_PROCESS_O) 94 $(RM) y.tab.c 95 96$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 97 $(RM) $@ 98 $(CAT) $(POFILES) > $@ 99 100generic.po: 101 $(RM) messages.po 102 $(XGETTEXT) $(XGETFLAGS) `($(GREP) -l gettext *.[ch] || echo /dev/null)` 103 $(SED) "/^domain/d" messages.po > $@ 104 $(RM) messages.po 105