xref: /titanic_41/usr/src/cmd/krb5/kadmin/server/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
17c478bd9Sstevel@tonic-gate#
2ba7b222eSGlenn Barry# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate# Use is subject to license terms.
47c478bd9Sstevel@tonic-gate#
57c478bd9Sstevel@tonic-gate
67c478bd9Sstevel@tonic-gatePROG= kadmind
77c478bd9Sstevel@tonic-gateMANIFEST=	kadmin.xml
87c478bd9Sstevel@tonic-gate
97c478bd9Sstevel@tonic-gateOBJS	= kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o misc.o server_glue_v1.o \
107c478bd9Sstevel@tonic-gate          ipropd_svc.o
117c478bd9Sstevel@tonic-gate
127c478bd9Sstevel@tonic-gateDERIVED_OBJS= iprop_xdr.o
137c478bd9Sstevel@tonic-gate
147c478bd9Sstevel@tonic-gateSRCS=	$(OBJS:.o=.c)
157c478bd9Sstevel@tonic-gateSRCS+=	$(DERIVED_OBJS:.o=.c)
167c478bd9Sstevel@tonic-gate
177c478bd9Sstevel@tonic-gate# Definitions needed to rpcgen iprop-related files
187c478bd9Sstevel@tonic-gateISRC= iprop.h iprop_xdr.c
197c478bd9Sstevel@tonic-gateKRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
207c478bd9Sstevel@tonic-gateCMD= grep -v "usr/src/cmd/krb5/iprop" > $@
217c478bd9Sstevel@tonic-gate
227c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG)
237c478bd9Sstevel@tonic-gate
247c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd
257c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
287c478bd9Sstevel@tonic-gatePOFILES = generic.po
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateDEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1  -DKRB5_KRB4_COMPAT
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateCPPFLAGS += -I. -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
35ba7b222eSGlenn Barry		-I$(SRC)/uts/common/gssapi \
367c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5 \
377c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5/kadm5 \
387c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5/kadm5/srv \
397c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
407c478bd9Sstevel@tonic-gate		-I$(KRB5IPROPDIR) \
417c478bd9Sstevel@tonic-gate		-I$(SRC)/uts/common/gssapi/include/ $(DEFS)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR)
447c478bd9Sstevel@tonic-gate
45*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration
46*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
47*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
48*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
49*7014882cSRichard Lowe
5067e3a03eSrieLDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
517c478bd9Sstevel@tonic-gateLDLIBS += -lgss -L$(KRB5LIB) \
527c478bd9Sstevel@tonic-gate	-lmech_krb5 -lkadm5srv -lkdb -lnsl -lresolv -lbsm -lpam -lsocket
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate.KEEP_STATE:
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gateall: $(PROG)
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS) $(DERIVED_OBJS)
597c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
607c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate# Rules to rpcgen-erate derived files from the iprop.x spec file
637c478bd9Sstevel@tonic-gateiprop.h:	$(KRB5IPROPDIR)/iprop.x
647c478bd9Sstevel@tonic-gate	$(RM) $@
657c478bd9Sstevel@tonic-gate	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gateiprop_xdr.c:	iprop.h $(KRB5IPROPDIR)/iprop.x
687c478bd9Sstevel@tonic-gate	$(RM) $@
697c478bd9Sstevel@tonic-gate	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate# Explicitly state the dependancy on iprop.h
727c478bd9Sstevel@tonic-gate$(OBJS): iprop.h
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gate$(KRB5LIBPROG):=	FILEMODE = 0500
757c478bd9Sstevel@tonic-gate
76a192e900Samaguireinstall: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gateclean:
817c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatelint: lint_SRCS
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
887c478bd9Sstevel@tonic-gate	$(RM) $@
897c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gategeneric.po: FRC
927c478bd9Sstevel@tonic-gate	$(RM) messages.po
937c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
947c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
957c478bd9Sstevel@tonic-gate	$(RM) messages.po
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateFRC:
98