Print this page
10080 smatch Makefile changes for usr/src/cmd
   1 #
   2 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #

   5 
   6 PROG            =       kproplog
   7 
   8 OBJS            =       kproplog.o
   9 DERIVED_OBJS    =       iprop_xdr.o
  10 
  11 SRCS=   $(OBJS:.o=.c)
  12 SRCS+=  $(DERIVED_OBJS:.o=.c)
  13 
  14 RSRC=   kproplog.c
  15 
  16 # Definitions needed to rpcgen iprop-related files
  17 ISRC= iprop.h iprop_xdr.c
  18 KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
  19 CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
  20 
  21 include ../../Makefile.cmd
  22 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  23 
  24 TEXT_DOMAIN = SUNW_OST_OSCMD
  25 POFILE  = kproplog.po
  26 POFILES = generic.po
  27 
  28 LDFLAGS         +=      -R$(KRB5RUNPATH) $(KRUNPATH)
  29 LDLIBS          +=      -L$(KRB5LIB) $(KLIB) -lnsl -lkdb -lkadm5clnt
  30 
  31 CPPFLAGS        +=      -I. -I$(SRC)/lib/krb5 \
  32                         -I$(KRB5IPROPDIR) \
  33                         -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  34                         -I$(SRC)/uts/common/gssapi/mechs/krb5/include
  35 
  36 CERRWARN        +=      -_gcc=-Wno-unused-variable
  37 CERRWARN        +=      -_gcc=-Wno-unused-function
  38 CERRWARN        +=      -_gcc=-Wno-implicit-function-declaration
  39 



  40 all:            $(PROG)
  41 
  42 $(PROG):        $(OBJS) $(DERIVED_OBJS)
  43         $(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
  44         $(POST_PROCESS)
  45 
  46 # Rules to rpcgen-erate derived files from the iprop.x spec file
  47 iprop.h:        $(KRB5IPROPDIR)/iprop.x
  48         $(RM) $@
  49         $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
  50 
  51 iprop_xdr.c:    iprop.h $(KRB5IPROPDIR)/iprop.x
  52         $(RM) $@
  53         $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
  54 
  55 # Explicitly state the dependancy on iprop.h
  56 $(OBJS): iprop.h
  57 
  58 install:        $(KRB5SBINPROG)
  59 
   1 #
   2 # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
   3 # Use is subject to license terms.
   4 #
   5 # Copyright (c) 2018, Joyent, Inc.
   6 
   7 PROG            =       kproplog
   8 
   9 OBJS            =       kproplog.o
  10 DERIVED_OBJS    =       iprop_xdr.o
  11 
  12 SRCS=   $(OBJS:.o=.c)
  13 SRCS+=  $(DERIVED_OBJS:.o=.c)
  14 
  15 RSRC=   kproplog.c
  16 
  17 # Definitions needed to rpcgen iprop-related files
  18 ISRC= iprop.h iprop_xdr.c
  19 KRB5IPROPDIR= $(SRC)/cmd/krb5/iprop
  20 CMD= grep -v "usr/src/cmd/krb5/iprop" > $@
  21 
  22 include ../../Makefile.cmd
  23 include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  24 
  25 TEXT_DOMAIN = SUNW_OST_OSCMD
  26 POFILE  = kproplog.po
  27 POFILES = generic.po
  28 
  29 LDFLAGS         +=      -R$(KRB5RUNPATH) $(KRUNPATH)
  30 LDLIBS          +=      -L$(KRB5LIB) $(KLIB) -lnsl -lkdb -lkadm5clnt
  31 
  32 CPPFLAGS        +=      -I. -I$(SRC)/lib/krb5 \
  33                         -I$(KRB5IPROPDIR) \
  34                         -I$(SRC)/lib/gss_mechs/mech_krb5/include \
  35                         -I$(SRC)/uts/common/gssapi/mechs/krb5/include
  36 
  37 CERRWARN        +=      -_gcc=-Wno-unused-variable
  38 CERRWARN        +=      -_gcc=-Wno-unused-function
  39 CERRWARN        +=      -_gcc=-Wno-implicit-function-declaration
  40 
  41 # not linted
  42 SMATCH=off
  43 
  44 all:            $(PROG)
  45 
  46 $(PROG):        $(OBJS) $(DERIVED_OBJS)
  47         $(LINK.c) $(OBJS) $(DERIVED_OBJS) -o $@ $(LDLIBS)
  48         $(POST_PROCESS)
  49 
  50 # Rules to rpcgen-erate derived files from the iprop.x spec file
  51 iprop.h:        $(KRB5IPROPDIR)/iprop.x
  52         $(RM) $@
  53         $(RPCGEN) -h $(KRB5IPROPDIR)/iprop.x > $@
  54 
  55 iprop_xdr.c:    iprop.h $(KRB5IPROPDIR)/iprop.x
  56         $(RM) $@
  57         $(RPCGEN) -c $(KRB5IPROPDIR)/iprop.x | $(CMD)
  58 
  59 # Explicitly state the dependancy on iprop.h
  60 $(OBJS): iprop.h
  61 
  62 install:        $(KRB5SBINPROG)
  63