17c478bd9Sstevel@tonic-gate# 27c64d375Smp153739# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate# Use is subject to license terms. 47c478bd9Sstevel@tonic-gate# 55661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 67c478bd9Sstevel@tonic-gate 77c478bd9Sstevel@tonic-gatePROG1=kprop 87c478bd9Sstevel@tonic-gatePROG2=kpropd 97c478bd9Sstevel@tonic-gatePROG3=kprop_script 107c478bd9Sstevel@tonic-gatePROG=$(PROG1) $(PROG2) $(PROG3) 117c478bd9Sstevel@tonic-gateMANIFEST= krb5_prop.xml 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gateOBJS = \ 147c478bd9Sstevel@tonic-gate kprop.o\ 157c478bd9Sstevel@tonic-gate utils.o\ 167c478bd9Sstevel@tonic-gate kpropd.o \ 177c478bd9Sstevel@tonic-gate kpropd_rpc.o \ 187c478bd9Sstevel@tonic-gate iprop_xdr.o 197c478bd9Sstevel@tonic-gate 207c478bd9Sstevel@tonic-gateCOMMONOBJS= utils.o 217c478bd9Sstevel@tonic-gateCOMMONSRCS= utils.c 227c478bd9Sstevel@tonic-gateCLIENTOBJS= kprop.o 237c478bd9Sstevel@tonic-gateCLIENTSRCS= kprop.c 247c478bd9Sstevel@tonic-gateSERVEROBJS= kpropd.o kpropd_rpc.o 257c478bd9Sstevel@tonic-gateSERVERSRCS= kpropd.c kpropd_rpc.c 267c478bd9Sstevel@tonic-gateDERIVED_OBJS= iprop_xdr.o 277c478bd9Sstevel@tonic-gateDERIVED_SRCS= iprop_xdr.c 287c478bd9Sstevel@tonic-gateSRCS = $(OBJS:.o=.c) 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate# Definitions needed to rpcgen iprop-related files 317c478bd9Sstevel@tonic-gateISRC= iprop.h iprop_xdr.c 327c478bd9Sstevel@tonic-gateKRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 337c478bd9Sstevel@tonic-gateCMD= grep -v "usr/src/cmd/krb5/iprop" > $@ 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateDEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \ 367c478bd9Sstevel@tonic-gate -DHAVE_COMPILE=1 \ 377c478bd9Sstevel@tonic-gate -DHAVE_STEP=1 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateCLOBBERFILES += $(RSRC) 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 427c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY) 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_OSCMD 477c478bd9Sstevel@tonic-gatePOFILE = kprop.po 487c478bd9Sstevel@tonic-gatePOFILES = generic.po 497c478bd9Sstevel@tonic-gate 50*d17be682SRichard LoweCFLAGS += $(CCOPTS) $(DEFS) $(LOCALINCLUDE) 517c478bd9Sstevel@tonic-gateCPPFLAGS += -I. \ 527c478bd9Sstevel@tonic-gate -I$(KRB5IPROPDIR) \ 537c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 547c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\ 557c478bd9Sstevel@tonic-gate -I$(SRC)/lib/krb5 \ 567c478bd9Sstevel@tonic-gate -I$(SRC)/lib/krb5/kadm5 \ 577c478bd9Sstevel@tonic-gate -I$(SRC)/uts/common/gssapi/mechs/krb5/include 587c478bd9Sstevel@tonic-gate 597014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 607014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 617014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 627014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 637014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 647014882cSRichard LoweCERRWARN += -_gcc=-Wno-address 657014882cSRichard Lowe 665661bb76SJohn Levon# not linted 675661bb76SJohn LevonSMATCH=off 685661bb76SJohn Levon 6967e3a03eSrieLDFLAGS += $(KRUNPATH) $(KERBRUNPATH) 707c478bd9Sstevel@tonic-gateLDLIBS += -lmech_krb5 -lsocket 717c478bd9Sstevel@tonic-gate$(PROG1) := LDLIBS += -L$(KRB5LIB) -lkadm5srv 727c478bd9Sstevel@tonic-gate$(PROG2) := LDLIBS += -L$(KRB5LIB) -lnsl -lkdb -lkadm5clnt 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate.KEEP_STATE: 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateall: $(PROG) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate$(PROG1): $(CLIENTOBJS) $(COMMONOBJS) 797c478bd9Sstevel@tonic-gate $(LINK.c) $(CLIENTOBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 807c478bd9Sstevel@tonic-gate $(POST_PROCESS) 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate$(PROG2): $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(DEPLIBS) 837c478bd9Sstevel@tonic-gate $(LINK.c) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 847c478bd9Sstevel@tonic-gate $(POST_PROCESS) 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate# Rules to rpcgen-erate derived files from the iprop.x spec file 877c478bd9Sstevel@tonic-gateiprop.h: $(KRB5IPROPDIR)/iprop.x 887c478bd9Sstevel@tonic-gate $(RM) $@ 897c478bd9Sstevel@tonic-gate $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateiprop_xdr.c: iprop.h $(KRB5IPROPDIR)/iprop.x 927c478bd9Sstevel@tonic-gate $(RM) $@ 937c478bd9Sstevel@tonic-gate $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate# Make dependencies explicit so make sees it. 967c478bd9Sstevel@tonic-gate$(KRB5LIB)/$(PROG3): $(PROG3) 977c478bd9Sstevel@tonic-gate$(OBJS): iprop.h 987c478bd9Sstevel@tonic-gate 99a192e900Samaguireinstall: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gateinstall_h: 1047c478bd9Sstevel@tonic-gateclean: 1057c478bd9Sstevel@tonic-gate $(RM) $(CLIENTOBJS) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(PROG) $(ISRC) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1107c478bd9Sstevel@tonic-gate $(RM) $@ 1117c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gategeneric.po: FRC 1147c478bd9Sstevel@tonic-gate $(RM) messages.po 1157c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 1167c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1177c478bd9Sstevel@tonic-gate $(RM) messages.po 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gateFRC: 120