xref: /titanic_44/usr/src/cmd/gss/gssd/Makefile (revision 6dfee4834394825da35b977ca71cdc965bc7b6a4)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29TESTPROG = gssdtest
30
31OUTPUT_OPTION = -I.
32
33PROG= gssd
34
35MANIFEST=	gss.xml
36
37GSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
38GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
39		gssd_handle.o
40
41GD_OBJS	= gssd_svc.o
42GC_OBJS	= gssd_clnt.o
43G_OBJS	= gssd_xdr.o
44GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
45GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
46
47GSSD_LINTS = $(GSSD_BASEOBJS:.o=.c)
48GSSC_LINTS = $(GSSC_BASEOBJS:.o=.c)
49
50ROBJS	= $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
51OBJS	= $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
52SRCS	= $(OBJS:.o=.c)
53RSRC	= $(ROBJS:.o=.c)
54RSRC 	+= gssd.h
55
56CLOBBERFILES += $(TESTPROG)
57
58include ../../Makefile.cmd
59
60ROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
61$(ROOTMANIFEST)		:= FILEMODE= 444
62
63TEXT_DOMAIN = SUNW_OST_NETRPC
64POFILE = $(PROG).po
65POFILES = generic.po
66
67#
68# Override $ROOTLIB
69#
70ROOTLIB=	$(ROOT)/usr/lib/gss
71
72DIRS=	$(ROOTLIB)
73
74$(ROOTLIB)/gssd :=	OWNER=	root
75$(ROOTLIB)/gssd :=	GROUP=	bin
76
77CPPFLAGS += -I$(SRC)/uts/common/gssapi/include
78COPTFLAG += $(XESS) #-I$(KINCDIR)
79
80LDLIBS += -lgss -lnsl
81
82$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
83
84.KEEP_STATE:
85
86all: $(PROG) $(TESTPROG)
87
88$(ROOTLIB):
89	$(INS.dir)
90
91$(ROOTLIB)/%:	%
92	$(INS.file)
93
94gssd:	$(GSSDOBJS)
95	$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
96	$(POST_PROCESS)
97
98gssdtest:       $(GSSCOBJS)
99	$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
100	$(POST_PROCESS)
101
102GSSDX=	$(SRC)/uts/common/gssapi/gssd.x
103gssd.x:	$(GSSDX)
104	rm -f $@
105	cp $(GSSDX) $@
106
107#  Rules to generate derived rpcgen files from gssd.x spec file.
108
109gssd.h:        gssd.x
110	$(RM) $@
111	$(RPCGEN) -M -h gssd.x > $@
112
113gssd_clnt.c:   gssd.x
114	$(RM) $@
115	$(RPCGEN) -M -l gssd.x > $@
116
117gssd_svc.c:    gssd.x
118	$(RM) $@
119	$(RPCGEN) -M -m gssd.x > $@
120
121gssd_xdr.c:    gssd.x
122	$(RM) $@
123	$(RPCGEN) -M -c gssd.x > $@
124
125$(OBJS): gssd.h
126
127install: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
128
129install_h:
130
131clean:
132	$(RM) $(OBJS) $(RSRC) gssd.x
133
134lint_gssd:
135	$(LINT.c) $(GSSD_LINTS)
136
137lint_gssc:
138	$(LINT.c) $(GSSC_LINTS)
139
140lint:	lint_gssd lint_gssc
141
142check:	$(CHKMANIFEST)
143
144include ../../Makefile.targ
145
146# EXPORT DELETE START
147# Special targets to clean up the source tree for export distribution
148# The WS target modifies the SCCS files as well, so a working workspace
149# can be shipped.
150# Warning: These targets change the source tree, the first only at the
151#		plain source level, but the second changes the guts!
152EXPORT_SRC:
153	$(RM) Makefile+ gssd_clnt_stubs.c+ gssd_proc.c+ gssdtest.c+
154	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
155		< Makefile > Makefile+
156	$(MV) Makefile+ Makefile
157	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
158		< gssd_clnt_stubs.c > gssd_clnt_stubs.c+
159	$(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c
160	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
161		< gssd_proc.c > gssd_proc.c+
162	$(MV) gssd_proc.c+ gssd_proc.c
163	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
164		< gssdtest.c > gssdtest.c+
165	$(MV) gssdtest.c+ gssdtest.c
166	$(CHMOD) 444  Makefile gssd_clnt_stubs.c gssd_proc.c gssdtest.c
167
168# EXPORT DELETE END
169
170$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
171	$(RM) $@
172	$(CAT) $(POFILES) > $@
173
174generic.po: FRC
175	$(RM) messages.po
176	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
177	$(SED) "/^domain/d" messages.po > $@
178	$(RM) messages.po
179
180FRC:
181
182