xref: /illumos-gate/usr/src/cmd/krb5/kproplog/Makefile (revision ff67a31b)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# Copyright 2004 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		=	kproplog
87c478bd9Sstevel@tonic-gate
97c478bd9Sstevel@tonic-gateOBJS		=	kproplog.o
107c478bd9Sstevel@tonic-gateDERIVED_OBJS	=	iprop_xdr.o
117c478bd9Sstevel@tonic-gate
127c478bd9Sstevel@tonic-gateSRCS=	$(OBJS:.o=.c)
137c478bd9Sstevel@tonic-gateSRCS+=	$(DERIVED_OBJS:.o=.c)
147c478bd9Sstevel@tonic-gate
157c478bd9Sstevel@tonic-gateRSRC=	kproplog.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-gateinclude	../../Makefile.cmd
237c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_OSCMD
267c478bd9Sstevel@tonic-gatePOFILE	= kproplog.po
277c478bd9Sstevel@tonic-gatePOFILES	= generic.po
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateLDFLAGS		+=	-R$(KRB5RUNPATH) $(KRUNPATH)
307c478bd9Sstevel@tonic-gateLDLIBS		+=	-L$(KRB5LIB) $(KLIB) -lnsl -lkdb -lkadm5clnt
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateCPPFLAGS	+=	-I. -I$(SRC)/lib/krb5 \
337c478bd9Sstevel@tonic-gate			-I$(KRB5IPROPDIR) \
347c478bd9Sstevel@tonic-gate			-I$(SRC)/lib/gss_mechs/mech_krb5/include \
357c478bd9Sstevel@tonic-gate			-I$(SRC)/uts/common/gssapi/mechs/krb5/include
367c478bd9Sstevel@tonic-gate
377014882cSRichard LoweCERRWARN	+=	-_gcc=-Wno-unused-variable
387014882cSRichard LoweCERRWARN	+=	-_gcc=-Wno-unused-function
397014882cSRichard LoweCERRWARN	+=	-_gcc=-Wno-implicit-function-declaration
407014882cSRichard Lowe
41*5661bb76SJohn Levon# not linted
42*5661bb76SJohn LevonSMATCH=off
43*5661bb76SJohn Levon
447c478bd9Sstevel@tonic-gateall:		$(PROG)
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS) $(DERIVED_OBJS)
477c478bd9Sstevel@tonic-gate	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
487c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate# Rules to rpcgen-erate derived files from the iprop.x spec file
517c478bd9Sstevel@tonic-gateiprop.h:	$(KRB5IPROPDIR)/iprop.x
527c478bd9Sstevel@tonic-gate	$(RM) $@
537c478bd9Sstevel@tonic-gate	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateiprop_xdr.c:	iprop.h $(KRB5IPROPDIR)/iprop.x
567c478bd9Sstevel@tonic-gate	$(RM) $@
577c478bd9Sstevel@tonic-gate	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gate# Explicitly state the dependancy on iprop.h
607c478bd9Sstevel@tonic-gate$(OBJS): iprop.h
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateinstall:	$(KRB5SBINPROG)
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateclean:
657c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
707c478bd9Sstevel@tonic-gate	$(RM) $@
717c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gategeneric.po:
747c478bd9Sstevel@tonic-gate	$(RM) messages.po
757c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
767c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
777c478bd9Sstevel@tonic-gate	$(RM) messages.po
78