Merge illumos-gate
[unleashed.git] / usr / src / cmd / gss / gssd / Makefile
blobd21d8c0f9d834049b8663b35f558176d93bb8d25
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
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright (c) 2018, Joyent, Inc.
27 TESTPROG = gssdtest
29 OUTPUT_OPTION = -I.
31 PROG= gssd
33 MANIFEST= gss.xml
35 GSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
36 GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
37 gssd_handle.o
39 GD_OBJS = gssd_svc.o
40 GC_OBJS = gssd_clnt.o
41 G_OBJS = gssd_xdr.o
42 GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
43 GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
45 ROBJS = $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
46 OBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
47 SRCS = $(OBJS:.o=.c)
48 RSRC = $(ROBJS:.o=.c)
49 RSRC += gssd.h
51 CLOBBERFILES += $(TESTPROG)
53 include ../../Makefile.cmd
55 ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC)
57 TEXT_DOMAIN = SUNW_OST_NETRPC
58 POFILE = $(PROG).po
59 POFILES = generic.po
62 # Override $ROOTLIB
64 ROOTLIB= $(ROOT)/usr/lib/gss
66 DIRS= $(ROOTLIB)
68 CPPFLAGS += -I$(SRC)/uts/common/gssapi/include
70 CERRWARN += -Wno-unused-variable
71 CERRWARN += -Wno-implicit-function-declaration
72 CERRWARN += -Wno-parentheses
73 CERRWARN += -Wno-uninitialized
75 # not linted
76 SMATCH=off
78 LDLIBS += -lgss
80 gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
81 gssd := LDFLAGS += $(MAPFILES:%=-Wl,-M%)
83 $(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
85 .KEEP_STATE:
87 all: $(PROG) $(TESTPROG)
89 $(ROOTLIB):
90 $(INS.dir)
92 $(ROOTLIB)/%: %
93 $(INS.file)
95 gssd: $(GSSDOBJS) $$(MAPFILES)
96 $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
97 $(POST_PROCESS)
99 gssdtest: $(GSSCOBJS)
100 $(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
101 $(POST_PROCESS)
103 GSSDX= $(SRC)/uts/common/gssapi/gssd.x
104 gssd.x: $(GSSDX)
105 rm -f $@
106 cp $(GSSDX) $@
108 # Rules to generate derived rpcgen files from gssd.x spec file.
110 # NOTE WELL: There is code in gssd that assumes gssd is NOT
111 # multi-threaded. Do NOT add -A to the rpcgen argument list in the
112 # Makefile unless you also remove this assumption.
114 gssd.h: gssd.x
115 $(RM) $@
116 $(RPCGEN) -M -h gssd.x > $@
118 gssd_clnt.c: gssd.x
119 $(RM) $@
120 $(RPCGEN) -M -l gssd.x > $@
122 gssd_svc.c: gssd.x
123 $(RM) $@
124 $(RPCGEN) -M -m gssd.x > $@
126 gssd_xdr.c: gssd.x
127 $(RM) $@
128 $(RPCGEN) -M -c gssd.x > $@
130 $(OBJS): gssd.h
132 install: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
134 install_h:
136 clean:
137 $(RM) $(OBJS) $(RSRC) gssd.x
139 check: $(CHKMANIFEST)
141 include ../../Makefile.targ
143 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
144 $(RM) $@
145 $(CAT) $(POFILES) > $@
147 generic.po: FRC
148 $(RM) messages.po
149 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
150 $(SED) "/^domain/d" messages.po > $@
151 $(RM) messages.po
153 FRC: