Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mdb/Makefile.mdb
+++ new/usr/src/cmd/mdb/Makefile.mdb
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 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 #
27 27 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
28 28 # Copyright (c) 2012 by Delphix. All rights reserved.
29 29 # Copyright 2019 Joyent, Inc.
30 30 # Copyright 2018 Jason King
31 31 #
32 32
33 33 .KEEP_STATE:
34 34 .SUFFIXES:
35 35
36 36 SRCS += \
37 37 ffs.c \
38 38 mdb.c \
39 39 mdb_addrvec.c \
40 40 mdb_argvec.c \
41 41 mdb_callb.c \
42 42 mdb_cmdbuf.c \
43 43 mdb_cmds.c \
44 44 mdb_conf.c \
45 45 mdb_context.c \
46 46 mdb_create.c \
47 47 mdb_ctf.c \
48 48 mdb_ctf_open.c \
49 49 mdb_debug.c \
50 50 mdb_demangle.c \
51 51 mdb_disasm.c \
52 52 mdb_dump.c \
53 53 mdb_err.c \
54 54 mdb_evset.c \
55 55 mdb_fdio.c \
56 56 mdb_fmt.c \
57 57 mdb_frame.c \
58 58 mdb_gelf.c \
59 59 mdb_help.c \
60 60 mdb_io.c \
61 61 mdb_kb_kvm.c \
62 62 mdb_kproc.c \
63 63 mdb_kvm.c \
64 64 mdb_logio.c \
65 65 mdb_list.c \
66 66 mdb_macalias.c \
67 67 mdb_main.c \
68 68 mdb_memio.c \
69 69 mdb_modapi.c \
70 70 mdb_module.c \
71 71 mdb_module_load.c \
72 72 mdb_nm.c \
73 73 mdb_nv.c \
74 74 mdb_pipeio.c \
75 75 mdb_print.c \
76 76 mdb_proc.c \
77 77 mdb_pservice.c \
78 78 mdb_rawfile.c \
79 79 mdb_set.c \
80 80 mdb_shell.c \
81 81 mdb_signal.c \
82 82 mdb_stdlib.c \
83 83 mdb_string.c \
84 84 mdb_strio.c \
85 85 mdb_tab.c \
86 86 mdb_target.c \
87 87 mdb_tdb.c \
88 88 mdb_termio.c \
89 89 mdb_typedef.c \
90 90 mdb_umem.c \
91 91 mdb_value.c \
92 92 mdb_vcb.c \
93 93 mdb_wcb.c \
94 94 mdb_whatis.c
↓ open down ↓ |
94 lines elided |
↑ open up ↑ |
95 95
96 96 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
97 97 CPPFLAGS += -D_MDB -I. -I../.. -I../../../common
98 98
99 99 CSTD= $(CSTD_GNU99)
100 100 C99LMODE= -Xc99=%all
101 101
102 102 LDLIBS += -lcurses -lkvm -lproc -lrtld_db -lctf -lumem -ldisasm -lscf
103 103 LDLIBS += -ldemangle-sys
104 104
105 -CERRWARN += -_gcc=-Wno-uninitialized
105 +CERRWARN += $(CNOWARN_UNINIT)
106 106 CERRWARN += -_gcc=-Wno-char-subscripts
107 107 CERRWARN += -_gcc=-Wno-clobbered
108 108 CERRWARN += -_gcc=-Wno-parentheses
109 109 CERRWARN += -_gcc=-Wno-unused-label
110 110 CERRWARN += -_gcc=-Wno-unused-variable
111 111
112 112 #
113 113 # -erroff=E_INCONS_ARG_DECL2 works around a problem where lint gets confused
114 114 # about how struct mdb_tgt_gregset is used in mdb_tgt_stack_f() and
115 115 # mdb_tgt_stack_iter_f(). Will be resolved as part of fix for CR 6749868.
116 116 #
117 117 LINTFLAGS += -n -errtags=yes -erroff=E_INCONS_ARG_DECL2
118 118 LINTFILES = $(SRCS:%.c=%.ln)
119 119
120 120 PROG = mdb
121 121 OBJS = $(SRCS:%.c=%.o) mdb_lex.o mdb_grammar.o
122 122
123 123 LINK = adb
124 124 ROOTLINK = $(ROOTBIN)/$(LINK)
125 125 ROOTLINK32 = $(LINK:%=$(ROOTBIN32)/%)
126 126 ROOTLINK64 = $(LINK:%=$(ROOTBIN64)/%)
127 127
128 128 .NO_PARALLEL:
129 129 .PARALLEL: $(OBJS) $(LINTFILES)
130 130
131 131 all: $(PROG)
132 132
133 133 $(PROG): $(OBJS)
134 134 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
135 135 $(CTFMERGE) -L VERSION -o $@ $(OBJS)
136 136 $(POST_PROCESS)
137 137
138 138 $(ROOTLINK32): $(ROOTPROG32)
139 139 $(RM) $@
140 140 $(LN) $(ROOTPROG32) $@
141 141
142 142 $(ROOTLINK64): $(ROOTPROG64)
143 143 $(RM) $@
144 144 $(LN) $(ROOTPROG64) $@
145 145
146 146 mdb_lex.c: ../../../common/mdb/mdb_lex.l mdb_grammar.h
147 147 $(LEX) $(LFLAGS) ../../../common/mdb/mdb_lex.l > $@
148 148
149 149 mdb_grammar.h mdb_grammar.c: ../../../common/mdb/mdb_grammar.y
150 150 $(YACC) $(YFLAGS) ../../../common/mdb/mdb_grammar.y
151 151 @$(MV) y.tab.h mdb_grammar.h
152 152 @$(MV) y.tab.c mdb_grammar.c
153 153
154 154 mdb_lex.o mdb_grammar.o := CCVERBOSE =
155 155
156 156 mdb_conf.o := CPPFLAGS += -DMDB_VERSION='$(MDB_VERSION)'
157 157
158 158 inet_ntop.o := CPPFLAGS += -Dsnprintf=mdb_snprintf
159 159
160 160 ffs.o ffs.ln := CPPFLAGS += -Dffs=mdb_ffs
161 161
162 162 %.o: ../../../common/mdb/%.c
163 163 $(COMPILE.c) $<
164 164 $(CTFCONVERT_O)
165 165
166 166 %.o: ../../mdb/%.c
167 167 $(COMPILE.c) $<
168 168 $(CTFCONVERT_O)
169 169
170 170 %.o: %.c
171 171 $(COMPILE.c) $<
172 172 $(CTFCONVERT_O)
173 173
174 174 %.o: $(SRC)/common/net/util/%.c
175 175 $(COMPILE.c) $<
176 176 $(CTFCONVERT_O)
177 177
178 178 %.o: $(SRC)/common/util/%.c
179 179 $(COMPILE.c) $<
180 180 $(CTFCONVERT_O)
181 181
182 182 clean.lint:
183 183 $(RM) $(LINTFILES)
184 184
185 185 clean:
186 186 $(RM) $(OBJS)
187 187 $(RM) mdb_lex.c mdb_grammar.c mdb_grammar.h y.tab.h y.tab.c y.output
188 188
189 189 clobber: clean clean.lint
190 190 $(RM) $(PROG)
191 191
192 192 %.ln: ../../../common/mdb/%.c
193 193 $(LINT.c) -c $<
194 194
195 195 %.ln: ../../mdb/%.c
196 196 $(LINT.c) -c $<
197 197
198 198 %.ln: %.c
199 199 $(LINT.c) -c $<
200 200
201 201 %.ln: $(SRC)/common/net/util/%.c
202 202 $(LINT.c) -c $<
203 203
204 204 %.ln: $(SRC)/common/util/%.c
205 205 $(LINT.c) -c $<
206 206
207 207 lint: $(LINTFILES)
208 208 $(LINT) $(LINTFLAGS) $(LINTFILES)
209 209
210 210 dmods:
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX