Print this page
12312 fix unused lib dependencies


   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2015 Gary Mills
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 # Copyright (c) 2018, Joyent, Inc.
  26 #
  27 
  28 BINPROG = ypmatch ypwhich ypcat
  29 SBINPROG = makedbm ypalias ypinit yppoll ypset
  30 NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
  31                 multi multi.awk stdethers stdhosts \
  32                 ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
  33                 ypstart ypstop
  34 NIS2LDAPPROG = ypxfrd ypserv ypxfr
  35 SVCMETHOD = yp
  36 PROG=   $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
  37 
  38 MANIFEST = server.xml client.xml xfr.xml
  39 
  40 # These only need -lnsl
  41 LNSLPROG = ypmatch ypwhich ypcat yppoll ypset \
  42         ypbind ypxfr yppush mkalias stdhosts
  43 
  44 include ../Makefile.cmd
  45 


 140 IBINPROG=               $(BINPROG:%=$(ROOTBIN)/%)
 141 ISBINPROG=              $(SBINPROG:%=$(ROOTUSRSBIN)/%)
 142 INETYPPROG=             $(NETYPPROG:%=$(NETYP)/%)
 143 INIS2LDAPPROG =         $(NIS2LDAPPROG:%=$(NETYP)/%)
 144 
 145 NIS2LDAPINC =           -I$(SRC)/lib/libnisdb/yptol
 146 
 147 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
 148 CERRWARN +=     -_gcc=-Wno-parentheses
 149 CERRWARN +=     -_gcc=-Wno-unused-variable
 150 CERRWARN +=     $(CNOWARN_UNINIT)
 151 CERRWARN +=     -_gcc=-Wno-switch
 152 CERRWARN +=     -_gcc=-Wno-extra
 153 CERRWARN +=     -_gcc=-Wno-unused-label
 154 CERRWARN +=     -_gcc=-Wno-address
 155 CERRWARN +=     -_gcc=-Wno-unused-function
 156 
 157 # too many unknown types
 158 SMATCH =        off
 159 


 160 #conditional assignments
 161 ypalias.o :=    CPPFLAGS= -DMAIN $(CPPFLAGS.master)
 162 makedbm.o :=    CPPFLAGS= $(CPPFLAGS.master)
 163 yp_b_svc.o :=   CPPFLAGS += -DINIT_DEFAULT
 164 ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
 165 ypxfr.o := CPPFLAGS += $(NIS2LDAPINC)
 166 yppush.o := CPPFLAGS += $(NIS2LDAPINC)
 167 $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
 168 $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 169 $(ROOTVAR_YP)/Makefile := FILEMODE= 555
 170 $(ROOTVAR_YP)/nicknames := FILEMODE= 644
 171 $(ROOTVAR_YP)/updaters := FILEMODE= 500
 172 $(ROOTETC)/publickey := FILEMODE= 644
 173 # non-default file attributes to avoid conflict with rpcsrc
 174 NETYP =         $(NETSVC)/yp
 175 
 176 
 177 all:=           TARGET= all
 178 install:=       TARGET= install
 179 clean:=         TARGET= clean
 180 clobber:=       TARGET= clobber
 181 lint:=          TARGET= lint
 182 cstyle :=       TARGET= cstyle
 183 
 184 all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS) 
 185 
 186 # install rules
 187 $(ROOTVAR_YP)/% \
 188 $(ROOTETC)/%: net_files/%
 189         $(INS.file)
 190 
 191 $(ROOTVAR_YP)/% : net_files/%
 192         $(INS.file)
 193 
 194 $(NETYP)/%: %
 195         $(INS.file)
 196 
 197 .KEEP_STATE:
 198 
 199 $(SHAREDOBJ): $(SHAREDSRC)
 200         $(COMPILE.c) $(SHAREDSRC) -o $@ $<
 201 


 257         $(POST_PROCESS)
 258 
 259 stdethers: $(STDETHERSOBJ)
 260         $(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
 261         $(POST_PROCESS)
 262 
 263 stdhosts: $(STDHOSTSOBJ)
 264         $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
 265         $(POST_PROCESS)
 266 
 267 install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
 268         $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
 269         $(ROOTSVCMETHOD)
 270 
 271 $(ROOTDIRS):
 272         $(INS.dir)
 273 
 274 $(SUBDIRS): FRC
 275         @cd $@; pwd; $(MAKE) $(TARGET)
 276 
 277 lint := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 278 
 279 lint:   $(SUBDIRS)
 280         $(LINT.c) ypmatch.c nick.c -lnsl
 281         $(LINT.c) ypwhich.c nick.c -lnsl
 282         $(LINT.c) ypcat.c nick.c -lnsl
 283         $(LINT.c) makedbm.c getlist.c yp_getalias.c
 284         $(LINT.c) ypalias.c getlist.c yp_getalias.c
 285         $(LINT.c) yp_b_svc.c yp_b_subr.c rpc_bootstrap.c getlist.c -lnsl
 286         $(LINT.c) ypxfr.c ypxfrd_client.c ypxfrd_xdr.c getlist.c yp_getalias.c \
 287                 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c -lnsl
 288         $(LINT.c) yppush.c getlist.c yp_getalias.c -lnsl
 289         $(LINT.c) udpublickey.c
 290         $(LINT.c) mkalias.c -lnsl
 291         $(LINT.c) stdethers.c -lsocket
 292         $(LINT.c) stdhosts.c -lnsl
 293         $(LINT.c) ypxfrd_svc.c ypxfrd_xdr.c ypxfrd_server.c \
 294                 ypserv_net_secure.c \
 295                 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
 296                 -lnsl -lnisdb
 297         $(LINT.c) ypserv.c ypserv_map.c ypserv_proc.c ypserv_ancil.c \
 298                 ypserv_resolv.c ypserv_resolv_common.c ypv1_xdr.c \
 299                 ypserv_net_secure.c getlist.c yp_getalias.c \
 300                 ./shared/utils.c ./shared/lockmap.c ./shared/ancil.c \
 301                 -lnsl -lnisdb
 302 
 303 check: $(CHKMANIFEST)
 304 
 305 cstyle: $(SUBDIRS)
 306         ${CSTYLE} `echo $(SRCS) | sed 's/ypinit.c//'`
 307 
 308 clean:  $(SUBDIRS)
 309         $(RM) $(OBJS) $(CLEANFILES)
 310 
 311 clobber: clean $(SUBDIRS)
 312 
 313 FRC:
 314 
 315 include ../Makefile.targ


   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2015 Gary Mills
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 # Copyright 2020 Joyent, Inc.
  26 #
  27 
  28 BINPROG = ypmatch ypwhich ypcat
  29 SBINPROG = makedbm ypalias ypinit yppoll ypset
  30 NETYPPROG = ypbind ypxfr yppush udpublickey mkalias \
  31                 multi multi.awk stdethers stdhosts \
  32                 ypxfr_1perday ypxfr_1perhour ypxfr_2perday \
  33                 ypstart ypstop
  34 NIS2LDAPPROG = ypxfrd ypserv ypxfr
  35 SVCMETHOD = yp
  36 PROG=   $(BINPROG) $(SBINPROG) $(NETYPPROG) $(NIS2LDAPPROG) $(SVCMETHOD)
  37 
  38 MANIFEST = server.xml client.xml xfr.xml
  39 
  40 # These only need -lnsl
  41 LNSLPROG = ypmatch ypwhich ypcat yppoll ypset \
  42         ypbind ypxfr yppush mkalias stdhosts
  43 
  44 include ../Makefile.cmd
  45 


 140 IBINPROG=               $(BINPROG:%=$(ROOTBIN)/%)
 141 ISBINPROG=              $(SBINPROG:%=$(ROOTUSRSBIN)/%)
 142 INETYPPROG=             $(NETYPPROG:%=$(NETYP)/%)
 143 INIS2LDAPPROG =         $(NIS2LDAPPROG:%=$(NETYP)/%)
 144 
 145 NIS2LDAPINC =           -I$(SRC)/lib/libnisdb/yptol
 146 
 147 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
 148 CERRWARN +=     -_gcc=-Wno-parentheses
 149 CERRWARN +=     -_gcc=-Wno-unused-variable
 150 CERRWARN +=     $(CNOWARN_UNINIT)
 151 CERRWARN +=     -_gcc=-Wno-switch
 152 CERRWARN +=     -_gcc=-Wno-extra
 153 CERRWARN +=     -_gcc=-Wno-unused-label
 154 CERRWARN +=     -_gcc=-Wno-address
 155 CERRWARN +=     -_gcc=-Wno-unused-function
 156 
 157 # too many unknown types
 158 SMATCH =        off
 159 
 160 ZGUIDANCE = -zguidance=nounused
 161 
 162 #conditional assignments
 163 ypalias.o :=    CPPFLAGS= -DMAIN $(CPPFLAGS.master)
 164 makedbm.o :=    CPPFLAGS= $(CPPFLAGS.master)
 165 yp_b_svc.o :=   CPPFLAGS += -DINIT_DEFAULT
 166 ypxfrd_svc.o := CPPFLAGS += -Dmain=_main
 167 ypxfr.o := CPPFLAGS += $(NIS2LDAPINC)
 168 yppush.o := CPPFLAGS += $(NIS2LDAPINC)
 169 $(NIS2LDAPPROG) := CPPFLAGS += $(NIS2LDAPINC)
 170 $(SHAREDOBJ) := CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
 171 $(ROOTVAR_YP)/Makefile := FILEMODE= 555
 172 $(ROOTVAR_YP)/nicknames := FILEMODE= 644
 173 $(ROOTVAR_YP)/updaters := FILEMODE= 500
 174 $(ROOTETC)/publickey := FILEMODE= 644
 175 # non-default file attributes to avoid conflict with rpcsrc
 176 NETYP =         $(NETSVC)/yp
 177 
 178 
 179 all:=           TARGET= all
 180 install:=       TARGET= install
 181 clean:=         TARGET= clean
 182 clobber:=       TARGET= clobber

 183 cstyle :=       TARGET= cstyle
 184 
 185 all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS) 
 186 
 187 # install rules
 188 $(ROOTVAR_YP)/% \
 189 $(ROOTETC)/%: net_files/%
 190         $(INS.file)
 191 
 192 $(ROOTVAR_YP)/% : net_files/%
 193         $(INS.file)
 194 
 195 $(NETYP)/%: %
 196         $(INS.file)
 197 
 198 .KEEP_STATE:
 199 
 200 $(SHAREDOBJ): $(SHAREDSRC)
 201         $(COMPILE.c) $(SHAREDSRC) -o $@ $<
 202 


 258         $(POST_PROCESS)
 259 
 260 stdethers: $(STDETHERSOBJ)
 261         $(LINK.c) $(STDETHERSOBJ) -o $@ $(LDLIBS)
 262         $(POST_PROCESS)
 263 
 264 stdhosts: $(STDHOSTSOBJ)
 265         $(LINK.c) $(STDHOSTSOBJ) -o $@ $(LDLIBS)
 266         $(POST_PROCESS)
 267 
 268 install: all $(PROG) $(ROOTDIRS) $(ROOTETCFILE) $(ROOTYPFILES) $(IBINPROG) \
 269         $(ISBINPROG) $(INETYPPROG) $(INIS2LDAPPROG) $(SUBDIRS) $(ROOTMANIFEST) \
 270         $(ROOTSVCMETHOD)
 271 
 272 $(ROOTDIRS):
 273         $(INS.dir)
 274 
 275 $(SUBDIRS): FRC
 276         @cd $@; pwd; $(MAKE) $(TARGET)
 277 


























 278 check: $(CHKMANIFEST)
 279 
 280 cstyle: $(SUBDIRS)
 281         ${CSTYLE} `echo $(SRCS) | sed 's/ypinit.c//'`
 282 
 283 clean:  $(SUBDIRS)
 284         $(RM) $(OBJS) $(CLEANFILES)
 285 
 286 clobber: clean $(SUBDIRS)
 287 
 288 FRC:
 289 
 290 include ../Makefile.targ