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