Print this page
10080 smatch Makefile changes for usr/src/cmd
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  14 # Copyright 2014 Alexander Pyhalov

  15 #
  16 
  17 
  18 LIBPROG=        mailwrapper 
  19 
  20 PROG=          $(LIBPROG)
  21 
  22 include ../Makefile.cmd
  23 
  24 MWOBJS=         fgetln.o fparseln.o mailwrapper.o
  25 
  26 CLOBBERFILES=   $(PROG)
  27 CLEANFILES=     $(MWOBJS)
  28 
  29 SRCS=           $(MWOBJS:%.o=%.c)
  30 
  31 CPROG=          mailwrapper
  32 CPROGSRC=       $(CPROG:%=_%.c)
  33 
  34 CFS=            mailer.conf
  35 
  36 ROOTETCFILES=$(CFS:%=$(ROOTETC)/%)
  37 
  38 $(ROOTETCFILES) :=      FILEMODE = 0644
  39 
  40 # installed modules
  41 ROOTLIBPROG=    $(LIBPROG:%=$(ROOTLIB)/%)
  42 
  43 ROOTSYMLINKS=   $(ROOTBIN)/mailq \
  44                 $(ROOTLIB)/sendmail \
  45                 $(ROOTUSRSBIN)/newaliases \
  46                 $(ROOTUSRSBIN)/sendmail
  47 
  48 CPPFLAGS =      -I. $(CPPFLAGS.master)
  49 
  50 LINTFLAGS       += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
  51 


  52 # conditional assignments
  53 #
  54 all:=           TARGET= all
  55 install:=       TARGET= install
  56 clean:=         TARGET= clean
  57 clobber:=       TARGET= clobber
  58 lint:=          TARGET= lint
  59 
  60 # install rules
  61 $(ROOTINC)/% : %
  62         $(INS.file)
  63 
  64 .KEEP_STATE:
  65 
  66 .PARALLEL: $(MWOBJS) $(OBJS)
  67 
  68 all:            $(PROG) 
  69 
  70 mailwrapper:    $(MWOBJS)
  71         $(LINK.c) -o $@ $(MWOBJS) $(LDLIBS)


   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  14 # Copyright 2014 Alexander Pyhalov
  15 # Copyright (c) 2018, Joyent, Inc.
  16 #
  17 
  18 
  19 LIBPROG=        mailwrapper
  20 
  21 PROG=          $(LIBPROG)
  22 
  23 include ../Makefile.cmd
  24 
  25 MWOBJS=         fgetln.o fparseln.o mailwrapper.o
  26 
  27 CLOBBERFILES=   $(PROG)
  28 CLEANFILES=     $(MWOBJS)
  29 
  30 SRCS=           $(MWOBJS:%.o=%.c)
  31 
  32 CPROG=          mailwrapper
  33 CPROGSRC=       $(CPROG:%=_%.c)
  34 
  35 CFS=            mailer.conf
  36 
  37 ROOTETCFILES=$(CFS:%=$(ROOTETC)/%)
  38 
  39 $(ROOTETCFILES) :=      FILEMODE = 0644
  40 
  41 # installed modules
  42 ROOTLIBPROG=    $(LIBPROG:%=$(ROOTLIB)/%)
  43 
  44 ROOTSYMLINKS=   $(ROOTBIN)/mailq \
  45                 $(ROOTLIB)/sendmail \
  46                 $(ROOTUSRSBIN)/newaliases \
  47                 $(ROOTUSRSBIN)/sendmail
  48 
  49 CPPFLAGS =      -I. $(CPPFLAGS.master)
  50 
  51 LINTFLAGS       += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
  52 
  53 SMOFF += all_func_returns
  54 
  55 # conditional assignments
  56 #
  57 all:=           TARGET= all
  58 install:=       TARGET= install
  59 clean:=         TARGET= clean
  60 clobber:=       TARGET= clobber
  61 lint:=          TARGET= lint
  62 
  63 # install rules
  64 $(ROOTINC)/% : %
  65         $(INS.file)
  66 
  67 .KEEP_STATE:
  68 
  69 .PARALLEL: $(MWOBJS) $(OBJS)
  70 
  71 all:            $(PROG)
  72 
  73 mailwrapper:    $(MWOBJS)
  74         $(LINK.c) -o $@ $(MWOBJS) $(LDLIBS)