1 # 2 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 3 # Use is subject to license terms. 4 # 5 # Copyright (c) 2018, Joyent, Inc. 6 7 PROG= kdb5_util 8 9 OBJS = kdb5_util.o \ 10 kdb5_create.o kadm5_create.o string_table.o kdb5_stash.o \ 11 kdb5_destroy.o ovload.o strtok.o dump.o 12 13 SRCS = $(OBJS:.o=.c) 14 15 CLOBBERFILES += $(TESTPROG) 16 17 ISRCHDR= iprop.h 18 KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 19 20 include ../../../Makefile.cmd 21 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 22 23 POFILE = $(PROG).po 24 POFILES = generic.po 25 26 CPPFLAGS += -I. -I$(SRC)/lib/gss_mechs/mech_krb5/include/kerberosIV \ 27 -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 28 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \ 29 -I$(SRC)/lib/krb5 \ 30 -I$(SRC)/uts/common/gssapi/include \ 31 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 32 -I$(KRB5IPROPDIR) \ 33 -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_GETCWD=1 \ 34 -DHAVE_STRSTR=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 \ 35 -DHAVE_KRB_DB_H=1 -DHAVE_KDC_H=1 -DKDB4_DISABLE \ 36 -DUSE_KADM5_API_VERSION=2 37 COPTFLAG += $(XESS) #-I$(KINCDIR) 38 39 CERRWARN += -_gcc=-Wno-parentheses 40 CERRWARN += -_gcc=-Wno-unused-variable 41 CERRWARN += -_gcc=-Wno-unused-function 42 CERRWARN += -_gcc=-Wno-implicit-function-declaration 43 44 # not linted 45 SMATCH=off 46 47 LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) 48 LDLIBS += -L $(ROOT_KLIBDIR) -L $(KRB5LIB) -lkadm5srv -lkdb \ 49 -lmech_krb5 -lnsl 50 51 .KEEP_STATE: 52 53 all: $(PROG) 54 55 # Rpcgen-erate iprop.h from the iprop.x spec file 56 $(ISRCHDR): $(KRB5IPROPDIR)/iprop.x 57 $(RM) $@ 58 $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 59 60 # Explicitly state the dependency on iprop.h 61 $(OBJS): $(ISRCHDR) 62 63 $(PROG): $(OBJS) 64 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 65 $(POST_PROCESS) 66 67 install: $(KRB5SBINPROG) 68 69 clean: 70 $(RM) $(OBJS) $(ISRCHDR) 71 72 lint: lint_SRCS 73 74 include ../../../Makefile.targ 75 76 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 77 $(RM) $@ 78 $(CAT) $(POFILES) > $@ 79 80 generic.po: FRC 81 $(RM) messages.po 82 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 83 $(SED) "/^domain/d" messages.po > $@ 84 $(RM) messages.po 85 86 FRC: