xref: /illumos-gate/usr/src/cmd/krb5/kwarn/Makefile (revision 613b28719c10e84c1202c1045df44d77767de21d)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29TESTPROG = kwarndtest
30
31PROG= ktkt_warnd
32MANIFEST=	ktkt_warn.xml
33
34KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
35KWARNTOBJS = kwarndtest.o
36
37G_OBJS   = kwarnd_xdr.o
38
39OBJS	= $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS)
40SRCS	= $(OBJS:.o=.c)
41RSRC	= kwarnd_xdr.c kwarnd_svc.c kwarnd.h
42
43CLOBBERFILES += $(TESTPROG)
44
45include ../../Makefile.cmd
46include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
47
48ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
49
50POFILE = $(PROG).po
51POFILES = generic.po
52
53COPTFLAG +=	$(XESS) #-I$(KINCDIR)
54CPPFLAGS +=	-D_REENTRANT
55
56CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
57                 -I$(SRC)/lib/gss_mechs/mech_krb5 \
58                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
59                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include
60
61ktkt_warnd :=	MAPFILES =	$(MAPFILE.INT) $(MAPFILE.NGB)
62ktkt_warnd :=	LDFLAGS +=	$(KRUNPATH) $(MAPFILES:%=-M%)
63
64LDFLAGS +=	$(KRUNPATH)
65LDLIBS +=	$(KMECHLIB) -lnsl
66
67.KEEP_STATE:
68
69all: $(PROG) $(TESTPROG)
70
71$(PROG):	$(G_OBJS) $(KWARNDOBJS) $$(MAPFILES)
72	$(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
73	$(POST_PROCESS)
74
75# the client entry points (kwarn_*_warning) are now avail in mech_krb5.so
76$(TESTPROG):    $(KWARNTOBJS)
77	$(LINK.c) $(KWARNTOBJS) -o $@ $(LDLIBS)
78	$(POST_PROCESS)
79
80#  Rules to generate derived rpcgen files from kwarnd.x spec file.
81
82kwarnd.h:        kwarnd.x
83	$(RM) $@
84	$(RPCGEN) -M -h kwarnd.x > $@
85
86kwarnd_svc.c:    kwarnd.x
87	$(RM) $@
88	$(RPCGEN) -M -m kwarnd.x > $@
89
90kwarnd_xdr.c:    kwarnd.x
91	$(RM) $@
92	$(RPCGEN) -M -c kwarnd.x > $@
93
94$(OBJS): kwarnd.h
95
96# note that nightly depends on having all of the derived
97# .c files built here on 'make install', even though this
98# module doesn't use all of those files.
99install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
100
101check:	$(CHKMANIFEST)
102
103clean:
104	$(RM) $(OBJS) $(RSRC)
105
106lint: lint_SRCS
107
108include ../../Makefile.targ
109
110#additional dependencies
111
112$(LIBRARY) : $(OBJS)
113$(DYNLIB) : $(PICS)
114
115FRC:
116
117$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
118	$(RM) $@
119	$(CAT) $(POFILES) > $@
120
121generic.po: FRC
122	$(RM) messages.po
123	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
124	$(SED) "/^domain/d" messages.po > $@
125	$(RM) messages.po
126