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


   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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2015 RackTop Systems.

  24 #
  25 
  26 .KEEP_STATE:
  27 
  28 SRCS += fmd.c \
  29         fmd_api.c \
  30         fmd_alloc.c \
  31         fmd_asru.c \
  32         fmd_buf.c \
  33         fmd_builtin.c \
  34         fmd_case.c \
  35         fmd_ckpt.c \
  36         fmd_conf.c \
  37         fmd_ctl.c \
  38         fmd_dispq.c \
  39         fmd_dr.c \
  40         fmd_error.c \
  41         fmd_event.c \
  42         fmd_eventq.c \
  43         fmd_fmri.c \


 106 HDRS = fmd_api.h fmd_fmri.h
 107 ROOTCDIR = $(ROOT)/etc/fm/$(PROG)
 108 ROOTHDIR = $(ROOT)/usr/include/fm
 109 ROOTHDRS = $(HDRS:%=$(ROOTHDIR)/%)
 110 
 111 $(ROOTHDRS) := FILEMODE = 0644
 112 $(ROOTVSUB) := DIRMODE = 0755
 113 $(ROOTMANIFEST) := FILEMODE = 0444
 114 
 115 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
 116 CPPFLAGS += -I. -I../common
 117 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
 118 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
 119 LINTFLAGS += -mu
 120 CERRWARN += -_gcc=-Wno-switch
 121 CERRWARN += -_gcc=-Wno-parentheses
 122 CERRWARN += -_gcc=-Wno-uninitialized
 123 CERRWARN += -_gcc=-Wno-unused-variable
 124 CERRWARN += -_gcc=-Wno-clobbered
 125 



 126 $(PROG) := LDFLAGS += -R/usr/lib/fm
 127 $(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios \
 128                 -luuid -lnvpair -lexacct -lnsl -lumem -ldevinfo -lfmd_msg
 129 
 130 $(DMOD) := CFLAGS += $(CC_PICFLAGS) -G $(XREGSFLAG)
 131 $(DMOD) := LDFLAGS += $(ZTEXT) $(ZDEFS) $(MAPFILE-DMOD:%=-M%)
 132 
 133 #
 134 # rpcgen(1) produces code that wants to be in the foreground if we're compiled
 135 # DEBUG, which isn't appropriate for our daemon.  Forcibly undefine this code.
 136 # It also produces various lint warnings; turn these off for these files only.
 137 # Unfortunately we also have to turn off IGNOR2 for pass2 lint as well.
 138 #
 139 fmd_svc_adm.o fmd_svc_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
 140 fmd_xdr_adm.o fmd_xdr_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
 141 
 142 fmd_svc_adm.ln fmd_svc_api.ln fmd_xdr_adm.ln fmd_xdr_api.ln := LINTFLAGS += \
 143   -xerroff=E_FUNC_ARG_UNUSED -xerroff=E_FUNC_VAR_UNUSED -xerroff=E_STATIC_UNUSED
 144 
 145 lint_prog := LINTFLAGS += -xerroff=E_FUNC_RET_ALWAYS_IGNOR2




   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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2015 RackTop Systems.
  24 # Copyright (c) 2018, Joyent, Inc.
  25 #
  26 
  27 .KEEP_STATE:
  28 
  29 SRCS += fmd.c \
  30         fmd_api.c \
  31         fmd_alloc.c \
  32         fmd_asru.c \
  33         fmd_buf.c \
  34         fmd_builtin.c \
  35         fmd_case.c \
  36         fmd_ckpt.c \
  37         fmd_conf.c \
  38         fmd_ctl.c \
  39         fmd_dispq.c \
  40         fmd_dr.c \
  41         fmd_error.c \
  42         fmd_event.c \
  43         fmd_eventq.c \
  44         fmd_fmri.c \


 107 HDRS = fmd_api.h fmd_fmri.h
 108 ROOTCDIR = $(ROOT)/etc/fm/$(PROG)
 109 ROOTHDIR = $(ROOT)/usr/include/fm
 110 ROOTHDRS = $(HDRS:%=$(ROOTHDIR)/%)
 111 
 112 $(ROOTHDRS) := FILEMODE = 0644
 113 $(ROOTVSUB) := DIRMODE = 0755
 114 $(ROOTMANIFEST) := FILEMODE = 0444
 115 
 116 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
 117 CPPFLAGS += -I. -I../common
 118 CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
 119 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
 120 LINTFLAGS += -mu
 121 CERRWARN += -_gcc=-Wno-switch
 122 CERRWARN += -_gcc=-Wno-parentheses
 123 CERRWARN += -_gcc=-Wno-uninitialized
 124 CERRWARN += -_gcc=-Wno-unused-variable
 125 CERRWARN += -_gcc=-Wno-clobbered
 126 
 127 # not linted
 128 SMATCH=off
 129 
 130 $(PROG) := LDFLAGS += -R/usr/lib/fm
 131 $(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios \
 132                 -luuid -lnvpair -lexacct -lnsl -lumem -ldevinfo -lfmd_msg
 133 
 134 $(DMOD) := CFLAGS += $(CC_PICFLAGS) -G $(XREGSFLAG)
 135 $(DMOD) := LDFLAGS += $(ZTEXT) $(ZDEFS) $(MAPFILE-DMOD:%=-M%)
 136 
 137 #
 138 # rpcgen(1) produces code that wants to be in the foreground if we're compiled
 139 # DEBUG, which isn't appropriate for our daemon.  Forcibly undefine this code.
 140 # It also produces various lint warnings; turn these off for these files only.
 141 # Unfortunately we also have to turn off IGNOR2 for pass2 lint as well.
 142 #
 143 fmd_svc_adm.o fmd_svc_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
 144 fmd_xdr_adm.o fmd_xdr_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
 145 
 146 fmd_svc_adm.ln fmd_svc_api.ln fmd_xdr_adm.ln fmd_xdr_api.ln := LINTFLAGS += \
 147   -xerroff=E_FUNC_ARG_UNUSED -xerroff=E_FUNC_VAR_UNUSED -xerroff=E_STATIC_UNUSED
 148 
 149 lint_prog := LINTFLAGS += -xerroff=E_FUNC_RET_ALWAYS_IGNOR2