--- old/usr/src/cmd/abi/appcert/static_prof/Makefile.targ	2015-03-13 12:28:26.980105607 -0400
+++ new/usr/src/cmd/abi/appcert/static_prof/Makefile.targ	2015-03-13 12:28:26.987764342 -0400
@@ -23,13 +23,13 @@
 # Copyright (c) 1997-2000 by Sun Microsystems, Inc.
 # All rights reserved.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
 #
 # cmd/abi/appcert/static_prof/Makefile
 #
 
 $(PROG): $(SRCS)
-		$(LINK.c) -o $@ $(SRCS)
+		$(LINK.c) -o $@ $(SRCS) $(LDLIBS)
 		$(POST_PROCESS)
 
 #
--- old/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ	2015-03-13 12:28:27.164440411 -0400
+++ new/usr/src/cmd/abi/spectrans/spec2trace/Makefile.targ	2015-03-13 12:28:27.171052285 -0400
@@ -23,6 +23,8 @@
 # Copyright (c) 1997-1999 by Sun Microsystems, Inc.
 # All rights reserved.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 .KEEP_STATE:
 
@@ -50,4 +52,4 @@
 parseproto := RM = @echo keeping	# do not remove generated C code
 parseproto := COPTFLAG = -g -DDEBUG -DMEM_DEBUG -DTRACE
 parseproto:	parseproto.o
-	$(LINK.c) -o parseproto parseproto.o
+	$(LINK.c) -o parseproto parseproto.o $(LDLIBS)
--- old/usr/src/cmd/adbgen/Makefile.com	2015-03-13 12:28:27.333407807 -0400
+++ new/usr/src/cmd/adbgen/Makefile.com	2015-03-13 12:28:27.339846628 -0400
@@ -23,7 +23,7 @@
 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
 #
 
 PROGS = adbgen1 adbgen3 adbgen4
@@ -54,7 +54,7 @@
 clean:
 
 adbgen%: ../common/adbgen%.c
-	$(LINK.c) -o $@ $<
+	$(LINK.c) -o $@ $< $(LDLIBS)
 	$(POST_PROCESS)
 
 %.o: ../common/%.c
--- old/usr/src/cmd/audio/audiotest/Makefile	2015-03-13 12:28:27.501463948 -0400
+++ new/usr/src/cmd/audio/audiotest/Makefile	2015-03-13 12:28:27.508553700 -0400
@@ -22,6 +22,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 # Makefile for cmd/audio/audiotest
 
 PROG= audiotest
@@ -38,7 +40,7 @@
 all: $(PROG)
 
 $(PROG):	$(OBJS)
-	$(LINK.c) $(OBJS) -o $@
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 install: all $(ROOTPROG)
--- old/usr/src/cmd/cmd-inet/usr.bin/nca/Makefile	2015-03-13 12:28:27.675143816 -0400
+++ new/usr/src/cmd/cmd-inet/usr.bin/nca/Makefile	2015-03-13 12:28:27.682674402 -0400
@@ -22,6 +22,8 @@
 #
 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
+#
+# Copyright 2015 RackTop Systems.
 # 
 
 PROG=	ncab2clf 
@@ -55,7 +57,7 @@
 all: $(PROG)
 
 $(PROG): $(OBJS)
-	$(LINK.c) $(OBJS) -o $@
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 #
--- old/usr/src/cmd/fm/fmd/Makefile.fmd	2015-03-13 12:28:27.843808282 -0400
+++ new/usr/src/cmd/fm/fmd/Makefile.fmd	2015-03-13 12:28:27.850343453 -0400
@@ -20,6 +20,7 @@
 #
 #
 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 .KEEP_STATE:
@@ -160,7 +161,7 @@
 	$(POST_PROCESS)
 
 $(DMOD): $(DMOD_OBJS)
-	$(LINK.c) $(DMOD_OBJS) -o $@ -lc
+	$(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS) -lc
 	$(POST_PROCESS)
 
 %.o: ../common/%.c
--- old/usr/src/cmd/fm/modules/Makefile.plugin	2015-03-13 12:28:28.022072814 -0400
+++ new/usr/src/cmd/fm/modules/Makefile.plugin	2015-03-13 12:28:28.030400435 -0400
@@ -20,6 +20,7 @@
 #
 #
 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 .KEEP_STATE:
@@ -100,7 +101,7 @@
 
 $(DMODPROG): $(DMOD_OBJS) $(MAPFILE-DMOD)
 	-@mkdir -p $(@D)
-	$(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-M%) -o $@ -lc
+	$(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-M%) -o $@ $(LDLIBS) -lc
 	$(POST_PROCESS)
 
 %.o: %.c
--- old/usr/src/cmd/fs.d/autofs/Makefile	2015-03-13 12:28:28.196394535 -0400
+++ new/usr/src/cmd/fs.d/autofs/Makefile	2015-03-13 12:28:28.203002579 -0400
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 # cmd/fs.d/autofs/Makefile
 
@@ -125,11 +126,11 @@
 		$(POST_PROCESS)
 
 $(SHARE):	$(SHAREOBJS)
-		$(LINK.c) -o $@ $(SHAREOBJS)
+		$(LINK.c) -o $@ $(SHAREOBJS) $(LDLIBS)
 		$(POST_PROCESS)
 
 $(UNSHARE):	$(UNSHAREOBJS)
-		$(LINK.c) -o $@ $(UNSHAREOBJS)
+		$(LINK.c) -o $@ $(UNSHAREOBJS) $(LDLIBS)
 		$(POST_PROCESS)
 
 $(ROOTSVCSYSTEM)/filesystem/%: %
--- old/usr/src/cmd/fs.d/cachefs/share/Makefile	2015-03-13 12:28:28.369860162 -0400
+++ new/usr/src/cmd/fs.d/cachefs/share/Makefile	2015-03-13 12:28:28.376337452 -0400
@@ -20,11 +20,11 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Copyright (c) 1999 by Sun Microsystems, Inc.
 # All rights reserved.
 #
+# Copyright 2015 RackTop Systems.
+#
 # cmd/fs.d/cachefs/share
 #
 
@@ -39,7 +39,7 @@
 PROGSRCS=	$(LIBPROG:%=%.c)
 
 $(LIBPROG): 	$(PROGOBJS)
-	$(LINK.c) -o $@ $(PROGOBJS)
+	$(LINK.c) -o $@ $(PROGOBJS) $(LDLIBS)
 	$(POST_PROCESS)
 
 clean:
--- old/usr/src/cmd/fs.d/cachefs/unshare/Makefile	2015-03-13 12:28:28.534636014 -0400
+++ new/usr/src/cmd/fs.d/cachefs/unshare/Makefile	2015-03-13 12:28:28.541976080 -0400
@@ -20,11 +20,11 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Copyright (c) 1999 by Sun Microsystems, Inc.
 # All rights reserved.
 #
+# Copyright 2015 RackTop Systems.
+#
 # cmd/fs.d/cachefs/unshare
 #
 
@@ -39,7 +39,7 @@
 PROGSRCS=	$(LIBPROG:%=%.c)
 
 $(LIBPROG): 	$(PROGOBJS)
-	$(LINK.c) -o $@ $(PROGOBJS)
+	$(LINK.c) -o $@ $(PROGOBJS) $(LDLIBS)
 	$(POST_PROCESS)
 
 clean:
--- old/usr/src/cmd/link/Makefile	2015-03-13 12:28:28.706031361 -0400
+++ new/usr/src/cmd/link/Makefile	2015-03-13 12:28:28.713063554 -0400
@@ -23,6 +23,8 @@
 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 PROG= link 
 XPG4PROG= link
@@ -41,7 +43,7 @@
 all: $(PROG) $(XPG4)
 
 $(PROG) $(XPG4): $$(OBJS)
-	$(LINK.c) -o $@ $(OBJS)
+	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
 	$(POST_PROCESS)
 
 install: all $(ROOTUSRSBINPROG) $(ROOTXPG4PROG)
--- old/usr/src/cmd/picl/plugins/common/devtree/Makefile	2015-03-13 12:28:28.875767107 -0400
+++ new/usr/src/cmd/picl/plugins/common/devtree/Makefile	2015-03-13 12:28:28.883204924 -0400
@@ -23,7 +23,7 @@
 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
 #
 # cmd/picl/plugins/common/devtree/Makefile
 #
@@ -56,7 +56,7 @@
 LDLIBS +=	-lc -lkstat -ldevinfo -lpicltree -lnvpair
 LDLIBS +=	-L../piclevent -L$(ROOT)/usr/lib/picl/plugins -lpiclevent
 LDLIBS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins
-LDLIBS +=	-R/usr/platform/sun4u/lib/picl/plugins
+$(SPARC_BLD)LDLIBS +=	-R/usr/platform/sun4u/lib/picl/plugins
 LDLIBS +=	-R/usr/lib/picl/plugins
 
 LINTFLAGS +=	-L$(SRC)/lib/libpicltree/$(MACH) -lpicltree
@@ -97,7 +97,7 @@
 	$(LINT.c) $(SRCS)
 
 %.so: %.o
-	$(LINK.c) -o $@ $(GSHARED) -h $@ $<
+	$(LINK.c) -o $@ $(GSHARED) -h $@ $< $(LDLIBS)
 
 %.o: %.c
 	$(COMPILE.c) -o $@ $<
--- old/usr/src/cmd/rexd/Makefile	2015-03-13 12:28:29.052709417 -0400
+++ new/usr/src/cmd/rexd/Makefile	2015-03-13 12:28:29.059262036 -0400
@@ -22,6 +22,8 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 PROG=		rpc.rexd on
 # where under
@@ -112,7 +114,7 @@
 #rex_xdr.o \
 #rex_svc.o \
 #rex_clnt.o:	rex.h rex.c
-#	$(LINK.c) -c -o $@ rex.c
+#	$(LINK.c) -c -o $@ rex.c $(LDLIBS)
 
 on.o:		rex.h
 
--- old/usr/src/cmd/sgs/link_audit/Makefile.targ	2015-03-13 12:28:29.224339429 -0400
+++ new/usr/src/cmd/sgs/link_audit/Makefile.targ	2015-03-13 12:28:29.230893956 -0400
@@ -22,7 +22,7 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
 #
 
 %:	../common/%.ksh
@@ -67,7 +67,7 @@
 		$(POST_PROCESS_SO)
 
 dumpbind: $(OBJDIR)/dumpbind.o
-		$(LINK.c) -o $@ $(OBJDIR)/dumpbind.o
+		$(LINK.c) -o $@ $(OBJDIR)/dumpbind.o $(LDLIBS)
 		$(POST_PROCESS)
 
 $(ROOTUSRBIN)/%: %
--- old/usr/src/cmd/sgs/link_audit/common/Makefile.demo	2015-03-13 12:28:29.397985986 -0400
+++ new/usr/src/cmd/sgs/link_audit/common/Makefile.demo	2015-03-13 12:28:29.405072449 -0400
@@ -18,9 +18,9 @@
 #
 # CDDL HEADER END
 #
-
 #
 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 MACH:sh=	uname -p
@@ -74,7 +74,7 @@
 
 dumpbind: \
 	obj32/dumpbind.o
-	$(LINK.c) obj32/dumpbind.o -o $@
+	$(LINK.c) obj32/dumpbind.o -o $@ $(LDLIBS)
 
 lib32/bindings.so.1: \
 	obj32/bindings.o obj32/env.o
--- old/usr/src/cmd/sqlite/Makefile	2015-03-13 12:28:29.567201031 -0400
+++ new/usr/src/cmd/sqlite/Makefile	2015-03-13 12:28:29.574223979 -0400
@@ -22,6 +22,8 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 PROG=		sqlite
 
@@ -53,7 +55,8 @@
 
 $(PROG): $(OBJS) $(SQLITEHDRDIR)/sqlite.h
 	$(LINK.c) -o $@ $(OBJS) \
-	    $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBSQLITE)
+	    $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
+	    $(LIBSQLITE) $(LDLIBS)
 	$(CTFMERGE) -t -L VERSION -o $@ $(OBJS) $(LIBSQLITE)
 	$(POST_PROCESS)
 
--- old/usr/src/cmd/vt/Makefile	2015-03-13 12:28:29.734838484 -0400
+++ new/usr/src/cmd/vt/Makefile	2015-03-13 12:28:29.741986058 -0400
@@ -22,6 +22,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 PROG= vtdaemon vtinfo vtxlock
 
@@ -33,7 +35,8 @@
 CFLAGS += $(CCVERBOSE)
 CERRWARN += -_gcc=-Wno-uninitialized
 
-LDLIBS += -lpam -lbsm
+vtdaemon := LDLIBS += -lpam -lbsm
+lint_vtdaemon := LDLIBS += -lpam -lbsm
 
 .KEEP_STATE:
 
@@ -44,15 +47,19 @@
 	$(POST_PROCESS)
 
 vtinfo: $(VTINFO_SRC)
-	$(LINK.c) -o $@ $(VTINFO_SRC)
+	$(LINK.c) -o $@ $(VTINFO_SRC) $(LDLIBS)
 	$(POST_PROCESS)
 
 install: all $(ROOTLIBPROG)
 
 clean:
 
-lint:
+lint: lint_vtdaemon lint_vtinfo
+
+lint_vtdaemon:
 	$(LINT.c) $(VTDAEMON_SRC) $(LDLIBS)
-	$(LINT.c) $(VTINFO_SRC)
+
+lint_vtinfo:
+	$(LINT.c) $(VTINFO_SRC) $(LDLIBS)
 
 include ../Makefile.targ
--- old/usr/src/cmd/ypcmd/Makefile	2015-03-13 12:28:29.904893892 -0400
+++ new/usr/src/cmd/ypcmd/Makefile	2015-03-13 12:28:29.911924115 -0400
@@ -22,6 +22,8 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2015 RackTop Systems.
+#
 
 BINPROG = ypmatch ypwhich ypcat
 SBINPROG = makedbm ypalias ypinit yppoll ypset
@@ -49,12 +51,18 @@
 		$(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
 		$(ROOTUSRSBIN) $(ROOTBIN)
 
-$(BINPROG) :=	LDLIBS += -lnsl
-$(NETYPPROG) :=	LDLIBS += -lnsl
 $(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
 ypinit :=	LDLIBS += -lnsl
 yppoll :=	LDLIBS += -lnsl
 ypset :=	LDLIBS += -lnsl
+ypbind :=	LDLIBS += -lnsl
+ypmatch :=	LDLIBS += -lnsl
+ypwhich :=	LDLIBS += -lnsl
+ypcat :=	LDLIBS += -lnsl
+yppush :=	LDLIBS += -lnsl
+mkalias :=	LDLIBS += -lnsl
+stdhosts :=	LDLIBS += -lnsl
+stdethers :=	LDLIBS += -lsocket
 makedbm :=	MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
 makedbm :=	LDFLAGS += $(MAPFILES:%=-M%)
 
@@ -68,7 +76,6 @@
 TXTS=	$(ETCFILES:%=net_files/%) $(YPFILES:%=net_files/%)
 SUBDIRS = yppasswd mknetid revnetgroup ypupdated yp2lscripts
 
-YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
 #
 # Some sort of obsolete idea of common files which are only now used by a 
 # few minor utilities
@@ -80,17 +87,19 @@
 #
 SHARED_DIR= ./shared
 SHAREDOBJ= $(SHARED_DIR)/utils.o $(SHARED_DIR)/lockmap.o $(SHARED_DIR)/ancil.o
-SHARESRC = $(SHAREOBJ:.o=.c)
+SHAREDSRC = $(SHAREDOBJ:%.o=%.c)
 
+YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
 YPXFROBJ = ypxfr.o ypxfrd_client.o ypxfrd_xdr.o
 YPMATOBJ = ypmatch.o nick.o
 YPWHIOBJ = ypwhich.o nick.o
 YPCATOBJ = ypcat.o nick.o
+MAKEDBMOBJ = makedbm.o
+YPALIASOBJ = ypalias.o
 UDPUBLICKEYOBJ = udpublickey.o
 MKALIASOBJ = mkalias.o
 STDETHERSOBJ = stdethers.o
 STDHOSTSOBJ = stdhosts.o
-#COMMONCLNTOBJ =	clnt_create_rsvd.o
 YPSERVOBJ = ypserv.o ypserv_map.o \
 		ypserv_proc.o ypserv_ancil.o \
 		ypserv_resolv.o ypserv_resolv_common.o \
@@ -103,31 +112,27 @@
 		$(YPBINDOBJ) $(UDPUBLICKEYOBJ)
 OBJS = $(NETYPOBJ) $(MKALIASOBJ) $(COMMONOBJ) $(SHAREDOBJ) \
 	$(YPPUSHOBJ) $(YPMATOBJ) $(YPWHIOBJ) $(YPCATOBJ) \
-	$(STDETHERSOBJ) $(STDHOSTSOBJ) makedbm.o ypalias.o pong.o
-
-BINSRC = $(BINPROG:=.c)
-
-SBINSRC = $(SBINPROG:=.c)
-
-NETYPSRC = $(NETYPOBJ:.o=.c)
-
-YPBINDSRC = $(YPBINSOBJ:.o=.c)
-
-YPXFRSRC =	$(YPXFROBJ:.o=.c)
+	$(STDETHERSOBJ) $(STDHOSTSOBJ) $(MAKEDBMOBJ) $(YPALIASOBJ)
 
-YPSERVSRC =	$(YPSERVOBJ:.o=.c)
-
-YPPUSHSRC =	$(YPPUSHOBJ:.o=.c)
-
-YPXFRDSRC =	$(YPXFRDOBJ:.o=.c)
-
-YPMASTERSRC =	$(YPMASTEROBJ:.o=.c)
-
-YPALLSRC =	$(YPALLOBJ:.o=.c)
-
-COMMONSRC = 	$(COMMONOBJ:.o=.c)
-
-#COMMONCLNTSRC =	$(COMMONCLNTOBJ:.o=.c)
+BINSRC =	$(BINPROG:%=%.c)
+SBINSRC =	$(SBINPROG:%=%.c)
+NETYPSRC =	$(NETYPOBJ:%.o=%.c)
+YPBINDSRC =	$(YPBINSOBJ:%.o=%.c)
+YPXFRSRC =	$(YPXFROBJ:%.o=%.c)
+YPMATSRC =	$(YPMATOBJ:%.o=%.c)
+YPWHISRC =	$(YPWHIOBJ:%.o=%.c)
+YPCATSRC =	$(YPCATOBJ:%.o=%.c)
+MAKEDBMSRC =	$(MAKEDBMOBJ:%.o=%.c)
+YPALIASSRC =	$(YPALIASOBJ:%.o=%.c)
+UDPUBLICKEYSRC =	$(UDPUBLICKEYOBJ:%.o=%.c)
+MKALIASSRC =	$(MKALIASOBJ:%.o=%.c)
+STDETHERSSRC =	$(STDETHERSOBJ:%.o=%.c)
+STDHOSTSSRC =	$(STDHOSTSOBJ:%.o=%.c)
+YPSERVSRC =	$(YPSERVOBJ:%.o=%.c)
+YPPUSHSRC =	$(YPPUSHOBJ:%.o=%.c)
+YPXFRDSRC =	$(YPXFRDOBJ:%.o=%.c)
+YPALLSRC =	$(YPALLOBJ:%.o=%.c)
+COMMONSRC = 	$(COMMONOBJ:%.o=%.c)
 
 SRCS = $(BINSRC) $(SBINSRC) $(NETYPSRC) \
 	$(COMMONSRC) $(SHAREDSRC)
@@ -152,12 +157,12 @@
 CERRWARN +=	-_gcc=-Wno-unused-function
 
 #conditional assignments
-ypalias.o :=	CPPFLAGS= -DMAIN $(CPPFLAGS.master)
-makedbm.o :=	CPPFLAGS= $(CPPFLAGS.master)
-yp_b_svc.o :=	CPPFLAGS += -DINIT_DEFAULT
+$(YPALIASOBJ) :=	CPPFLAGS= -DMAIN $(CPPFLAGS.master)
+$(MAKEDBMOBJ) :=	CPPFLAGS= $(CPPFLAGS.master)
+$(YPBINDOBJ) :=	CPPFLAGS += -DINIT_DEFAULT
 ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
-ypxfr.o := CPPFLAGS += $(NIS2LDAPINC)
-yppush.o := CPPFLAGS += $(NIS2LDAPINC)
+$(YPXFROBJ) := CPPFLAGS += $(NIS2LDAPINC)
+$(YPPUSHOBJ) := CPPFLAGS += $(NIS2LDAPINC)
 $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
 $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 $(ROOTVAR_YP)/Makefile := FILEMODE= 555
@@ -175,7 +180,7 @@
 lint:=		TARGET= lint
 cstyle :=	TARGET= cstyle
 
-all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS) 
+all: $(SHAREDOBJ) .WAIT $(SUBDIRS) $(PROG) $(TXTS)
 
 # install rules
 $(ROOTVAR_YP)/% \
@@ -190,8 +195,8 @@
 
 .KEEP_STATE:
 
-$(SHAREDOBJ): $(SHAREDSRC)
-	$(COMPILE.c) $(SHAREDSRC) -o $@ $<
+$(SHARED_DIR)/%.o: $(SHARED_DIR)/%.c
+	$(COMPILE.c) -o $@ $<
 
 ypbind: $(YPBINDOBJ)
 	$(LINK.c) $(YPBINDOBJ) -o $@ $(LDLIBS)
@@ -221,21 +226,16 @@
 
 ypxfrd_xdr.o ypxfrd_client.o: ypxfrd.h
 
-#clnt_create_rsvd.o ypxfr.o: clnt_create_rsvd.h
-
 ypxfrd: $(YPXFRDOBJ) $(SHAREDOBJ)
-	$(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) \
-	-o $@ $(LDLIBS) -lc
+	$(LINK.cc) $(YPXFRDOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
-ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(YPMASTEROBJ) $(SHAREDOBJ)
-	$(LINK.cc) -o $@ $(YPXFROBJ) $(YPMASTEROBJ) $(COMMONOBJ) \
-		$(SHAREDOBJ) $(LDLIBS)
+ypxfr: $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ)
+	$(LINK.cc) -o $@ $(YPXFROBJ) $(COMMONOBJ) $(SHAREDOBJ) $(LDLIBS)
 	$(POST_PROCESS)
 
 ypserv: $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ)
-	$(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) \
-		$(SHAREDOBJ) -o $@ $(LDLIBS)
+	$(LINK.cc) $(YPSERVOBJ) $(COMMONOBJ) $(SHAREDOBJ) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 yppush: $(YPPUSHOBJ) $(COMMONOBJ)
@@ -243,15 +243,15 @@
 	$(POST_PROCESS)
 
 udpublickey: $(UDPUBLICKEYOBJ)
-	$(LINK.c) $(UDPUBLICKEYOBJ) -o $@
+	$(LINK.c) $(UDPUBLICKEYOBJ) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 mkalias: $(MKALIASOBJ)
-	$(LINK.c) $(MKALIASOBJ) -o $@ -lnsl
+	$(LINK.c) $(MKALIASOBJ) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 stdethers: $(STDETHERSOBJ)
-	$(LINK.c) $(STDETHERSOBJ) -o $@ -lsocket
+	$(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 stdhosts: $(STDHOSTSOBJ)
@@ -271,28 +271,19 @@
 lint := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 
 lint:	$(SUBDIRS)
-	$(LINT.c) ypmatch.c nick.c -lnsl
-	$(LINT.c) ypwhich.c nick.c -lnsl
-	$(LINT.c) ypcat.c nick.c -lnsl
-	$(LINT.c) makedbm.c getlist.c yp_getalias.c
-	$(LINT.c) ypalias.c getlist.c yp_getalias.c
-	$(LINT.c) yp_b_svc.c yp_b_subr.c rpc_bootstrap.c getlist.c -lnsl
-	$(LINT.c) ypxfr.c ypxfrd_client.c ypxfrd_xdr.c getlist.c yp_getalias.c \
-		./shared/utils.c ./shared/lockmap.c ./shared/ancil.c -lnsl
-	$(LINT.c) yppush.c getlist.c yp_getalias.c -lnsl
-	$(LINT.c) udpublickey.c
-	$(LINT.c) mkalias.c -lnsl
-	$(LINT.c) stdethers.c -lsocket
-	$(LINT.c) stdhosts.c -lnsl
-	$(LINT.c) ypxfrd_svc.c ypxfrd_xdr.c ypxfrd_server.c \
-		ypserv_net_secure.c \
-		./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
-		-lnsl -lnisdb
-	$(LINT.c) ypserv.c ypserv_map.c ypserv_proc.c ypserv_ancil.c \
-		ypserv_resolv.c ypserv_resolv_common.c ypv1_xdr.c \
-		ypserv_net_secure.c getlist.c yp_getalias.c \
-		./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
-		-lnsl -lnisdb
+	$(LINT.c) $(UDPUBLICKEYSRC) $(LDLIBS)
+	$(LINT.c) $(MAKEDBMSRC) $(COMMONSRC) $(LDLIBS)
+	$(LINT.c) $(YPALIASSRC) $(COMMONSRC) $(LDLIBS)
+	$(LINT.c) $(YPMATSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(YPWHISRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(YPCATSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(YPBINDSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(MKALIASSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(STDHOSTSSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(STDETHERSSRC) $(LDLIBS) -lsocket
+	$(LINT.c) $(YPPUSHSRC) $(COMMONSRC) $(LDLIBS) -lnsl
+	$(LINT.c) $(YPXFRSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
+	$(LINT.c) $(YPSERVSRC) $(COMMONSRC) $(SHAREDSRC) $(LDLIBS) -lnsl -lnisdb
 
 check: $(CHKMANIFEST)
 
--- old/usr/src/lib/Makefile	2015-03-13 12:28:30.085784491 -0400
+++ new/usr/src/lib/Makefile	2015-03-13 12:28:30.092877208 -0400
@@ -23,8 +23,9 @@
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
-# Copyright (c) 2013 Gary Mills
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2015 Gary Mills
+# Copyright 2015 RackTop Systems.
 
 include ../Makefile.master
 
@@ -567,27 +568,27 @@
 libbe: 		libzfs
 libbsm:		libtsol
 libcmd: 	libsum libast libsocket libnsl
-libcmdutils:	libavl
+libcmdutils:	libavl libnvpair
 libcontract:	libnvpair
 libdevid:	libdevinfo
 libdevinfo:	libnvpair libsec
 libdhcpagent:	libsocket libdhcputil libuuid libdlpi libcontract
 libdhcputil:	libnsl libgen libinetutil libdlpi
 libdladm:	libdevinfo libinetutil libsocket libscf librcm libnvpair \
-		libexacct libnsl libkstat libcurses
+		libexacct libnsl libkstat libcurses libpool
 libdll: 	libast
 libdlpi:	libinetutil libdladm
 libds:		libsysevent
 libdscfg:	libnsctl libunistat libsocket libnsl
-libdtrace:	libproc libgen libctf
+libdtrace:	libproc libgen libctf libmapmalloc
 libdtrace_jni:	libuutil libdtrace
 libefi:		libuuid
 libfstyp:	libnvpair
-libelfsign:	libcryptoutil libkmf
+libelfsign:	libcryptoutil libkmf libmd
 libidmap:	libadutils libldap5 libavl libsldap libuutil
 libipadm:	libnsl libinetutil libsocket libdlpi libnvpair libdhcpagent \
 		libdladm libsecdb
-libiscsit:	libc libnvpair libstmf libuuid libnsl
+libiscsit:	libc libnvpair libstmf libuuid libnsl libscf
 libkmf:		libcryptoutil pkcs11
 libm:		libc
 libm1:		libc libm
@@ -600,7 +601,7 @@
 libipsecutil:	libtecla libsocket
 libinstzones:	libzonecfg libcontract
 libpkg:		libwanboot libscf libadm
-libnwam:	libscf
+libnwam:	libbsm libdladm libnsl libnvpair libscf libsecdb libsocket
 libsecdb:	libnsl
 libsasl:	libgss libsocket pkcs11 libmd
 sasl_plugins:	pkcs11 libgss libsocket libsasl
@@ -618,6 +619,7 @@
 libpp:		libast
 libzonecfg:	libc libsocket libnsl libuuid libnvpair libsysevent libsec \
 		libbrand libpool libscf
+libzonestat:	libcmdutils libumem
 libproc:	../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf libsaveargs
 libproject:	libpool libproc libsecdb
 libtermcap:	libcurses
@@ -629,7 +631,7 @@
 pam_modules:	libproject passwdutil smbsrv
 libscf:		libuutil libmd libgen libsmbios libnsl
 libinetsvc:	libscf
-librestart:	libuutil libscf
+librestart:	libuutil libscf libpool
 libsaveargs:	libdisasm
 ../cmd/sgs/libdl:	../cmd/sgs/libconv
 ../cmd/sgs/libelf:	../cmd/sgs/libconv
@@ -640,7 +642,7 @@
 		libadm libavl libefi libidmap libmd libzfs_core libm
 libzfs_core:	libnvpair
 libzfs_jni:	libdiskmgt libnvpair libzfs
-libzpool:	libavl libumem libnvpair libcmdutils
+libzpool:	libavl libumem libnvpair libcmdutils libsysevent libmd
 libsec:		libavl libidmap
 brand:		libc libsocket
 libshare:	libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
@@ -658,7 +660,7 @@
 sun_fc:		libdevinfo libsysevent libnvpair
 libsun_ima:	libdevinfo libsysevent libnsl
 sun_sas:	libdevinfo libsysevent libnvpair libkstat libdevid
-libgrubmgmt:	libdevinfo libzfs libfstyp
+libgrubmgmt:	libdevinfo libzfs libfstyp libfdisk
 pylibbe: 	libbe libzfs
 pyzfs:		libnvpair libzfs
 pysolaris:	libsec libidmap
--- old/usr/src/lib/libc/port/mapfile-vers	2015-03-13 12:28:30.269348910 -0400
+++ new/usr/src/lib/libc/port/mapfile-vers	2015-03-13 12:28:30.275696150 -0400
@@ -29,6 +29,7 @@
 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
 # Copyright (c) 2013 Gary Mills
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2015 RackTop Systems.
 
 #
 # MAPFILE HEADER START
@@ -273,7 +274,6 @@
 	aio_waitn;
 	aio_write;
 	aiowrite;
-	asprintf;
 	assfail;
 	backtrace;
 	backtrace_symbols;
@@ -304,7 +304,6 @@
 	faccessat;
 	fchmodat;
 	fcloseall;
-	fdatasync;
 	ffsl;
 	ffsll;
 	fgetattr;
@@ -389,7 +388,6 @@
 	sigqueue;
 	sigtimedwait;
 	sigwaitinfo;
-	smt_pause;
 	stpcpy;
 	stpncpy;
 	strcasestr;
@@ -413,7 +411,6 @@
 	uconv_u32tou8;
 	uconv_u8tou16;
 	uconv_u8tou32;
-	vasprintf;
 	verr;
 	verrx;
 	vforkx;
@@ -444,6 +441,14 @@
 	posix_fadvise64;
 	posix_fallocate64;
 $endif
+} SUNW_1.22.7;
+
+SYMBOL_VERSION SUNW_1.22.7 {	# s10u10 - SunOS 5.10 (Solaris 10) patch additions
+    protected:
+	asprintf;
+	fdatasync;
+	smt_pause;
+	vasprintf;
 } SUNW_1.22.6;
 
 SYMBOL_VERSION SUNW_1.22.6 {	# s10u9 - SunOS 5.10 (Solaris 10) patch additions
--- old/usr/src/lib/libdtrace/Makefile.com	2015-03-13 12:28:30.511395414 -0400
+++ new/usr/src/lib/libdtrace/Makefile.com	2015-03-13 12:28:30.518508047 -0400
@@ -21,6 +21,7 @@
 #
 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 LIBRARY = libdtrace.a
@@ -132,8 +133,7 @@
 CERRWARN += -_gcc=-Wno-switch
 
 YYCFLAGS =
-LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
-DRTILDLIBS = $(LDLIBS.lib) -lc
+$(LIBS) := LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
 
 yydebug := YYCFLAGS += -DYYDEBUG
 
@@ -162,7 +162,7 @@
 lint: lintdlink lintcheck
 
 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
-	$(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(DRTILDLIBS)
+	$(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(LDLIBS) -lc
 
 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
 	$(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
@@ -229,7 +229,7 @@
 
 $(LIBDAUDIT): $(LIBDAUDITOBJS)
 	$(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
-	    $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
+	    $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) $(LDLIBS) \
 	    -lmapmalloc -lc -lproc
 	$(POST_PROCESS_SO)
 
--- old/usr/src/lib/scsi/plugins/scsi/engines/Makefile.targ	2015-03-13 12:28:30.697998638 -0400
+++ new/usr/src/lib/scsi/plugins/scsi/engines/Makefile.targ	2015-03-13 12:28:30.709259090 -0400
@@ -18,12 +18,12 @@
 #
 # CDDL HEADER END
 #
-
 #
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
+#
 
 all: $(PROG) $(DMODPROG)
 
@@ -37,7 +37,7 @@
 
 $(DMODPROG): $(DMOD_OBJS)
 	-@mkdir -p $(@D)
-	$(LINK.c) $(DMOD_OBJS) -o $@
+	$(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 %.o: %.c
--- old/usr/src/lib/scsi/plugins/ses/Makefile.targ	2015-03-13 12:28:30.875484756 -0400
+++ new/usr/src/lib/scsi/plugins/ses/Makefile.targ	2015-03-13 12:28:30.884029453 -0400
@@ -18,12 +18,12 @@
 #
 # CDDL HEADER END
 #
-
 #
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
+# Copyright 2015 RackTop Systems.
+#
 
 all: $(PROG) $(DMODPROG)
 
@@ -37,7 +37,7 @@
 
 $(DMODPROG): $(DMOD_OBJS)
 	-@mkdir -p $(@D)
-	$(LINK.c) $(DMOD_OBJS) -o $@
+	$(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 %.o: %.c
--- old/usr/src/lib/scsi/plugins/smp/Makefile.targ	2015-03-13 12:28:31.051043967 -0400
+++ new/usr/src/lib/scsi/plugins/smp/Makefile.targ	2015-03-13 12:28:31.058973585 -0400
@@ -18,9 +18,9 @@
 #
 # CDDL HEADER END
 #
-
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 all: $(PROG) $(DMODPROG)
@@ -35,7 +35,7 @@
 
 $(DMODPROG): $(DMOD_OBJS)
 	-@mkdir -p $(@D)
-	$(LINK.c) $(DMOD_OBJS) -o $@
+	$(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS)
 	$(POST_PROCESS)
 
 %.o: %.c
