xref: /titanic_52/usr/src/cmd/krb5/kwarn/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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
27TESTPROG = kwarndtest
28
29PROG= ktkt_warnd
30MANIFEST=	ktkt_warn.xml
31
32KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
33KWARNTOBJS = kwarndtest.o
34
35G_OBJS   = kwarnd_xdr.o
36
37OBJS	= $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS)
38SRCS	= $(OBJS:.o=.c)
39RSRC	= kwarnd_xdr.c kwarnd_svc.c kwarnd.h
40
41CLOBBERFILES += $(TESTPROG)
42
43include ../../Makefile.cmd
44include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
45
46ROOTMANIFESTDIR=	$(ROOTSVCNETWORKSECURITY)
47
48POFILE = $(PROG).po
49POFILES = generic.po
50
51COPTFLAG +=	$(XESS) #-I$(KINCDIR)
52CPPFLAGS +=	-D_REENTRANT
53
54CERRWARN +=	-_gcc=-Wno-unused-variable
55CERRWARN +=	-_gcc=-Wno-unused-function
56CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
57CERRWARN +=	-_gcc=-Wno-parentheses
58
59CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
60                 -I$(SRC)/lib/gss_mechs/mech_krb5 \
61                 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
62                 -I$(SRC)/uts/common/gssapi/mechs/krb5/include
63
64ktkt_warnd :=	MAPFILES =	$(MAPFILE.INT) $(MAPFILE.NGB)
65ktkt_warnd :=	LDFLAGS +=	$(KRUNPATH) $(MAPFILES:%=-M%)
66
67LDFLAGS +=	$(KRUNPATH)
68LDLIBS +=	$(KMECHLIB) -lnsl
69
70.KEEP_STATE:
71
72all: $(PROG) $(TESTPROG)
73
74$(PROG):	$(G_OBJS) $(KWARNDOBJS) $$(MAPFILES)
75	$(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
76	$(POST_PROCESS)
77
78# the client entry points (kwarn_*_warning) are now avail in mech_krb5.so
79$(TESTPROG):    $(KWARNTOBJS)
80	$(LINK.c) $(KWARNTOBJS) -o $@ $(LDLIBS)
81	$(POST_PROCESS)
82
83#  Rules to generate derived rpcgen files from kwarnd.x spec file.
84
85kwarnd.h:        kwarnd.x
86	$(RM) $@
87	$(RPCGEN) -M -h kwarnd.x > $@
88
89kwarnd_svc.c:    kwarnd.x
90	$(RM) $@
91	$(RPCGEN) -M -m kwarnd.x > $@
92
93kwarnd_xdr.c:    kwarnd.x
94	$(RM) $@
95	$(RPCGEN) -M -c kwarnd.x > $@
96
97$(OBJS): kwarnd.h
98
99# note that nightly depends on having all of the derived
100# .c files built here on 'make install', even though this
101# module doesn't use all of those files.
102install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
103
104check:	$(CHKMANIFEST)
105
106clean:
107	$(RM) $(OBJS) $(RSRC)
108
109lint: lint_SRCS
110
111include ../../Makefile.targ
112
113#additional dependencies
114
115$(LIBRARY) : $(OBJS)
116$(DYNLIB) : $(PICS)
117
118FRC:
119
120$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
121	$(RM) $@
122	$(CAT) $(POFILES) > $@
123
124generic.po: FRC
125	$(RM) messages.po
126	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
127	$(SED) "/^domain/d" messages.po > $@
128	$(RM) messages.po
129