xref: /illumos-gate/usr/src/cmd/gss/gssd/Makefile (revision a192e900f6d2b0e1a822e3252c0dfd795ed49d76)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*a192e900Samaguire# Common Development and Distribution License (the "License").
6*a192e900Samaguire# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*a192e900Samaguire# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateTESTPROG = gssdtest
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gateOUTPUT_OPTION = -I.
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gatePROG= gssd
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateMANIFEST=	gss.xml
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateGSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
377c478bd9Sstevel@tonic-gateGSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
387c478bd9Sstevel@tonic-gate		gssd_handle.o
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateGD_OBJS	= gssd_svc.o
417c478bd9Sstevel@tonic-gateGC_OBJS	= gssd_clnt.o
427c478bd9Sstevel@tonic-gateG_OBJS	= gssd_xdr.o
437c478bd9Sstevel@tonic-gateGSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
447c478bd9Sstevel@tonic-gateGSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gateGSSD_LINTS = $(GSSD_BASEOBJS:.o=.c)
477c478bd9Sstevel@tonic-gateGSSC_LINTS = $(GSSC_BASEOBJS:.o=.c)
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gateROBJS	= $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
507c478bd9Sstevel@tonic-gateOBJS	= $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
517c478bd9Sstevel@tonic-gateSRCS	= $(OBJS:.o=.c)
527c478bd9Sstevel@tonic-gateRSRC	= $(ROBJS:.o=.c)
537c478bd9Sstevel@tonic-gateRSRC 	+= gssd.h
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_NETRPC
627c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
637c478bd9Sstevel@tonic-gatePOFILES = generic.po
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate#
667c478bd9Sstevel@tonic-gate# Override $ROOTLIB
677c478bd9Sstevel@tonic-gate#
687c478bd9Sstevel@tonic-gateROOTLIB=	$(ROOT)/usr/lib/gss
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateDIRS=	$(ROOTLIB)
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate$(ROOTLIB)/gssd :=	OWNER=	root
737c478bd9Sstevel@tonic-gate$(ROOTLIB)/gssd :=	GROUP=	bin
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include
767c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateLDLIBS += -lgss -lnsl
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate.KEEP_STATE:
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateall: $(PROG) $(TESTPROG)
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate$(ROOTLIB):
877c478bd9Sstevel@tonic-gate	$(INS.dir)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate$(ROOTLIB)/%:	%
907c478bd9Sstevel@tonic-gate	$(INS.file)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gategssd:	$(GSSDOBJS)
937c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
947c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gategssdtest:       $(GSSCOBJS)
977c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
987c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gateGSSDX=	$(SRC)/uts/common/gssapi/gssd.x
1017c478bd9Sstevel@tonic-gategssd.x:	$(GSSDX)
1027c478bd9Sstevel@tonic-gate	rm -f $@
1037c478bd9Sstevel@tonic-gate	cp $(GSSDX) $@
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate#  Rules to generate derived rpcgen files from gssd.x spec file.
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gategssd.h:        gssd.x
1087c478bd9Sstevel@tonic-gate	$(RM) $@
1097c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -h gssd.x > $@
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gategssd_clnt.c:   gssd.x
1127c478bd9Sstevel@tonic-gate	$(RM) $@
1137c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -l gssd.x > $@
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gategssd_svc.c:    gssd.x
1167c478bd9Sstevel@tonic-gate	$(RM) $@
1177c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -m gssd.x > $@
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gategssd_xdr.c:    gssd.x
1207c478bd9Sstevel@tonic-gate	$(RM) $@
1217c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -c gssd.x > $@
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gate$(OBJS): gssd.h
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gateinstall: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gateinstall_h:
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gateclean:
1307c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(RSRC) gssd.x
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gatelint_gssd:
1337c478bd9Sstevel@tonic-gate	$(LINT.c) $(GSSD_LINTS)
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gatelint_gssc:
1367c478bd9Sstevel@tonic-gate	$(LINT.c) $(GSSC_LINTS)
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gatelint:	lint_gssd lint_gssc
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1437c478bd9Sstevel@tonic-gate
1447c478bd9Sstevel@tonic-gate# EXPORT DELETE START
1457c478bd9Sstevel@tonic-gate# Special targets to clean up the source tree for export distribution
1467c478bd9Sstevel@tonic-gate# The WS target modifies the SCCS files as well, so a working workspace
1477c478bd9Sstevel@tonic-gate# can be shipped.
1487c478bd9Sstevel@tonic-gate# Warning: These targets change the source tree, the first only at the
1497c478bd9Sstevel@tonic-gate#		plain source level, but the second changes the guts!
1507c478bd9Sstevel@tonic-gateEXPORT_SRC:
1517c478bd9Sstevel@tonic-gate	$(RM) Makefile+ gssd_clnt_stubs.c+ gssd_proc.c+ gssdtest.c+
1527c478bd9Sstevel@tonic-gate	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
1537c478bd9Sstevel@tonic-gate		< Makefile > Makefile+
1547c478bd9Sstevel@tonic-gate	$(MV) Makefile+ Makefile
1557c478bd9Sstevel@tonic-gate	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1567c478bd9Sstevel@tonic-gate		< gssd_clnt_stubs.c > gssd_clnt_stubs.c+
1577c478bd9Sstevel@tonic-gate	$(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c
1587c478bd9Sstevel@tonic-gate	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1597c478bd9Sstevel@tonic-gate		< gssd_proc.c > gssd_proc.c+
1607c478bd9Sstevel@tonic-gate	$(MV) gssd_proc.c+ gssd_proc.c
1617c478bd9Sstevel@tonic-gate	sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
1627c478bd9Sstevel@tonic-gate		< gssdtest.c > gssdtest.c+
1637c478bd9Sstevel@tonic-gate	$(MV) gssdtest.c+ gssdtest.c
1647c478bd9Sstevel@tonic-gate	$(CHMOD) 444  Makefile gssd_clnt_stubs.c gssd_proc.c gssdtest.c
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate# EXPORT DELETE END
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
1697c478bd9Sstevel@tonic-gate	$(RM) $@
1707c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1717c478bd9Sstevel@tonic-gate
1727c478bd9Sstevel@tonic-gategeneric.po: FRC
1737c478bd9Sstevel@tonic-gate	$(RM) messages.po
1747c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
1757c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
1767c478bd9Sstevel@tonic-gate	$(RM) messages.po
1777c478bd9Sstevel@tonic-gate
1787c478bd9Sstevel@tonic-gateFRC:
1797c478bd9Sstevel@tonic-gate
180