xref: /illumos-gate/usr/src/cmd/krb5/kwarn/Makefile (revision c2785286330b58810071fc24f6ca69f401682dff)
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
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_xdr.c:    kwarnd.x
87	$(RM) $@
88	$(RPCGEN) -M -c kwarnd.x > $@
89
90$(OBJS): kwarnd.h
91
92# note that nightly depends on having all of the derived
93# .c files built here on 'make install', even though this
94# module doesn't use all of those files.
95install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
96
97check:	$(CHKMANIFEST)
98
99clean:
100	$(RM) $(OBJS) $(RSRC)
101
102lint: lint_SRCS
103
104include ../../Makefile.targ
105
106#additional dependencies
107
108$(LIBRARY) : $(OBJS)
109$(DYNLIB) : $(PICS)
110
111FRC:
112
113$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
114	$(RM) $@
115	$(CAT) $(POFILES) > $@
116
117generic.po: FRC
118	$(RM) messages.po
119	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
120	$(SED) "/^domain/d" messages.po > $@
121	$(RM) messages.po
122