xref: /illumos-gate/usr/src/cmd/krb5/kproplog/Makefile (revision 3db86aab554edbb4244c8d1a1c90f152eee768af)
1#
2# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7
8PROG		=	kproplog
9
10OBJS		=	kproplog.o
11DERIVED_OBJS	=	iprop_xdr.o
12
13SRCS=	$(OBJS:.o=.c)
14SRCS+=	$(DERIVED_OBJS:.o=.c)
15
16RSRC=	kproplog.c
17
18# Definitions needed to rpcgen iprop-related files
19ISRC= iprop.h iprop_xdr.c
20KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
21CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
22
23include	../../Makefile.cmd
24include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
25
26TEXT_DOMAIN = SUNW_OST_OSCMD
27POFILE	= kproplog.po
28POFILES	= generic.po
29
30LDFLAGS		+=	-R$(KRB5RUNPATH) $(KRUNPATH)
31LDLIBS		+=	-L$(KRB5LIB) $(KLIB) -lnsl -lkdb -lkadm5clnt
32
33CPPFLAGS	+=	-I. -I$(SRC)/lib/krb5 \
34			-I$(KRB5IPROPDIR) \
35			-I$(SRC)/lib/gss_mechs/mech_krb5/include \
36			-I$(SRC)/uts/common/gssapi/mechs/krb5/include
37
38all:		$(PROG)
39
40$(PROG):	$(OBJS) $(DERIVED_OBJS)
41	$(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
42	$(POST_PROCESS)
43
44# Rules to rpcgen-erate derived files from the iprop.x spec file
45iprop.h:	$(KRB5IPROPDIR)/iprop.x
46	$(RM) $@
47	$(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
48
49iprop_xdr.c:	iprop.h $(KRB5IPROPDIR)/iprop.x
50	$(RM) $@
51	$(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
52
53# Explicitly state the dependancy on iprop.h
54$(OBJS): iprop.h
55
56install:	$(KRB5SBINPROG)
57
58lint:	$(ISRC) .WAIT lint_SRCS
59
60clean:
61	$(RM) $(OBJS) $(DERIVED_OBJS) $(ISRC)
62
63include ../../Makefile.targ
64
65$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
66	$(RM) $@
67	$(CAT) $(POFILES) > $@
68
69generic.po:
70	$(RM) messages.po
71	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
72	$(SED) "/^domain/d" messages.po > $@
73	$(RM) messages.po
74