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