xref: /titanic_50/usr/src/cmd/krb5/kwarn/Makefile (revision 9acbbeaf2a1ffe5c14b244867d427714fab43c5c)
1#
2# Copyright 2005 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$(ROOTMANIFEST)		:= FILEMODE= 444
29
30POFILE = $(PROG).po
31POFILES = generic.po
32
33COPTFLAG +=	$(XESS) #-I$(KINCDIR)
34CPPFLAGS +=	-D_REENTRANT
35
36CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
37                 -I$(SRC)/lib/gss_mechs/mech_krb5 \
38                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
39                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include
40LDFLAGS += $(KRUNPATH)
41LDLIBS += $(KMECHLIB) -lnsl
42
43.KEEP_STATE:
44
45all: $(PROG) $(TESTPROG)
46
47$(PROG):	$(G_OBJS) $(KWARNDOBJS)
48	$(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
49	$(POST_PROCESS)
50
51$(TESTPROG):       $(G_OBJS) $(KWARNCOBJS)
52	$(LINK.c) $(KWARNCOBJS) $(G_OBJS) -o $@ $(LDLIBS)
53	$(POST_PROCESS)
54
55#  Rules to generate derived rpcgen files from kwarnd.x spec file.
56
57kwarnd.h:        kwarnd.x
58	$(RM) $@
59	$(RPCGEN) -M -h kwarnd.x > $@
60
61kwarnd_clnt.c:   kwarnd.x
62	$(RM) $@
63	$(RPCGEN) -M -l kwarnd.x > $@
64
65kwarnd_svc.c:    kwarnd.x
66	$(RM) $@
67	$(RPCGEN) -M -m kwarnd.x > $@
68
69kwarnd_xdr.c:    kwarnd.x
70	$(RM) $@
71	$(RPCGEN) -M -c kwarnd.x > $@
72
73$(OBJS): kwarnd.h
74
75# note that nightly depends on having all of the derived
76# .c files built here on 'make install', even though this
77# module doesn't use all of those files.
78install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
79
80check:	$(CHKMANIFEST)
81
82clean:
83	$(RM) $(OBJS) $(RSRC)
84
85lint: lint_SRCS
86
87include ../../Makefile.targ
88
89#additional dependencies
90
91$(LIBRARY) : $(OBJS)
92$(DYNLIB) : $(PICS)
93
94FRC:
95
96$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
97	$(RM) $@
98	$(CAT) $(POFILES) > $@
99
100generic.po: FRC
101	$(RM) messages.po
102	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
103	$(SED) "/^domain/d" messages.po > $@
104	$(RM) messages.po
105