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# 22*1f03f049SPeter 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-gate$(ROOTLIB)/gssd := OWNER= root 717c478bd9Sstevel@tonic-gate$(ROOTLIB)/gssd := GROUP= bin 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include 747c478bd9Sstevel@tonic-gateCOPTFLAG += $(XESS) #-I$(KINCDIR) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateLDLIBS += -lgss -lnsl 777c478bd9Sstevel@tonic-gate 7824da5b34Sriegssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) 7924da5b34Sriegssd := LDFLAGS += $(MAPFILES:%=-M%) 8024da5b34Srie 817c478bd9Sstevel@tonic-gate$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate.KEEP_STATE: 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateall: $(PROG) $(TESTPROG) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate$(ROOTLIB): 887c478bd9Sstevel@tonic-gate $(INS.dir) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate$(ROOTLIB)/%: % 917c478bd9Sstevel@tonic-gate $(INS.file) 927c478bd9Sstevel@tonic-gate 9324da5b34Sriegssd: $(GSSDOBJS) $$(MAPFILES) 947c478bd9Sstevel@tonic-gate $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS) 957c478bd9Sstevel@tonic-gate $(POST_PROCESS) 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gategssdtest: $(GSSCOBJS) 987c478bd9Sstevel@tonic-gate $(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS) 997c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateGSSDX= $(SRC)/uts/common/gssapi/gssd.x 1027c478bd9Sstevel@tonic-gategssd.x: $(GSSDX) 1037c478bd9Sstevel@tonic-gate rm -f $@ 1047c478bd9Sstevel@tonic-gate cp $(GSSDX) $@ 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate# Rules to generate derived rpcgen files from gssd.x spec file. 1077c478bd9Sstevel@tonic-gate 108*1f03f049SPeter Shoults# NOTE WELL: There is code in gssd that assumes gssd is NOT 109*1f03f049SPeter Shoults# multi-threaded. Do NOT add -A to the rpcgen argument list in the 110*1f03f049SPeter Shoults# Makefile unless you also remove this assumption. 111*1f03f049SPeter Shoults 1127c478bd9Sstevel@tonic-gategssd.h: gssd.x 1137c478bd9Sstevel@tonic-gate $(RM) $@ 1147c478bd9Sstevel@tonic-gate $(RPCGEN) -M -h gssd.x > $@ 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gategssd_clnt.c: gssd.x 1177c478bd9Sstevel@tonic-gate $(RM) $@ 1187c478bd9Sstevel@tonic-gate $(RPCGEN) -M -l gssd.x > $@ 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gategssd_svc.c: gssd.x 1217c478bd9Sstevel@tonic-gate $(RM) $@ 1227c478bd9Sstevel@tonic-gate $(RPCGEN) -M -m gssd.x > $@ 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gategssd_xdr.c: gssd.x 1257c478bd9Sstevel@tonic-gate $(RM) $@ 1267c478bd9Sstevel@tonic-gate $(RPCGEN) -M -c gssd.x > $@ 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(OBJS): gssd.h 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gateinstall: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gateinstall_h: 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gateclean: 1357c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(RSRC) gssd.x 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gatelint_gssd: 1387c478bd9Sstevel@tonic-gate $(LINT.c) $(GSSD_LINTS) 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gatelint_gssc: 1417c478bd9Sstevel@tonic-gate $(LINT.c) $(GSSC_LINTS) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gatelint: lint_gssd lint_gssc 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate# EXPORT DELETE START 1507c478bd9Sstevel@tonic-gate# Special targets to clean up the source tree for export distribution 1517c478bd9Sstevel@tonic-gate# The WS target modifies the SCCS files as well, so a working workspace 1527c478bd9Sstevel@tonic-gate# can be shipped. 1537c478bd9Sstevel@tonic-gate# Warning: These targets change the source tree, the first only at the 1547c478bd9Sstevel@tonic-gate# plain source level, but the second changes the guts! 1557c478bd9Sstevel@tonic-gateEXPORT_SRC: 1567c478bd9Sstevel@tonic-gate $(RM) Makefile+ gssd_clnt_stubs.c+ gssd_proc.c+ gssdtest.c+ 1577c478bd9Sstevel@tonic-gate sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 1587c478bd9Sstevel@tonic-gate < Makefile > Makefile+ 1597c478bd9Sstevel@tonic-gate $(MV) Makefile+ Makefile 1607c478bd9Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1617c478bd9Sstevel@tonic-gate < gssd_clnt_stubs.c > gssd_clnt_stubs.c+ 1627c478bd9Sstevel@tonic-gate $(MV) gssd_clnt_stubs.c+ gssd_clnt_stubs.c 1637c478bd9Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1647c478bd9Sstevel@tonic-gate < gssd_proc.c > gssd_proc.c+ 1657c478bd9Sstevel@tonic-gate $(MV) gssd_proc.c+ gssd_proc.c 1667c478bd9Sstevel@tonic-gate sed -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \ 1677c478bd9Sstevel@tonic-gate < gssdtest.c > gssdtest.c+ 1687c478bd9Sstevel@tonic-gate $(MV) gssdtest.c+ gssdtest.c 1697c478bd9Sstevel@tonic-gate $(CHMOD) 444 Makefile gssd_clnt_stubs.c gssd_proc.c gssdtest.c 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate# EXPORT DELETE END 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1747c478bd9Sstevel@tonic-gate $(RM) $@ 1757c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gategeneric.po: FRC 1787c478bd9Sstevel@tonic-gate $(RM) messages.po 1797c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 1807c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1817c478bd9Sstevel@tonic-gate $(RM) messages.po 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gateFRC: 1847c478bd9Sstevel@tonic-gate 185