17c478bd9Sstevel@tonic-gate# 2*a192e900Samaguire# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate# Use is subject to license terms. 47c478bd9Sstevel@tonic-gate# 57c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 67c478bd9Sstevel@tonic-gate# 77c478bd9Sstevel@tonic-gate 87c478bd9Sstevel@tonic-gatePROG1=kprop 97c478bd9Sstevel@tonic-gatePROG2=kpropd 107c478bd9Sstevel@tonic-gatePROG3=kprop_script 117c478bd9Sstevel@tonic-gatePROG=$(PROG1) $(PROG2) $(PROG3) 127c478bd9Sstevel@tonic-gateMANIFEST= krb5_prop.xml 13*a192e900SamaguireSVCMETHOD= svc-kdc.slave 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gateOBJS = \ 167c478bd9Sstevel@tonic-gate kprop.o\ 177c478bd9Sstevel@tonic-gate utils.o\ 187c478bd9Sstevel@tonic-gate kpropd.o \ 197c478bd9Sstevel@tonic-gate kpropd_rpc.o \ 207c478bd9Sstevel@tonic-gate iprop_xdr.o 217c478bd9Sstevel@tonic-gate 227c478bd9Sstevel@tonic-gateCOMMONOBJS= utils.o 237c478bd9Sstevel@tonic-gateCOMMONSRCS= utils.c 247c478bd9Sstevel@tonic-gateCLIENTOBJS= kprop.o 257c478bd9Sstevel@tonic-gateCLIENTSRCS= kprop.c 267c478bd9Sstevel@tonic-gateSERVEROBJS= kpropd.o kpropd_rpc.o 277c478bd9Sstevel@tonic-gateSERVERSRCS= kpropd.c kpropd_rpc.c 287c478bd9Sstevel@tonic-gateDERIVED_OBJS= iprop_xdr.o 297c478bd9Sstevel@tonic-gateDERIVED_SRCS= iprop_xdr.c 307c478bd9Sstevel@tonic-gateSRCS = $(OBJS:.o=.c) 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate# Definitions needed to rpcgen iprop-related files 337c478bd9Sstevel@tonic-gateISRC= iprop.h iprop_xdr.c 347c478bd9Sstevel@tonic-gateKRB5IPROPDIR= $(SRC)/cmd/krb5/iprop 357c478bd9Sstevel@tonic-gateCMD= grep -v "usr/src/cmd/krb5/iprop" > $@ 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateDEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 \ 387c478bd9Sstevel@tonic-gate -DHAVE_COMPILE=1 \ 397c478bd9Sstevel@tonic-gate -DHAVE_STEP=1 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateCLOBBERFILES += $(RSRC) 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 447c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_OSCMD 497c478bd9Sstevel@tonic-gatePOFILE = kprop.po 507c478bd9Sstevel@tonic-gatePOFILES = generic.po 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateCFLAGS += $(XESS) $(CCOPTS) $(DEFS) $(LOCALINCLUDE) 537c478bd9Sstevel@tonic-gateCPPFLAGS += -I. \ 547c478bd9Sstevel@tonic-gate -I$(KRB5IPROPDIR) \ 557c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 567c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5\ 577c478bd9Sstevel@tonic-gate -I$(SRC)/lib/krb5 \ 587c478bd9Sstevel@tonic-gate -I$(SRC)/lib/krb5/kadm5 \ 597c478bd9Sstevel@tonic-gate -I$(SRC)/uts/common/gssapi/mechs/krb5/include 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gateLDFLAGS += $(KRUNPATH) 627c478bd9Sstevel@tonic-gateLDLIBS += -lmech_krb5 -lsocket 637c478bd9Sstevel@tonic-gate$(PROG1) := LDLIBS += -L$(KRB5LIB) -lkadm5srv 647c478bd9Sstevel@tonic-gate$(PROG2) := LDLIBS += -L$(KRB5LIB) -lnsl -lkdb -lkadm5clnt 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate.KEEP_STATE: 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gateall: $(PROG) 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate$(PROG1): $(CLIENTOBJS) $(COMMONOBJS) 717c478bd9Sstevel@tonic-gate $(LINK.c) $(CLIENTOBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 727c478bd9Sstevel@tonic-gate $(POST_PROCESS) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate$(PROG2): $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(DEPLIBS) 757c478bd9Sstevel@tonic-gate $(LINK.c) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) -o $@ $(DEPLIBS) $(LDFLAGS) $(LDARGS) $(LDLIBS) 767c478bd9Sstevel@tonic-gate $(POST_PROCESS) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate# Rules to rpcgen-erate derived files from the iprop.x spec file 797c478bd9Sstevel@tonic-gateiprop.h: $(KRB5IPROPDIR)/iprop.x 807c478bd9Sstevel@tonic-gate $(RM) $@ 817c478bd9Sstevel@tonic-gate $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@ 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gateiprop_xdr.c: iprop.h $(KRB5IPROPDIR)/iprop.x 847c478bd9Sstevel@tonic-gate $(RM) $@ 857c478bd9Sstevel@tonic-gate $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate# Make dependencies explicit so make sees it. 887c478bd9Sstevel@tonic-gate$(KRB5LIB)/$(PROG3): $(PROG3) 897c478bd9Sstevel@tonic-gate$(OBJS): iprop.h 907c478bd9Sstevel@tonic-gate 91*a192e900Samaguireinstall: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gateinstall_h: 967c478bd9Sstevel@tonic-gateclean: 977c478bd9Sstevel@tonic-gate $(RM) $(CLIENTOBJS) $(SERVEROBJS) $(DERIVED_OBJS) $(COMMONOBJS) $(PROG) $(ISRC) 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gatelint: 1007c478bd9Sstevel@tonic-gate $(LINT.c) $(CLIENTSRCS) $(COMMONSRCS) $(LDLIBS) 1017c478bd9Sstevel@tonic-gate $(LINT.c) $(SERVERSRCS) $(DERIVED_SRCS) $(COMMONSRCS) $(LDLIBS) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1067c478bd9Sstevel@tonic-gate $(RM) $@ 1077c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gategeneric.po: FRC 1107c478bd9Sstevel@tonic-gate $(RM) messages.po 1117c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 1127c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1137c478bd9Sstevel@tonic-gate $(RM) messages.po 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gateFRC: 116