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