Print this page
10079 smatch Makefile changes for usr/src/lib


   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 #
  23 # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright 2018 Nexenta Systems, Inc. All rights reserved.

  25 #
  26 
  27 LIBRARY= libnsl.a
  28 VERS=   .1
  29 
  30 # objects are listed by source directory
  31 
  32 # common utility code used in more than one directory
  33 COMMON=         common.o daemon_utils.o
  34 
  35 DES=            des_crypt.o des_soft.o
  36 
  37 DIAL=           dial.o
  38 
  39 IPSEC=          algs.o
  40 
  41 NETDIR=         netdir.o
  42 
  43 NSS= \
  44 gethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \


 186 CPPFLAGS +=     -I$(SRC)/lib/libnsl/include -D_REENTRANT
 187 CPPFLAGS +=     -I$(SRC)/lib/libnsl/dial
 188 
 189 CFLAGS +=       $(CCVERBOSE)
 190 
 191 # Make string literals read-only to save memory.
 192 CFLAGS +=       $(XSTRCONST)
 193 CFLAGS64 +=     $(XSTRCONST)
 194 CCFLAGS +=      -_CC=-features=conststrings
 195 CCFLAGS64 +=    -_CC=-features=conststrings
 196 
 197 CERRWARN +=     -_gcc=-Wno-char-subscripts
 198 CERRWARN +=     -_gcc=-Wno-parentheses
 199 CERRWARN +=     -_gcc=-Wno-uninitialized
 200 CERRWARN +=     -_gcc=-Wno-switch
 201 CERRWARN +=     -_gcc=-Wno-char-subscripts
 202 CERRWARN +=     -_gcc=-Wno-empty-body
 203 CERRWARN +=     -_gcc=-Wno-unused-variable
 204 CERRWARN +=     -_gcc=-Wno-clobbered
 205 



 206 LIBMP =         -lmp
 207 lint :=         LIBMP =
 208 LDLIBS +=       $(LIBMP) -lmd -lc
 209 DYNFLAGS +=     $(ZNODELETE)
 210 
 211 $(LINTLIB):=    SRCS=$(SRCDIR)/$(LINTSRC)
 212 LINTFLAGS +=    -m -DPORTMAP
 213 LINTFLAGS64 +=  -m -DPORTMAP
 214 
 215 .KEEP_STATE:
 216 
 217 all: $(LIBS)
 218 
 219 # Don't lint WRAPPERS as they are explicitly unclean
 220 SRCS=   $(DES:%.o=../des/%.c)                   \
 221         $(DIAL:%.o=../dial/%.c)                 \
 222         $(IPSEC:%.o=../ipsec/%.c)               \
 223         $(NETDIR:%.o=../netdir/%.c)             \
 224         $(NSS:%.o=../nss/%.c)                   \
 225         $(NETSELECT:%.o=../netselect/%.c)       \


   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 #
  23 # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright 2018 Nexenta Systems, Inc. All rights reserved.
  25 # Copyright (c) 2018, Joyent, Inc.
  26 #
  27 
  28 LIBRARY= libnsl.a
  29 VERS=   .1
  30 
  31 # objects are listed by source directory
  32 
  33 # common utility code used in more than one directory
  34 COMMON=         common.o daemon_utils.o
  35 
  36 DES=            des_crypt.o des_soft.o
  37 
  38 DIAL=           dial.o
  39 
  40 IPSEC=          algs.o
  41 
  42 NETDIR=         netdir.o
  43 
  44 NSS= \
  45 gethostbyname_r.o gethostent.o gethostent_r.o gethostent6.o gethostby_door.o \


 187 CPPFLAGS +=     -I$(SRC)/lib/libnsl/include -D_REENTRANT
 188 CPPFLAGS +=     -I$(SRC)/lib/libnsl/dial
 189 
 190 CFLAGS +=       $(CCVERBOSE)
 191 
 192 # Make string literals read-only to save memory.
 193 CFLAGS +=       $(XSTRCONST)
 194 CFLAGS64 +=     $(XSTRCONST)
 195 CCFLAGS +=      -_CC=-features=conststrings
 196 CCFLAGS64 +=    -_CC=-features=conststrings
 197 
 198 CERRWARN +=     -_gcc=-Wno-char-subscripts
 199 CERRWARN +=     -_gcc=-Wno-parentheses
 200 CERRWARN +=     -_gcc=-Wno-uninitialized
 201 CERRWARN +=     -_gcc=-Wno-switch
 202 CERRWARN +=     -_gcc=-Wno-char-subscripts
 203 CERRWARN +=     -_gcc=-Wno-empty-body
 204 CERRWARN +=     -_gcc=-Wno-unused-variable
 205 CERRWARN +=     -_gcc=-Wno-clobbered
 206 
 207 # not linted
 208 SMATCH=off
 209 
 210 LIBMP =         -lmp
 211 lint :=         LIBMP =
 212 LDLIBS +=       $(LIBMP) -lmd -lc
 213 DYNFLAGS +=     $(ZNODELETE)
 214 
 215 $(LINTLIB):=    SRCS=$(SRCDIR)/$(LINTSRC)
 216 LINTFLAGS +=    -m -DPORTMAP
 217 LINTFLAGS64 +=  -m -DPORTMAP
 218 
 219 .KEEP_STATE:
 220 
 221 all: $(LIBS)
 222 
 223 # Don't lint WRAPPERS as they are explicitly unclean
 224 SRCS=   $(DES:%.o=../des/%.c)                   \
 225         $(DIAL:%.o=../dial/%.c)                 \
 226         $(IPSEC:%.o=../ipsec/%.c)               \
 227         $(NETDIR:%.o=../netdir/%.c)             \
 228         $(NSS:%.o=../nss/%.c)                   \
 229         $(NETSELECT:%.o=../netselect/%.c)       \