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


   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 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  26 # Copyright 2016 Toomas Soome <tsoome@me.com>

  27 #
  28 
  29 PROG=           finger rdate ruptime rwho whois
  30 SUIDPROG=       rcp rlogin rsh
  31 ALL=            $(PROG) $(SUIDPROG)
  32 SRCS=           $(ALL:%=%.c)
  33 KCMDPROGS=      rcp rlogin rsh
  34 
  35 SUBDIRS=        chat dns-sd ftp nc nca netstat \
  36                 pppd pppdump pppstats rdist talk telnet tftp
  37 SUBDIR1=        talk 
  38 MSGSUBDIRS=     nca talk
  39 
  40 # As programs get lint-clean, add them here.  Eventually.
  41 # This hack should go away, and all in PROG should be lint-clean.
  42 LINTCLEAN=      rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
  43 
  44 # Likewise, as subdirs get lint-clean, add them here.  Once
  45 # they're all clean, replace the dependency of the lint target
  46 # with SUBDIRS.  Also (sigh) deal with the commented-out build lines


  58 POFILE=         usr.bin.po
  59 
  60 CLOBBERFILES += $(ALL)
  61 CLEANFILES +=   kcmd.o rcp.o rlogin.o rsh.o
  62 
  63 all:=           TARGET= all
  64 install:=       TARGET= install
  65 clean:=         TARGET= clean
  66 clobber:=       TARGET= clobber
  67 lint:=          TARGET= lint
  68 _msg:=          TARGET= _msg
  69 
  70 ROOTSUIDPROG=   $(SUIDPROG:%=$(ROOTBIN)/%)
  71 $(ROOTSUIDPROG) :=      FILEMODE=       04555
  72 
  73 CPPFLAGS +=     -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR)
  74 CERRWARN +=     -_gcc=-Wno-parentheses
  75 CERRWARN +=     -_gcc=-Wno-uninitialized
  76 CERRWARN +=     -_gcc=-Wno-unused-function
  77 


  78 # Eventually just plain CFLAGS should be += -v, but not until all in
  79 # PROGS are lint clean.
  80 $(LINTCLEAN)    :=      CFLAGS += $(CCVERBOSE)
  81 
  82 finger :=       CFLAGS += $(CCVERBOSE)
  83 # Enable large file support for reading the lastlog file.
  84 finger :=       CPPFLAGS += -D_FILE_OFFSET_BITS=64
  85 
  86 finger :=               LDLIBS += -lnsl -lcurses -lsocket
  87 rcp lint-rcp :=         LDLIBS += -lsocket -lsec -lsendfile
  88 rdate lint-rdate:=      LDLIBS += -lsocket
  89 rlogin lint-rlogin :=   LDLIBS += -lnsl -lsocket
  90 rsh lint-rsh :=         LDLIBS += -lsocket
  91 whois lint-whois :=     LDLIBS += -lsocket
  92 
  93 include  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  94 $(KCMDPROGS)    :=      LDLIBS += -lnsl -lmech_krb5
  95 $(KCMDPROGS)    :=      LDFLAGS += $(ZIGNORE) $(KRUNPATH) \
  96                                 -L$(ROOT)$(KLIBDIR_DO) \
  97                                 -L$(ROOT)$(KLIBDIR_GL)




   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 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  26 # Copyright 2016 Toomas Soome <tsoome@me.com>
  27 # Copyright (c) 2018, Joyent, Inc.
  28 #
  29 
  30 PROG=           finger rdate ruptime rwho whois
  31 SUIDPROG=       rcp rlogin rsh
  32 ALL=            $(PROG) $(SUIDPROG)
  33 SRCS=           $(ALL:%=%.c)
  34 KCMDPROGS=      rcp rlogin rsh
  35 
  36 SUBDIRS=        chat dns-sd ftp nc nca netstat \
  37                 pppd pppdump pppstats rdist talk telnet tftp
  38 SUBDIR1=        talk
  39 MSGSUBDIRS=     nca talk
  40 
  41 # As programs get lint-clean, add them here.  Eventually.
  42 # This hack should go away, and all in PROG should be lint-clean.
  43 LINTCLEAN=      rlogin.c rsh.c rcp.c rdate.c rwho.c whois.c
  44 
  45 # Likewise, as subdirs get lint-clean, add them here.  Once
  46 # they're all clean, replace the dependency of the lint target
  47 # with SUBDIRS.  Also (sigh) deal with the commented-out build lines


  59 POFILE=         usr.bin.po
  60 
  61 CLOBBERFILES += $(ALL)
  62 CLEANFILES +=   kcmd.o rcp.o rlogin.o rsh.o
  63 
  64 all:=           TARGET= all
  65 install:=       TARGET= install
  66 clean:=         TARGET= clean
  67 clobber:=       TARGET= clobber
  68 lint:=          TARGET= lint
  69 _msg:=          TARGET= _msg
  70 
  71 ROOTSUIDPROG=   $(SUIDPROG:%=$(ROOTBIN)/%)
  72 $(ROOTSUIDPROG) :=      FILEMODE=       04555
  73 
  74 CPPFLAGS +=     -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR)
  75 CERRWARN +=     -_gcc=-Wno-parentheses
  76 CERRWARN +=     -_gcc=-Wno-uninitialized
  77 CERRWARN +=     -_gcc=-Wno-unused-function
  78 
  79 ruptime :=     SMOFF += leaks
  80 
  81 # Eventually just plain CFLAGS should be += -v, but not until all in
  82 # PROGS are lint clean.
  83 $(LINTCLEAN)    :=      CFLAGS += $(CCVERBOSE)
  84 
  85 finger :=       CFLAGS += $(CCVERBOSE)
  86 # Enable large file support for reading the lastlog file.
  87 finger :=       CPPFLAGS += -D_FILE_OFFSET_BITS=64
  88 
  89 finger :=               LDLIBS += -lnsl -lcurses -lsocket
  90 rcp lint-rcp :=         LDLIBS += -lsocket -lsec -lsendfile
  91 rdate lint-rdate:=      LDLIBS += -lsocket
  92 rlogin lint-rlogin :=   LDLIBS += -lnsl -lsocket
  93 rsh lint-rsh :=         LDLIBS += -lsocket
  94 whois lint-whois :=     LDLIBS += -lsocket
  95 
  96 include  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
  97 $(KCMDPROGS)    :=      LDLIBS += -lnsl -lmech_krb5
  98 $(KCMDPROGS)    :=      LDFLAGS += $(ZIGNORE) $(KRUNPATH) \
  99                                 -L$(ROOT)$(KLIBDIR_DO) \
 100                                 -L$(ROOT)$(KLIBDIR_GL)