xref: /illumos-gate/usr/src/cmd/krb5/kwarn/Makefile (revision 982d85fc28969b583003622c0bd41d9db0ccecd7)
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 2007 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
35KWARNCOBJS = kwarndtest.o kwarnd_clnt.o \
36		kwarnd_clnt_stubs.o kwarnd_handle.o
37G_OBJS   = kwarnd_xdr.o
38
39OBJS	= $(KWARNDOBJS) $(KWARNCOBJS) $(G_OBJS)
40SRCS	= $(OBJS:.o=.c)
41RSRC	= kwarnd.h kwarnd_clnt.c kwarnd_svc.c 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$(TESTPROG):       $(G_OBJS) $(KWARNCOBJS)
76	$(LINK.c) $(KWARNCOBJS) $(G_OBJS) -o $@ $(LDLIBS)
77	$(POST_PROCESS)
78
79#  Rules to generate derived rpcgen files from kwarnd.x spec file.
80
81kwarnd.h:        kwarnd.x
82	$(RM) $@
83	$(RPCGEN) -M -h kwarnd.x > $@
84
85kwarnd_clnt.c:   kwarnd.x
86	$(RM) $@
87	$(RPCGEN) -M -l 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