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 # cmd/power/Makefile
  26 #
  27 
  28 DAEMON_SRCS =   powerd.c sysstat.c
  29 DAEMON_OBJS =   $(DAEMON_SRCS:%.c=%.o)
  30 DAEMON =        powerd
  31 PMCFG_SRCS =    conf.c parse.c handlers.c
  32 PMCFG_OBJS =    $(PMCFG_SRCS:%.c=%.o)
  33 PMCFG =         pmconfig
  34 SUSPEND_SRCS =  sys-suspend.c pm_pam_conv.c
  35 SUSPEND_OBJS =  $(SUSPEND_SRCS:%.c=%.o)
  36 SUSPEND =       sys-suspend
  37 SRCS =          $(DAEMON_SRCS) $(PMCFG_SRCS) $(SUSPEND_SRCS)
  38 OBJS =          $(SRCS:%.c=%.o)
  39 PROG =          $(DAEMON) $(PMCFG) $(SUSPEND)
  40 POWERCONF=      power.conf
  41 ETCFILES =      $(POWERCONF)
  42 POWERPERM =     power
  43 DEFAULTFILES =  power.dfl
  44 
  45 MANIFEST=       power.xml
  46 SVCMETHOD=      svc-power


  66 SUSPEND_LDLIBS = $(LDLIBS.cmd) -lbsm -lpam -lsecdb
  67 
  68 ROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%)
  69 $(ROOTUSRSBINPMCFG) := FILEMODE= 4555
  70 ROOTUSRBINSUSPEND= $(SUSPEND:%=$(ROOTBIN)/%)
  71 $(ROOTUSRBINSUSPEND) := FILEMODE= 4555
  72 
  73 ROOTLIBPOWER= $(ROOTLIB)/power
  74 ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%)
  75 $(ROOTLIBPOWER) := FILEMODE= 755
  76 $(ROOTLIBPOWERDAEMON) := FILEMODE= 555
  77 
  78 ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%) 
  79 $(ROOTETCFILES) := FILEMODE= 644 
  80 
  81 #
  82 # lint pass one enforcement
  83 #
  84 CFLAGS += $(CCVERBOSE)
  85 


  86 .PARALLEL: $(OBJS)
  87 
  88 .KEEP_STATE:
  89 
  90 all: $(PROG) $(POWERPERM).dfl $(ETCFILES)
  91 
  92 install clean:
  93 
  94 $(POWERCONF): $(POWERCONF).$(MACH)
  95 
  96 $(DAEMON_OBJS): $(DAEMON_SRCS)
  97         $(CC) $(CFLAGS) -D_REENTRANT $(CPPFLAGS) -o $@ -c $<
  98         $(PROCESS_COMMENT) $@
  99 
 100 $(DAEMON): $(DAEMON_OBJS)
 101         $(CC) -o $@ $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDLIBS)
 102         $(POST_PROCESS)
 103 
 104 $(PMCFG_OBJS): pmconfig.h
 105 




   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 DAEMON_SRCS =   powerd.c sysstat.c
  28 DAEMON_OBJS =   $(DAEMON_SRCS:%.c=%.o)
  29 DAEMON =        powerd
  30 PMCFG_SRCS =    conf.c parse.c handlers.c
  31 PMCFG_OBJS =    $(PMCFG_SRCS:%.c=%.o)
  32 PMCFG =         pmconfig
  33 SUSPEND_SRCS =  sys-suspend.c pm_pam_conv.c
  34 SUSPEND_OBJS =  $(SUSPEND_SRCS:%.c=%.o)
  35 SUSPEND =       sys-suspend
  36 SRCS =          $(DAEMON_SRCS) $(PMCFG_SRCS) $(SUSPEND_SRCS)
  37 OBJS =          $(SRCS:%.c=%.o)
  38 PROG =          $(DAEMON) $(PMCFG) $(SUSPEND)
  39 POWERCONF=      power.conf
  40 ETCFILES =      $(POWERCONF)
  41 POWERPERM =     power
  42 DEFAULTFILES =  power.dfl
  43 
  44 MANIFEST=       power.xml
  45 SVCMETHOD=      svc-power


  65 SUSPEND_LDLIBS = $(LDLIBS.cmd) -lbsm -lpam -lsecdb
  66 
  67 ROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%)
  68 $(ROOTUSRSBINPMCFG) := FILEMODE= 4555
  69 ROOTUSRBINSUSPEND= $(SUSPEND:%=$(ROOTBIN)/%)
  70 $(ROOTUSRBINSUSPEND) := FILEMODE= 4555
  71 
  72 ROOTLIBPOWER= $(ROOTLIB)/power
  73 ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%)
  74 $(ROOTLIBPOWER) := FILEMODE= 755
  75 $(ROOTLIBPOWERDAEMON) := FILEMODE= 555
  76 
  77 ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
  78 $(ROOTETCFILES) := FILEMODE= 644
  79 
  80 #
  81 # lint pass one enforcement
  82 #
  83 CFLAGS += $(CCVERBOSE)
  84 
  85 SMOFF += signed
  86 
  87 .PARALLEL: $(OBJS)
  88 
  89 .KEEP_STATE:
  90 
  91 all: $(PROG) $(POWERPERM).dfl $(ETCFILES)
  92 
  93 install clean:
  94 
  95 $(POWERCONF): $(POWERCONF).$(MACH)
  96 
  97 $(DAEMON_OBJS): $(DAEMON_SRCS)
  98         $(CC) $(CFLAGS) -D_REENTRANT $(CPPFLAGS) -o $@ -c $<
  99         $(PROCESS_COMMENT) $@
 100 
 101 $(DAEMON): $(DAEMON_OBJS)
 102         $(CC) -o $@ $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDLIBS)
 103         $(POST_PROCESS)
 104 
 105 $(PMCFG_OBJS): pmconfig.h
 106