xref: /titanic_41/usr/src/cmd/gss/gssd/Makefile (revision 0b42f15ac52b077791d4ba079e8c163c592c3fda)
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
5a192e900Samaguire# Common Development and Distribution License (the "License").
6a192e900Samaguire# 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#
221f03f049SPeter Shoults# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateTESTPROG = gssdtest
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateOUTPUT_OPTION = -I.
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gatePROG= gssd
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateMANIFEST=	gss.xml
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateGSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
357c478bd9Sstevel@tonic-gateGSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
367c478bd9Sstevel@tonic-gate		gssd_handle.o
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateGD_OBJS	= gssd_svc.o
397c478bd9Sstevel@tonic-gateGC_OBJS	= gssd_clnt.o
407c478bd9Sstevel@tonic-gateG_OBJS	= gssd_xdr.o
417c478bd9Sstevel@tonic-gateGSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
427c478bd9Sstevel@tonic-gateGSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateGSSD_LINTS = $(GSSD_BASEOBJS:.o=.c)
457c478bd9Sstevel@tonic-gateGSSC_LINTS = $(GSSC_BASEOBJS:.o=.c)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateROBJS	= $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
487c478bd9Sstevel@tonic-gateOBJS	= $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
497c478bd9Sstevel@tonic-gateSRCS	= $(OBJS:.o=.c)
507c478bd9Sstevel@tonic-gateRSRC	= $(ROBJS:.o=.c)
517c478bd9Sstevel@tonic-gateRSRC 	+= gssd.h
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG)
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_NETRPC
607c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
617c478bd9Sstevel@tonic-gatePOFILES = generic.po
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gate#
647c478bd9Sstevel@tonic-gate# Override $ROOTLIB
657c478bd9Sstevel@tonic-gate#
667c478bd9Sstevel@tonic-gateROOTLIB=	$(ROOT)/usr/lib/gss
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateDIRS=	$(ROOTLIB)
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include
717c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR)
727c478bd9Sstevel@tonic-gate
73*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
74*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration
75*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
76*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
77*7014882cSRichard Lowe
787c478bd9Sstevel@tonic-gateLDLIBS += -lgss -lnsl
797c478bd9Sstevel@tonic-gate
8024da5b34Sriegssd :=	MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
8124da5b34Sriegssd :=	LDFLAGS += $(MAPFILES:%=-M%)
8224da5b34Srie
837c478bd9Sstevel@tonic-gate$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate.KEEP_STATE:
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gateall: $(PROG) $(TESTPROG)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate$(ROOTLIB):
907c478bd9Sstevel@tonic-gate	$(INS.dir)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate$(ROOTLIB)/%:	%
937c478bd9Sstevel@tonic-gate	$(INS.file)
947c478bd9Sstevel@tonic-gate
9524da5b34Sriegssd:	$(GSSDOBJS) $$(MAPFILES)
967c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
977c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gategssdtest:       $(GSSCOBJS)
1007c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
1017c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gateGSSDX=	$(SRC)/uts/common/gssapi/gssd.x
1047c478bd9Sstevel@tonic-gategssd.x:	$(GSSDX)
1057c478bd9Sstevel@tonic-gate	rm -f $@
1067c478bd9Sstevel@tonic-gate	cp $(GSSDX) $@
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate#  Rules to generate derived rpcgen files from gssd.x spec file.
1097c478bd9Sstevel@tonic-gate
1101f03f049SPeter Shoults# NOTE WELL: There is code in gssd that assumes gssd is NOT
1111f03f049SPeter Shoults# multi-threaded.  Do NOT add -A to the rpcgen argument list in the
1121f03f049SPeter Shoults# Makefile unless you also remove this assumption.
1131f03f049SPeter Shoults
1147c478bd9Sstevel@tonic-gategssd.h:        gssd.x
1157c478bd9Sstevel@tonic-gate	$(RM) $@
1167c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -h gssd.x > $@
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gategssd_clnt.c:   gssd.x
1197c478bd9Sstevel@tonic-gate	$(RM) $@
1207c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -l gssd.x > $@
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gategssd_svc.c:    gssd.x
1237c478bd9Sstevel@tonic-gate	$(RM) $@
1247c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -m gssd.x > $@
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gategssd_xdr.c:    gssd.x
1277c478bd9Sstevel@tonic-gate	$(RM) $@
1287c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -c gssd.x > $@
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate$(OBJS): gssd.h
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gateinstall: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateinstall_h:
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gateclean:
1377c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(RSRC) gssd.x
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gatelint_gssd:
1407c478bd9Sstevel@tonic-gate	$(LINT.c) $(GSSD_LINTS)
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gatelint_gssc:
1437c478bd9Sstevel@tonic-gate	$(LINT.c) $(GSSC_LINTS)
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gatelint:	lint_gssd lint_gssc
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
1527c478bd9Sstevel@tonic-gate	$(RM) $@
1537c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gategeneric.po: FRC
1567c478bd9Sstevel@tonic-gate	$(RM) messages.po
1577c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
1587c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
1597c478bd9Sstevel@tonic-gate	$(RM) messages.po
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gateFRC:
1627c478bd9Sstevel@tonic-gate
163