10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 53048Samaguire# Common Development and Distribution License (the "License"). 63048Samaguire# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*9763SPeter.Shoults@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate 260Sstevel@tonic-gateTESTPROG = gssdtest 270Sstevel@tonic-gate 280Sstevel@tonic-gateOUTPUT_OPTION = -I. 290Sstevel@tonic-gate 300Sstevel@tonic-gatePROG= gssd 310Sstevel@tonic-gate 320Sstevel@tonic-gateMANIFEST= gss.xml 330Sstevel@tonic-gate 340Sstevel@tonic-gateGSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o 350Sstevel@tonic-gateGSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \ 360Sstevel@tonic-gate gssd_handle.o 370Sstevel@tonic-gate 380Sstevel@tonic-gateGD_OBJS = gssd_svc.o 390Sstevel@tonic-gateGC_OBJS = gssd_clnt.o 400Sstevel@tonic-gateG_OBJS = gssd_xdr.o 410Sstevel@tonic-gateGSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS) 420Sstevel@tonic-gateGSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS) 430Sstevel@tonic-gate 440Sstevel@tonic-gateGSSD_LINTS = $(GSSD_BASEOBJS:.o=.c) 450Sstevel@tonic-gateGSSC_LINTS = $(GSSC_BASEOBJS:.o=.c) 460Sstevel@tonic-gate 470Sstevel@tonic-gateROBJS = $(GD_OBJS) $(GC_OBJS) $(G_OBJS) 480Sstevel@tonic-gateOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS) 490Sstevel@tonic-gateSRCS = $(OBJS:.o=.c) 500Sstevel@tonic-gateRSRC = $(ROBJS:.o=.c) 510Sstevel@tonic-gateRSRC += gssd.h 520Sstevel@tonic-gate 530Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG) 540Sstevel@tonic-gate 550Sstevel@tonic-gateinclude ../../Makefile.cmd 560Sstevel@tonic-gate 570Sstevel@tonic-gateROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC) 580Sstevel@tonic-gate 590Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_NETRPC 600Sstevel@tonic-gatePOFILE = $(PROG).po 610Sstevel@tonic-gatePOFILES = generic.po 620Sstevel@tonic-gate 630Sstevel@tonic-gate# 640Sstevel@tonic-gate# Override $ROOTLIB 650Sstevel@tonic-gate# 660Sstevel@tonic-gateROOTLIB= $(ROOT)/usr/lib/gss 670Sstevel@tonic-gate 680Sstevel@tonic-gateDIRS= $(ROOTLIB) 690Sstevel@tonic-gate 700Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include 710Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR) 720Sstevel@tonic-gate 730Sstevel@tonic-gateLDLIBS += -lgss -lnsl 740Sstevel@tonic-gate 754271Sriegssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) 764271Sriegssd := LDFLAGS += $(MAPFILES:%=-M%) 774271Srie 780Sstevel@tonic-gate$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 790Sstevel@tonic-gate 800Sstevel@tonic-gate.KEEP_STATE: 810Sstevel@tonic-gate 820Sstevel@tonic-gateall: $(PROG) $(TESTPROG) 830Sstevel@tonic-gate 840Sstevel@tonic-gate$(ROOTLIB): 850Sstevel@tonic-gate $(INS.dir) 860Sstevel@tonic-gate 870Sstevel@tonic-gate$(ROOTLIB)/%: % 880Sstevel@tonic-gate $(INS.file) 890Sstevel@tonic-gate 904271Sriegssd: $(GSSDOBJS) $$(MAPFILES) 910Sstevel@tonic-gate $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS) 920Sstevel@tonic-gate $(POST_PROCESS) 930Sstevel@tonic-gate 940Sstevel@tonic-gategssdtest: $(GSSCOBJS) 950Sstevel@tonic-gate $(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS) 960Sstevel@tonic-gate $(POST_PROCESS) 970Sstevel@tonic-gate 980Sstevel@tonic-gateGSSDX= $(SRC)/uts/common/gssapi/gssd.x 990Sstevel@tonic-gategssd.x: $(GSSDX) 1000Sstevel@tonic-gate rm -f $@ 1010Sstevel@tonic-gate cp $(GSSDX) $@ 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate# Rules to generate derived rpcgen files from gssd.x spec file. 1040Sstevel@tonic-gate 105*9763SPeter.Shoults@Sun.COM# NOTE WELL: There is code in gssd that assumes gssd is NOT 106*9763SPeter.Shoults@Sun.COM# multi-threaded. Do NOT add -A to the rpcgen argument list in the 107*9763SPeter.Shoults@Sun.COM# Makefile unless you also remove this assumption. 108*9763SPeter.Shoults@Sun.COM 1090Sstevel@tonic-gategssd.h: gssd.x 1100Sstevel@tonic-gate $(RM) $@ 1110Sstevel@tonic-gate $(RPCGEN) -M -h gssd.x > $@ 1120Sstevel@tonic-gate 1130Sstevel@tonic-gategssd_clnt.c: gssd.x 1140Sstevel@tonic-gate $(RM) $@ 1150Sstevel@tonic-gate $(RPCGEN) -M -l gssd.x > $@ 1160Sstevel@tonic-gate 1170Sstevel@tonic-gategssd_svc.c: gssd.x 1180Sstevel@tonic-gate $(RM) $@ 1190Sstevel@tonic-gate $(RPCGEN) -M -m gssd.x > $@ 1200Sstevel@tonic-gate 1210Sstevel@tonic-gategssd_xdr.c: gssd.x 1220Sstevel@tonic-gate $(RM) $@ 1230Sstevel@tonic-gate $(RPCGEN) -M -c gssd.x > $@ 1240Sstevel@tonic-gate 1250Sstevel@tonic-gate$(OBJS): gssd.h 1260Sstevel@tonic-gate 1270Sstevel@tonic-gateinstall: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST) 1280Sstevel@tonic-gate 1290Sstevel@tonic-gateinstall_h: 1300Sstevel@tonic-gate 1310Sstevel@tonic-gateclean: 1320Sstevel@tonic-gate $(RM) $(OBJS) $(RSRC) gssd.x 1330Sstevel@tonic-gate 1340Sstevel@tonic-gatelint_gssd: 1350Sstevel@tonic-gate $(LINT.c) $(GSSD_LINTS) 1360Sstevel@tonic-gate 1370Sstevel@tonic-gatelint_gssc: 1380Sstevel@tonic-gate $(LINT.c) $(GSSC_LINTS) 1390Sstevel@tonic-gate 1400Sstevel@tonic-gatelint: lint_gssd lint_gssc 1410Sstevel@tonic-gate 1420Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1430Sstevel@tonic-gate 1440Sstevel@tonic-gateinclude ../../Makefile.targ 1450Sstevel@tonic-gate 1460Sstevel@tonic-gate# EXPORT DELETE START 1470Sstevel@tonic-gate# Special targets to clean up the source tree for export distribution 1480Sstevel@tonic-gate# The WS target modifies the SCCS files as well, so a working workspace 1490Sstevel@tonic-gate# can be shipped. 1500Sstevel@tonic-gate# Warning: These targets change the source tree, the first only at the 1510Sstevel@tonic-gate# plain source level, but the second changes the guts! 1520Sstevel@tonic-gateEXPORT_SRC: 1530Sstevel@tonic-gate $(RM) Makefile+ gssd_clnt_stubs.c+ gssd_proc.c+ gssdtest.c+ 1540Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 1550Sstevel@tonic-gate < Makefile > Makefile+ 1560Sstevel@tonic-gate $(MV) Makefile+ Makefile 1570Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1580Sstevel@tonic-gate < gssd_clnt_stubs.c > gssd_clnt_stubs.c+ 1590Sstevel@tonic-gate $(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c 1600Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1610Sstevel@tonic-gate < gssd_proc.c > gssd_proc.c+ 1620Sstevel@tonic-gate $(MV) gssd_proc.c+ gssd_proc.c 1630Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1640Sstevel@tonic-gate < gssdtest.c > gssdtest.c+ 1650Sstevel@tonic-gate $(MV) gssdtest.c+ gssdtest.c 1660Sstevel@tonic-gate $(CHMOD) 444 Makefile gssd_clnt_stubs.c gssd_proc.c gssdtest.c 1670Sstevel@tonic-gate 1680Sstevel@tonic-gate# EXPORT DELETE END 1690Sstevel@tonic-gate 1700Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1710Sstevel@tonic-gate $(RM) $@ 1720Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1730Sstevel@tonic-gate 1740Sstevel@tonic-gategeneric.po: FRC 1750Sstevel@tonic-gate $(RM) messages.po 1760Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 1770Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1780Sstevel@tonic-gate $(RM) messages.po 1790Sstevel@tonic-gate 1800Sstevel@tonic-gateFRC: 1810Sstevel@tonic-gate 182