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


   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   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 
  26 PROG= sac sacadm pmadm
  27 
  28 MANIFEST = sac.xml
  29 
  30 include ../Makefile.cmd
  31 
  32 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
  33 
  34 SACOBJ= sac.o readtab.o global.o log.o misc.o
  35 SACOBJS= $(SACOBJ) util1.o
  36 SACADMOBJ= sacadm.o admutil.o
  37 SACADMOBJS= $(SACADMOBJ) util2.o
  38 PMADMOBJ= pmadm.o admutil.o
  39 PMADMOBJS= $(PMADMOBJ) util2.o
  40 SACSRC= $(SACOBJ:%.o=%.c)
  41 SACSRCS= $(SACSRC) util.c
  42 SACADMSRC= $(SACADMOBJ:%.o=%.c)
  43 SACADMSRCS= $(SACADMSRC) util.c
  44 PMADMSRC= $(PMADMOBJ:%.o=%.c)
  45 PMADMSRCS= $(PMADMSRC) util.c
  46 OBJS= $(SACOBJS) $(SACADMOBJS) $(PMADMOBJS)
  47 
  48 LIBSAFD = $(ROOTLIB)/saf
  49 DIRS= $(LIBSAFD)
  50 SACF= sac
  51 ADMF= sacadm pmadm
  52 ROOTSACF= $(SACF:%=$(LIBSAFD)/%)
  53 ROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%)
  54 
  55 LDLIBS += -lnsl
  56 LDFLAGS += $(MAPFILE.NGB:%=-M%)
  57 LINTFLAGS += -b -x
  58 
  59 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  60 CERRWARN += -_gcc=-Wno-parentheses
  61 CERRWARN += -_gcc=-Wno-unused-variable
  62 CERRWARN += -_gcc=-Wno-extra
  63 



  64 util1.o := CPPFLAGS += -DSAC
  65 util2.o := CPPFLAGS += -USAC
  66 
  67 sac :=  LDLIBS += -lpam
  68 
  69 $(ROOTUSRSBIN)/sacadm :=        FILEMODE =      04755
  70 
  71 $(LIBSAFD)/% : %
  72         $(INS.file)
  73 
  74 .KEEP_STATE:
  75 
  76 .PARALLEL: $(OBJS)
  77 
  78 all: $(PROG) 
  79 
  80 sac: $(SACOBJS) $(MAPFILE.NGB)
  81         $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS)
  82         $(POST_PROCESS)
  83 




   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   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 (c) 2018, Joyent, Inc.
  26 
  27 PROG= sac sacadm pmadm
  28 
  29 MANIFEST = sac.xml
  30 
  31 include ../Makefile.cmd
  32 
  33 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
  34 
  35 SACOBJ= sac.o readtab.o global.o log.o misc.o
  36 SACOBJS= $(SACOBJ) util1.o
  37 SACADMOBJ= sacadm.o admutil.o
  38 SACADMOBJS= $(SACADMOBJ) util2.o
  39 PMADMOBJ= pmadm.o admutil.o
  40 PMADMOBJS= $(PMADMOBJ) util2.o
  41 SACSRC= $(SACOBJ:%.o=%.c)
  42 SACSRCS= $(SACSRC) util.c
  43 SACADMSRC= $(SACADMOBJ:%.o=%.c)
  44 SACADMSRCS= $(SACADMSRC) util.c
  45 PMADMSRC= $(PMADMOBJ:%.o=%.c)
  46 PMADMSRCS= $(PMADMSRC) util.c
  47 OBJS= $(SACOBJS) $(SACADMOBJS) $(PMADMOBJS)
  48 
  49 LIBSAFD = $(ROOTLIB)/saf
  50 DIRS= $(LIBSAFD)
  51 SACF= sac
  52 ADMF= sacadm pmadm
  53 ROOTSACF= $(SACF:%=$(LIBSAFD)/%)
  54 ROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%)
  55 
  56 LDLIBS += -lnsl
  57 LDFLAGS += $(MAPFILE.NGB:%=-M%)
  58 LINTFLAGS += -b -x
  59 
  60 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  61 CERRWARN += -_gcc=-Wno-parentheses
  62 CERRWARN += -_gcc=-Wno-unused-variable
  63 CERRWARN += -_gcc=-Wno-extra
  64 
  65 # too many untyped funcs
  66 SMATCH=off
  67 
  68 util1.o := CPPFLAGS += -DSAC
  69 util2.o := CPPFLAGS += -USAC
  70 
  71 sac :=  LDLIBS += -lpam
  72 
  73 $(ROOTUSRSBIN)/sacadm :=        FILEMODE =      04755
  74 
  75 $(LIBSAFD)/% : %
  76         $(INS.file)
  77 
  78 .KEEP_STATE:
  79 
  80 .PARALLEL: $(OBJS)
  81 
  82 all: $(PROG) 
  83 
  84 sac: $(SACOBJS) $(MAPFILE.NGB)
  85         $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS)
  86         $(POST_PROCESS)
  87