xref: /illumos-gate/usr/src/cmd/krb5/kadmin/server/Makefile (revision 5661bb7641e85c46713da7a3002b29ecd2c3daf0)
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#
5*5661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
67c478bd9Sstevel@tonic-gate
77c478bd9Sstevel@tonic-gatePROG= kadmind
87c478bd9Sstevel@tonic-gateMANIFEST=	kadmin.xml
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gateOBJS	= kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o misc.o server_glue_v1.o \
117c478bd9Sstevel@tonic-gate          ipropd_svc.o
127c478bd9Sstevel@tonic-gate
137c478bd9Sstevel@tonic-gateDERIVED_OBJS= iprop_xdr.o
147c478bd9Sstevel@tonic-gate
157c478bd9Sstevel@tonic-gateSRCS=	$(OBJS:.o=.c)
167c478bd9Sstevel@tonic-gateSRCS+=	$(DERIVED_OBJS:.o=.c)
177c478bd9Sstevel@tonic-gate
187c478bd9Sstevel@tonic-gate# Definitions needed to rpcgen iprop-related files
197c478bd9Sstevel@tonic-gateISRC= iprop.h iprop_xdr.c
207c478bd9Sstevel@tonic-gateKRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
217c478bd9Sstevel@tonic-gateCMD= grep -v "usr/src/cmd/krb5/iprop" > $@
227c478bd9Sstevel@tonic-gate
237c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG)
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd
267c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
297c478bd9Sstevel@tonic-gatePOFILES = generic.po
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateDEFS = -DHAVE_LIBSOCKET=1 -DHAVE_LIBNSL=1 -DHAVE_COMPILE=1 -DHAVE_STEP=1  -DKRB5_KRB4_COMPAT
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateCPPFLAGS += -I. -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
36ba7b222eSGlenn Barry		-I$(SRC)/uts/common/gssapi \
377c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5 \
387c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5/kadm5 \
397c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/krb5/kadm5/srv \
407c478bd9Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
417c478bd9Sstevel@tonic-gate		-I$(KRB5IPROPDIR) \
427c478bd9Sstevel@tonic-gate		-I$(SRC)/uts/common/gssapi/include/ $(DEFS)
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR)
457c478bd9Sstevel@tonic-gate
467014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration
477014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
487014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
497014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
507014882cSRichard Lowe
51*5661bb76SJohn Levon# not linted
52*5661bb76SJohn LevonSMATCH=off
53*5661bb76SJohn Levon
5467e3a03eSrieLDFLAGS += $(KRUNPATH) $(KERBRUNPATH)
557c478bd9Sstevel@tonic-gateLDLIBS += -lgss -L$(KRB5LIB) \
567c478bd9Sstevel@tonic-gate	-lmech_krb5 -lkadm5srv -lkdb -lnsl -lresolv -lbsm -lpam -lsocket
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate.KEEP_STATE:
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gateall: $(PROG)
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS) $(DERIVED_OBJS)
637c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
647c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate# Rules to rpcgen-erate derived files from the iprop.x spec file
677c478bd9Sstevel@tonic-gateiprop.h:	$(KRB5IPROPDIR)/iprop.x
687c478bd9Sstevel@tonic-gate	$(RM) $@
697c478bd9Sstevel@tonic-gate	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateiprop_xdr.c:	iprop.h $(KRB5IPROPDIR)/iprop.x
727c478bd9Sstevel@tonic-gate	$(RM) $@
737c478bd9Sstevel@tonic-gate	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate# Explicitly state the dependancy on iprop.h
767c478bd9Sstevel@tonic-gate$(OBJS): iprop.h
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gate$(KRB5LIBPROG):=	FILEMODE = 0500
797c478bd9Sstevel@tonic-gate
80a192e900Samaguireinstall: $(KRB5LIBPROG) $(ROOTSVCMETHOD) $(ROOTMANIFEST)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateclean:
857c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gatelint: lint_SRCS
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
927c478bd9Sstevel@tonic-gate	$(RM) $@
937c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gategeneric.po: FRC
967c478bd9Sstevel@tonic-gate	$(RM) messages.po
977c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
987c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
997c478bd9Sstevel@tonic-gate	$(RM) messages.po
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gateFRC:
102