Commit | Line | Data |
---|---|---|
61baf725 | 1 | # Copyright (C) 1989-2017 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@ |
c906108c | 46 | |
a8347a2a | 47 | SHELL = @SHELL@ |
de7c3b4a | 48 | EXEEXT = @EXEEXT@ |
c906108c | 49 | |
d6e9fb05 JK |
50 | INSTALL = @INSTALL@ |
51 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
52 | INSTALL_DATA = @INSTALL_DATA@ | |
c9a1864a | 53 | RANLIB = @RANLIB@ |
c906108c | 54 | |
84563040 | 55 | CC = @CC@ |
3bc3d82a | 56 | CXX = @CXX@ |
8629c02c | 57 | CXX_DIALECT = @CXX_DIALECT@ |
e1d2394b MS |
58 | AR = @AR@ |
59 | AR_FLAGS = rc | |
c906108c | 60 | |
61c125b9 TT |
61 | # Dependency tracking information. |
62 | DEPMODE = @CCDEPMODE@ | |
63 | DEPDIR = @DEPDIR@ | |
64 | depcomp = $(SHELL) $(srcdir)/../depcomp | |
65 | ||
66 | # Note that these are overridden by GNU make-specific code below if | |
67 | # GNU make is used. The overrides implement dependency tracking. | |
cf0dd6f0 | 68 | COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT) |
61c125b9 TT |
69 | COMPILE.post = -c -o $@ |
70 | COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post) | |
71 | POSTCOMPILE = @true | |
72 | ||
c906108c SS |
73 | # Directory containing source files. Don't clean up the spacing, |
74 | # this exact string is matched for by the "configure" script. | |
d6e9fb05 | 75 | srcdir = @srcdir@ |
8629c02c SM |
76 | abs_top_srcdir = @abs_top_srcdir@ |
77 | abs_srcdir = @abs_srcdir@ | |
d6e9fb05 | 78 | VPATH = @srcdir@ |
c906108c SS |
79 | |
80 | # It is also possible that you will need to add -I/usr/include/sys to the | |
1b3f6016 | 81 | # CFLAGS section if your system doesn't have fcntl.h in /usr/include (which |
c906108c SS |
82 | # is where it should be according to Posix). |
83 | ||
84 | # Set this up with gcc if you have gnu ld and the loader will print out | |
85 | # line numbers for undefinded refs. | |
8629c02c SM |
86 | #CC_LD = g++ -static |
87 | CC_LD = $(CXX) $(CXX_DIALECT) | |
c906108c SS |
88 | |
89 | # Where is the "include" directory? Traditionally ../include or ./include | |
8629c02c | 90 | INCLUDE_DIR = ${srcdir}/../../include |
c906108c SS |
91 | INCLUDE_DEP = $$(INCLUDE_DIR) |
92 | ||
0b04e523 TT |
93 | LIBIBERTY_BUILDDIR = build-libiberty-gdbserver |
94 | LIBIBERTY = $(LIBIBERTY_BUILDDIR)/libiberty.a | |
95 | ||
0fb4aa4b PA |
96 | # Where is ust? These will be empty if ust was not available. |
97 | ustlibs = @ustlibs@ | |
98 | ustinc = @ustinc@ | |
99 | ||
c9a1864a | 100 | # gnulib |
c971b7fa PA |
101 | GNULIB_BUILDDIR = build-gnulib-gdbserver |
102 | LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a | |
103 | INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import | |
ecedbe58 | 104 | |
c9a1864a YQ |
105 | # Generated headers in the gnulib directory. These must be listed |
106 | # so that they are generated before other files are compiled. | |
c971b7fa | 107 | GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@ |
c9a1864a | 108 | |
c906108c SS |
109 | # All the includes used for CFLAGS and for lint. |
110 | # -I. for config files. | |
7ea81414 DJ |
111 | # -I${srcdir} for our headers. |
112 | # -I$(srcdir)/../regformats for regdef.h. | |
96d7229d LM |
113 | # |
114 | # We do not include ../target or ../nat in here because headers | |
115 | # in those directories should be included with the subdirectory. | |
116 | # e.g.: "target/wait.h". | |
117 | # | |
2aecd87f | 118 | INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \ |
66af0f44 | 119 | -I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \ |
57c4b50b | 120 | $(INCGNU) |
c906108c SS |
121 | |
122 | # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS | |
123 | # from the config/ directory. | |
124 | GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS} | |
125 | #PROFILE_CFLAGS = -pg | |
126 | ||
d4596a3d PA |
127 | WARN_CFLAGS = @WARN_CFLAGS@ |
128 | WERROR_CFLAGS = @WERROR_CFLAGS@ | |
0729219d | 129 | |
d3ce09f5 SS |
130 | WARN_CFLAGS_NO_FORMAT = `echo " $(WARN_CFLAGS) " \ |
131 | | sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"` | |
132 | ||
a994041d | 133 | # These are specifically reserved for setting from the command line |
c906108c | 134 | # when running make. I.E. "make CFLAGS=-Wmissing-prototypes". |
84563040 | 135 | CFLAGS = @CFLAGS@ |
a994041d | 136 | CXXFLAGS = @CXXFLAGS@ |
bffc0964 | 137 | CPPFLAGS = @CPPFLAGS@ |
84563040 | 138 | |
c906108c | 139 | # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. |
8629c02c | 140 | INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \ |
bffc0964 | 141 | ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} |
8629c02c SM |
142 | INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) |
143 | INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER | |
c906108c SS |
144 | |
145 | # LDFLAGS is specifically reserved for setting from the command line | |
146 | # when running make. | |
697f7479 | 147 | LDFLAGS = @LDFLAGS@ |
f6de3c42 | 148 | INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@ |
c906108c | 149 | |
c906108c SS |
150 | # All source files that go into linking GDB remote server. |
151 | ||
b593ecca SM |
152 | SFILES = \ |
153 | $(srcdir)/debug.c \ | |
154 | $(srcdir)/dll.c \ | |
155 | $(srcdir)/gdbreplay.c \ | |
156 | $(srcdir)/hostio.c \ | |
157 | $(srcdir)/hostio-errno.c \ | |
158 | $(srcdir)/i387-fp.c \ | |
159 | $(srcdir)/inferiors.c \ | |
98fc70d6 | 160 | $(srcdir)/linux-aarch64-low.c \ |
b593ecca SM |
161 | $(srcdir)/linux-arm-low.c \ |
162 | $(srcdir)/linux-bfin-low.c \ | |
163 | $(srcdir)/linux-cris-low.c \ | |
164 | $(srcdir)/linux-crisv32-low.c \ | |
165 | $(srcdir)/linux-ia64-low.c \ | |
166 | $(srcdir)/linux-low.c \ | |
7cfbc4a0 | 167 | $(srcdir)/linux-m32r-low.c \ |
b593ecca SM |
168 | $(srcdir)/linux-m68k-low.c \ |
169 | $(srcdir)/linux-mips-low.c \ | |
68f5f838 | 170 | $(srcdir)/linux-nios2-low.c \ |
b593ecca | 171 | $(srcdir)/linux-ppc-low.c \ |
eee84df1 | 172 | $(srcdir)/linux-s390-low.c \ |
b593ecca SM |
173 | $(srcdir)/linux-sh-low.c \ |
174 | $(srcdir)/linux-sparc-low.c \ | |
175 | $(srcdir)/linux-tile-low.c \ | |
d0722149 | 176 | $(srcdir)/linux-x86-low.c \ |
1525d545 | 177 | $(srcdir)/linux-xtensa-low.c \ |
b593ecca SM |
178 | $(srcdir)/mem-break.c \ |
179 | $(srcdir)/proc-service.c \ | |
180 | $(srcdir)/proc-service.list \ | |
181 | $(srcdir)/regcache.c \ | |
182 | $(srcdir)/remote-utils.c \ | |
183 | $(srcdir)/server.c \ | |
184 | $(srcdir)/symbol.c \ | |
185 | $(srcdir)/target.c \ | |
186 | $(srcdir)/thread-db.c \ | |
187 | $(srcdir)/utils.c \ | |
188 | $(srcdir)/win32-arm-low.c \ | |
189 | $(srcdir)/win32-i386-low.c \ | |
190 | $(srcdir)/win32-low.c \ | |
191 | $(srcdir)/wincecompat.c \ | |
192 | $(srcdir)/x86-low.c \ | |
193 | $(srcdir)/arch/arm.c \ | |
194 | $(srcdir)/arch/arm-get-next-pcs.c \ | |
195 | $(srcdir)/arch/arm-linux.c \ | |
791c0056 | 196 | $(srcdir)/common/btrace-common.c \ |
b593ecca SM |
197 | $(srcdir)/common/buffer.c \ |
198 | $(srcdir)/common/cleanups.c \ | |
199 | $(srcdir)/common/common-debug.c \ | |
200 | $(srcdir)/common/common-exceptions.c \ | |
201 | $(srcdir)/common/common-regcache.c \ | |
202 | $(srcdir)/common/common-utils.c \ | |
203 | $(srcdir)/common/errors.c \ | |
1672e0d9 | 204 | $(srcdir)/common/environ.c \ |
b593ecca SM |
205 | $(srcdir)/common/fileio.c \ |
206 | $(srcdir)/common/filestuff.c \ | |
15652511 | 207 | $(srcdir)/common/job-control.c \ |
7da0a886 | 208 | $(srcdir)/common/gdb_tilde_expand.c \ |
b593ecca SM |
209 | $(srcdir)/common/gdb_vecs.c \ |
210 | $(srcdir)/common/new-op.c \ | |
211 | $(srcdir)/common/print-utils.c \ | |
212 | $(srcdir)/common/ptid.c \ | |
213 | $(srcdir)/common/rsp-low.c \ | |
214 | $(srcdir)/common/vec.c \ | |
215 | $(srcdir)/common/xml-utils.c \ | |
216 | $(srcdir)/nat/linux-btrace.c \ | |
217 | $(srcdir)/nat/linux-namespaces.c \ | |
218 | $(srcdir)/nat/linux-osdata.c \ | |
219 | $(srcdir)/nat/linux-personality.c \ | |
220 | $(srcdir)/nat/mips-linux-watch.c \ | |
221 | $(srcdir)/nat/ppc-linux.c \ | |
2090129c | 222 | $(srcdir)/nat/fork-inferior.c \ |
b593ecca | 223 | $(srcdir)/target/waitstatus.c |
c906108c | 224 | |
7ea81414 | 225 | DEPFILES = @GDBSERVER_DEPFILES@ |
c906108c | 226 | |
e28b3332 DJ |
227 | LIBOBJS = @LIBOBJS@ |
228 | ||
7ea81414 | 229 | SOURCES = $(SFILES) |
1b3f6016 | 230 | TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} |
c906108c | 231 | |
b593ecca SM |
232 | OBS = \ |
233 | agent.o \ | |
234 | ax.o \ | |
235 | btrace-common.o \ | |
236 | buffer.o \ | |
237 | cleanups.o \ | |
238 | common-debug.o \ | |
239 | common-exceptions.o \ | |
15652511 | 240 | job-control.o \ |
b593ecca SM |
241 | common-regcache.o \ |
242 | common-utils.o \ | |
243 | debug.o \ | |
244 | dll.o \ | |
245 | errors.o \ | |
1672e0d9 | 246 | environ.o \ |
b593ecca SM |
247 | event-loop.o \ |
248 | fileio.o \ | |
249 | filestuff.o \ | |
250 | format.o \ | |
7da0a886 | 251 | gdb_tilde_expand.o \ |
b593ecca SM |
252 | gdb_vecs.o \ |
253 | hostio.o \ | |
254 | inferiors.o \ | |
255 | mem-break.o \ | |
256 | new-op.o \ | |
257 | notif.o \ | |
258 | print-utils.o \ | |
259 | ptid.o \ | |
260 | regcache.o \ | |
261 | remote-utils.o \ | |
262 | rsp-low.o \ | |
6d580b63 | 263 | selftest.o \ |
b593ecca SM |
264 | server.o \ |
265 | signals.o \ | |
266 | signals-state-save-restore.o \ | |
267 | symbol.o \ | |
268 | target.o \ | |
269 | tdesc.o \ | |
270 | tracepoint.o \ | |
271 | utils.o \ | |
272 | vec.o \ | |
273 | version.o \ | |
274 | waitstatus.o \ | |
275 | xml-utils.o \ | |
276 | $(DEPFILES) \ | |
277 | $(LIBOBJS) \ | |
278 | $(XML_BUILTIN) | |
279 | ||
a417dc56 | 280 | GDBREPLAY_OBS = gdbreplay.o version.o |
0d62e5e8 | 281 | GDBSERVER_LIBS = @GDBSERVER_LIBS@ |
b80864fb | 282 | XM_CLIBS = @LIBS@ |
f6528abd | 283 | CDEPS = $(srcdir)/proc-service.list |
c906108c | 284 | |
fb1e4ffc DJ |
285 | # XML files to compile in to gdbserver, if any. |
286 | XML_DIR = $(srcdir)/../features | |
fb1e4ffc DJ |
287 | XML_FILES = @srv_xmlfiles@ |
288 | XML_BUILTIN = @srv_xmlbuiltin@ | |
289 | ||
fa593d66 PA |
290 | IPA_DEPFILES = @IPA_DEPFILES@ |
291 | extra_libraries = @extra_libraries@ | |
292 | ||
0b04e523 | 293 | SUBDIRS = $(GNULIB_BUILDDIR) $(LIBIBERTY_BUILDDIR) |
c971b7fa PA |
294 | CLEANDIRS = $(SUBDIRS) |
295 | ||
296 | # List of subdirectories in the build tree that must exist. | |
297 | # This is used to force build failures in existing trees when | |
298 | # a new directory is added. | |
299 | # The format here is for the `case' shell command. | |
0b04e523 | 300 | REQUIRED_SUBDIRS = $(GNULIB_BUILDDIR) | $(LIBIBERTY_BUILDDIR) |
c971b7fa | 301 | |
f474844c JZ |
302 | FLAGS_TO_PASS = \ |
303 | "prefix=$(prefix)" \ | |
304 | "exec_prefix=$(exec_prefix)" \ | |
305 | "infodir=$(infodir)" \ | |
306 | "datarootdir=$(datarootdir)" \ | |
307 | "docdir=$(docdir)" \ | |
308 | "htmldir=$(htmldir)" \ | |
309 | "pdfdir=$(pdfdir)" \ | |
310 | "libdir=$(libdir)" \ | |
311 | "mandir=$(mandir)" \ | |
312 | "datadir=$(datadir)" \ | |
313 | "includedir=$(includedir)" \ | |
314 | "against=$(against)" \ | |
315 | "DESTDIR=$(DESTDIR)" \ | |
316 | "AR=$(AR)" \ | |
317 | "AR_FLAGS=$(AR_FLAGS)" \ | |
318 | "CC=$(CC)" \ | |
319 | "CFLAGS=$(CFLAGS)" \ | |
320 | "CXX=$(CXX)" \ | |
321 | "CXXFLAGS=$(CXXFLAGS)" \ | |
322 | "DLLTOOL=$(DLLTOOL)" \ | |
323 | "LDFLAGS=$(LDFLAGS)" \ | |
324 | "RANLIB=$(RANLIB)" \ | |
325 | "MAKEINFO=$(MAKEINFO)" \ | |
326 | "MAKEHTML=$(MAKEHTML)" \ | |
327 | "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ | |
328 | "INSTALL=$(INSTALL)" \ | |
329 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
330 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
331 | "RUNTEST=$(RUNTEST)" \ | |
332 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" | |
333 | ||
fd9bb8b8 PA |
334 | # All generated files which can be included by another file. |
335 | generated_files = config.h $(GNULIB_H) | |
336 | ||
fa593d66 | 337 | all: gdbserver$(EXEEXT) gdbreplay$(EXEEXT) $(extra_libraries) |
c971b7fa | 338 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
c906108c SS |
339 | |
340 | # Traditionally "install" depends on "all". But it may be useful | |
1b3f6016 | 341 | # not to; for example, if the user has made some trivial change to a |
c906108c SS |
342 | # source file and doesn't care about rebuilding or just wants to save the |
343 | # time it takes for make to check that all is up to date. | |
344 | # install-only is intended to address that need. | |
f474844c JZ |
345 | install: all |
346 | @$(MAKE) $(FLAGS_TO_PASS) install-only | |
347 | ||
1b3f6016 | 348 | install-only: |
c906108c SS |
349 | n=`echo gdbserver | sed '$(program_transform_name)'`; \ |
350 | if [ x$$n = x ]; then n=gdbserver; else true; fi; \ | |
12ac6819 | 351 | if [ x"$(IPA_DEPFILES)" != x ]; then \ |
fa593d66 PA |
352 | $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir); \ |
353 | $(INSTALL_PROGRAM) $(IPA_LIB) $(DESTDIR)$(libdir)/$(IPA_LIB); \ | |
354 | fi; \ | |
c938e9b0 | 355 | $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \ |
480b27bf | 356 | $(INSTALL_PROGRAM) gdbserver$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) |
0b04e523 TT |
357 | # Note that we run install and not install-only, as the latter |
358 | # is not part of GNU standards and in particular not provided | |
359 | # in libiberty. | |
360 | @$(MAKE) $(FLAGS_TO_PASS) DO=install "DODIRS=$(SUBDIRS)" subdir_do | |
c906108c SS |
361 | |
362 | uninstall: force | |
363 | n=`echo gdbserver | sed '$(program_transform_name)'`; \ | |
364 | if [ x$$n = x ]; then n=gdbserver; else true; fi; \ | |
f1048712 | 365 | rm -f $(DESTDIR)/$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(man1dir)/$$n.1 |
c971b7fa | 366 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
c906108c SS |
367 | |
368 | installcheck: | |
369 | check: | |
9453113a | 370 | info dvi pdf: |
c906108c | 371 | install-info: |
9453113a | 372 | install-pdf: |
085dd6e6 JM |
373 | html: |
374 | install-html: | |
c9a1864a | 375 | clean-info: force |
c971b7fa | 376 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
c906108c | 377 | |
0b04e523 | 378 | gdbserver$(EXEEXT): $(OBS) ${ADD_DEPS} ${CDEPS} $(LIBGNU) $(LIBIBERTY) |
68070c10 | 379 | rm -f gdbserver$(EXEEXT) |
3bc3d82a | 380 | $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbserver$(EXEEXT) $(OBS) \ |
0b04e523 | 381 | $(LIBGNU) $(LIBIBERTY) $(GDBSERVER_LIBS) $(XM_CLIBS) |
c9a1864a | 382 | |
0b04e523 TT |
383 | $(LIBGNU) $(LIBIBERTY) $(GNULIB_H): all-lib |
384 | all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile | |
385 | @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do | |
c9a1864a | 386 | .PHONY: all-lib |
c906108c | 387 | |
0b04e523 | 388 | gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY) |
68070c10 | 389 | rm -f gdbreplay$(EXEEXT) |
3bc3d82a | 390 | $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \ |
0b04e523 | 391 | $(XM_CLIBS) $(LIBGNU) $(LIBIBERTY) |
c906108c | 392 | |
a206891a SM |
393 | IPA_OBJS = \ |
394 | ax-ipa.o \ | |
395 | common-utils-ipa.o \ | |
396 | errors-ipa.o \ | |
397 | format-ipa.o \ | |
398 | print-utils-ipa.o \ | |
399 | regcache-ipa.o \ | |
400 | remote-utils-ipa.o \ | |
401 | rsp-low-ipa.o \ | |
402 | tdesc-ipa.o \ | |
403 | tracepoint-ipa.o \ | |
404 | utils-ipa.o \ | |
f7000548 | 405 | vec-ipa.o \ |
ef87c8bb | 406 | ${IPA_DEPFILES} |
fa593d66 | 407 | |
8629c02c | 408 | IPA_LIB = libinproctrace.so |
fa593d66 PA |
409 | |
410 | $(IPA_LIB): $(IPA_OBJS) ${ADD_DEPS} ${CDEPS} | |
411 | rm -f $(IPA_LIB) | |
6e774b13 | 412 | $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) -Wl,--no-undefined $(INTERNAL_CFLAGS) \ |
0fb4aa4b | 413 | $(INTERNAL_LDFLAGS) -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread |
fa593d66 | 414 | |
c906108c SS |
415 | # Put the proper machine-specific files first, so M-. on a machine |
416 | # specific routine gets the one for the correct machine. | |
417 | # The xyzzy stuff below deals with empty DEPFILES | |
418 | TAGS: ${TAGFILES} | |
2c0fc042 | 419 | etags `find ${srcdir}/../config -name $(DEPRECATED_TM_FILE) -print` \ |
c906108c SS |
420 | `find ${srcdir}/../config -name ${XM_FILE} -print` \ |
421 | `find ${srcdir}/../config -name ${NAT_FILE} -print` \ | |
422 | `for i in yzzy ${DEPFILES}; do \ | |
423 | if [ x$$i != xyzzy ]; then \ | |
424 | echo ${srcdir}/$$i | sed -e 's/\.o$$/\.c/' ; \ | |
425 | fi; \ | |
426 | done` \ | |
427 | ${TAGFILES} | |
428 | tags: TAGS | |
429 | ||
430 | clean: | |
431 | rm -f *.o ${ADD_FILES} *~ | |
de7c3b4a | 432 | rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log |
fa593d66 | 433 | rm -f $(IPA_LIB) |
8fa5b777 SM |
434 | rm -f *-generated.c |
435 | rm -f stamp-xml | |
65dd1e59 | 436 | rm -f $(DEPDIR)/*.Po |
c971b7fa | 437 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
c906108c | 438 | |
a59d1c82 | 439 | maintainer-clean realclean distclean: clean |
c971b7fa PA |
440 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |
441 | rm -rf $(GNULIB_BUILDDIR) | |
442 | rm -f Makefile config.status config.h stamp-h config.log | |
443 | rm -f Makefile | |
444 | ||
445 | subdir_do: force | |
446 | @for i in $(DODIRS); do \ | |
447 | case $$i in \ | |
448 | $(REQUIRED_SUBDIRS)) \ | |
449 | if [ ! -f ./$$i/Makefile ] ; then \ | |
450 | echo "Missing $$i/Makefile" >&2 ; \ | |
451 | exit 1 ; \ | |
452 | fi ;; \ | |
453 | esac ; \ | |
454 | if [ -f ./$$i/Makefile ] ; then \ | |
455 | if (cd ./$$i; \ | |
456 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ | |
457 | else exit 1 ; fi ; \ | |
458 | else true ; fi ; \ | |
459 | done | |
c906108c | 460 | |
c3a3ccc7 DJ |
461 | config.h: stamp-h ; @true |
462 | stamp-h: config.in config.status | |
e0e76420 | 463 | CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status |
0729219d | 464 | |
7ea81414 | 465 | Makefile: Makefile.in config.status |
0729219d | 466 | CONFIG_HEADERS="" $(SHELL) ./config.status |
c906108c | 467 | |
c971b7fa PA |
468 | $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status |
469 | @cd $(GNULIB_BUILDDIR); CONFIG_FILES="Makefile" \ | |
c9a1864a YQ |
470 | CONFIG_COMMANDS="depfiles" \ |
471 | CONFIG_HEADERS= \ | |
472 | CONFIG_LINKS= \ | |
c971b7fa | 473 | $(SHELL) config.status |
c9a1864a | 474 | |
270c9937 | 475 | config.status: configure configure.srv $(srcdir)/../../bfd/development.sh |
d6e9fb05 JK |
476 | $(SHELL) ./config.status --recheck |
477 | ||
c9a1864a YQ |
478 | # automatic rebuilding in automake-generated Makefiles requires |
479 | # this rule in the toplevel Makefile, which, with GNU make, causes | |
480 | # the desired updates through the implicit regeneration of the Makefile | |
481 | # and all of its prerequisites. | |
482 | am--refresh: | |
483 | @: | |
484 | ||
c906108c SS |
485 | force: |
486 | ||
8fa5b777 | 487 | version-generated.c: Makefile $(srcdir)/../version.in $(srcdir)/../../bfd/version.h $(srcdir)/../common/create-version.sh |
01208463 | 488 | $(SHELL) $(srcdir)/../common/create-version.sh $(srcdir)/.. \ |
8fa5b777 | 489 | $(host_alias) $(target_alias) $@ |
c906108c | 490 | |
8fa5b777 | 491 | xml-builtin-generated.c: stamp-xml; @true |
fb1e4ffc DJ |
492 | stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES) |
493 | rm -f xml-builtin.tmp | |
494 | $(SHELL) $(XML_DIR)/feature_to_c.sh xml-builtin.tmp $(XML_FILES) | |
8fa5b777 | 495 | $(SHELL) $(srcdir)/../../move-if-change xml-builtin.tmp xml-builtin-generated.c |
fb1e4ffc DJ |
496 | echo stamp > stamp-xml |
497 | ||
9b4b61c8 | 498 | .PRECIOUS: xml-builtin.c |
fb1e4ffc | 499 | |
c906108c SS |
500 | # GNU Make has an annoying habit of putting *all* the Makefile variables |
501 | # into the environment, unless you include this target as a circumvention. | |
502 | # Rumor is that this will be fixed (and this target can be removed) | |
503 | # in GNU Make 4.0. | |
504 | .NOEXPORT: | |
505 | ||
506 | # GNU Make 3.63 has a different problem: it keeps tacking command line | |
507 | # overrides onto the definition of $(MAKE). This variable setting | |
508 | # will remove them. | |
8629c02c | 509 | MAKEOVERRIDES = |
c906108c | 510 | |
0c74b2a7 | 511 | regdat_sh = $(srcdir)/../regformats/regdat.sh |
7a60ad40 | 512 | |
0fb4aa4b PA |
513 | UST_CFLAGS = $(ustinc) -DCONFIG_UST_GDB_INTEGRATION |
514 | ||
fa593d66 PA |
515 | # Note, we only build the IPA if -fvisibility=hidden is supported in |
516 | # the first place. | |
bffc0964 | 517 | IPAGENT_CFLAGS = $(INTERNAL_CFLAGS) $(UST_CFLAGS) \ |
3ba6ad0f | 518 | -fPIC -DIN_PROCESS_AGENT \ |
fa593d66 PA |
519 | -fvisibility=hidden |
520 | ||
61c125b9 TT |
521 | IPAGENT_COMPILE = $(COMPILE.pre) $(IPAGENT_CFLAGS) $(COMPILE.post) |
522 | ||
1a01e7c6 SM |
523 | # Rules for special cases. |
524 | ||
61c125b9 TT |
525 | ax-ipa.o: ax.c |
526 | $(IPAGENT_COMPILE) $(WARN_CFLAGS_NO_FORMAT) $< | |
527 | $(POSTCOMPILE) | |
61c125b9 TT |
528 | |
529 | ax.o: ax.c | |
530 | $(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $< | |
531 | $(POSTCOMPILE) | |
532 | ||
5f035c07 YQ |
533 | arch-i386.o: ../arch/i386.c |
534 | $(COMPILE) $< | |
535 | $(POSTCOMPILE) | |
536 | ||
b4570e4b YQ |
537 | arch-amd64.o: ../arch/amd64.c |
538 | $(COMPILE) $< | |
539 | $(POSTCOMPILE) | |
540 | ||
a8ebe3d5 SM |
541 | # Rules for objects that go in the in-process agent. |
542 | ||
8fa5b777 SM |
543 | %-ipa.o: %-generated.c |
544 | $(IPAGENT_COMPILE) $< | |
545 | $(POSTCOMPILE) | |
546 | ||
a8ebe3d5 SM |
547 | %-ipa.o: %.c |
548 | $(IPAGENT_COMPILE) $< | |
549 | $(POSTCOMPILE) | |
550 | ||
1a01e7c6 SM |
551 | # Note: Between two matching pattern rules, GNU Make 3.81 chooses the first one. |
552 | # Therefore, this one needs to be before "%.o: %.c" for it to be considered for | |
553 | # files such as linux-amd64-ipa.o generated from linux-amd64-ipa.c. | |
554 | # | |
555 | # Later versions of GNU Make choose the rule with the shortest stem, so it would | |
556 | # work in any order. | |
557 | ||
558 | %-ipa.o: %-ipa.c | |
559 | $(IPAGENT_COMPILE) $< | |
560 | $(POSTCOMPILE) | |
561 | ||
36bc18a8 SM |
562 | %-ipa.o: ../common/%.c |
563 | $(IPAGENT_COMPILE) $< | |
564 | $(POSTCOMPILE) | |
565 | ||
5f035c07 YQ |
566 | %-ipa.o: ../arch/%.c |
567 | $(IPAGENT_COMPILE) $< | |
568 | $(POSTCOMPILE) | |
569 | ||
50cfacb7 | 570 | # Rules for objects that go in the gdbserver binary. |
787749ea | 571 | |
8fa5b777 SM |
572 | %.o: %-generated.c |
573 | $(COMPILE) $< | |
574 | $(POSTCOMPILE) | |
575 | ||
50cfacb7 | 576 | %.o: %.c |
787749ea PL |
577 | $(COMPILE) $< |
578 | $(POSTCOMPILE) | |
579 | ||
50cfacb7 | 580 | %.o: ../arch/%.c |
21122961 SM |
581 | $(COMPILE) $< |
582 | $(POSTCOMPILE) | |
583 | ||
6bda016b SM |
584 | %.o: ../common/%.c |
585 | $(COMPILE) $< | |
586 | $(POSTCOMPILE) | |
587 | ||
c5a22423 SM |
588 | %.o: ../nat/%.c |
589 | $(COMPILE) $< | |
590 | $(POSTCOMPILE) | |
591 | ||
21122961 SM |
592 | %.o: ../target/%.c |
593 | $(COMPILE) $< | |
594 | $(POSTCOMPILE) | |
595 | ||
8fa5b777 SM |
596 | # Rules for register format descriptions. Suffix destination files with |
597 | # -generated to identify and clean them easily. | |
c362e621 | 598 | |
8fa5b777 | 599 | %-generated.c: ../regformats/%.dat | $(regdat_sh) |
c362e621 SM |
600 | $(SHELL) $(regdat_sh) $< $@ |
601 | ||
8fa5b777 | 602 | %-generated.c: ../regformats/arm/%.dat | $(regdat_sh) |
c362e621 SM |
603 | $(SHELL) $(regdat_sh) $< $@ |
604 | ||
8fa5b777 | 605 | %-generated.c: ../regformats/i386/%.dat | $(regdat_sh) |
c362e621 SM |
606 | $(SHELL) $(regdat_sh) $< $@ |
607 | ||
8fa5b777 | 608 | %-generated.c: ../regformats/rs6000/%.dat | $(regdat_sh) |
c362e621 | 609 | $(SHELL) $(regdat_sh) $< $@ |
61c125b9 TT |
610 | |
611 | # | |
3b165252 | 612 | # Dependency tracking. |
61c125b9 TT |
613 | # |
614 | ||
3b165252 | 615 | ifeq ($(DEPMODE),depmode=gcc3) |
61c125b9 TT |
616 | # Note that we put the dependencies into a .Tpo file, then move them |
617 | # into place if the compile succeeds. We need this because gcc does | |
618 | # not atomically write the dependency output file. | |
3b165252 SM |
619 | override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ |
620 | -MF $(DEPDIR)/$(basename $(@F)).Tpo | |
621 | override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \ | |
622 | $(DEPDIR)/$(basename $(@F)).Po | |
623 | else | |
624 | override COMPILE.pre = source='$<' object='$@' libtool=no \ | |
625 | DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) | |
61c125b9 TT |
626 | # depcomp handles atomicity for us, so we don't need a postcompile |
627 | # step. | |
3b165252 SM |
628 | override POSTCOMPILE = |
629 | endif | |
61c125b9 TT |
630 | |
631 | # A list of all the objects we might care about in this build, for | |
632 | # dependency tracking. | |
1798301e | 633 | all_object_files = $(OBS) $(GDBREPLAY_OBS) $(IPA_OBJS) |
61c125b9 TT |
634 | |
635 | # Ensure that generated files are created early. Use order-only | |
636 | # dependencies if available. They require GNU make 3.80 or newer, | |
637 | # and the .VARIABLES variable was introduced at the same time. | |
3b165252 SM |
638 | ifdef .VARIABLES |
639 | $(all_object_files): | $(generated_files) | |
640 | else | |
61c125b9 | 641 | $(all_object_files) : $(generated_files) |
3b165252 | 642 | endif |
61c125b9 TT |
643 | |
644 | # Dependencies. | |
3b165252 | 645 | -include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files)) |
61c125b9 | 646 | |
ad02e4fe SM |
647 | # Disable implicit make rules. |
648 | include $(srcdir)/../disable-implicit-rules.mk | |
649 | ||
50a421ac SM |
650 | # Do not delete intermediate files (e.g. *-generated.c). |
651 | .SECONDARY: | |
652 | ||
c906108c | 653 | # This is the end of "Makefile.in". |