1# 2# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 3# Use is subject to license terms. 4# 5# Copyright (c) 2018, Joyent, Inc. 6 7PROG= kadmind 8MANIFEST= kadmin.xml 9 10OBJS = kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o misc.o server_glue_v1.o \ 11 ipropd_svc.o 12 13DERIVED_OBJS= iprop_xdr.o 14 15SRCS= $(OBJS:.o=.c) 16SRCS+= $(DERIVED_OBJS:.o=.c) 17 18# Definitions needed to rpcgen iprop-related files 19ISRC= iprop.h iprop_xdr.c 20KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 21CMD= grep -v "usr/src/cmd/krb5/iprop" > $@ 22 23CLOBBERFILES += $(TESTPROG) 24 25include ../../../Makefile.cmd 26include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 27 28POFILE = $(PROG).po 29POFILES = generic.po 30 31ROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY) 32 33DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1 -DKRB5_KRB4_COMPAT 34 35CPPFLAGS += -I. -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ 36 -I$(SRC)/uts/common/gssapi \ 37 -I$(SRC)/lib/krb5 \ 38 -I$(SRC)/lib/krb5/kadm5 \ 39 -I$(SRC)/lib/krb5/kadm5/srv \ 40 -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 41 -I$(KRB5IPROPDIR) \ 42 -I$(SRC)/uts/common/gssapi/include/ $(DEFS) 43 44CERRWARN += -_gcc=-Wno-implicit-function-declaration 45CERRWARN += -_gcc=-Wno-unused-variable 46CERRWARN += -_gcc=-Wno-parentheses 47CERRWARN += -_gcc=-Wno-unused-function 48 49# not linted 50SMATCH=off 51 52LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) 53LDLIBS += -lgss -L$(KRB5LIB) \ 54 -lmech_krb5 -lkadm5srv -lkdb -lnsl -lresolv -lbsm -lpam -lsocket 55 56.KEEP_STATE: 57 58all: $(PROG) 59 60$(PROG): $(OBJS) $(DERIVED_OBJS) 61 $(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS) 62 $(POST_PROCESS) 63 64# Rules to rpcgen-erate derived files from the iprop.x spec file 65iprop.h: $(KRB5IPROPDIR)/iprop.x 66 $(RM) $@ 67 $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 68 69iprop_xdr.c: iprop.h $(KRB5IPROPDIR)/iprop.x 70 $(RM) $@ 71 $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD) 72 73# Explicitly state the dependancy on iprop.h 74$(OBJS): iprop.h 75 76$(KRB5LIBPROG):= FILEMODE = 0500 77 78install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST) 79 80check: $(CHKMANIFEST) 81 82clean: 83 $(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC) 84 85include ../../../Makefile.targ 86 87$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 88 $(RM) $@ 89 $(CAT) $(POFILES) > $@ 90 91generic.po: FRC 92 $(RM) messages.po 93 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 94 $(SED) "/^domain/d" messages.po > $@ 95 $(RM) messages.po 96 97FRC: 98