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