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


   6 # (the "License").  You may not use this file except in compliance
   7 # with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 #
  23 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #

  26 
  27 #
  28 # Debugging targets
  29 #   sort provides a number of debugging options to simplify failure analysis.
  30 #
  31 #   debug               provides symbol information and sets DEBUG; includes
  32 #                       convert, invoke
  33 #   stats               builds binaries with statistics reporting enabled
  34 #   convert             builds convert binaries (converts input to collation
  35 #                       vectors)
  36 #   invoke              builds invoke binaries (allows inspection of options
  37 #                       parser outcome)
  38 #
  39 # Debugging #defines
  40 #   DEBUG               activate assertions; allow wider range of memory
  41 #                       settings (-S)
  42 #   DEBUG_FORCE_WIDE    force all i/o through wide streams
  43 #   DEBUG_DISALLOW_MMAP force all i/o through stdio or wide streams
  44 #   DEBUG_NO_CACHE_TEMP do not cache last sorted portion in memory; write all
  45 #                       data to temporary files before merge


  71 LNTS =  $(OBJS:%.o=%.ln)
  72 CLEANFILES = $(OBJS) $(XPG4OBJS) $(LNTS)
  73 
  74 include ../../Makefile.cmd
  75 
  76 SED =           sed
  77 DCFILE =        $(PROG).dc
  78 
  79 SPACEFLAG =
  80 SPACEFLAG64 =
  81 
  82 CFLAGS +=       $(CCVERBOSE) $(SORT_DEBUG)
  83 CFLAGS64 +=     $(CCVERBOSE) $(SORT_DEBUG)
  84 CPPFLAGS +=     -D_FILE_OFFSET_BITS=64
  85 LINTFLAGS +=    -U_FILE_OFFSET_BITS
  86 
  87 CERRWARN +=     -_gcc=-Wno-parentheses
  88 CERRWARN +=     -_gcc=-Wno-uninitialized
  89 CERRWARN +=     -_gcc=-Wno-unused-function
  90 



  91 $(XPG4) :=      CFLAGS += -DXPG4
  92 
  93 debug :=        SORT_DEBUG = -g -DDEBUG $(ILDOFF)
  94 debug :=        COPTFLAG =
  95 debug :=        COPTFLAG64 =
  96 stats   :=      SORT_DEBUG = -g -DSTATS -DDEBUG $(ILDOFF)
  97 stats   :=      COPTFLAG =
  98 stats   :=      COPTFLAG64 =
  99 
 100 .KEEP_STATE :
 101 
 102 .PARALLEL : $(OBJS) $(XPG4OBJS) $(LNTS)
 103 
 104 all : $(PROG) $(XPG4)
 105 
 106 debug : $(PROG) convert invoke
 107 
 108 lint : $(LNTS)
 109         $(LINT.c) $(LINTFLAGS) $(LNTS) $(LDLIBS)
 110 




   6 # (the "License").  You may not use this file except in compliance
   7 # with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 #
  23 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 # Copyright (c) 2018, Joyent, Inc.
  27 
  28 #
  29 # Debugging targets
  30 #   sort provides a number of debugging options to simplify failure analysis.
  31 #
  32 #   debug               provides symbol information and sets DEBUG; includes
  33 #                       convert, invoke
  34 #   stats               builds binaries with statistics reporting enabled
  35 #   convert             builds convert binaries (converts input to collation
  36 #                       vectors)
  37 #   invoke              builds invoke binaries (allows inspection of options
  38 #                       parser outcome)
  39 #
  40 # Debugging #defines
  41 #   DEBUG               activate assertions; allow wider range of memory
  42 #                       settings (-S)
  43 #   DEBUG_FORCE_WIDE    force all i/o through wide streams
  44 #   DEBUG_DISALLOW_MMAP force all i/o through stdio or wide streams
  45 #   DEBUG_NO_CACHE_TEMP do not cache last sorted portion in memory; write all
  46 #                       data to temporary files before merge


  72 LNTS =  $(OBJS:%.o=%.ln)
  73 CLEANFILES = $(OBJS) $(XPG4OBJS) $(LNTS)
  74 
  75 include ../../Makefile.cmd
  76 
  77 SED =           sed
  78 DCFILE =        $(PROG).dc
  79 
  80 SPACEFLAG =
  81 SPACEFLAG64 =
  82 
  83 CFLAGS +=       $(CCVERBOSE) $(SORT_DEBUG)
  84 CFLAGS64 +=     $(CCVERBOSE) $(SORT_DEBUG)
  85 CPPFLAGS +=     -D_FILE_OFFSET_BITS=64
  86 LINTFLAGS +=    -U_FILE_OFFSET_BITS
  87 
  88 CERRWARN +=     -_gcc=-Wno-parentheses
  89 CERRWARN +=     -_gcc=-Wno-uninitialized
  90 CERRWARN +=     -_gcc=-Wno-unused-function
  91 
  92 # not linted
  93 SMATCH=off
  94 
  95 $(XPG4) :=      CFLAGS += -DXPG4
  96 
  97 debug :=        SORT_DEBUG = -g -DDEBUG $(ILDOFF)
  98 debug :=        COPTFLAG =
  99 debug :=        COPTFLAG64 =
 100 stats   :=      SORT_DEBUG = -g -DSTATS -DDEBUG $(ILDOFF)
 101 stats   :=      COPTFLAG =
 102 stats   :=      COPTFLAG64 =
 103 
 104 .KEEP_STATE :
 105 
 106 .PARALLEL : $(OBJS) $(XPG4OBJS) $(LNTS)
 107 
 108 all : $(PROG) $(XPG4)
 109 
 110 debug : $(PROG) convert invoke
 111 
 112 lint : $(LNTS)
 113         $(LINT.c) $(LINTFLAGS) $(LNTS) $(LDLIBS)
 114