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


   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 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #

  26 
  27 SHELL=/usr/bin/ksh93
  28 
  29 LIBRARY=        libsum.a
  30 VERS=           .1
  31 
  32 OBJECTS= \
  33         sumlib.o
  34 
  35 include ../../Makefile.astmsg
  36 
  37 include ../../Makefile.lib
  38 
  39 # mapfile-vers does not live with the sources in in common/ to make
  40 # automated code updates easier.
  41 MAPFILES=       ../mapfile-vers
  42 
  43 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
  44 include ../../../Makefile.ast
  45 


  59 # may then cause silent breakage in the AST sources because the last -D
  60 # option specified overrides previous -D options so we prefer the current
  61 # way to explicitly list each single flag.
  62 # Notes:
  63 #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
  64 CPPFLAGS = \
  65         $(DTEXTDOM) $(DTS_ERRNO) \
  66         -Isrc/lib/libsum \
  67         -I$(ROOT)/usr/include/ast \
  68         -I$(ROOT)/usr/include \
  69         -D_PACKAGE_ast \
  70         -D_BLD_DLL
  71 
  72 CFLAGS += \
  73         $(ASTCFLAGS)
  74 CFLAGS64 += \
  75         $(ASTCFLAGS64)
  76 
  77 CERRWARN        += -_gcc=-Wno-parentheses
  78 


  79 # This codepath is performance-critical
  80 sparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  81 sparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  82 i386_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
  83 amd64_COPTFLAG=-_cc=-xO5  -_cc=-xprefetch=auto,explicit
  84 
  85 # Suppress this one warning as the fix would break old gcc, which upstream
  86 # still supports. This needs a better fix (later).
  87 pics/sumlib.o   := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
  88 
  89 .KEEP_STATE:
  90 
  91 all: $(LIBS)
  92 
  93 #
  94 # libsum is not lint-clean yet; fake up a target.  (You can use
  95 # "make lintcheck" to actually run lint; please send all lint fixes
  96 # upstream (to AT&T) so the next update will pull them into ON.)
  97 #
  98 lint:


   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 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 # Copyright (c) 2018, Joyent, Inc.
  27 
  28 SHELL=/usr/bin/ksh93
  29 
  30 LIBRARY=        libsum.a
  31 VERS=           .1
  32 
  33 OBJECTS= \
  34         sumlib.o
  35 
  36 include ../../Makefile.astmsg
  37 
  38 include ../../Makefile.lib
  39 
  40 # mapfile-vers does not live with the sources in in common/ to make
  41 # automated code updates easier.
  42 MAPFILES=       ../mapfile-vers
  43 
  44 # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
  45 include ../../../Makefile.ast
  46 


  60 # may then cause silent breakage in the AST sources because the last -D
  61 # option specified overrides previous -D options so we prefer the current
  62 # way to explicitly list each single flag.
  63 # Notes:
  64 #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
  65 CPPFLAGS = \
  66         $(DTEXTDOM) $(DTS_ERRNO) \
  67         -Isrc/lib/libsum \
  68         -I$(ROOT)/usr/include/ast \
  69         -I$(ROOT)/usr/include \
  70         -D_PACKAGE_ast \
  71         -D_BLD_DLL
  72 
  73 CFLAGS += \
  74         $(ASTCFLAGS)
  75 CFLAGS64 += \
  76         $(ASTCFLAGS64)
  77 
  78 CERRWARN        += -_gcc=-Wno-parentheses
  79 
  80 SMOFF += all_func_returns
  81 
  82 # This codepath is performance-critical
  83 sparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  84 sparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  85 i386_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
  86 amd64_COPTFLAG=-_cc=-xO5  -_cc=-xprefetch=auto,explicit
  87 
  88 # Suppress this one warning as the fix would break old gcc, which upstream
  89 # still supports. This needs a better fix (later).
  90 pics/sumlib.o   := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
  91 
  92 .KEEP_STATE:
  93 
  94 all: $(LIBS)
  95 
  96 #
  97 # libsum is not lint-clean yet; fake up a target.  (You can use
  98 # "make lintcheck" to actually run lint; please send all lint fixes
  99 # upstream (to AT&T) so the next update will pull them into ON.)
 100 #
 101 lint: