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 7PROG1=kprop 8PROG2=kpropd 9PROG3=kprop_script 10PROG=$(PROG1) $(PROG2) $(PROG3) 11MANIFEST= krb5_prop.xml 12 13OBJS = \ 14 kprop.o\ 15 utils.o\ 16 kpropd.o \ 17 kpropd_rpc.o \ 18 iprop_xdr.o 19 20COMMONOBJS= utils.o 21COMMONSRCS= utils.c 22CLIENTOBJS= kprop.o 23CLIENTSRCS= kprop.c 24SERVEROBJS= kpropd.o kpropd_rpc.o 25SERVERSRCS= kpropd.c kpropd_rpc.c 26DERIVED_OBJS= iprop_xdr.o 27DERIVED_SRCS= iprop_xdr.c 28SRCS = $(OBJS:.o=.c) 29 30# Definitions needed to rpcgen iprop-related files 31ISRC= iprop.h iprop_xdr.c 32KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 33CMD= grep -v "usr/src/cmd/krb5/iprop" > $@ 34 35DEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \ 36 -DHAVE_COMPILE=1 \ 37 -DHAVE_STEP=1 38 39CLOBBERFILES += $(RSRC) 40 41include ../../Makefile.cmd 42include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 43 44ROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY) 45 46TEXT_DOMAIN = SUNW_OST_OSCMD 47POFILE = kprop.po 48POFILES = generic.po 49 50CFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE) 51CPPFLAGS += -I. \ 52 -I$(KRB5IPROPDIR) \ 53 -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 54 -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\ 55 -I$(SRC)/lib/krb5 \ 56 -I$(SRC)/lib/krb5/kadm5 \ 57 -I$(SRC)/uts/common/gssapi/mechs/krb5/include 58 59CERRWARN += -_gcc=-Wno-unused-variable 60CERRWARN += -_gcc=-Wno-unused-function 61CERRWARN += -_gcc=-Wno-implicit-function-declaration 62CERRWARN += -_gcc=-Wno-parentheses 63CERRWARN += -_gcc=-Wno-unused-value 64CERRWARN += -_gcc=-Wno-address 65 66# not linted 67SMATCH=off 68 69LDFLAGS += $(KRUNPATH) $(KERBRUNPATH) 70LDLIBS += -lmech_krb5 -lsocket 71$(PROG1) := LDLIBS += -L$(KRB5LIB) -lkadm5srv 72$(PROG2) := LDLIBS += -L$(KRB5LIB) -lnsl -lkdb -lkadm5clnt 73 74.KEEP_STATE: 75 76all: $(PROG) 77 78$(PROG1): $(CLIENTOBJS) $(COMMONOBJS) 79 $(LINK.c) $(CLIENTOBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 80 $(POST_PROCESS) 81 82$(PROG2): $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(DEPLIBS) 83 $(LINK.c) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 84 $(POST_PROCESS) 85 86# Rules to rpcgen-erate derived files from the iprop.x spec file 87iprop.h: $(KRB5IPROPDIR)/iprop.x 88 $(RM) $@ 89 $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 90 91iprop_xdr.c: iprop.h $(KRB5IPROPDIR)/iprop.x 92 $(RM) $@ 93 $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD) 94 95# Make dependencies explicit so make sees it. 96$(KRB5LIB)/$(PROG3): $(PROG3) 97$(OBJS): iprop.h 98 99install: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST) 100 101check: $(CHKMANIFEST) 102 103install_h: 104clean: 105 $(RM) $(CLIENTOBJS) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(PROG) $(ISRC) 106 107include ../../Makefile.targ 108 109$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 110 $(RM) $@ 111 $(CAT) $(POFILES) > $@ 112 113generic.po: FRC 114 $(RM) messages.po 115 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 116 $(SED) "/^domain/d" messages.po > $@ 117 $(RM) messages.po 118 119FRC: 120