Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/allocate/Makefile
+++ new/usr/src/cmd/allocate/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 #
23 23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 +# Copyright (c) 2018, Joyent, Inc.
25 26
26 27 ETCTSOLFILES = devalloc_defaults
27 28
28 29 include ../Makefile.cmd
29 30
30 31 CERRWARN += -_gcc=-Wno-unused-value
31 32 CERRWARN += -_gcc=-Wno-uninitialized
32 33 CERRWARN += -_gcc=-Wno-parentheses
33 34 CERRWARN += -_gcc=-Wno-clobbered
34 35
36 +# not linted
37 +SMATCH=off
38 +
35 39 ROOTSEC = $(ROOTETC)/security
36 40 ROOTSECDEV = $(ROOTSEC)/dev
37 41 ROOTSECLIB = $(ROOTSEC)/lib
38 42 ROOTSECAUD = $(ROOTSEC)/audio
39 43 ROOTDIRS = $(ROOTSECDEV) $(ROOTSECLIB) $(ROOTSECAUD)
40 44
41 45 ROOTMANIFESTDIR= $(ROOTSVCSYSTEMDEVICE)
42 46 SVCMETHOD = svc-allocate
43 47 MANIFEST = allocate.xml
44 48
45 49 RTLCKS = audio fd0 sr0 st0 st1
46 50 CLEANfd = fd_clean
47 51 CLEANsr = sr_clean
48 52 CLEANst = st_clean
49 53 CLEANaudio = audio_clean
50 54 CLEANdisk = disk_clean
51 55 CLEAN_SCRIPTS = $(CLEANfd) $(CLEANsr) $(CLEANst) $(CLEANaudio) $(CLEANdisk)
52 56 WDW_SCRIPTS = wdwmsg wdwwrapper
53 57 WDW_LINKS = $(CLEANaudio) $(CLEANdisk) $(CLEANst)
54 58 SCRIPTS = $(CLEAN_SCRIPTS) $(WDW_SCRIPTS)
55 59 ALLSCRIPTS = allscripts.sh
56 60
57 61 PROGalloc = allocate
58 62 PROGmkdevalloc = mkdevalloc
59 63 PROGdminfo = dminfo
60 64 PROGaddalloc = add_allocatable
61 65 PROG = $(PROGalloc) $(PROGmkdevalloc) $(PROGdminfo) \
62 66 $(PROGaddalloc)
63 67
64 68 LINKPROGalloc = deallocate list_devices
65 69 LINKPROGmkdevalloc = mkdevmaps
66 70 LINKPROGaddalloc = remove_allocatable
67 71
68 72 POFILE = allocate_all.po
69 73 POFILES = $(OBJS:%.o=%.po) $(ALLSCRIPTS:%.sh=%.po)
70 74
71 75 DFLAGS += -D_REENTRANT
72 76 CPPFLAGS += $(DFLAGS)
73 77
74 78 ROOTLOCKS = $(RTLCKS:%=$(ROOTSECDEV)/%)
75 79 ROOTSCRIPTS = $(SCRIPTS:%=$(ROOTSECLIB)/%)
76 80 ROOTWDWLINKS = $(WDW_LINKS:%=$(ROOTSECLIB)/%.windowing)
77 81
78 82 ROOTPROG = $(PROGallocate:%=$(ROOTUSRSBIN)/%) \
79 83 $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) \
80 84 $(PROGdminfo:%=$(ROOTUSRSBIN)/%) \
81 85 $(PROGaddaloc:%=$(ROOTUSRSBIN)/%)
82 86 ROOTLINKalloc = $(LINKPROGalloc:%=$(ROOTUSRSBIN)/%)
83 87 ROOTLINKmkdevalloc = $(LINKPROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
84 88 ROOTLINKaddalloc = $(LINKPROGaddalloc:%=$(ROOTUSRSBIN)/%)
85 89 ROOTLINKS = $(ROOTLINKalloc) $(ROOTLINKmkdevalloc) $(ROOTLINKaddalloc)
86 90
87 91 PROGallocOBJS = allocate.o allocate3.o
88 92 PROGmkdevallocOBJS = mkdevalloc.o
89 93 PROGdminfoOBJS = dminfo.o
90 94 PROGaddallocOBJS = add_allocatable.o
91 95
92 96 OBJS = $(PROGallocOBJS) \
93 97 $(PROGmkdevallocOBJS) \
94 98 $(PROGdminfoOBJS) \
95 99 $(PROGaddallocOBJS)
96 100
97 101 SRCS = $(OBJS:%.o=%.c)
98 102
99 103 $(ROOTUSRSBIN)/% := FILEMODE = 555
100 104 $(ROOTUSRSBIN)/allocate := FILEMODE = 4555
101 105 $(ROOTSECDEV)/% := FILEMODE = 0400
102 106 $(ROOTSECLIB)/% := FILEMODE = 0555
103 107
104 108 lint := LDLIBS += -lbsm -lsec -lsecdb -ldevinfo -ltsol
105 109
106 110 $(PROGalloc) := LDLIBS += -lbsm -lsec -lsecdb -ldevinfo -ltsol
107 111 $(PROGmkdevalloc) := LDLIBS += -lbsm
108 112 $(PROGdminfo) := LDLIBS += -lbsm
109 113 $(PROGaddalloc) := LDLIBS += -lbsm -lsecdb -ltsol
110 114
111 115 CLOBBERFILES += $(SCRIPTS)
112 116
113 117 .KEEP_STATE:
114 118
115 119 all : $(PROG) $(RTLCKS) $(SCRIPTS)
116 120
117 121 install : $(PROG) $(ROOTDIRS) $(ROOTPROG) $(ROOTLOCKS) \
118 122 $(ROOTSCRIPTS) $(ROOTLINKS) $(ROOTWDWLINKS) \
119 123 $(ROOTETCTSOLFILES) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
120 124 $(RTLCKS):
121 125 $(TOUCH) $@
122 126
123 127 $(ROOTSECLIB)/%: %.sh
124 128 $(INS.rename)
125 129
126 130 $(PROGalloc) : $(PROGallocOBJS)
127 131 $(LINK.c) $(PROGallocOBJS) -o $@ $(LDLIBS)
128 132 $(POST_PROCESS)
129 133
130 134 $(PROGaddalloc) : $(PROGaddallocOBJS)
131 135 $(LINK.c) $(PROGaddallocOBJS) -o $@ $(LDLIBS)
132 136 $(POST_PROCESS)
133 137
134 138 $(PROGmkdevalloc) : $(PROGmkdevallocOBJS)
135 139 $(LINK.c) $(PROGmkdevallocOBJS) -o $@ $(LDLIBS)
136 140 $(POST_PROCESS)
137 141
138 142 $(PROGdminfo) : $(PROGdminfoOBJS)
139 143 $(LINK.c) $(PROGdminfoOBJS) -o $@ $(LDLIBS)
140 144 $(POST_PROCESS)
141 145
142 146 $(ROOTDIRS) :
143 147 $(INS.dir)
144 148
145 149 $(ROOTSECDEV)/%: %
146 150 $(INS.file)
147 151
148 152 $(ROOTSECLIB)/%: %
149 153 $(RM) $@
150 154 $(INS.file)
151 155
152 156 $(ROOTLINKalloc) : $(PROGalloc:%=$(ROOTUSRSBIN)/%)
153 157 $(RM) $@
154 158 $(LN) $(PROGalloc:%=$(ROOTUSRSBIN)/%) $@
155 159
156 160 $(ROOTLINKaddalloc) : $(PROGaddalloc:%=$(ROOTUSRSBIN)/%)
157 161 $(RM) $@
158 162 $(LN) $(PROGaddalloc:%=$(ROOTUSRSBIN)/%) $@
159 163
160 164 $(ROOTLINKmkdevalloc) : $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%)
161 165 $(RM) $@
162 166 $(LN) $(PROGmkdevalloc:%=$(ROOTUSRSBIN)/%) $@
163 167
164 168
165 169 $(ROOTETCSECLIB)/%.windowing: %
166 170 $(RM) $@
167 171 $(SYMLINK) $< $@
168 172
169 173 $(POFILE): $(POFILES)
170 174 $(RM) $@
171 175 $(CAT) $(POFILES) > $@
172 176
173 177 #
174 178 # Concatenate all the scripts into one before we build the catalogue.
175 179 # Done to shrink the catalogue since some messages are shared between
176 180 # the various scripts.
177 181 #
178 182 $(ALLSCRIPTS): $(SCRIPTS:%=%.sh)
179 183 $(CAT) $(SCRIPTS:%=%.sh) > $@
180 184
181 185 clean :
182 186 $(RM) $(PROG) $(RTLCKS) $(OBJS) \
183 187 $(SCRIPTS) $(ALLSCRIPTS) $(POFILE) $(POFILES)
184 188
185 189 lint : lint_SRCS
186 190
187 191 strip :
188 192 $(STRIP) $(PROG)
189 193
190 194 include ../Makefile.targ
↓ open down ↓ |
146 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX