Commit | Line | Data |
---|---|---|
b811d2c2 | 1 | # Copyright (C) 1989-2020 Free Software Foundation, Inc. |
c906108c SS |
2 | |
3 | # This file is part of GDB. | |
4 | ||
5 | # This program is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
32de4b9d | 7 | # the Free Software Foundation; either version 3 of the License, or |
c906108c | 8 | # (at your option) any later version. |
1b3f6016 | 9 | # |
c906108c SS |
10 | # This program is distributed in the hope that it will be useful, |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
1b3f6016 | 14 | # |
c906108c | 15 | # You should have received a copy of the GNU General Public License |
32de4b9d | 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
c906108c | 17 | |
b593ecca SM |
18 | # Please keep lists in this file sorted alphabetically, with one item per line. |
19 | # See gdb/Makefile.in for guidelines on ordering files and directories. | |
20 | ||
d6e9fb05 JK |
21 | prefix = @prefix@ |
22 | exec_prefix = @exec_prefix@ | |
c906108c | 23 | |
bd885420 YQ |
24 | host_alias = @host_noncanonical@ |
25 | target_alias = @target_noncanonical@ | |
d6e9fb05 JK |
26 | program_transform_name = @program_transform_name@ |
27 | bindir = @bindir@ | |
28 | libdir = @libdir@ | |
c906108c SS |
29 | tooldir = $(libdir)/$(target_alias) |
30 | ||
96e946ca | 31 | datarootdir = @datarootdir@ |
d6e9fb05 JK |
32 | datadir = @datadir@ |
33 | mandir = @mandir@ | |
c906108c SS |
34 | man1dir = $(mandir)/man1 |
35 | man2dir = $(mandir)/man2 | |
36 | man3dir = $(mandir)/man3 | |
37 | man4dir = $(mandir)/man4 | |
38 | man5dir = $(mandir)/man5 | |
39 | man6dir = $(mandir)/man6 | |
40 | man7dir = $(mandir)/man7 | |
41 | man8dir = $(mandir)/man8 | |
42 | man9dir = $(mandir)/man9 | |
d6e9fb05 | 43 | infodir = @infodir@ |
085dd6e6 | 44 | htmldir = $(prefix)/html |
d6e9fb05 | 45 | includedir = @includedir@ |
60d6cfc9 | 46 | CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@ |
c906108c | 47 | |
bdaed379 HD |
48 | install_sh = @install_sh@ |
49 | ||
a8347a2a | 50 | SHELL = @SHELL@ |
de7c3b4a | 51 | EXEEXT = @EXEEXT@ |
c906108c | 52 | |
d6e9fb05 JK |
53 | INSTALL = @INSTALL@ |
54 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
bdaed379 | 55 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
d6e9fb05 | 56 | INSTALL_DATA = @INSTALL_DATA@ |
c9a1864a | 57 | RANLIB = @RANLIB@ |
c906108c | 58 | |
84563040 | 59 | CC = @CC@ |
3bc3d82a | 60 | CXX = @CXX@ |
8629c02c | 61 | CXX_DIALECT = @CXX_DIALECT@ |
e1d2394b MS |
62 | AR = @AR@ |
63 | AR_FLAGS = rc | |
bdaed379 | 64 | STRIP = @STRIP@ |
c906108c | 65 | |
61c125b9 TT |
66 | # Dependency tracking information. |
67 | DEPMODE = @CCDEPMODE@ | |
68 | DEPDIR = @DEPDIR@ | |
919adfe8 | 69 | depcomp = $(SHELL) $(srcdir)/../depcomp |
61c125b9 | 70 | |
c906108c SS |
71 | # Directory containing source files. Don't clean up the spacing, |
72 | # this exact string is matched for by the "configure" script. | |
d6e9fb05 | 73 | srcdir = @srcdir@ |
8629c02c SM |
74 | abs_top_srcdir = @abs_top_srcdir@ |
75 | abs_srcdir = @abs_srcdir@ | |
d6e9fb05 | 76 | VPATH = @srcdir@ |
c906108c | 77 | |
9a665d62 TT |
78 | top_builddir = . |
79 | ||
919adfe8 | 80 | include $(srcdir)/../gdb/silent-rules.mk |
39be3c7e SM |
81 | |
82 | # Note that these are overridden by GNU make-specific code below if | |
83 | # GNU make is used. The overrides implement dependency tracking. | |
feacfcac | 84 | COMPILE.pre = $(CXX) $(CXX_DIALECT) |
39be3c7e SM |
85 | COMPILE.post = -c -o $@ |
86 | COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post) | |
87 | POSTCOMPILE = @true | |
88 | ||
c906108c | 89 | # It is also possible that you will need to add -I/usr/include/sys to the |
1b3f6016 | 90 | # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which |
c906108c SS |
91 | # is where it should be according to Posix). |
92 | ||
93 | # Set this up with gcc if you have gnu ld and the loader will print out | |
94 | # line numbers for undefinded refs. | |
8629c02c SM |
95 | #CC_LD = g++ -static |
96 | CC_LD = $(CXX) $(CXX_DIALECT) | |
c906108c SS |
97 | |
98 | # Where is the "include" directory? Traditionally ../include or ./include | |
919adfe8 | 99 | INCLUDE_DIR = ${srcdir}/../include |
c906108c SS |
100 | INCLUDE_DEP = $$(INCLUDE_DIR) |
101 | ||
1a627e7e | 102 | LIBIBERTY_BUILDDIR = ../libiberty |
0b04e523 TT |
103 | LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a |
104 | ||
0fb4aa4b PA |
105 | # Where is ust? These will be empty if ust was not available. |
106 | ustlibs = @ustlibs@ | |
107 | ustinc = @ustinc@ | |
108 | ||
c9a1864a | 109 | # gnulib |
1a627e7e | 110 | GNULIB_BUILDDIR = ../gnulib |
c971b7fa | 111 | LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a |
919adfe8 | 112 | INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import |
ecedbe58 | 113 | |
9a665d62 TT |
114 | # Where is the INTL library? Typically in ../intl. |
115 | INTL = @LIBINTL@ | |
116 | INTL_DEPS = @LIBINTL_DEP@ | |
117 | INTL_CFLAGS = @INCINTL@ | |
118 | ||
919adfe8 | 119 | INCSUPPORT = -I$(srcdir)/.. -I.. |
01027315 | 120 | |
c906108c SS |
121 | # All the includes used for CFLAGS and for lint. |
122 | # -I. for config files. | |
7ea81414 | 123 | # -I${srcdir} for our headers. |
919adfe8 | 124 | # -I$(srcdir)/../gdb/regformats for regdef.h. |
96d7229d LM |
125 | # |
126 | # We do not include ../target or ../nat in here because headers | |
127 | # in those directories should be included with the subdirectory. | |
128 | # e.g.: "target/wait.h". | |
129 | # | |
a0707f3c | 130 | INCLUDE_CFLAGS = -I. -I${srcdir} \ |
919adfe8 | 131 | -I$(srcdir)/../gdb/regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \ |
9a665d62 TT |
132 | -I$(srcdir)/../gdb $(INCGNU) $(INCSUPPORT) \ |
133 | $(INTL_CFLAGS) | |
c906108c SS |
134 | |
135 | # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS | |
136 | # from the config/ directory. | |
137 | GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} | |
138 | #PROFILE_CFLAGS = -pg | |
139 | ||
d4596a3d PA |
140 | WARN_CFLAGS = @WARN_CFLAGS@ |
141 | WERROR_CFLAGS = @WERROR_CFLAGS@ | |
0729219d | 142 | |
d3ce09f5 SS |
143 | WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \ |
144 | | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"` | |
145 | ||
a994041d | 146 | # These are specifically reserved for setting from the command line |
c906108c | 147 | # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". |
84563040 | 148 | CFLAGS = @CFLAGS@ |
a994041d | 149 | CXXFLAGS = @CXXFLAGS@ |
bffc0964 | 150 | CPPFLAGS = @CPPFLAGS@ |
84563040 | 151 | |
5e030278 TT |
152 | PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ |
153 | PTHREAD_LIBS = @PTHREAD_LIBS@ | |
154 | ||
c906108c | 155 | # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. |
8629c02c | 156 | INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \ |
5e030278 | 157 | ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS) |
8629c02c SM |
158 | INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) |
159 | INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER | |
c906108c SS |
160 | |
161 | # LDFLAGS is specifically reserved for setting from the command line | |
162 | # when running make. | |
697f7479 | 163 | LDFLAGS = @LDFLAGS@ |
f6de3c42 | 164 | INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@ |
c906108c | 165 | |
c906108c SS |
166 | # All source files that go into linking GDB remote server. |
167 | ||
b593ecca | 168 | SFILES = \ |
feacfcac SM |
169 | $(srcdir)/debug.cc \ |
170 | $(srcdir)/dll.cc \ | |
171 | $(srcdir)/gdbreplay.cc \ | |
172 | $(srcdir)/hostio.cc \ | |
173 | $(srcdir)/hostio-errno.cc \ | |
174 | $(srcdir)/i387-fp.cc \ | |
175 | $(srcdir)/inferiors.cc \ | |
176 | $(srcdir)/linux-aarch64-low.cc \ | |
177 | $(srcdir)/linux-arm-low.cc \ | |
178 | $(srcdir)/linux-bfin-low.cc \ | |
179 | $(srcdir)/linux-cris-low.cc \ | |
180 | $(srcdir)/linux-crisv32-low.cc \ | |
181 | $(srcdir)/linux-ia64-low.cc \ | |
182 | $(srcdir)/linux-low.cc \ | |
183 | $(srcdir)/linux-m32r-low.cc \ | |
184 | $(srcdir)/linux-m68k-low.cc \ | |
185 | $(srcdir)/linux-mips-low.cc \ | |
186 | $(srcdir)/linux-nios2-low.cc \ | |
187 | $(srcdir)/linux-ppc-low.cc \ | |
bf84f706 | 188 | $(srcdir)/linux-riscv-low.cc \ |
feacfcac SM |
189 | $(srcdir)/linux-s390-low.cc \ |
190 | $(srcdir)/linux-sh-low.cc \ | |
191 | $(srcdir)/linux-sparc-low.cc \ | |
192 | $(srcdir)/linux-tile-low.cc \ | |
193 | $(srcdir)/linux-x86-low.cc \ | |
194 | $(srcdir)/linux-xtensa-low.cc \ | |
195 | $(srcdir)/mem-break.cc \ | |
196 | $(srcdir)/proc-service.cc \ | |
b593ecca | 197 | $(srcdir)/proc-service.list \ |
feacfcac SM |
198 | $(srcdir)/regcache.cc \ |
199 | $(srcdir)/remote-utils.cc \ | |
200 | $(srcdir)/server.cc \ | |
201 | $(srcdir)/symbol.cc \ | |
202 | $(srcdir)/target.cc \ | |
203 | $(srcdir)/thread-db.cc \ | |
204 | $(srcdir)/utils.cc \ | |
205 | $(srcdir)/win32-arm-low.cc \ | |
206 | $(srcdir)/win32-i386-low.cc \ | |
207 | $(srcdir)/win32-low.cc \ | |
208 | $(srcdir)/wincecompat.cc \ | |
209 | $(srcdir)/x86-low.cc \ | |
919adfe8 TT |
210 | $(srcdir)/../gdb/alloc.c \ |
211 | $(srcdir)/../gdb/arch/arm.c \ | |
212 | $(srcdir)/../gdb/arch/arm-get-next-pcs.c \ | |
213 | $(srcdir)/../gdb/arch/arm-linux.c \ | |
214 | $(srcdir)/../gdb/arch/ppc-linux-common.c \ | |
bf84f706 | 215 | $(srcdir)/../gdb/arch/riscv.c \ |
06b3c5bd SM |
216 | $(srcdir)/../gdbsupport/btrace-common.cc \ |
217 | $(srcdir)/../gdbsupport/buffer.cc \ | |
218 | $(srcdir)/../gdbsupport/cleanups.cc \ | |
219 | $(srcdir)/../gdbsupport/common-debug.cc \ | |
220 | $(srcdir)/../gdbsupport/common-exceptions.cc \ | |
221 | $(srcdir)/../gdbsupport/common-inferior.cc \ | |
222 | $(srcdir)/../gdbsupport/common-regcache.cc \ | |
223 | $(srcdir)/../gdbsupport/common-utils.cc \ | |
224 | $(srcdir)/../gdbsupport/errors.cc \ | |
225 | $(srcdir)/../gdbsupport/environ.cc \ | |
226 | $(srcdir)/../gdbsupport/fileio.cc \ | |
227 | $(srcdir)/../gdbsupport/filestuff.cc \ | |
228 | $(srcdir)/../gdbsupport/job-control.cc \ | |
229 | $(srcdir)/../gdbsupport/gdb-dlfcn.cc \ | |
230 | $(srcdir)/../gdbsupport/gdb_tilde_expand.cc \ | |
231 | $(srcdir)/../gdbsupport/gdb_vecs.cc \ | |
232 | $(srcdir)/../gdbsupport/gdb_wait.cc \ | |
233 | $(srcdir)/../gdbsupport/netstuff.cc \ | |
234 | $(srcdir)/../gdbsupport/new-op.cc \ | |
235 | $(srcdir)/../gdbsupport/pathstuff.cc \ | |
236 | $(srcdir)/../gdbsupport/print-utils.cc \ | |
237 | $(srcdir)/../gdbsupport/ptid.cc \ | |
238 | $(srcdir)/../gdbsupport/rsp-low.cc \ | |
239 | $(srcdir)/../gdbsupport/safe-strerror.cc \ | |
240 | $(srcdir)/../gdbsupport/tdesc.cc \ | |
241 | $(srcdir)/../gdbsupport/xml-utils.cc \ | |
919adfe8 TT |
242 | $(srcdir)/../gdb/nat/aarch64-sve-linux-ptrace.c \ |
243 | $(srcdir)/../gdb/nat/linux-btrace.c \ | |
244 | $(srcdir)/../gdb/nat/linux-namespaces.c \ | |
245 | $(srcdir)/../gdb/nat/linux-osdata.c \ | |
246 | $(srcdir)/../gdb/nat/linux-personality.c \ | |
247 | $(srcdir)/../gdb/nat/mips-linux-watch.c \ | |
248 | $(srcdir)/../gdb/nat/ppc-linux.c \ | |
bf84f706 | 249 | $(srcdir)/../gdb/nat/riscv-linux-tdesc.c \ |
919adfe8 TT |
250 | $(srcdir)/../gdb/nat/fork-inferior.c \ |
251 | $(srcdir)/../gdb/target/waitstatus.c | |
c906108c | 252 | |
7ea81414 | 253 | DEPFILES = @GDBSERVER_DEPFILES@ |
c906108c | 254 | |
e28b3332 DJ |
255 | LIBOBJS = @LIBOBJS@ |
256 | ||
7ea81414 | 257 | SOURCES = $(SFILES) |
1b3f6016 | 258 | TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} |
c906108c | 259 | |
b593ecca | 260 | OBS = \ |
08f10e02 | 261 | alloc.o \ |
b593ecca | 262 | ax.o \ |
268a13a5 TT |
263 | gdbsupport/agent.o \ |
264 | gdbsupport/btrace-common.o \ | |
265 | gdbsupport/buffer.o \ | |
266 | gdbsupport/cleanups.o \ | |
267 | gdbsupport/common-debug.o \ | |
268 | gdbsupport/common-exceptions.o \ | |
80fd2826 | 269 | gdbsupport/common-inferior.o \ |
268a13a5 TT |
270 | gdbsupport/job-control.o \ |
271 | gdbsupport/common-regcache.o \ | |
272 | gdbsupport/common-utils.o \ | |
273 | gdbsupport/errors.o \ | |
274 | gdbsupport/environ.o \ | |
275 | gdbsupport/fileio.o \ | |
276 | gdbsupport/filestuff.o \ | |
277 | gdbsupport/format.o \ | |
2d41fa11 | 278 | gdbsupport/gdb-dlfcn.o \ |
268a13a5 TT |
279 | gdbsupport/gdb_tilde_expand.o \ |
280 | gdbsupport/gdb_vecs.o \ | |
559e7e50 | 281 | gdbsupport/gdb_wait.o \ |
268a13a5 TT |
282 | gdbsupport/netstuff.o \ |
283 | gdbsupport/new-op.o \ | |
284 | gdbsupport/pathstuff.o \ | |
285 | gdbsupport/print-utils.o \ | |
286 | gdbsupport/ptid.o \ | |
287 | gdbsupport/rsp-low.o \ | |
cd850b40 | 288 | gdbsupport/safe-strerror.o \ |
268a13a5 TT |
289 | gdbsupport/signals.o \ |
290 | gdbsupport/signals-state-save-restore.o \ | |
291 | gdbsupport/tdesc.o \ | |
268a13a5 | 292 | gdbsupport/xml-utils.o \ |
b593ecca SM |
293 | debug.o \ |
294 | dll.o \ | |
b593ecca | 295 | event-loop.o \ |
b593ecca SM |
296 | hostio.o \ |
297 | inferiors.o \ | |
298 | mem-break.o \ | |
b593ecca | 299 | notif.o \ |
b593ecca SM |
300 | regcache.o \ |
301 | remote-utils.o \ | |
b593ecca | 302 | server.o \ |
b593ecca SM |
303 | symbol.o \ |
304 | target.o \ | |
305 | tdesc.o \ | |
306 | tracepoint.o \ | |
307 | utils.o \ | |
b593ecca | 308 | version.o \ |
42cd72aa | 309 | target/waitstatus.o \ |
b593ecca SM |
310 | $(DEPFILES) \ |
311 | $(LIBOBJS) \ | |
312 | $(XML_BUILTIN) | |
313 | ||
03349c93 | 314 | GDBREPLAY_OBS = \ |
268a13a5 TT |
315 | gdbsupport/cleanups.o \ |
316 | gdbsupport/common-exceptions.o \ | |
317 | gdbsupport/common-utils.o \ | |
318 | gdbsupport/rsp-low.o \ | |
319 | gdbsupport/errors.o \ | |
320 | gdbsupport/netstuff.o \ | |
321 | gdbsupport/print-utils.o \ | |
ab7d13f0 | 322 | gdbsupport/safe-strerror.o \ |
03349c93 PA |
323 | gdbreplay.o \ |
324 | utils.o \ | |
325 | version.o | |
326 | ||
5e030278 | 327 | GDBSERVER_LIBS = @GDBSERVER_LIBS@ $(PTHREAD_LIBS) |
b80864fb | 328 | XM_CLIBS = @LIBS@ |
f6528abd | 329 | CDEPS = $(srcdir)/proc-service.list |
c906108c | 330 | |
fb1e4ffc | 331 | # XML files to compile in to gdbserver, if any. |
919adfe8 | 332 | XML_DIR = $(srcdir)/../gdb/features |
fb1e4ffc DJ |
333 | XML_FILES = @srv_xmlfiles@ |
334 | XML_BUILTIN = @srv_xmlbuiltin@ | |
335 | ||
fa593d66 PA |
336 | IPA_DEPFILES = @IPA_DEPFILES@ |
337 | extra_libraries = @extra_libraries@ | |
338 | ||
f474844c JZ |
339 | FLAGS_TO_PASS = \ |
340 | "prefix=$(prefix)" \ | |
341 | "exec_prefix=$(exec_prefix)" \ | |
342 | "infodir=$(infodir)" \ | |
343 | "datarootdir=$(datarootdir)" \ | |
344 | "docdir=$(docdir)" \ | |
345 | "htmldir=$(htmldir)" \ | |
346 | "pdfdir=$(pdfdir)" \ | |
347 | "libdir=$(libdir)" \ | |
348 | "mandir=$(mandir)" \ | |
349 | "datadir=$(datadir)" \ | |
350 | "includedir=$(includedir)" \ | |
351 | "against=$(against)" \ | |
352 | "DESTDIR=$(DESTDIR)" \ | |
353 | "AR=$(AR)" \ | |
354 | "AR_FLAGS=$(AR_FLAGS)" \ | |
355 | "CC=$(CC)" \ | |
356 | "CFLAGS=$(CFLAGS)" \ | |
357 | "CXX=$(CXX)" \ | |
358 | "CXXFLAGS=$(CXXFLAGS)" \ | |
359 | "DLLTOOL=$(DLLTOOL)" \ | |
360 | "LDFLAGS=$(LDFLAGS)" \ | |
361 | "RANLIB=$(RANLIB)" \ | |
362 | "MAKEINFO=$(MAKEINFO)" \ | |
363 | "MAKEHTML=$(MAKEHTML)" \ | |
364 | "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ | |
365 | "INSTALL=$(INSTALL)" \ | |
366 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
367 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
368 | "RUNTEST=$(RUNTEST)" \ | |
369 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" | |
370 | ||
fd9bb8b8 | 371 | # All generated files which can be included by another file. |
1a627e7e | 372 | generated_files = config.h |
fd9bb8b8 | 373 | |
fa593d66 | 374 | all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries) |
c906108c SS |
375 | |
376 | # Traditionally "install" depends on "all". But it may be useful | |
1b3f6016 | 377 | # not to; for example, if the user has made some trivial change to a |
c906108c SS |
378 | # source file and doesn't care about rebuilding or just wants to save the |
379 | # time it takes for make to check that all is up to date. | |
380 | # install-only is intended to address that need. | |
f474844c JZ |
381 | install: all |
382 | @$(MAKE) $(FLAGS_TO_PASS) install-only | |
383 | ||
1b3f6016 | 384 | install-only: |
c906108c SS |
385 | n=`echo gdbserver | sed '$(program_transform_name)'`; \ |
386 | if [ x$$n = x ]; then n=gdbserver; else true; fi; \ | |
12ac6819 | 387 | if [ x"$(IPA_DEPFILES)" != x ]; then \ |
919adfe8 | 388 | $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir); \ |
48189bec | 389 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \ |
fa593d66 | 390 | fi; \ |
919adfe8 | 391 | $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ |
48189bec | 392 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |
c906108c | 393 | |
bdaed379 HD |
394 | install-strip: |
395 | $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | |
396 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | |
397 | `test -z '$(STRIP)' || \ | |
398 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only | |
399 | ||
c906108c SS |
400 | uninstall: force |
401 | n=`echo gdbserver | sed '$(program_transform_name)'`; \ | |
402 | if [ x$$n = x ]; then n=gdbserver; else true; fi; \ | |
f1048712 | 403 | rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1 |
c906108c SS |
404 | |
405 | installcheck: | |
406 | check: | |
9453113a | 407 | info dvi pdf: |
c906108c | 408 | install-info: |
9453113a | 409 | install-pdf: |
085dd6e6 JM |
410 | html: |
411 | install-html: | |
1a627e7e | 412 | clean-info: |
c906108c | 413 | |
9a665d62 TT |
414 | gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY) \ |
415 | $(INTL_DEPS) | |
39be3c7e SM |
416 | $(SILENCE) rm -f gdbserver$(EXEEXT) |
417 | $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \ | |
418 | -o gdbserver$(EXEEXT) $(OBS) $(LIBGNU) $(LIBIBERTY) \ | |
9a665d62 | 419 | $(INTL) $(GDBSERVER_LIBS) $(XM_CLIBS) |
c9a1864a | 420 | |
9a665d62 TT |
421 | gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY) \ |
422 | $(INTL_DEPS) | |
39be3c7e SM |
423 | $(SILENCE) rm -f gdbreplay$(EXEEXT) |
424 | $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \ | |
425 | -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) $(LIBGNU) \ | |
9a665d62 | 426 | $(LIBIBERTY) $(INTL) |
c906108c | 427 | |
a206891a | 428 | IPA_OBJS = \ |
08f10e02 | 429 | alloc-ipa.o \ |
a206891a | 430 | ax-ipa.o \ |
268a13a5 TT |
431 | gdbsupport/common-utils-ipa.o \ |
432 | gdbsupport/errors-ipa.o \ | |
433 | gdbsupport/format-ipa.o \ | |
434 | gdbsupport/print-utils-ipa.o \ | |
435 | gdbsupport/rsp-low-ipa.o \ | |
ab7d13f0 | 436 | gdbsupport/safe-strerror-ipa.o \ |
268a13a5 | 437 | gdbsupport/tdesc-ipa.o \ |
a206891a SM |
438 | regcache-ipa.o \ |
439 | remote-utils-ipa.o \ | |
a206891a SM |
440 | tdesc-ipa.o \ |
441 | tracepoint-ipa.o \ | |
442 | utils-ipa.o \ | |
ef87c8bb | 443 | ${IPA_DEPFILES} |
fa593d66 | 444 | |
8629c02c | 445 | IPA_LIB = libinproctrace.so |
fa593d66 | 446 | |
8ff03f0b | 447 | $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS} |
39be3c7e SM |
448 | $(SILENCE) rm -f $(IPA_LIB) |
449 | $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \ | |
450 | -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \ | |
451 | -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread | |
fa593d66 | 452 | |
c906108c SS |
453 | # Put the proper machine-specific files first, so M-. on a machine |
454 | # specific routine gets the one for the correct machine. | |
455 | # The xyzzy stuff below deals with empty DEPFILES | |
456 | TAGS: ${TAGFILES} | |
42ba50ec | 457 | etags \ |
c906108c SS |
458 | `for i in yzzy ${DEPFILES}; do \ |
459 | if [ x$$i != xyzzy ]; then \ | |
feacfcac | 460 | echo ${srcdir}/$$i | sed -e 's/\.o$$/\.cc/' \ |
42cd72aa MR |
461 | -e 's,/\(arch\|nat\|target\)/,/../\1/,' \ |
462 | -e 's,/\(gdbsupport\)/,/../../\1/,'; \ | |
c906108c SS |
463 | fi; \ |
464 | done` \ | |
465 | ${TAGFILES} | |
466 | tags: TAGS | |
467 | ||
dda42c0b | 468 | mostlyclean clean: |
c906108c | 469 | rm -f *.o ${ADD_FILES} *~ |
de7c3b4a | 470 | rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log |
fa593d66 | 471 | rm -f $(IPA_LIB) |
feacfcac | 472 | rm -f *-generated.cc |
8fa5b777 | 473 | rm -f stamp-xml |
65dd1e59 | 474 | rm -f $(DEPDIR)/*.Po |
60d6cfc9 YQ |
475 | for i in $(CONFIG_SRC_SUBDIR); do \ |
476 | rm -f $$i/*.o; \ | |
477 | rm -f $$i/$(DEPDIR)/*; \ | |
478 | done | |
c906108c | 479 | |
a59d1c82 | 480 | maintainer-clean realclean distclean: clean |
c971b7fa PA |
481 | rm -f Makefile config.status config.h stamp-h config.log |
482 | rm -f Makefile | |
60d6cfc9 YQ |
483 | for i in $(CONFIG_SRC_SUBDIR); do \ |
484 | rmdir $$i/$(DEPDIR); \ | |
485 | done | |
c971b7fa | 486 | |
c3a3ccc7 DJ |
487 | config.h: stamp-h ; @true |
488 | stamp-h: config.in config.status | |
c5adaa19 | 489 | $(SHELL) ./config.status config.h |
0729219d | 490 | |
7ea81414 | 491 | Makefile: Makefile.in config.status |
c5adaa19 | 492 | $(SHELL) ./config.status $@ |
c906108c | 493 | |
919adfe8 | 494 | config.status: configure configure.srv $(srcdir)/../bfd/development.sh |
d6e9fb05 JK |
495 | $(SHELL) ./config.status --recheck |
496 | ||
c9a1864a YQ |
497 | # automatic rebuilding in automake-generated Makefiles requires |
498 | # this rule in the toplevel Makefile, which, with GNU make, causes | |
499 | # the desired updates through the implicit regeneration of the Makefile | |
500 | # and all of its prerequisites. | |
501 | am--refresh: | |
502 | @: | |
503 | ||
c906108c SS |
504 | force: |
505 | ||
feacfcac | 506 | version-generated.cc: Makefile $(srcdir)/../gdb/version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh |
919adfe8 | 507 | $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir)/../gdb \ |
39be3c7e | 508 | $(host_alias) $(target_alias) $@ |
c906108c | 509 | |
feacfcac | 510 | xml-builtin-generated.cc: stamp-xml; @true |
fb1e4ffc | 511 | stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES) |
39be3c7e SM |
512 | $(SILENCE) rm -f xml-builtin.tmp |
513 | $(ECHO_GEN_XML_BUILTIN_GENERATED) $(SHELL) $(XML_DIR)/feature_to_c.sh \ | |
514 | xml-builtin.tmp $(XML_FILES) | |
feacfcac | 515 | $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin-generated.cc |
39be3c7e | 516 | $(SILENCE) echo stamp > stamp-xml |
fb1e4ffc | 517 | |
feacfcac | 518 | .PRECIOUS: xml-builtin.cc |
fb1e4ffc | 519 | |
c906108c SS |
520 | # GNU Make has an annoying habit of putting *all* the Makefile variables |
521 | # into the environment, unless you include this target as a circumvention. | |
522 | # Rumor is that this will be fixed (and this target can be removed) | |
523 | # in GNU Make 4.0. | |
524 | .NOEXPORT: | |
525 | ||
526 | # GNU Make 3.63 has a different problem: it keeps tacking command line | |
527 | # overrides onto the definition of $(MAKE). This variable setting | |
528 | # will remove them. | |
8629c02c | 529 | MAKEOVERRIDES = |
c906108c | 530 | |
919adfe8 | 531 | regdat_sh = $(srcdir)/../gdb/regformats/regdat.sh |
7a60ad40 | 532 | |
0fb4aa4b PA |
533 | UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION |
534 | ||
956cc47c SN |
535 | # Undo gnulib replacements for the IPA shared library build. |
536 | # The gnulib headers are still needed, but gnulib is not linked | |
537 | # into the IPA lib so replacement apis don't work. | |
ab7d13f0 | 538 | UNDO_GNULIB_CFLAGS = -Drpl_strerror_r=strerror_r |
956cc47c | 539 | |
fa593d66 PA |
540 | # Note, we only build the IPA if -fvisibility=hidden is supported in |
541 | # the first place. | |
bffc0964 | 542 | IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \ |
956cc47c | 543 | $(UNDO_GNULIB_CFLAGS) \ |
3ba6ad0f | 544 | -fPIC -DIN_PROCESS_AGENT \ |
fa593d66 PA |
545 | -fvisibility=hidden |
546 | ||
39be3c7e | 547 | IPAGENT_COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post) |
61c125b9 | 548 | |
1a01e7c6 SM |
549 | # Rules for special cases. |
550 | ||
feacfcac | 551 | ax-ipa.o: ax.cc |
61c125b9 TT |
552 | $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $< |
553 | $(POSTCOMPILE) | |
61c125b9 | 554 | |
feacfcac | 555 | ax.o: ax.cc |
61c125b9 TT |
556 | $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $< |
557 | $(POSTCOMPILE) | |
558 | ||
a543c5ca AH |
559 | # Rules for objects that go in the in-process agent. |
560 | ||
919adfe8 | 561 | arch/%-ipa.o: ../gdb/arch/%.c |
feacfcac | 562 | $(IPAGENT_COMPILE) -x c++ $< |
b4570e4b YQ |
563 | $(POSTCOMPILE) |
564 | ||
06b3c5bd | 565 | gdbsupport/%-ipa.o: ../gdbsupport/%.cc |
a543c5ca AH |
566 | $(IPAGENT_COMPILE) $< |
567 | $(POSTCOMPILE) | |
a8ebe3d5 | 568 | |
feacfcac | 569 | %-ipa.o: %-generated.cc |
8fa5b777 SM |
570 | $(IPAGENT_COMPILE) $< |
571 | $(POSTCOMPILE) | |
572 | ||
feacfcac | 573 | %-ipa.o: %.cc |
a8ebe3d5 SM |
574 | $(IPAGENT_COMPILE) $< |
575 | $(POSTCOMPILE) | |
576 | ||
919adfe8 | 577 | %-ipa.o: ../gdb/%.c |
feacfcac | 578 | $(IPAGENT_COMPILE) -x c++ $< |
1ee7b812 BE |
579 | $(POSTCOMPILE) |
580 | ||
1a01e7c6 | 581 | # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one. |
feacfcac SM |
582 | # Therefore, this one needs to be before "%.o: %.cc" for it to be considered for |
583 | # files such as linux-amd64-ipa.o generated from linux-amd64-ipa.cc. | |
1a01e7c6 SM |
584 | # |
585 | # Later versions of GNU Make choose the rule with the shortest stem, so it would | |
586 | # work in any order. | |
587 | ||
feacfcac | 588 | %-ipa.o: %-ipa.cc |
1a01e7c6 SM |
589 | $(IPAGENT_COMPILE) $< |
590 | $(POSTCOMPILE) | |
591 | ||
a543c5ca | 592 | # Rules for objects that go in the gdbserver binary. |
36bc18a8 | 593 | |
919adfe8 | 594 | arch/%.o: ../gdb/arch/%.c |
feacfcac | 595 | $(COMPILE) -x c++ $< |
5f035c07 YQ |
596 | $(POSTCOMPILE) |
597 | ||
06b3c5bd | 598 | gdbsupport/%.o: ../gdbsupport/%.cc |
8fa5b777 SM |
599 | $(COMPILE) $< |
600 | $(POSTCOMPILE) | |
601 | ||
feacfcac | 602 | %.o: %-generated.cc |
21122961 SM |
603 | $(COMPILE) $< |
604 | $(POSTCOMPILE) | |
605 | ||
feacfcac | 606 | %.o: %.cc |
6bda016b SM |
607 | $(COMPILE) $< |
608 | $(POSTCOMPILE) | |
609 | ||
919adfe8 | 610 | nat/%.o: ../gdb/nat/%.c |
feacfcac | 611 | $(COMPILE) -x c++ $< |
c5a22423 SM |
612 | $(POSTCOMPILE) |
613 | ||
919adfe8 | 614 | target/%.o: ../gdb/target/%.c |
feacfcac | 615 | $(COMPILE) -x c++ $< |
21122961 | 616 | $(POSTCOMPILE) |
08f10e02 | 617 | |
919adfe8 | 618 | %.o: ../gdb/%.c |
feacfcac | 619 | $(COMPILE) -x c++ $< |
08f10e02 | 620 | $(POSTCOMPILE) |
21122961 | 621 | |
8fa5b777 SM |
622 | # Rules for register format descriptions. Suffix destination files with |
623 | # -generated to identify and clean them easily. | |
c362e621 | 624 | |
feacfcac | 625 | %-generated.cc: ../gdb/regformats/%.dat $(regdat_sh) |
39be3c7e | 626 | $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@ |
c362e621 | 627 | |
feacfcac | 628 | %-generated.cc: ../gdb/regformats/arm/%.dat $(regdat_sh) |
39be3c7e | 629 | $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@ |
c362e621 | 630 | |
feacfcac | 631 | %-generated.cc: ../gdb/regformats/rs6000/%.dat $(regdat_sh) |
39be3c7e | 632 | $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@ |
61c125b9 TT |
633 | |
634 | # | |
3b165252 | 635 | # Dependency tracking. |
61c125b9 TT |
636 | # |
637 | ||
3b165252 | 638 | ifeq ($(DEPMODE),depmode=gcc3) |
61c125b9 TT |
639 | # Note that we put the dependencies into a .Tpo file, then move them |
640 | # into place if the compile succeeds. We need this because gcc does | |
641 | # not atomically write the dependency output file. | |
3b165252 | 642 | override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ |
60d6cfc9 YQ |
643 | -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo |
644 | override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \ | |
645 | $(@D)/$(DEPDIR)/$(basename $(@F)).Po | |
3b165252 SM |
646 | else |
647 | override COMPILE.pre = source='$<' object='$@' libtool=no \ | |
60d6cfc9 | 648 | DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \ |
feacfcac | 649 | $(CXX) $(CXX_DIALECT) |
61c125b9 TT |
650 | # depcomp handles atomicity for us, so we don't need a postcompile |
651 | # step. | |
3b165252 SM |
652 | override POSTCOMPILE = |
653 | endif | |
61c125b9 TT |
654 | |
655 | # A list of all the objects we might care about in this build, for | |
656 | # dependency tracking. | |
1798301e | 657 | all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS) |
61c125b9 TT |
658 | |
659 | # Ensure that generated files are created early. Use order-only | |
660 | # dependencies if available. They require GNU make 3.80 or newer, | |
661 | # and the .VARIABLES variable was introduced at the same time. | |
3b165252 SM |
662 | ifdef .VARIABLES |
663 | $(all_object_files): | $(generated_files) | |
664 | else | |
61c125b9 | 665 | $(all_object_files) : $(generated_files) |
3b165252 | 666 | endif |
61c125b9 | 667 | |
f31c089e SM |
668 | # All the .deps files to include. |
669 | all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\ | |
670 | $(dir $(dep))/$(DEPDIR)/$(notdir $(dep))) | |
671 | ||
61c125b9 | 672 | # Dependencies. |
f31c089e | 673 | -include $(all_deps_files) |
61c125b9 | 674 | |
ad02e4fe | 675 | # Disable implicit make rules. |
919adfe8 | 676 | include $(srcdir)/../gdb/disable-implicit-rules.mk |
ad02e4fe | 677 | |
feacfcac | 678 | # Do not delete intermediate files (e.g. *-generated.cc). |
50a421ac SM |
679 | .SECONDARY: |
680 | ||
c906108c | 681 | # This is the end of "Makefile.in". |