Merge illumos-gate
[unleashed.git] / usr / src / cmd / krb5 / kwarn / Makefile
blobcc868f4d90b4d3185470edd4e9dfe986744d32de
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
26 # Copyright (c) 2018, Joyent, Inc.
28 TESTPROG = kwarndtest
30 PROG= ktkt_warnd
31 MANIFEST= ktkt_warn.xml
33 KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
34 KWARNTOBJS = kwarndtest.o
36 G_OBJS = kwarnd_xdr.o
38 OBJS = $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS)
39 SRCS = $(OBJS:.o=.c)
40 RSRC = kwarnd_xdr.c kwarnd_svc.c kwarnd.h
42 CLOBBERFILES += $(TESTPROG)
44 include ../../Makefile.cmd
45 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
47 ROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY)
49 POFILE = $(PROG).po
50 POFILES = generic.po
52 COPTFLAG += #-I$(KINCDIR)
54 CERRWARN += -Wno-unused-variable
55 CERRWARN += -Wno-unused-function
56 CERRWARN += -Wno-implicit-function-declaration
57 CERRWARN += -Wno-parentheses
59 # not linted
60 SMATCH=off
62 CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
63 -I$(SRC)/lib/gss_mechs/mech_krb5 \
64 -I$(SRC)/lib/gss_mechs/mech_krb5/include \
65 -I$(SRC)/uts/common/gssapi/mechs/krb5/include
67 ktkt_warnd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
68 ktkt_warnd := LDFLAGS += $(KRUNPATH) $(MAPFILES:%=-Wl,-M%)
70 LDFLAGS += $(KRUNPATH)
71 LDLIBS += $(KMECHLIB)
73 .KEEP_STATE:
75 all: $(PROG) $(TESTPROG)
77 $(PROG): $(G_OBJS) $(KWARNDOBJS) $$(MAPFILES)
78 $(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS)
79 $(POST_PROCESS)
81 # the client entry points (kwarn_*_warning) are now avail in mech_krb5.so
82 $(TESTPROG): $(KWARNTOBJS)
83 $(LINK.c) $(KWARNTOBJS) -o $@ $(LDLIBS)
84 $(POST_PROCESS)
86 # Rules to generate derived rpcgen files from kwarnd.x spec file.
88 kwarnd.h: kwarnd.x
89 $(RM) $@
90 $(RPCGEN) -M -h kwarnd.x > $@
92 kwarnd_svc.c: kwarnd.x
93 $(RM) $@
94 $(RPCGEN) -M -m kwarnd.x > $@
96 kwarnd_xdr.c: kwarnd.x
97 $(RM) $@
98 $(RPCGEN) -M -c kwarnd.x > $@
100 $(OBJS): kwarnd.h
102 # note that nightly depends on having all of the derived
103 # .c files built here on 'make install', even though this
104 # module doesn't use all of those files.
105 install: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST)
107 check: $(CHKMANIFEST)
109 clean:
110 $(RM) $(OBJS) $(RSRC)
113 include ../../Makefile.targ
115 #additional dependencies
117 $(LIBRARY) : $(OBJS)
118 $(DYNLIB) : $(PICS)
120 FRC:
122 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
123 $(RM) $@
124 $(CAT) $(POFILES) > $@
126 generic.po: FRC
127 $(RM) messages.po
128 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
129 $(SED) "/^domain/d" messages.po > $@
130 $(RM) messages.po