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