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