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