xref: /illumos-gate/usr/src/cmd/krb5/kwarn/Makefile (revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95)
1#
2# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# ident	"%Z%%M%	%I%	%E% SMI"
6#
7
8TESTPROG = kwarndtest
9
10PROG= ktkt_warnd
11MANIFEST=	ktkt_warn.xml
12
13KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
14KWARNCOBJS = kwarndtest.o kwarnd_clnt.o \
15		kwarnd_clnt_stubs.o kwarnd_handle.o
16G_OBJS   = kwarnd_xdr.o
17
18OBJS	= $(KWARNDOBJS) $(KWARNCOBJS) $(G_OBJS)
19SRCS	= $(OBJS:.o=.c)
20RSRC	= kwarnd.h kwarnd_clnt.c kwarnd_svc.c kwarnd_xdr.c
21
22CLOBBERFILES += $(TESTPROG)
23
24include ../../Makefile.cmd
25include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
26
27ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
28
29POFILE = $(PROG).po
30POFILES = generic.po
31
32COPTFLAG +=	$(XESS) #-I$(KINCDIR)
33CPPFLAGS +=	-D_REENTRANT
34
35CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
36                 -I$(SRC)/lib/gss_mechs/mech_krb5 \
37                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
38                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include
39LDFLAGS += $(KRUNPATH)
40LDLIBS += $(KMECHLIB) -lnsl
41
42.KEEP_STATE:
43
44all: $(PROG) $(TESTPROG)
45
46$(PROG):	$(G_OBJS) $(KWARNDOBJS)
47	$(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
48	$(POST_PROCESS)
49
50$(TESTPROG):       $(G_OBJS) $(KWARNCOBJS)
51	$(LINK.c) $(KWARNCOBJS) $(G_OBJS) -o $@ $(LDLIBS)
52	$(POST_PROCESS)
53
54#  Rules to generate derived rpcgen files from kwarnd.x spec file.
55
56kwarnd.h:        kwarnd.x
57	$(RM) $@
58	$(RPCGEN) -M -h kwarnd.x > $@
59
60kwarnd_clnt.c:   kwarnd.x
61	$(RM) $@
62	$(RPCGEN) -M -l kwarnd.x > $@
63
64kwarnd_svc.c:    kwarnd.x
65	$(RM) $@
66	$(RPCGEN) -M -m kwarnd.x > $@
67
68kwarnd_xdr.c:    kwarnd.x
69	$(RM) $@
70	$(RPCGEN) -M -c kwarnd.x > $@
71
72$(OBJS): kwarnd.h
73
74# note that nightly depends on having all of the derived
75# .c files built here on 'make install', even though this
76# module doesn't use all of those files.
77install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
78
79check:	$(CHKMANIFEST)
80
81clean:
82	$(RM) $(OBJS) $(RSRC)
83
84lint: lint_SRCS
85
86include ../../Makefile.targ
87
88#additional dependencies
89
90$(LIBRARY) : $(OBJS)
91$(DYNLIB) : $(PICS)
92
93FRC:
94
95$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
96	$(RM) $@
97	$(CAT) $(POFILES) > $@
98
99generic.po: FRC
100	$(RM) messages.po
101	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
102	$(SED) "/^domain/d" messages.po > $@
103	$(RM) messages.po
104