Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/power/Makefile
+++ new/usr/src/cmd/power/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 -# cmd/power/Makefile
26 -#
25 +# Copyright (c) 2018, Joyent, Inc.
27 26
28 27 DAEMON_SRCS = powerd.c sysstat.c
29 28 DAEMON_OBJS = $(DAEMON_SRCS:%.c=%.o)
30 29 DAEMON = powerd
31 30 PMCFG_SRCS = conf.c parse.c handlers.c
32 31 PMCFG_OBJS = $(PMCFG_SRCS:%.c=%.o)
33 32 PMCFG = pmconfig
34 33 SUSPEND_SRCS = sys-suspend.c pm_pam_conv.c
35 34 SUSPEND_OBJS = $(SUSPEND_SRCS:%.c=%.o)
36 35 SUSPEND = sys-suspend
37 36 SRCS = $(DAEMON_SRCS) $(PMCFG_SRCS) $(SUSPEND_SRCS)
38 37 OBJS = $(SRCS:%.c=%.o)
39 38 PROG = $(DAEMON) $(PMCFG) $(SUSPEND)
40 39 POWERCONF= power.conf
41 40 ETCFILES = $(POWERCONF)
42 41 POWERPERM = power
43 42 DEFAULTFILES = power.dfl
44 43
45 44 MANIFEST= power.xml
46 45 SVCMETHOD= svc-power
47 46
48 47 include ../Makefile.cmd
49 48
50 49 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
51 50
52 51 TEXT_DOMAIN= SUNW_OST_OSCMD
53 52
54 53 XGETFLAGS += -a -x power_all.xcl
55 54 POFILE= power_all.po
56 55 POFILES= $(PMCFG_SRCS:%.c=%.po) $(SUSPEND_SRCS:%.c=%.po)
57 56
58 57 # pmconfig only needs libdevinfo on sparc
59 58 sparc_LDEVINFO= -ldevinfo -lefi -ladm -lzfs -lnvpair
60 59 i386_LDEVINFO=
61 60
62 61 LDEVINFO= -ldevinfo
63 62
64 63 DAEMON_LDLIBS = $(LDLIBS.cmd) -lkstat $(LDEVINFO)
65 64 PMCFG_LDLIBS = $(LDLIBS.cmd) -lsmbios -lkstat $($(MACH)_LDEVINFO)
66 65 SUSPEND_LDLIBS = $(LDLIBS.cmd) -lbsm -lpam -lsecdb
67 66
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
68 67 ROOTUSRSBINPMCFG= $(PMCFG:%=$(ROOTUSRSBIN)/%)
69 68 $(ROOTUSRSBINPMCFG) := FILEMODE= 4555
70 69 ROOTUSRBINSUSPEND= $(SUSPEND:%=$(ROOTBIN)/%)
71 70 $(ROOTUSRBINSUSPEND) := FILEMODE= 4555
72 71
73 72 ROOTLIBPOWER= $(ROOTLIB)/power
74 73 ROOTLIBPOWERDAEMON= $(DAEMON:%=$(ROOTLIBPOWER)/%)
75 74 $(ROOTLIBPOWER) := FILEMODE= 755
76 75 $(ROOTLIBPOWERDAEMON) := FILEMODE= 555
77 76
78 -ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
79 -$(ROOTETCFILES) := FILEMODE= 644
77 +ROOTETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
78 +$(ROOTETCFILES) := FILEMODE= 644
80 79
81 80 #
82 81 # lint pass one enforcement
83 82 #
84 83 CFLAGS += $(CCVERBOSE)
85 84
85 +SMOFF += signed
86 +
86 87 .PARALLEL: $(OBJS)
87 88
88 89 .KEEP_STATE:
89 90
90 91 all: $(PROG) $(POWERPERM).dfl $(ETCFILES)
91 92
92 93 install clean:
93 94
94 95 $(POWERCONF): $(POWERCONF).$(MACH)
95 96
96 97 $(DAEMON_OBJS): $(DAEMON_SRCS)
97 98 $(CC) $(CFLAGS) -D_REENTRANT $(CPPFLAGS) -o $@ -c $<
98 99 $(PROCESS_COMMENT) $@
99 100
100 101 $(DAEMON): $(DAEMON_OBJS)
101 102 $(CC) -o $@ $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDLIBS)
102 103 $(POST_PROCESS)
103 104
104 105 $(PMCFG_OBJS): pmconfig.h
105 106
106 107 $(PMCFG): $(PMCFG_OBJS)
107 108 $(LINK.c) -o $@ $(PMCFG_OBJS) $(PMCFG_LDLIBS)
108 109 $(POST_PROCESS)
109 110
110 111 $(SUSPEND): $(SUSPEND_OBJS)
111 112 $(LINK.c) -o $@ $(SUSPEND_OBJS) $(SUSPEND_LDLIBS)
112 113 $(POST_PROCESS)
113 114
114 115 install: all $(ROOTUSRSBINPMCFG) $(ROOTLIBPOWERDAEMON) $(ROOTUSRBINSUSPEND) \
115 116 $(ROOTETCFILES) $(ROOTETCDEFAULTFILES) \
116 117 $(ROOTMANIFEST) $(ROOTSVCMETHOD)
117 118
118 119 $(ROOTLIBPOWER):
119 120 $(INS.dir)
120 121
121 122 $(ROOTLIBPOWER)/%: %
122 123 $(INS.file)
123 124
124 125 $(ROOTLIBPOWERDAEMON): $(ROOTLIBPOWER)
125 126
126 127 $(POFILE): $(POFILES)
127 128 $(RM) $@
128 129 cat $(POFILES) > $@
129 130
130 131 check: $(CHKMANIFEST)
131 132
132 133 clean:
133 134 $(RM) $(OBJS) $(POWERCONF)
134 135 $(RM) $(POFILE) $(POFILES)
135 136
136 137 lint := LINTFLAGS=-auxn
137 138 lint:
138 139 $(LINT.c) $(DAEMON_SRCS)
139 140 $(LINT.c) $(PMCFG_SRCS)
140 141 $(LINT.c) $(SUSPEND_SRCS)
141 142
142 143 cstyle:
143 144 $(CSTYLE) $(SRCS)
144 145
145 146 %: %.$(MACH)
146 147 $(RM) $@
147 148 cat $< > $@
148 149
149 150 include ../Makefile.targ
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX