Print this page
10080 smatch Makefile changes for usr/src/cmd


   3 #
   4 # The contents of this file are subject to the terms of the
   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 (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.

  23 #
  24 # Makefile for name service cache daemon
  25 #
  26 
  27 PROG=           nscd
  28 MANIFEST=       name-service-cache.xml
  29 SVCMETHOD=      svc-nscd
  30 
  31 include ../Makefile.cmd
  32 
  33 ROOTMANIFESTDIR=        $(ROOTSVCSYSTEM)
  34 
  35 OBJS=   server.o getpw.o getgr.o gethost.o getnode.o \
  36         getether.o getrpc.o getproto.o getnet.o \
  37         getbootp.o getauth.o getserv.o \
  38         getnetmasks.o getprinter.o getproject.o \
  39         getexec.o getprof.o getuser.o cache.o \
  40         nscd_biggest.o nscd_wait.o \
  41         nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \
  42         nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \


  46         nscd_frontend.o nscd_admin.o nscd_door.o \
  47         gettnrhtp.o gettnrhdb.o
  48 
  49 CLOBBERFILES=   nscd
  50 
  51 SRCS=   ${OBJS:%.o=%.c}
  52 
  53 CFLAGS +=       $(CCVERBOSE)
  54 CPPFLAGS +=     -D_REENTRANT -DSUN_THREADS \
  55                 -I../../lib/libc/port/gen -I../../lib/libc/inc \
  56                 -I../../lib/libsldap/common
  57 LINTFLAGS +=    -erroff=E_GLOBAL_COULD_BE_STATIC2
  58 LINTFLAGS +=    -erroff=E_NAME_USED_NOT_DEF2
  59 LINTFLAGS +=    -erroff=E_NAME_DEF_NOT_USED2
  60 
  61 CERRWARN +=     -_gcc=-Wno-switch
  62 CERRWARN +=     -_gcc=-Wno-uninitialized
  63 CERRWARN +=     -_gcc=-Wno-parentheses
  64 CERRWARN +=     -_gcc=-Wno-type-limits
  65 



  66 # nscd interposes on many symbols, and must export others for its own dlsym()
  67 # use, and dlsym() calls from libc.  Itemizing the interfaces within a mapfile
  68 # is error-prone, so establish the whole object as an interposer.
  69 LDFLAGS +=      $(ZINTERPOSE)
  70 
  71 # TCOV_FLAG=    -ql
  72 
  73 PROGLIBS=       $(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl
  74 
  75 # install macros and rule
  76 #
  77 ROOTPROG=       ${ROOTUSRSBIN}/nscd
  78 
  79 .KEEP_STATE:
  80 
  81 all: $(PROG) $(NISPROG)
  82 
  83 ${PROG}: ${OBJS}
  84         ${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
  85         ${POST_PROCESS}




   3 #
   4 # The contents of this file are subject to the terms of the
   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 (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2018, Joyent, Inc.
  24 #
  25 # Makefile for name service cache daemon
  26 #
  27 
  28 PROG=           nscd
  29 MANIFEST=       name-service-cache.xml
  30 SVCMETHOD=      svc-nscd
  31 
  32 include ../Makefile.cmd
  33 
  34 ROOTMANIFESTDIR=        $(ROOTSVCSYSTEM)
  35 
  36 OBJS=   server.o getpw.o getgr.o gethost.o getnode.o \
  37         getether.o getrpc.o getproto.o getnet.o \
  38         getbootp.o getauth.o getserv.o \
  39         getnetmasks.o getprinter.o getproject.o \
  40         getexec.o getprof.o getuser.o cache.o \
  41         nscd_biggest.o nscd_wait.o \
  42         nscd_init.o nscd_access.o nscd_cfgfile.o nscd_config.o \
  43         nscd_dbimpl.o nscd_getentctx.o nscd_intaddr.o \


  47         nscd_frontend.o nscd_admin.o nscd_door.o \
  48         gettnrhtp.o gettnrhdb.o
  49 
  50 CLOBBERFILES=   nscd
  51 
  52 SRCS=   ${OBJS:%.o=%.c}
  53 
  54 CFLAGS +=       $(CCVERBOSE)
  55 CPPFLAGS +=     -D_REENTRANT -DSUN_THREADS \
  56                 -I../../lib/libc/port/gen -I../../lib/libc/inc \
  57                 -I../../lib/libsldap/common
  58 LINTFLAGS +=    -erroff=E_GLOBAL_COULD_BE_STATIC2
  59 LINTFLAGS +=    -erroff=E_NAME_USED_NOT_DEF2
  60 LINTFLAGS +=    -erroff=E_NAME_DEF_NOT_USED2
  61 
  62 CERRWARN +=     -_gcc=-Wno-switch
  63 CERRWARN +=     -_gcc=-Wno-uninitialized
  64 CERRWARN +=     -_gcc=-Wno-parentheses
  65 CERRWARN +=     -_gcc=-Wno-type-limits
  66 
  67 # not linted
  68 SMATCH=off
  69 
  70 # nscd interposes on many symbols, and must export others for its own dlsym()
  71 # use, and dlsym() calls from libc.  Itemizing the interfaces within a mapfile
  72 # is error-prone, so establish the whole object as an interposer.
  73 LDFLAGS +=      $(ZINTERPOSE)
  74 
  75 # TCOV_FLAG=    -ql
  76 
  77 PROGLIBS=       $(LDLIBS) -lresolv -lnsl -lsocket -lumem -lscf -lavl
  78 
  79 # install macros and rule
  80 #
  81 ROOTPROG=       ${ROOTUSRSBIN}/nscd
  82 
  83 .KEEP_STATE:
  84 
  85 all: $(PROG) $(NISPROG)
  86 
  87 ${PROG}: ${OBJS}
  88         ${LINK.c} ${OPT} -o $@ ${OBJS} ${PROGLIBS}
  89         ${POST_PROCESS}