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