Print this page
5840 cmd/ypcmd build failed without usr/lib/libsocket.so on build host
@@ -17,10 +17,11 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
+# Copyright 2015 Gary Mills
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
BINPROG = ypmatch ypwhich ypcat
@@ -33,10 +34,14 @@
SVCMETHOD = yp
PROG= $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
MANIFEST = server.xml client.xml xfr.xml
+# These only need -lnsl
+LNSLPROG = ypmatch ypwhich ypcat yppoll ypset \
+ ypbind ypxfr yppush mkalias stdhosts
+
include ../Makefile.cmd
ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
# installed directories
@@ -47,16 +52,13 @@
ROOTBINDING = $(ROOTVAR_YP)/binding
ROOTDIRS = $(ROOT) $(ROOTUSR) $(ROOTLIB) $(ROOTETC) $(ROOTVAR) \
$(NETSVC) $(NETYP) $(ROOTVAR_YP) $(ROOTBINDING) \
$(ROOTUSRSBIN) $(ROOTBIN)
-$(BINPROG) := LDLIBS += -lnsl
-$(NETYPPROG) := LDLIBS += -lnsl
+$(LNSLPROG) := LDLIBS += -lnsl
$(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
-ypinit := LDLIBS += -lnsl
-yppoll := LDLIBS += -lnsl
-ypset := LDLIBS += -lnsl
+stdethers := LDLIBS += -lsocket
makedbm := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
makedbm := LDFLAGS += $(MAPFILES:%=-M%)
$(ROOTVAR_YP)/aliases := FILEMODE=555
@@ -241,19 +243,19 @@
yppush: $(YPPUSHOBJ) $(COMMONOBJ)
$(LINK.c) $(YPPUSHOBJ) $(COMMONOBJ) -o $@ $(LDLIBS)
$(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)
$(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)