Print this page
    
10079 smatch Makefile changes for usr/src/lib
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/krb5/kdb/Makefile.com
          +++ new/usr/src/lib/krb5/kdb/Makefile.com
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  
    | ↓ open down ↓ | 14 lines elided | ↑ open up ↑ | 
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  #
  22   22  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
       25 +# Copyright (c) 2018, Joyent, Inc.
  25   26  
  26   27  LIBRARY= libkdb.a
  27   28  VERS= .1
  28   29  
  29   30  # kdb
  30   31  KDBOBJS= \
  31   32          keytab.o \
  32   33          encrypt_key.o \
  33   34          decrypt_key.o \
  34   35          kdb_convert.o \
  35   36          kdb_cpw.o \
  36   37          kdb_default.o \
  37   38          kdb_log.o \
  38   39          kdb5.o
  39   40  
  40   41  DERIVED_OBJS= \
  41   42          iprop_xdr.o
  42   43  
  43   44  # Definitions needed to rpcgen iprop-related files
  44   45  ISRCHDR= ../iprop.h
  45   46  ISRCXDR= ../iprop_xdr.c
  46   47  KRB5IPROPDIR=   $(SRC)/cmd/krb5/iprop
  47   48  CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
  48   49  
  49   50  # libkdb5 needs to link against some files from kadm5
  50   51  KADM5DIR=       $(SRC)/lib/krb5/kadm5
  51   52  KADM5OBJS= alt_prof.o str_conv.o
  52   53  KADM5SRCS= $(KADM5DIR)/$(KADM5OBJS:%.o=%.c)
  53   54  
  54   55  OBJECTS= $(KDBOBJS) $(KADM5OBJS) $(DERIVED_OBJS)
  55   56  
  56   57  # include library definitions
  57   58  include ../../Makefile.lib
  58   59  
  59   60  SRCS=           $(KDBOBJS:%.o=../%.c)
  60   61  SRCS+=          $(DERIVED_OBJS:%.o=../%.c)
  61   62  SRCS+=          $(KADM5SRCS)
  62   63  
  63   64  LIBS=           $(DYNLIB)
  64   65  
  65   66  include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  66   67  
  67   68  POFILE = $(LIBRARY:%.a=%.po)
  68   69  POFILES = generic.po
  69   70  
  70   71  # override liblink
  71   72  INS.liblink=    -$(RM) $@; $(SYMLINK) $(LIBLINKS)$(VERS) $@
  72   73  
  73   74  CPPFLAGS +=     -DHAVE_CONFIG_H -DHAVE_BT_RSEQ \
  74   75                  -I$(KRB5IPROPDIR) \
  75   76                  -I$(SRC)/lib/krb5 \
  76   77                  -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  77   78                  -I$(SRC)/lib/gss_mechs/mech_krb5/krb5/os \
  78   79                  -I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5 \
  79   80                  -I$(SRC)/uts/common/gssapi/include/ \
  
    | ↓ open down ↓ | 45 lines elided | ↑ open up ↑ | 
  80   81                  -I$(SRC)/uts/common/gssapi/mechs/krb5/include
  81   82  
  82   83  CFLAGS +=       $(CCVERBOSE) -I..
  83   84  
  84   85  CERRWARN +=     -_gcc=-Wno-unused-variable
  85   86  CERRWARN +=     -_gcc=-Wno-unused-function
  86   87  CERRWARN +=     -_gcc=-Wno-type-limits
  87   88  CERRWARN +=     -_gcc=-Wno-uninitialized
  88   89  CERRWARN +=     -_gcc=-Wno-parentheses
  89   90  
       91 +SMOFF += indenting,all_func_returns,deref_check,signed
       92 +
  90   93  DYNFLAGS +=     $(KRUNPATH) $(KMECHLIB)
  91   94  LDLIBS +=       -lc -lnsl
  92   95  
  93   96  .KEEP_STATE:
  94   97  
  95   98  all:    $(LIBS)
  96   99  
  97  100  # Rules to rpcgen-erate derived files from the iprop.x spec file
  98  101  $(ISRCHDR):     $(KRB5IPROPDIR)/iprop.x
  99  102          $(RM)   $@
 100  103          $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
 101  104  
 102  105  $(ISRCXDR):     $(ISRCHDR) $(KRB5IPROPDIR)/iprop.x
 103  106          $(RM) $@
 104  107          $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
 105  108  
 106  109  CLEANFILES +=   $(ISRCHDR) $(ISRCXDR)
 107  110  
 108  111  # Explicitly state the dependancy on iprop.h
 109  112  $(LIBS): $(ISRCHDR)
 110  113  
 111  114  # We turn off ptr-cast warnings, since we're doing mmapping in kdb_log
 112  115  LINTFLAGS +=    -erroff=E_BAD_PTR_CAST_ALIGN
 113  116  
 114  117  lint:   lintcheck
 115  118  
 116  119  # include library targets
 117  120  include ../../Makefile.targ
 118  121  
 119  122  FRC:
 120  123  
 121  124  generic.po: FRC
 122  125          $(RM) messages.po
 123  126          $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext ../*.[ch]`
 124  127          $(SED) "/^domain/d" messages.po > $@
 125  128          $(RM) messages.po
  
    | ↓ open down ↓ | 26 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX