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