xref: /titanic_41/usr/src/cmd/gss/gssd/Makefile (revision 4f4499478f0aa55fc93bcd8030ba3d128663ae70)
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
26TESTPROG = gssdtest
27
28OUTPUT_OPTION = -I.
29
30PROG= gssd
31
32MANIFEST=	gss.xml
33
34GSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
35GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
36		gssd_handle.o
37
38GD_OBJS	= gssd_svc.o
39GC_OBJS	= gssd_clnt.o
40G_OBJS	= gssd_xdr.o
41GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
42GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
43
44GSSD_LINTS = $(GSSD_BASEOBJS:.o=.c)
45GSSC_LINTS = $(GSSC_BASEOBJS:.o=.c)
46
47ROBJS	= $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
48OBJS	= $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
49SRCS	= $(OBJS:.o=.c)
50RSRC	= $(ROBJS:.o=.c)
51RSRC 	+= gssd.h
52
53CLOBBERFILES += $(TESTPROG)
54
55include ../../Makefile.cmd
56
57ROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
58
59TEXT_DOMAIN = SUNW_OST_NETRPC
60POFILE = $(PROG).po
61POFILES = generic.po
62
63#
64# Override $ROOTLIB
65#
66ROOTLIB=	$(ROOT)/usr/lib/gss
67
68DIRS=	$(ROOTLIB)
69
70CPPFLAGS += -I$(SRC)/uts/common/gssapi/include
71COPTFLAG += $(XESS) #-I$(KINCDIR)
72
73CERRWARN += -_gcc=-Wno-unused-variable
74CERRWARN += -_gcc=-Wno-implicit-function-declaration
75CERRWARN += -_gcc=-Wno-parentheses
76CERRWARN += -_gcc=-Wno-uninitialized
77
78LDLIBS += -lgss -lnsl
79
80gssd :=	MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
81gssd :=	LDFLAGS += $(MAPFILES:%=-M%)
82
83$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
84
85.KEEP_STATE:
86
87all: $(PROG) $(TESTPROG)
88
89$(ROOTLIB):
90	$(INS.dir)
91
92$(ROOTLIB)/%:	%
93	$(INS.file)
94
95gssd:	$(GSSDOBJS) $$(MAPFILES)
96	$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
97	$(POST_PROCESS)
98
99gssdtest:       $(GSSCOBJS)
100	$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
101	$(POST_PROCESS)
102
103GSSDX=	$(SRC)/uts/common/gssapi/gssd.x
104gssd.x:	$(GSSDX)
105	rm -f $@
106	cp $(GSSDX) $@
107
108#  Rules to generate derived rpcgen files from gssd.x spec file.
109
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.
113
114gssd.h:        gssd.x
115	$(RM) $@
116	$(RPCGEN) -M -h gssd.x > $@
117
118gssd_clnt.c:   gssd.x
119	$(RM) $@
120	$(RPCGEN) -M -l gssd.x > $@
121
122gssd_svc.c:    gssd.x
123	$(RM) $@
124	$(RPCGEN) -M -m gssd.x > $@
125
126gssd_xdr.c:    gssd.x
127	$(RM) $@
128	$(RPCGEN) -M -c gssd.x > $@
129
130$(OBJS): gssd.h
131
132install: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
133
134install_h:
135
136clean:
137	$(RM) $(OBJS) $(RSRC) gssd.x
138
139lint_gssd:
140	$(LINT.c) $(GSSD_LINTS)
141
142lint_gssc:
143	$(LINT.c) $(GSSC_LINTS)
144
145lint:	lint_gssd lint_gssc
146
147check:	$(CHKMANIFEST)
148
149include ../../Makefile.targ
150
151$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
152	$(RM) $@
153	$(CAT) $(POFILES) > $@
154
155generic.po: FRC
156	$(RM) messages.po
157	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
158	$(SED) "/^domain/d" messages.po > $@
159	$(RM) messages.po
160
161FRC:
162
163