Makefile.in 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614
  1. # Copyright (C) 1989-2022 Free Software Foundation, Inc.
  2. # This file is part of GDB.
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # Please keep lists in this file sorted alphabetically, with one item per line.
  16. # Here are the general guidelines for ordering files and directories:
  17. #
  18. # - Files come before directories.
  19. # - The extensions are not taken into account when comparing filenames, except
  20. # if the filenames are otherwise equal.
  21. # - A filename that is a prefix of another one comes before.
  22. # - Underscores and dashes are treated equally, and come before alphanumeric
  23. # characters.
  24. #
  25. # For example:
  26. #
  27. # SOME_FILES = \
  28. # foo.c \
  29. # foo.h \
  30. # foo-bar.c \
  31. # foobar.c \
  32. # foo/bar.c
  33. prefix = @prefix@
  34. exec_prefix = @exec_prefix@
  35. host_alias = @host_alias@
  36. target_alias = @target_alias@
  37. program_transform_name = @program_transform_name@
  38. bindir = @bindir@
  39. libdir = @libdir@
  40. tooldir = $(libdir)/$(target_alias)
  41. datadir = @datadir@
  42. localedir = @localedir@
  43. mandir = @mandir@
  44. man1dir = $(mandir)/man1
  45. man2dir = $(mandir)/man2
  46. man3dir = $(mandir)/man3
  47. man4dir = $(mandir)/man4
  48. man5dir = $(mandir)/man5
  49. man6dir = $(mandir)/man6
  50. man7dir = $(mandir)/man7
  51. man8dir = $(mandir)/man8
  52. man9dir = $(mandir)/man9
  53. infodir = @infodir@
  54. datarootdir = @datarootdir@
  55. docdir = @docdir@
  56. htmldir = @htmldir@
  57. pdfdir = @pdfdir@
  58. includedir = @includedir@
  59. install_sh = @install_sh@
  60. # This can be referenced by `LIBINTL' as computed by
  61. # ZW_GNU_GETTEXT_SISTER_DIR.
  62. top_builddir = .
  63. SHELL = @SHELL@
  64. EXEEXT = @EXEEXT@
  65. AWK = @AWK@
  66. LN_S = @LN_S@
  67. INSTALL = @INSTALL@
  68. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  69. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  70. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  71. INSTALL_DATA = @INSTALL_DATA@
  72. DESTDIR =
  73. AR = @AR@
  74. AR_FLAGS = qv
  75. RANLIB = @RANLIB@
  76. DLLTOOL = @DLLTOOL@
  77. WINDRES = @WINDRES@
  78. MIG = @MIG@
  79. STRIP = @STRIP@
  80. XGETTEXT = @XGETTEXT@
  81. GMSGFMT = @GMSGFMT@
  82. MSGMERGE = msgmerge
  83. PACKAGE = @PACKAGE@
  84. CATALOGS = @CATALOGS@
  85. CC = @CC@
  86. CXX = @CXX@
  87. CXX_DIALECT = @CXX_DIALECT@
  88. # Dependency tracking information.
  89. DEPMODE = @CCDEPMODE@
  90. DEPDIR = @DEPDIR@
  91. depcomp = $(SHELL) $(srcdir)/../depcomp
  92. # Directory containing source files.
  93. srcdir = @srcdir@
  94. VPATH = @srcdir@
  95. top_srcdir = @top_srcdir@
  96. include $(srcdir)/silent-rules.mk
  97. # Note that these are overridden by GNU make-specific code below if
  98. # GNU make is used. The overrides implement dependency tracking.
  99. COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
  100. COMPILE.post = -c -o $@
  101. POSTCOMPILE = @true
  102. # CXXFLAGS is at the very end on purpose, so that user-supplied flags can
  103. # override internal flags.
  104. COMPILE = $(ECHO_CXX) $(COMPILE.pre) $(INTERNAL_CFLAGS) $(CXXFLAGS) \
  105. $(COMPILE.post)
  106. YACC = @YACC@
  107. # This is used to rebuild ada-lex.c from ada-lex.l. If the program is
  108. # not defined, but ada-lex.c is present, compilation will continue,
  109. # possibly with a warning.
  110. FLEX = flex
  111. YLWRAP = $(srcdir)/../ylwrap
  112. # where to find makeinfo, preferably one designed for texinfo-2
  113. MAKEINFO = @MAKEINFO@
  114. MAKEINFOFLAGS = @MAKEINFOFLAGS@
  115. MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@
  116. MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS)
  117. MAKEHTML = $(MAKEINFO_CMD) --html
  118. MAKEHTMLFLAGS =
  119. # Set this up with gcc if you have gnu ld and the loader will print out
  120. # line numbers for undefined references.
  121. #CC_LD = g++ -static
  122. CC_LD = $(CXX) $(CXX_DIALECT)
  123. # Where is our "include" directory? Typically $(srcdir)/../include.
  124. # This is essentially the header file directory for the library
  125. # routines in libiberty.
  126. INCLUDE_DIR = $(srcdir)/../include
  127. INCLUDE_CFLAGS = -I$(INCLUDE_DIR)
  128. # Where is the "-liberty" library? Typically in ../libiberty.
  129. LIBIBERTY = ../libiberty/libiberty.a
  130. # Where is the CTF library? Typically in ../libctf.
  131. LIBCTF = @LIBCTF@
  132. CTF_DEPS = @CTF_DEPS@
  133. # Where is the BFD library? Typically in ../bfd.
  134. BFD_DIR = ../bfd
  135. BFD = $(BFD_DIR)/libbfd.a
  136. BFD_SRC = $(srcdir)/$(BFD_DIR)
  137. BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
  138. # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
  139. # -I../zlib, unless we were configured with --with-system-zlib, in which
  140. # case both are empty.
  141. ZLIB = @zlibdir@ -lz
  142. ZLIBINC = @zlibinc@
  143. # Where is the decnumber library? Typically in ../libdecnumber.
  144. LIBDECNUMBER_DIR = ../libdecnumber
  145. LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
  146. LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
  147. LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)
  148. # Where is the READLINE library? Typically in ../readline/readline.
  149. READLINE_DIR = ../readline/readline
  150. READLINE_SRC = $(srcdir)/$(READLINE_DIR)
  151. READLINE = @READLINE@
  152. READLINE_DEPS = @READLINE_DEPS@
  153. READLINE_CFLAGS = @READLINE_CFLAGS@
  154. # Where is expat? This will be empty if expat was not available.
  155. LIBEXPAT = @LIBEXPAT@
  156. # Where is lzma? This will be empty if lzma was not available.
  157. LIBLZMA = @LIBLZMA@
  158. # Where is libbabeltrace? This will be empty if libbabeltrace was not
  159. # available.
  160. LIBBABELTRACE = @LIBBABELTRACE@
  161. # Where is libxxhash? This will be empty if libxxhash was not
  162. # available.
  163. LIBXXHASH = @LIBXXHASH@
  164. # Where is libipt? This will be empty if libipt was not available.
  165. LIBIPT = @LIBIPT@
  166. # Where is libgmp?
  167. LIBGMP = @LIBGMP@
  168. # Where is libmpfr? This will be empty if libmpfr was not available.
  169. LIBMPFR = @LIBMPFR@
  170. # GNU source highlight library.
  171. SRCHIGH_LIBS = @SRCHIGH_LIBS@
  172. SRCHIGH_CFLAGS = @SRCHIGH_CFLAGS@
  173. WARN_CFLAGS = @WARN_CFLAGS@
  174. WERROR_CFLAGS = @WERROR_CFLAGS@
  175. GDB_WARN_CFLAGS = $(WARN_CFLAGS)
  176. GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
  177. PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
  178. PTHREAD_LIBS = @PTHREAD_LIBS@
  179. DEBUGINFOD_CFLAGS = @DEBUGINFOD_CFLAGS@
  180. DEBUGINFOD_LIBS = @DEBUGINFOD_LIBS@
  181. RDYNAMIC = @RDYNAMIC@
  182. # Where is the INTL library? Typically in ../intl.
  183. INTL = @LIBINTL@
  184. INTL_DEPS = @LIBINTL_DEP@
  185. INTL_CFLAGS = @INCINTL@
  186. # Where is the ICONV library? This will be empty if in libc or not available.
  187. LIBICONV = @LIBICONV@
  188. # Did the user give us a --with-gdb-datadir option?
  189. GDB_DATADIR = @GDB_DATADIR@
  190. # Code signing.
  191. CODESIGN = codesign
  192. CODESIGN_CERT = @CODESIGN_CERT@
  193. # Flags to pass to gdb when invoked with "make run".
  194. GDBFLAGS =
  195. # Helper code from gnulib.
  196. GNULIB_PARENT_DIR = ..
  197. include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
  198. # For libbacktrace.
  199. LIBBACKTRACE_INC=@LIBBACKTRACE_INC@
  200. LIBBACKTRACE_LIB=@LIBBACKTRACE_LIB@
  201. SUPPORT = ../gdbsupport
  202. LIBSUPPORT = $(SUPPORT)/libgdbsupport.a
  203. INCSUPPORT = -I$(srcdir)/.. -I..
  204. #
  205. # CLI sub directory definitons
  206. #
  207. SUBDIR_CLI_SRCS = \
  208. cli/cli-cmds.c \
  209. cli/cli-decode.c \
  210. cli/cli-dump.c \
  211. cli/cli-interp.c \
  212. cli/cli-logging.c \
  213. cli/cli-option.c \
  214. cli/cli-script.c \
  215. cli/cli-setshow.c \
  216. cli/cli-style.c \
  217. cli/cli-utils.c
  218. SUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS))
  219. #
  220. # MI sub directory definitons
  221. #
  222. SUBDIR_MI_SRCS = \
  223. mi/mi-cmd-break.c \
  224. mi/mi-cmd-catch.c \
  225. mi/mi-cmd-disas.c \
  226. mi/mi-cmd-env.c \
  227. mi/mi-cmd-file.c \
  228. mi/mi-cmd-info.c \
  229. mi/mi-cmd-stack.c \
  230. mi/mi-cmd-target.c \
  231. mi/mi-cmd-var.c \
  232. mi/mi-cmds.c \
  233. mi/mi-console.c \
  234. mi/mi-getopt.c \
  235. mi/mi-interp.c \
  236. mi/mi-main.c \
  237. mi/mi-out.c \
  238. mi/mi-parse.c \
  239. mi/mi-symbol-cmds.c
  240. SUBDIR_MI_OBS = $(patsubst %.c,%.o,$(SUBDIR_MI_SRCS))
  241. SUBDIR_MI_DEPS =
  242. SUBDIR_MI_LDFLAGS =
  243. SUBDIR_MI_CFLAGS =
  244. #
  245. # TUI sub directory definitions
  246. #
  247. SUBDIR_TUI_SRCS = \
  248. tui/tui.c \
  249. tui/tui-command.c \
  250. tui/tui-data.c \
  251. tui/tui-disasm.c \
  252. tui/tui-file.c \
  253. tui/tui-hooks.c \
  254. tui/tui-interp.c \
  255. tui/tui-io.c \
  256. tui/tui-layout.c \
  257. tui/tui-location.c \
  258. tui/tui-out.c \
  259. tui/tui-regs.c \
  260. tui/tui-source.c \
  261. tui/tui-stack.c \
  262. tui/tui-win.c \
  263. tui/tui-wingeneral.c \
  264. tui/tui-winsource.c
  265. SUBDIR_TUI_OBS = $(patsubst %.c,%.o,$(SUBDIR_TUI_SRCS))
  266. SUBDIR_TUI_DEPS =
  267. SUBDIR_TUI_LDFLAGS =
  268. SUBDIR_TUI_CFLAGS = -DTUI=1
  269. #
  270. # GCC Compile support sub-directory definitions
  271. #
  272. SUBDIR_GCC_COMPILE_SRCS = \
  273. compile/compile.c \
  274. compile/compile-c-support.c \
  275. compile/compile-c-symbols.c \
  276. compile/compile-c-types.c \
  277. compile/compile-cplus-symbols.c \
  278. compile/compile-cplus-types.c \
  279. compile/compile-loc2c.c \
  280. compile/compile-object-load.c \
  281. compile/compile-object-run.c
  282. SUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SRCS)))
  283. #
  284. # Guile sub directory definitons for guile support.
  285. #
  286. SUBDIR_GUILE_SRCS = \
  287. guile/guile.c \
  288. guile/scm-arch.c \
  289. guile/scm-auto-load.c \
  290. guile/scm-block.c \
  291. guile/scm-breakpoint.c \
  292. guile/scm-cmd.c \
  293. guile/scm-disasm.c \
  294. guile/scm-exception.c \
  295. guile/scm-frame.c \
  296. guile/scm-gsmob.c \
  297. guile/scm-iterator.c \
  298. guile/scm-lazy-string.c \
  299. guile/scm-math.c \
  300. guile/scm-objfile.c \
  301. guile/scm-param.c \
  302. guile/scm-ports.c \
  303. guile/scm-pretty-print.c \
  304. guile/scm-progspace.c \
  305. guile/scm-safe-call.c \
  306. guile/scm-string.c \
  307. guile/scm-symbol.c \
  308. guile/scm-symtab.c \
  309. guile/scm-type.c \
  310. guile/scm-utils.c \
  311. guile/scm-value.c
  312. SUBDIR_GUILE_OBS = $(patsubst %.c,%.o,$(SUBDIR_GUILE_SRCS))
  313. SUBDIR_GUILE_DEPS =
  314. SUBDIR_GUILE_LDFLAGS =
  315. SUBDIR_GUILE_CFLAGS =
  316. #
  317. # python sub directory definitons
  318. #
  319. SUBDIR_PYTHON_SRCS = \
  320. python/py-arch.c \
  321. python/py-auto-load.c \
  322. python/py-block.c \
  323. python/py-bpevent.c \
  324. python/py-breakpoint.c \
  325. python/py-cmd.c \
  326. python/py-connection.c \
  327. python/py-continueevent.c \
  328. python/py-event.c \
  329. python/py-evtregistry.c \
  330. python/py-evts.c \
  331. python/py-exitedevent.c \
  332. python/py-finishbreakpoint.c \
  333. python/py-frame.c \
  334. python/py-framefilter.c \
  335. python/py-function.c \
  336. python/py-gdb-readline.c \
  337. python/py-inferior.c \
  338. python/py-infevents.c \
  339. python/py-infthread.c \
  340. python/py-instruction.c \
  341. python/py-lazy-string.c \
  342. python/py-linetable.c \
  343. python/py-membuf.c \
  344. python/py-micmd.c \
  345. python/py-newobjfileevent.c \
  346. python/py-objfile.c \
  347. python/py-param.c \
  348. python/py-prettyprint.c \
  349. python/py-progspace.c \
  350. python/py-record.c \
  351. python/py-record-btrace.c \
  352. python/py-record-full.c \
  353. python/py-registers.c \
  354. python/py-signalevent.c \
  355. python/py-stopevent.c \
  356. python/py-symbol.c \
  357. python/py-symtab.c \
  358. python/py-threadevent.c \
  359. python/py-tui.c \
  360. python/py-type.c \
  361. python/py-unwind.c \
  362. python/py-utils.c \
  363. python/py-value.c \
  364. python/py-varobj.c \
  365. python/py-xmethods.c \
  366. python/python.c
  367. SUBDIR_PYTHON_OBS = $(patsubst %.c,%.o,$(SUBDIR_PYTHON_SRCS))
  368. SUBDIR_PYTHON_DEPS =
  369. SUBDIR_PYTHON_LDFLAGS =
  370. SUBDIR_PYTHON_CFLAGS =
  371. SELFTESTS_SRCS = \
  372. disasm-selftests.c \
  373. gdbarch-selftests.c \
  374. selftest-arch.c \
  375. unittests/array-view-selftests.c \
  376. unittests/child-path-selftests.c \
  377. unittests/cli-utils-selftests.c \
  378. unittests/command-def-selftests.c \
  379. unittests/common-utils-selftests.c \
  380. unittests/copy_bitwise-selftests.c \
  381. unittests/enum-flags-selftests.c \
  382. unittests/environ-selftests.c \
  383. unittests/filtered_iterator-selftests.c \
  384. unittests/format_pieces-selftests.c \
  385. unittests/function-view-selftests.c \
  386. unittests/gdb_tilde_expand-selftests.c \
  387. unittests/gmp-utils-selftests.c \
  388. unittests/intrusive_list-selftests.c \
  389. unittests/lookup_name_info-selftests.c \
  390. unittests/memory-map-selftests.c \
  391. unittests/memrange-selftests.c \
  392. unittests/offset-type-selftests.c \
  393. unittests/observable-selftests.c \
  394. unittests/optional-selftests.c \
  395. unittests/parallel-for-selftests.c \
  396. unittests/parse-connection-spec-selftests.c \
  397. unittests/ptid-selftests.c \
  398. unittests/main-thread-selftests.c \
  399. unittests/mkdir-recursive-selftests.c \
  400. unittests/rsp-low-selftests.c \
  401. unittests/scoped_fd-selftests.c \
  402. unittests/scoped_ignore_signal-selftests.c \
  403. unittests/scoped_mmap-selftests.c \
  404. unittests/scoped_restore-selftests.c \
  405. unittests/search-memory-selftests.c \
  406. unittests/string_view-selftests.c \
  407. unittests/style-selftests.c \
  408. unittests/tracepoint-selftests.c \
  409. unittests/tui-selftests.c \
  410. unittests/ui-file-selftests.c \
  411. unittests/unique_xmalloc_ptr_char.c \
  412. unittests/unpack-selftests.c \
  413. unittests/utils-selftests.c \
  414. unittests/vec-utils-selftests.c \
  415. unittests/xml-utils-selftests.c
  416. SELFTESTS_OBS = $(patsubst %.c,%.o,$(SELFTESTS_SRCS))
  417. SUBDIR_TARGET_SRCS = target/waitstatus.c
  418. SUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS))
  419. # Opcodes currently live in one of two places. Either they are in the
  420. # opcode library, typically ../opcodes, or they are in a header file
  421. # in INCLUDE_DIR.
  422. # Where is the "-lopcodes" library, with (some of) the opcode tables and
  423. # disassemblers?
  424. OPCODES_DIR = ../opcodes
  425. OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
  426. OPCODES = $(OPCODES_DIR)/libopcodes.a
  427. # Where are the other opcode tables which only have header file
  428. # versions?
  429. OP_INCLUDE = $(INCLUDE_DIR)/opcode
  430. # See TOP_CFLAGS as well.
  431. OPCODES_CFLAGS = -I$(OP_INCLUDE)
  432. # Allow includes like "opcodes/mumble.h".
  433. TOP_CFLAGS = -I$(top_srcdir)/..
  434. # The simulator is usually nonexistent; targets that include one
  435. # should set this to list all the .o or .a files to be linked in.
  436. SIM = @SIM@
  437. WIN32LIBS = @WIN32LIBS@
  438. # Tcl et al cflags and libraries
  439. TCL = @TCL_LIBRARY@
  440. TCL_CFLAGS = @TCL_INCLUDE@
  441. GDBTKLIBS = @GDBTKLIBS@
  442. # Extra flags that the GDBTK files need:
  443. GDBTK_CFLAGS = @GDBTK_CFLAGS@
  444. TK = @TK_LIBRARY@
  445. TK_CFLAGS = @TK_INCLUDE@
  446. X11_CFLAGS = @TK_XINCLUDES@
  447. X11_LDFLAGS =
  448. X11_LIBS =
  449. WIN32LDAPP = @WIN32LDAPP@
  450. LIBGUI = @LIBGUI@
  451. GUI_CFLAGS_X = @GUI_CFLAGS_X@
  452. IDE_CFLAGS = $(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
  453. ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
  454. # The version of gdbtk we're building. This should be kept
  455. # in sync with GDBTK_VERSION and friends in gdbtk.h.
  456. GDBTK_VERSION = 1.0
  457. GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)
  458. # Gdbtk requires an absolute path to the source directory or
  459. # the testsuite won't run properly.
  460. GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
  461. SUBDIR_GDBTK_OBS = \
  462. gdbtk.o \
  463. gdbtk-bp.o \
  464. gdbtk-cmds.o \
  465. gdbtk-hooks.o \
  466. gdbtk-interp.o \
  467. gdbtk-register.o \
  468. gdbtk-stack.o \
  469. gdbtk-varobj.o \
  470. gdbtk-wrapper.o
  471. SUBDIR_GDBTK_SRCS = \
  472. gdbtk/generic/gdbtk.c \
  473. gdbtk/generic/gdbtk-bp.c \
  474. gdbtk/generic/gdbtk-cmds.c \
  475. gdbtk/generic/gdbtk-hooks.c \
  476. gdbtk/generic/gdbtk-interp.c \
  477. gdbtk/generic/gdbtk-main.c \
  478. gdbtk/generic/gdbtk-register.c \
  479. gdbtk/generic/gdbtk-stack.c \
  480. gdbtk/generic/gdbtk-varobj.c \
  481. gdbtk/generic/gdbtk-wrapper.c
  482. SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
  483. SUBDIR_GDBTK_LDFLAGS =
  484. SUBDIR_GDBTK_CFLAGS = -DGDBTK
  485. CONFIG_OBS = @CONFIG_OBS@
  486. CONFIG_SRCS = @CONFIG_SRCS@
  487. CONFIG_DEPS = @CONFIG_DEPS@
  488. CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
  489. ENABLE_CFLAGS = @ENABLE_CFLAGS@
  490. CONFIG_ALL = @CONFIG_ALL@
  491. CONFIG_CLEAN = @CONFIG_CLEAN@
  492. CONFIG_INSTALL = @CONFIG_INSTALL@
  493. CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
  494. HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
  495. CONFIG_SRC_SUBDIR = arch cli dwarf2 mi compile tui unittests guile python \
  496. target nat
  497. CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
  498. # -I. for config files.
  499. # -I$(srcdir) for gdb internal headers.
  500. # -I$(srcdir)/config for more generic config files.
  501. # It is also possible that you will need to add -I/usr/include/sys if
  502. # your system doesn't have fcntl.h in /usr/include (which is where it
  503. # should be according to Posix).
  504. DEFS = @DEFS@
  505. GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
  506. -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
  507. # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
  508. GLOBAL_CFLAGS = $(MH_CFLAGS)
  509. PROFILE_CFLAGS = @PROFILE_CFLAGS@
  510. # These are specifically reserved for setting from the command line
  511. # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes".
  512. CFLAGS = @CFLAGS@
  513. CXXFLAGS = @CXXFLAGS@
  514. CPPFLAGS = @CPPFLAGS@
  515. # Set by configure, for e.g. expat. Python installations are such that
  516. # C headers are included using their basename (for example, we #include
  517. # <Python.h> rather than, say, <python/Python.h>). Since the file names
  518. # are sometimes a little generic, we think that the risk of collision
  519. # with other header files is high. If that happens, we try to mitigate
  520. # a bit the consequences by putting the Python includes last in the list.
  521. INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \
  522. @LARGEFILE_CPPFLAGS@
  523. # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
  524. INTERNAL_CFLAGS_BASE = \
  525. $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
  526. $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
  527. $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
  528. $(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(LIBBACKTRACE_INC) \
  529. $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) \
  530. $(TOP_CFLAGS) $(PTHREAD_CFLAGS) $(DEBUGINFOD_CFLAGS)
  531. INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
  532. INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
  533. # LDFLAGS is specifically reserved for setting from the command line
  534. # when running make.
  535. LDFLAGS = @LDFLAGS@
  536. # Profiling options need to go here to work.
  537. # I think it's perfectly reasonable for a user to set -pg in CFLAGS
  538. # and have it work; that's why CFLAGS is here.
  539. # PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
  540. INTERNAL_LDFLAGS = \
  541. $(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
  542. $(LDFLAGS) $(CONFIG_LDFLAGS) $(PTHREAD_CFLAGS)
  543. # Libraries and corresponding dependencies for compiling gdb.
  544. # XM_CLIBS, defined in *config files, have host-dependent libs.
  545. # LIBIBERTY appears twice on purpose.
  546. CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) \
  547. $(LIBSUPPORT) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
  548. $(XM_CLIBS) $(GDBTKLIBS) $(LIBBACKTRACE_LIB) \
  549. @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
  550. $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
  551. $(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \
  552. $(LIBMPFR) $(LIBGMP) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \
  553. $(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB)
  554. CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \
  555. $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \
  556. $(LIBSUPPORT)
  557. DIST = gdb
  558. RUNTEST = runtest
  559. RUNTESTFLAGS =
  560. # XML files to build in to GDB.
  561. XMLFILES = \
  562. $(srcdir)/features/btrace.dtd \
  563. $(srcdir)/features/btrace-conf.dtd \
  564. $(srcdir)/features/gdb-target.dtd \
  565. $(srcdir)/features/library-list.dtd \
  566. $(srcdir)/features/library-list-aix.dtd \
  567. $(srcdir)/features/library-list-svr4.dtd \
  568. $(srcdir)/features/osdata.dtd \
  569. $(srcdir)/features/threads.dtd \
  570. $(srcdir)/features/traceframe-info.dtd \
  571. $(srcdir)/features/xinclude.dtd
  572. # Build the ser-*.o files the host supports. This includes ser-unix.o
  573. # for any system that supports a POSIX interface to the serial port.
  574. # See configure.ac.
  575. SER_HARDWIRE = @SER_HARDWIRE@
  576. # This is remote-sim.o if a simulator is to be linked in.
  577. SIM_OBS = @SIM_OBS@
  578. # Target-dependent object files.
  579. TARGET_OBS = @TARGET_OBS@
  580. # All target-dependent objects files that require 64-bit CORE_ADDR
  581. # (used with --enable-targets=all --enable-64-bit-bfd).
  582. ALL_64_TARGET_OBS = \
  583. aarch64-fbsd-tdep.o \
  584. aarch64-linux-tdep.o \
  585. aarch64-newlib-tdep.o \
  586. aarch64-ravenscar-thread.o \
  587. aarch64-tdep.o \
  588. alpha-bsd-tdep.o \
  589. alpha-linux-tdep.o \
  590. alpha-mdebug-tdep.o \
  591. alpha-netbsd-tdep.o \
  592. alpha-obsd-tdep.o \
  593. alpha-tdep.o \
  594. amd64-darwin-tdep.o \
  595. amd64-dicos-tdep.o \
  596. amd64-fbsd-tdep.o \
  597. amd64-linux-tdep.o \
  598. amd64-netbsd-tdep.o \
  599. amd64-obsd-tdep.o \
  600. amd64-ravenscar-thread.o \
  601. amd64-sol2-tdep.o \
  602. amd64-tdep.o \
  603. amd64-windows-tdep.o \
  604. arch/aarch64.o \
  605. arch/aarch64-insn.o \
  606. arch/aarch64-mte-linux.o \
  607. arch/amd64.o \
  608. arch/riscv.o \
  609. ia64-linux-tdep.o \
  610. ia64-tdep.o \
  611. ia64-vms-tdep.o \
  612. mips-fbsd-tdep.o \
  613. mips-linux-tdep.o \
  614. mips-netbsd-tdep.o \
  615. mips-sde-tdep.o \
  616. mips-tdep.o \
  617. mips64-obsd-tdep.o \
  618. riscv-fbsd-tdep.o \
  619. riscv-linux-tdep.o \
  620. riscv-none-tdep.o \
  621. riscv-ravenscar-thread.o \
  622. riscv-tdep.o \
  623. sparc64-fbsd-tdep.o \
  624. sparc64-linux-tdep.o \
  625. sparc64-netbsd-tdep.o \
  626. sparc64-obsd-tdep.o \
  627. sparc64-sol2-tdep.o \
  628. sparc64-tdep.o
  629. # All other target-dependent objects files (used with --enable-targets=all).
  630. ALL_TARGET_OBS = \
  631. aarch32-tdep.o \
  632. arc-linux-tdep.o \
  633. arc-newlib-tdep.o \
  634. arc-tdep.o \
  635. arch/aarch32.o \
  636. arch/arc.o \
  637. arch/arm.o \
  638. arch/arm-get-next-pcs.o \
  639. arch/arm-linux.o \
  640. arch/i386.o \
  641. arch/loongarch.o \
  642. arch/ppc-linux-common.o \
  643. arm-bsd-tdep.o \
  644. arm-fbsd-tdep.o \
  645. arm-linux-tdep.o \
  646. arm-netbsd-tdep.o \
  647. arm-none-tdep.o \
  648. arm-obsd-tdep.o \
  649. arm-pikeos-tdep.o \
  650. arm-tdep.o \
  651. arm-wince-tdep.o \
  652. avr-tdep.o \
  653. bfin-linux-tdep.o \
  654. bfin-tdep.o \
  655. bpf-tdep.o \
  656. bsd-uthread.o \
  657. cris-linux-tdep.o \
  658. cris-tdep.o \
  659. csky-linux-tdep.o \
  660. csky-tdep.o \
  661. dicos-tdep.o \
  662. fbsd-tdep.o \
  663. frv-linux-tdep.o \
  664. frv-tdep.o \
  665. ft32-tdep.o \
  666. glibc-tdep.o \
  667. h8300-tdep.o \
  668. hppa-bsd-tdep.o \
  669. hppa-linux-tdep.o \
  670. hppa-netbsd-tdep.o \
  671. hppa-obsd-tdep.o \
  672. hppa-tdep.o \
  673. i386-bsd-tdep.o \
  674. i386-darwin-tdep.o \
  675. i386-dicos-tdep.o \
  676. i386-fbsd-tdep.o \
  677. i386-gnu-tdep.o \
  678. i386-go32-tdep.o \
  679. i386-linux-tdep.o \
  680. i386-netbsd-tdep.o \
  681. i386-nto-tdep.o \
  682. i386-obsd-tdep.o \
  683. i386-sol2-tdep.o \
  684. i386-tdep.o \
  685. i386-windows-tdep.o \
  686. i387-tdep.o \
  687. iq2000-tdep.o \
  688. linux-record.o \
  689. linux-tdep.o \
  690. lm32-tdep.o \
  691. loongarch-linux-tdep.o \
  692. loongarch-tdep.o \
  693. m32c-tdep.o \
  694. m32r-linux-tdep.o \
  695. m32r-tdep.o \
  696. m68hc11-tdep.o \
  697. m68k-bsd-tdep.o \
  698. m68k-linux-tdep.o \
  699. m68k-tdep.o \
  700. mep-tdep.o \
  701. microblaze-linux-tdep.o \
  702. microblaze-tdep.o \
  703. mn10300-linux-tdep.o \
  704. mn10300-tdep.o \
  705. moxie-tdep.o \
  706. msp430-tdep.o \
  707. netbsd-tdep.o \
  708. nds32-tdep.o \
  709. nios2-linux-tdep.o \
  710. nios2-tdep.o \
  711. nto-tdep.o \
  712. obsd-tdep.o \
  713. or1k-linux-tdep.o \
  714. or1k-tdep.o \
  715. ppc-fbsd-tdep.o \
  716. ppc-linux-tdep.o \
  717. ppc-netbsd-tdep.o \
  718. ppc-obsd-tdep.o \
  719. ppc-ravenscar-thread.o \
  720. ppc-sysv-tdep.o \
  721. ppc64-tdep.o \
  722. ravenscar-thread.o \
  723. rl78-tdep.o \
  724. rs6000-aix-tdep.o \
  725. rs6000-lynx178-tdep.o \
  726. rs6000-tdep.o \
  727. rx-tdep.o \
  728. s12z-tdep.o \
  729. s390-linux-tdep.o \
  730. s390-tdep.o \
  731. sh-linux-tdep.o \
  732. sh-netbsd-tdep.o \
  733. sh-tdep.o \
  734. sol2-tdep.o \
  735. solib-aix.o \
  736. solib-darwin.o \
  737. solib-dsbt.o \
  738. solib-frv.o \
  739. solib-svr4.o \
  740. sparc-linux-tdep.o \
  741. sparc-netbsd-tdep.o \
  742. sparc-obsd-tdep.o \
  743. sparc-ravenscar-thread.o \
  744. sparc-sol2-tdep.o \
  745. sparc-tdep.o \
  746. symfile-mem.o \
  747. tic6x-linux-tdep.o \
  748. tic6x-tdep.o \
  749. tilegx-linux-tdep.o \
  750. tilegx-tdep.o \
  751. v850-tdep.o \
  752. vax-netbsd-tdep.o \
  753. vax-tdep.o \
  754. windows-tdep.o \
  755. x86-tdep.o \
  756. xcoffread.o \
  757. xstormy16-tdep.o \
  758. xtensa-config.o \
  759. xtensa-linux-tdep.o \
  760. xtensa-tdep.o \
  761. z80-tdep.o
  762. # The following native-target dependent variables are defined on
  763. # configure.nat.
  764. NAT_FILE = @NAT_FILE@
  765. NATDEPFILES = @NATDEPFILES@
  766. NAT_CDEPS = @NAT_CDEPS@
  767. LOADLIBES = @LOADLIBES@
  768. MH_CFLAGS = @MH_CFLAGS@
  769. XM_CLIBS = @XM_CLIBS@
  770. NAT_GENERATED_FILES = @NAT_GENERATED_FILES@
  771. NM_H = @NM_H@
  772. HAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@
  773. # Native-target dependent makefile fragment comes in here.
  774. @nat_makefile_frag@
  775. # End of native-target dependent variables.
  776. FLAGS_TO_PASS = \
  777. "prefix=$(prefix)" \
  778. "exec_prefix=$(exec_prefix)" \
  779. "infodir=$(infodir)" \
  780. "datarootdir=$(datarootdir)" \
  781. "docdir=$(docdir)" \
  782. "htmldir=$(htmldir)" \
  783. "pdfdir=$(pdfdir)" \
  784. "libdir=$(libdir)" \
  785. "mandir=$(mandir)" \
  786. "datadir=$(datadir)" \
  787. "includedir=$(includedir)" \
  788. "against=$(against)" \
  789. "DESTDIR=$(DESTDIR)" \
  790. "AR=$(AR)" \
  791. "AR_FLAGS=$(AR_FLAGS)" \
  792. "CC=$(CC)" \
  793. "CFLAGS=$(CFLAGS)" \
  794. "CXX=$(CXX)" \
  795. "CXX_DIALECT=$(CXX_DIALECT)" \
  796. "CXXFLAGS=$(CXXFLAGS)" \
  797. "DLLTOOL=$(DLLTOOL)" \
  798. "LDFLAGS=$(LDFLAGS)" \
  799. "RANLIB=$(RANLIB)" \
  800. "MAKEINFO=$(MAKEINFO)" \
  801. "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  802. "MAKEINFO_EXTRA_FLAGS=$(MAKEINFO_EXTRA_FLAGS)" \
  803. "MAKEHTML=$(MAKEHTML)" \
  804. "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
  805. "INSTALL=$(INSTALL)" \
  806. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  807. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  808. "INSTALL_DATA=$(INSTALL_DATA)" \
  809. "RUNTEST=$(RUNTEST)" \
  810. "RUNTESTFLAGS=$(RUNTESTFLAGS)"
  811. # Flags that we pass when building the testsuite.
  812. # empty for native, $(target_alias)/ for cross
  813. target_subdir = @target_subdir@
  814. CC_FOR_TARGET = ` \
  815. if [ -f $${rootme}/../gcc/xgcc ] ; then \
  816. if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
  817. echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \
  818. else \
  819. echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \
  820. fi; \
  821. else \
  822. if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  823. echo $(CC); \
  824. else \
  825. t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  826. fi; \
  827. fi`
  828. CXX_FOR_TARGET = ` \
  829. if [ -f $${rootme}/../gcc/xg++ ] ; then \
  830. if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \
  831. echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \
  832. else \
  833. echo $${rootme}/../gcc/xg++ -B$${rootme}/../gcc/; \
  834. fi; \
  835. else \
  836. if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  837. echo $(CXX); \
  838. else \
  839. t='$(program_transform_name)'; echo g++ | sed -e '' $$t; \
  840. fi; \
  841. fi`
  842. # The use of $$(x_FOR_TARGET) reduces the command line length by not
  843. # duplicating the lengthy definition.
  844. TARGET_FLAGS_TO_PASS = \
  845. "prefix=$(prefix)" \
  846. "exec_prefix=$(exec_prefix)" \
  847. "against=$(against)" \
  848. 'CC=$$(CC_FOR_TARGET)' \
  849. "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  850. "CFLAGS=$(CFLAGS)" \
  851. 'CXX=$$(CXX_FOR_TARGET)' \
  852. "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
  853. "CXXFLAGS=$(CXXFLAGS)" \
  854. "INSTALL=$(INSTALL)" \
  855. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  856. "INSTALL_DATA=$(INSTALL_DATA)" \
  857. "MAKEINFO=$(MAKEINFO)" \
  858. "MAKEHTML=$(MAKEHTML)" \
  859. "RUNTEST=$(RUNTEST)" \
  860. "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
  861. "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
  862. "TESTS=$(TESTS)"
  863. # All source files that go into linking GDB.
  864. # Files that should wind up in SFILES and whose corresponding .o
  865. # should be in COMMON_OBS.
  866. COMMON_SFILES = \
  867. ada-lang.c \
  868. ada-tasks.c \
  869. ada-typeprint.c \
  870. ada-valprint.c \
  871. ada-varobj.c \
  872. addrmap.c \
  873. agent.c \
  874. alloc.c \
  875. annotate.c \
  876. arch-utils.c \
  877. async-event.c \
  878. auto-load.c \
  879. auxv.c \
  880. ax-gdb.c \
  881. ax-general.c \
  882. bcache.c \
  883. bfd-target.c \
  884. block.c \
  885. blockframe.c \
  886. break-catch-exec.c \
  887. break-catch-fork.c \
  888. break-catch-sig.c \
  889. break-catch-syscall.c \
  890. break-catch-throw.c \
  891. breakpoint.c \
  892. bt-utils.c \
  893. btrace.c \
  894. build-id.c \
  895. buildsym-legacy.c \
  896. buildsym.c \
  897. c-lang.c \
  898. c-typeprint.c \
  899. c-valprint.c \
  900. c-varobj.c \
  901. charset.c \
  902. cli-out.c \
  903. coff-pe-read.c \
  904. coffread.c \
  905. complaints.c \
  906. completer.c \
  907. copying.c \
  908. corefile.c \
  909. corelow.c \
  910. cp-abi.c \
  911. cp-namespace.c \
  912. cp-support.c \
  913. cp-valprint.c \
  914. ctfread.c \
  915. d-lang.c \
  916. d-namespace.c \
  917. d-valprint.c \
  918. dbxread.c \
  919. dcache.c \
  920. debug.c \
  921. debuginfod-support.c \
  922. dictionary.c \
  923. disasm.c \
  924. displaced-stepping.c \
  925. dummy-frame.c \
  926. dwarf2/abbrev.c \
  927. dwarf2/attribute.c \
  928. dwarf2/comp-unit-head.c \
  929. dwarf2/cu.c \
  930. dwarf2/dwz.c \
  931. dwarf2/expr.c \
  932. dwarf2/frame-tailcall.c \
  933. dwarf2/frame.c \
  934. dwarf2/index-cache.c \
  935. dwarf2/index-common.c \
  936. dwarf2/index-write.c \
  937. dwarf2/leb.c \
  938. dwarf2/line-header.c \
  939. dwarf2/loc.c \
  940. dwarf2/macro.c \
  941. dwarf2/read.c \
  942. dwarf2/section.c \
  943. dwarf2/stringify.c \
  944. eval.c \
  945. event-top.c \
  946. exceptions.c \
  947. exec.c \
  948. expprint.c \
  949. extension.c \
  950. f-lang.c \
  951. f-typeprint.c \
  952. f-valprint.c \
  953. filename-seen-cache.c \
  954. filesystem.c \
  955. findcmd.c \
  956. findvar.c \
  957. frame.c \
  958. frame-base.c \
  959. frame-unwind.c \
  960. gcore.c \
  961. gdb-demangle.c \
  962. gdb_bfd.c \
  963. gdbtypes.c \
  964. gmp-utils.c \
  965. gnu-v2-abi.c \
  966. gnu-v3-abi.c \
  967. go-lang.c \
  968. go-typeprint.c \
  969. go-valprint.c \
  970. inf-child.c \
  971. inf-loop.c \
  972. infcall.c \
  973. infcmd.c \
  974. inferior.c \
  975. inflow.c \
  976. infrun.c \
  977. inline-frame.c \
  978. interps.c \
  979. jit.c \
  980. language.c \
  981. linespec.c \
  982. location.c \
  983. m2-lang.c \
  984. m2-typeprint.c \
  985. m2-valprint.c \
  986. macrocmd.c \
  987. macroexp.c \
  988. macroscope.c \
  989. macrotab.c \
  990. main.c \
  991. maint.c \
  992. maint-test-options.c \
  993. maint-test-settings.c \
  994. mdebugread.c \
  995. mem-break.c \
  996. memattr.c \
  997. memory-map.c \
  998. memrange.c \
  999. minidebug.c \
  1000. minsyms.c \
  1001. mipsread.c \
  1002. namespace.c \
  1003. objc-lang.c \
  1004. objfiles.c \
  1005. observable.c \
  1006. opencl-lang.c \
  1007. osabi.c \
  1008. osdata.c \
  1009. p-lang.c \
  1010. p-typeprint.c \
  1011. p-valprint.c \
  1012. parse.c \
  1013. printcmd.c \
  1014. probe.c \
  1015. process-stratum-target.c \
  1016. producer.c \
  1017. progspace.c \
  1018. progspace-and-thread.c \
  1019. prologue-value.c \
  1020. psymtab.c \
  1021. record.c \
  1022. record-btrace.c \
  1023. record-full.c \
  1024. regcache.c \
  1025. regcache-dump.c \
  1026. reggroups.c \
  1027. registry.c \
  1028. remote.c \
  1029. remote-fileio.c \
  1030. remote-notif.c \
  1031. reverse.c \
  1032. run-on-main-thread.c \
  1033. rust-lang.c \
  1034. rust-parse.c \
  1035. sentinel-frame.c \
  1036. ser-event.c \
  1037. serial.c \
  1038. skip.c \
  1039. solib.c \
  1040. solib-target.c \
  1041. source.c \
  1042. source-cache.c \
  1043. stabsread.c \
  1044. stack.c \
  1045. std-regs.c \
  1046. symfile.c \
  1047. symfile-debug.c \
  1048. symmisc.c \
  1049. symtab.c \
  1050. target.c \
  1051. target-connection.c \
  1052. target-dcache.c \
  1053. target-descriptions.c \
  1054. target-memory.c \
  1055. test-target.c \
  1056. thread.c \
  1057. thread-iter.c \
  1058. tid-parse.c \
  1059. top.c \
  1060. tracectf.c \
  1061. tracefile.c \
  1062. tracefile-tfile.c \
  1063. tracepoint.c \
  1064. trad-frame.c \
  1065. tramp-frame.c \
  1066. target-float.c \
  1067. type-stack.c \
  1068. typeprint.c \
  1069. ui-file.c \
  1070. ui-out.c \
  1071. ui-style.c \
  1072. user-regs.c \
  1073. utils.c \
  1074. valarith.c \
  1075. valops.c \
  1076. valprint.c \
  1077. value.c \
  1078. varobj.c \
  1079. xml-support.c \
  1080. xml-syscall.c \
  1081. xml-tdesc.c
  1082. # Links made at configuration time should not be specified here, since
  1083. # SFILES is used in building the distribution archive.
  1084. SFILES = \
  1085. ada-exp.y \
  1086. arch/i386.c \
  1087. c-exp.y \
  1088. cp-name-parser.y \
  1089. d-exp.y \
  1090. dtrace-probe.c \
  1091. elf-none-tdep.c \
  1092. elfread.c \
  1093. f-exp.y \
  1094. gcore-elf.c \
  1095. gdb.c \
  1096. go-exp.y \
  1097. m2-exp.y \
  1098. p-exp.y \
  1099. proc-service.list \
  1100. ser-base.c \
  1101. ser-unix.c \
  1102. sol-thread.c \
  1103. stap-probe.c \
  1104. stub-termcap.c \
  1105. symfile-mem.c \
  1106. ui-file.h \
  1107. mi/mi-common.c \
  1108. $(SUBDIR_CLI_SRCS) \
  1109. $(SUBDIR_TARGET_SRCS) \
  1110. $(COMMON_SFILES) \
  1111. $(SUBDIR_GCC_COMPILE_SRCS)
  1112. # Header files that need to have srcdir added. Note that in the cases
  1113. # where we use a macro like $(gdbcmd_h), things are carefully arranged
  1114. # so that each .h file is listed exactly once (M-x tags-search works
  1115. # wrong if TAGS has files twice). Because this is tricky to get
  1116. # right, it is probably easiest just to list .h files here directly.
  1117. HFILES_NO_SRCDIR = \
  1118. aarch32-tdep.h \
  1119. aarch64-ravenscar-thread.h \
  1120. aarch64-tdep.h \
  1121. ada-lang.h \
  1122. addrmap.h \
  1123. alpha-bsd-tdep.h \
  1124. alpha-tdep.h \
  1125. amd64-darwin-tdep.h \
  1126. amd64-linux-tdep.h \
  1127. amd64-nat.h \
  1128. amd64-ravenscar-thread.h \
  1129. amd64-tdep.h \
  1130. annotate.h \
  1131. arc-tdep.h \
  1132. arch-utils.h \
  1133. arm-linux-tdep.h \
  1134. arm-netbsd-tdep.h \
  1135. arm-tdep.h \
  1136. async-event.h \
  1137. auto-load.h \
  1138. auxv.h \
  1139. ax.h \
  1140. ax-gdb.h \
  1141. bcache.h \
  1142. bfd-target.h \
  1143. bfin-tdep.h \
  1144. block.h \
  1145. breakpoint.h \
  1146. bsd-kvm.h \
  1147. bsd-uthread.h \
  1148. bt-utils.h \
  1149. build-id.h \
  1150. buildsym-legacy.h \
  1151. buildsym.h \
  1152. c-lang.h \
  1153. charset.h \
  1154. charset-list.h \
  1155. cli-out.h \
  1156. coff-pe-read.h \
  1157. command.h \
  1158. complaints.h \
  1159. completer.h \
  1160. cp-abi.h \
  1161. cp-support.h \
  1162. csky-tdep.h \
  1163. d-lang.h \
  1164. darwin-nat.h \
  1165. dcache.h \
  1166. defs.h \
  1167. dicos-tdep.h \
  1168. dictionary.h \
  1169. disasm-flags.h \
  1170. disasm.h \
  1171. dummy-frame.h \
  1172. dwarf2/cu.h \
  1173. dwarf2/frame-tailcall.h \
  1174. dwarf2/frame.h \
  1175. dwarf2/expr.h \
  1176. dwarf2/index-cache.h \
  1177. dwarf2/index-common.h \
  1178. dwarf2/loc.h \
  1179. dwarf2/read.h \
  1180. event-top.h \
  1181. exceptions.h \
  1182. exec.h \
  1183. expression.h \
  1184. extension.h \
  1185. extension-priv.h \
  1186. f-array-walker.h \
  1187. f-lang.h \
  1188. fbsd-nat.h \
  1189. fbsd-tdep.h \
  1190. filesystem.h \
  1191. frame.h \
  1192. frame-base.h \
  1193. frame-unwind.h \
  1194. frv-tdep.h \
  1195. ft32-tdep.h \
  1196. gcore-elf.h \
  1197. gcore.h \
  1198. gdb_bfd.h \
  1199. gdb_curses.h \
  1200. gdb_expat.h \
  1201. gdb_proc_service.h \
  1202. gdb-stabs.h \
  1203. gdb_vfork.h \
  1204. gdb_wchar.h \
  1205. gdbarch.h \
  1206. gdbcmd.h \
  1207. gdbcore.h \
  1208. gdbthread.h \
  1209. gdbtypes.h \
  1210. glibc-tdep.h \
  1211. gmp-utils.h \
  1212. gnu-nat.h \
  1213. go-lang.h \
  1214. gregset.h \
  1215. hppa-bsd-tdep.h \
  1216. hppa-linux-offsets.h \
  1217. hppa-tdep.h \
  1218. i386-bsd-nat.h \
  1219. i386-darwin-tdep.h \
  1220. i386-linux-nat.h \
  1221. i386-linux-tdep.h \
  1222. i386-tdep.h \
  1223. i387-tdep.h \
  1224. ia64-libunwind-tdep.h \
  1225. ia64-tdep.h \
  1226. inf-child.h \
  1227. inf-loop.h \
  1228. inf-ptrace.h \
  1229. infcall.h \
  1230. inferior.h \
  1231. inline-frame.h \
  1232. interps.h \
  1233. jit.h \
  1234. language.h \
  1235. linespec.h \
  1236. linux-fork.h \
  1237. linux-nat.h \
  1238. linux-record.h \
  1239. linux-tdep.h \
  1240. location.h \
  1241. loongarch-tdep.h \
  1242. m2-lang.h \
  1243. m32r-tdep.h \
  1244. m68k-tdep.h \
  1245. macroexp.h \
  1246. macroscope.h \
  1247. macrotab.h \
  1248. main.h \
  1249. mdebugread.h \
  1250. memattr.h \
  1251. memory-map.h \
  1252. memrange.h \
  1253. microblaze-tdep.h \
  1254. mips-linux-tdep.h \
  1255. mips-netbsd-tdep.h \
  1256. mips-tdep.h \
  1257. mn10300-tdep.h \
  1258. moxie-tdep.h \
  1259. netbsd-nat.h \
  1260. netbsd-tdep.h \
  1261. nds32-tdep.h \
  1262. nios2-tdep.h \
  1263. elf-none-tdep.h \
  1264. nto-tdep.h \
  1265. objc-lang.h \
  1266. objfiles.h \
  1267. obsd-nat.h \
  1268. obsd-tdep.h \
  1269. or1k-linux-tdep.h \
  1270. osabi.h \
  1271. osdata.h \
  1272. p-lang.h \
  1273. parser-defs.h \
  1274. ppc-fbsd-tdep.h \
  1275. ppc-linux-tdep.h \
  1276. ppc-netbsd-tdep.h \
  1277. ppc-obsd-tdep.h \
  1278. ppc-ravenscar-thread.h \
  1279. ppc-tdep.h \
  1280. ppc64-tdep.h \
  1281. probe.h \
  1282. proc-utils.h \
  1283. procfs.h \
  1284. progspace.h \
  1285. progspace-and-thread.h \
  1286. prologue-value.h \
  1287. psympriv.h \
  1288. psymtab.h \
  1289. ravenscar-thread.h \
  1290. record.h \
  1291. record-full.h \
  1292. regcache.h \
  1293. reggroups.h \
  1294. regset.h \
  1295. remote.h \
  1296. remote-fileio.h \
  1297. remote-notif.h \
  1298. riscv-fbsd-tdep.h \
  1299. riscv-ravenscar-thread.h \
  1300. riscv-tdep.h \
  1301. rs6000-aix-tdep.h \
  1302. run-on-main-thread.h \
  1303. s390-linux-tdep.h \
  1304. s390-tdep.h \
  1305. selftest-arch.h \
  1306. sentinel-frame.h \
  1307. ser-base.h \
  1308. ser-event.h \
  1309. ser-tcp.h \
  1310. ser-unix.h \
  1311. serial.h \
  1312. sh-tdep.h \
  1313. sim-regno.h \
  1314. skip.h \
  1315. sol2-tdep.h \
  1316. solib.h \
  1317. solib-aix.h \
  1318. solib-darwin.h \
  1319. solib-svr4.h \
  1320. solib-target.h \
  1321. solist.h \
  1322. source.h \
  1323. source-cache.h \
  1324. sparc-nat.h \
  1325. sparc-ravenscar-thread.h \
  1326. sparc-tdep.h \
  1327. sparc64-tdep.h \
  1328. stabsread.h \
  1329. stack.h \
  1330. stap-probe.h \
  1331. symfile.h \
  1332. symtab.h \
  1333. target.h \
  1334. target-dcache.h \
  1335. target-descriptions.h \
  1336. terminal.h \
  1337. tid-parse.h \
  1338. top.h \
  1339. tracectf.h \
  1340. tracefile.h \
  1341. tracepoint.h \
  1342. trad-frame.h \
  1343. target-float.h \
  1344. tramp-frame.h \
  1345. type-stack.h \
  1346. typeprint.h \
  1347. ui-file.h \
  1348. ui-out.h \
  1349. ui-style.h \
  1350. user-regs.h \
  1351. utils.h \
  1352. valprint.h \
  1353. value.h \
  1354. varobj.h \
  1355. varobj-iter.h \
  1356. vax-tdep.h \
  1357. windows-nat.h \
  1358. windows-tdep.h \
  1359. x86-bsd-nat.h \
  1360. x86-linux-nat.h \
  1361. x86-nat.h \
  1362. xcoffread.h \
  1363. xml-builtin.h \
  1364. xml-support.h \
  1365. xml-syscall.h \
  1366. xml-tdesc.h \
  1367. xtensa-tdep.h \
  1368. arch/aarch32.h \
  1369. arch/aarch64.h \
  1370. arch/aarch64-insn.h \
  1371. arch/aarch64-mte-linux.h \
  1372. arch/arc.h \
  1373. arch/arm.h \
  1374. arch/i386.h \
  1375. arch/loongarch.h \
  1376. arch/ppc-linux-common.h \
  1377. arch/ppc-linux-tdesc.h \
  1378. arch/riscv.h \
  1379. cli/cli-cmds.h \
  1380. cli/cli-decode.h \
  1381. cli/cli-script.h \
  1382. cli/cli-setshow.h \
  1383. cli/cli-style.h \
  1384. cli/cli-utils.h \
  1385. compile/compile.h \
  1386. compile/compile-c.h \
  1387. compile/compile-cplus.h \
  1388. compile/compile-internal.h \
  1389. compile/compile-object-load.h \
  1390. compile/compile-object-run.h \
  1391. compile/gcc-c-plugin.h \
  1392. compile/gcc-cp-plugin.h \
  1393. config/nm-linux.h \
  1394. config/nm-nto.h \
  1395. config/djgpp/langinfo.h \
  1396. config/djgpp/nl_types.h \
  1397. config/i386/nm-i386gnu.h \
  1398. config/sparc/nm-sol2.h \
  1399. mi/mi-cmds.h \
  1400. mi/mi-common.h \
  1401. mi/mi-console.h \
  1402. mi/mi-getopt.h \
  1403. mi/mi-main.h \
  1404. mi/mi-out.h \
  1405. mi/mi-parse.h \
  1406. nat/aarch64-linux.h \
  1407. nat/aarch64-linux-hw-point.h \
  1408. nat/aarch64-mte-linux-ptrace.h \
  1409. nat/aarch64-sve-linux-ptrace.h \
  1410. nat/amd64-linux-siginfo.h \
  1411. nat/gdb_ptrace.h \
  1412. nat/gdb_thread_db.h \
  1413. nat/fork-inferior.h \
  1414. nat/linux-btrace.h \
  1415. nat/linux-namespaces.h \
  1416. nat/linux-nat.h \
  1417. nat/linux-osdata.h \
  1418. nat/linux-personality.h \
  1419. nat/linux-ptrace.h \
  1420. nat/linux-waitpid.h \
  1421. nat/mips-linux-watch.h \
  1422. nat/ppc-linux.h \
  1423. nat/x86-cpuid.h \
  1424. nat/x86-dregs.h \
  1425. nat/x86-gcc-cpuid.h \
  1426. nat/x86-linux.h \
  1427. nat/x86-linux-dregs.h \
  1428. python/py-event.h \
  1429. python/py-events.h \
  1430. python/py-stopevent.h \
  1431. python/python.h \
  1432. python/python-internal.h \
  1433. regformats/regdef.h \
  1434. target/resume.h \
  1435. target/target.h \
  1436. target/wait.h \
  1437. target/waitstatus.h \
  1438. tui/tui.h \
  1439. tui/tui-command.h \
  1440. tui/tui-data.h \
  1441. tui/tui-disasm.h \
  1442. tui/tui-file.h \
  1443. tui/tui-hooks.h \
  1444. tui/tui-io.h \
  1445. tui/tui-layout.h \
  1446. tui/tui-location.h \
  1447. tui/tui-out.h \
  1448. tui/tui-regs.h \
  1449. tui/tui-source.h \
  1450. tui/tui-stack.h \
  1451. tui/tui-win.h \
  1452. tui/tui-wingeneral.h \
  1453. tui/tui-winsource.h \
  1454. x86-tdep.h
  1455. # Header files that already have srcdir in them, or which are in objdir.
  1456. HFILES_WITH_SRCDIR = \
  1457. ../bfd/bfd.h \
  1458. jit-reader.h
  1459. # {X,T,NAT}DEPFILES are something of a pain in that it's hard to
  1460. # default their values the way we do for SER_HARDWIRE; in the future
  1461. # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other
  1462. # variables analogous to SER_HARDWIRE which get defaulted in this
  1463. # Makefile.in
  1464. DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(SIM_OBS)
  1465. ALLDEPFILES = \
  1466. arch/aarch32.c \
  1467. arch/aarch64.c \
  1468. arch/aarch64-insn.c \
  1469. arch/aarch64-mte-linux.c \
  1470. arch/amd64.c \
  1471. arch/arc.c \
  1472. arch/arm.c \
  1473. arch/arm-get-next-pcs.c \
  1474. arch/arm-linux.c \
  1475. arch/i386.c \
  1476. arch/loongarch.c \
  1477. arch/ppc-linux-common.c \
  1478. arch/riscv.c \
  1479. arch/tic6x.c \
  1480. aarch32-tdep.c \
  1481. aarch64-fbsd-nat.c \
  1482. aarch64-fbsd-tdep.c \
  1483. aarch64-linux-nat.c \
  1484. aarch64-linux-tdep.c \
  1485. aarch64-newlib-tdep.c \
  1486. aarch64-ravenscar-thread.c \
  1487. aarch64-tdep.c \
  1488. aix-thread.c \
  1489. alpha-bsd-nat.c \
  1490. alpha-bsd-tdep.c \
  1491. alpha-linux-nat.c \
  1492. alpha-linux-tdep.c \
  1493. alpha-mdebug-tdep.c \
  1494. alpha-netbsd-tdep.c \
  1495. alpha-obsd-tdep.c \
  1496. alpha-tdep.c \
  1497. amd64-bsd-nat.c \
  1498. amd64-darwin-tdep.c \
  1499. amd64-dicos-tdep.c \
  1500. amd64-fbsd-nat.c \
  1501. amd64-fbsd-tdep.c \
  1502. amd64-linux-nat.c \
  1503. amd64-linux-tdep.c \
  1504. amd64-nat.c \
  1505. amd64-netbsd-nat.c \
  1506. amd64-netbsd-tdep.c \
  1507. amd64-obsd-nat.c \
  1508. amd64-obsd-tdep.c \
  1509. amd64-ravenscar-thread.c \
  1510. amd64-sol2-tdep.c \
  1511. amd64-tdep.c \
  1512. arc-linux-nat.c \
  1513. arc-tdep.c \
  1514. arm-bsd-tdep.c \
  1515. arm-fbsd-nat.c \
  1516. arm-fbsd-tdep.c \
  1517. arm-linux-nat.c \
  1518. arm-linux-tdep.c \
  1519. arm-netbsd-nat.c \
  1520. arm-netbsd-tdep.c \
  1521. arm-none-tdep.c \
  1522. arm-obsd-tdep.c \
  1523. arm-tdep.c \
  1524. avr-tdep.c \
  1525. bfin-linux-tdep.c \
  1526. bfin-tdep.c \
  1527. bpf-tdep.c \
  1528. bsd-kvm.c \
  1529. bsd-uthread.c \
  1530. csky-linux-tdep.c \
  1531. csky-tdep.c \
  1532. darwin-nat.c \
  1533. dicos-tdep.c \
  1534. fbsd-nat.c \
  1535. fbsd-tdep.c \
  1536. fork-child.c \
  1537. ft32-tdep.c \
  1538. glibc-tdep.c \
  1539. go32-nat.c \
  1540. h8300-tdep.c \
  1541. hppa-bsd-tdep.c \
  1542. hppa-linux-nat.c \
  1543. hppa-linux-tdep.c \
  1544. hppa-netbsd-nat.c \
  1545. hppa-netbsd-tdep.c \
  1546. hppa-obsd-nat.c \
  1547. hppa-obsd-tdep.c \
  1548. hppa-tdep.c \
  1549. i386-bsd-nat.c \
  1550. i386-bsd-tdep.c \
  1551. i386-darwin-nat.c \
  1552. i386-darwin-tdep.c \
  1553. i386-dicos-tdep.c \
  1554. i386-fbsd-nat.c \
  1555. i386-fbsd-tdep.c \
  1556. i386-gnu-nat.c \
  1557. i386-gnu-tdep.c \
  1558. i386-linux-nat.c \
  1559. i386-linux-tdep.c \
  1560. i386-netbsd-nat.c \
  1561. i386-netbsd-tdep.c \
  1562. i386-obsd-nat.c \
  1563. i386-obsd-tdep.c \
  1564. i386-sol2-nat.c \
  1565. i386-sol2-tdep.c \
  1566. i386-tdep.c \
  1567. i386-windows-tdep.c \
  1568. i387-tdep.c \
  1569. ia64-libunwind-tdep.c \
  1570. ia64-linux-nat.c \
  1571. ia64-linux-tdep.c \
  1572. ia64-tdep.c \
  1573. ia64-vms-tdep.c \
  1574. inf-ptrace.c \
  1575. linux-fork.c \
  1576. linux-record.c \
  1577. linux-tdep.c \
  1578. lm32-tdep.c \
  1579. loongarch-linux-nat.c \
  1580. loongarch-linux-tdep.c \
  1581. loongarch-tdep.c \
  1582. m32r-linux-nat.c \
  1583. m32r-linux-tdep.c \
  1584. m32r-tdep.c \
  1585. m68hc11-tdep.c \
  1586. m68k-bsd-nat.c \
  1587. m68k-bsd-tdep.c \
  1588. m68k-linux-nat.c \
  1589. m68k-linux-tdep.c \
  1590. m68k-tdep.c \
  1591. microblaze-linux-tdep.c \
  1592. microblaze-tdep.c \
  1593. mingw-hdep.c \
  1594. mips-fbsd-nat.c \
  1595. mips-fbsd-tdep.c \
  1596. mips-linux-nat.c \
  1597. mips-linux-tdep.c \
  1598. mips-netbsd-nat.c \
  1599. mips-netbsd-tdep.c \
  1600. mips-sde-tdep.c \
  1601. mips-tdep.c \
  1602. mips64-obsd-nat.c \
  1603. mips64-obsd-tdep.c \
  1604. msp430-tdep.c \
  1605. netbsd-nat.c \
  1606. netbsd-tdep.c \
  1607. nds32-tdep.c \
  1608. nios2-linux-tdep.c \
  1609. nios2-tdep.c \
  1610. obsd-nat.c \
  1611. obsd-tdep.c \
  1612. or1k-linux-nat.c \
  1613. posix-hdep.c \
  1614. ppc-fbsd-nat.c \
  1615. ppc-fbsd-tdep.c \
  1616. ppc-linux-nat.c \
  1617. ppc-linux-tdep.c \
  1618. ppc-netbsd-nat.c \
  1619. ppc-netbsd-tdep.c \
  1620. ppc-obsd-nat.c \
  1621. ppc-obsd-tdep.c \
  1622. ppc-ravenscar-thread.c \
  1623. ppc-sysv-tdep.c \
  1624. ppc64-tdep.c \
  1625. procfs.c \
  1626. ravenscar-thread.c \
  1627. remote-sim.c \
  1628. riscv-fbsd-nat.c \
  1629. riscv-fbsd-tdep.c \
  1630. riscv-linux-nat.c \
  1631. riscv-linux-tdep.c \
  1632. riscv-none-tdep.c \
  1633. riscv-ravenscar-thread.c \
  1634. riscv-tdep.c \
  1635. rl78-tdep.c \
  1636. rs6000-aix-nat.c \
  1637. rs6000-lynx178-tdep.c \
  1638. rs6000-tdep.c \
  1639. rx-tdep.c \
  1640. s390-linux-nat.c \
  1641. s390-linux-tdep.c \
  1642. s390-tdep.c \
  1643. ser-go32.c \
  1644. ser-mingw.c \
  1645. ser-pipe.c \
  1646. ser-tcp.c \
  1647. ser-uds.c \
  1648. sh-netbsd-nat.c \
  1649. sh-netbsd-tdep.c \
  1650. sh-tdep.c \
  1651. sol2-tdep.c \
  1652. solib-aix.c \
  1653. solib-svr4.c \
  1654. sparc-linux-nat.c \
  1655. sparc-linux-tdep.c \
  1656. sparc-nat.c \
  1657. sparc-netbsd-nat.c \
  1658. sparc-netbsd-tdep.c \
  1659. sparc-obsd-tdep.c \
  1660. sparc-ravenscar-thread.c \
  1661. sparc-sol2-nat.c \
  1662. sparc-sol2-tdep.c \
  1663. sparc-tdep.c \
  1664. sparc64-fbsd-nat.c \
  1665. sparc64-fbsd-tdep.c \
  1666. sparc64-linux-nat.c \
  1667. sparc64-linux-tdep.c \
  1668. sparc64-nat.c \
  1669. sparc64-netbsd-nat.c \
  1670. sparc64-netbsd-tdep.c \
  1671. sparc64-obsd-nat.c \
  1672. sparc64-obsd-tdep.c \
  1673. sparc64-sol2-tdep.c \
  1674. sparc64-tdep.c \
  1675. tilegx-linux-nat.c \
  1676. tilegx-linux-tdep.c \
  1677. tilegx-tdep.c \
  1678. v850-tdep.c \
  1679. vax-bsd-nat.c \
  1680. vax-netbsd-tdep.c \
  1681. vax-tdep.c \
  1682. windows-nat.c \
  1683. windows-tdep.c \
  1684. x86-nat.c \
  1685. x86-tdep.c \
  1686. xcoffread.c \
  1687. xstormy16-tdep.c \
  1688. xtensa-config.c \
  1689. xtensa-linux-nat.c \
  1690. xtensa-linux-tdep.c \
  1691. xtensa-tdep.c \
  1692. xtensa-xtregs.c
  1693. # Don't include YYFILES (*.c) because we already include *.y in SFILES,
  1694. # and it's more useful to see it in the .y file.
  1695. TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
  1696. $(CONFIG_SRCS)
  1697. TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
  1698. COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
  1699. mi/mi-common.o \
  1700. version.o \
  1701. xml-builtin.o \
  1702. $(patsubst %.c,%.o,$(COMMON_SFILES)) \
  1703. $(SUBDIR_CLI_OBS) \
  1704. $(SUBDIR_TARGET_OBS) \
  1705. $(SUBDIR_GCC_COMPILE_OBS)
  1706. SUBDIRS = doc @subdirs@ data-directory
  1707. CLEANDIRS = $(SUBDIRS)
  1708. # List of subdirectories in the build tree that must exist.
  1709. # This is used to force build failures in existing trees when
  1710. # a new directory is added.
  1711. # The format here is for the `case' shell command.
  1712. REQUIRED_SUBDIRS = doc | testsuite | data-directory
  1713. # Parser intermediate files.
  1714. YYFILES = \
  1715. ada-exp.c \
  1716. ada-lex.c \
  1717. c-exp.c \
  1718. cp-name-parser.c \
  1719. d-exp.c \
  1720. f-exp.c \
  1721. go-exp.c \
  1722. m2-exp.c \
  1723. p-exp.c
  1724. # ada-lex.c is included by another file, so it shouldn't wind up as a
  1725. # .o itself.
  1726. YYOBJ = $(filter-out ada-lex.o,$(patsubst %.c,%.o,$(YYFILES)))
  1727. # Things which need to be built when making a distribution.
  1728. DISTSTUFF = $(YYFILES)
  1729. # All generated files which can be included by another file.
  1730. generated_files = \
  1731. ada-lex.c \
  1732. config.h \
  1733. jit-reader.h \
  1734. $(NAT_GENERATED_FILES) \
  1735. $(NM_H)
  1736. # Flags needed to compile Python code
  1737. PYTHON_CFLAGS = @PYTHON_CFLAGS@
  1738. all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
  1739. @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=$(SUBDIRS)" subdir_do
  1740. # Rule for compiling .c files in the top-level gdb directory.
  1741. # The order-only dependencies ensure that we create the build subdirectories.
  1742. %.o: %.c | $(CONFIG_DEP_SUBDIR)
  1743. $(COMPILE) $<
  1744. $(POSTCOMPILE)
  1745. $(CONFIG_DEP_SUBDIR):
  1746. $(SHELL) $(srcdir)/../mkinstalldirs $@
  1747. # Python files need special flags.
  1748. python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
  1749. # Rules for compiling .c files in the various source subdirectories.
  1750. %.o: $(srcdir)/gdbtk/generic/%.c
  1751. $(COMPILE) $(all_gdbtk_cflags) $<
  1752. $(POSTCOMPILE)
  1753. installcheck:
  1754. # The check target can not use subdir_do, because subdir_do does not
  1755. # use TARGET_FLAGS_TO_PASS.
  1756. check: force
  1757. @if [ -f testsuite/Makefile ]; then \
  1758. rootme=`pwd`; export rootme; \
  1759. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1760. cd testsuite; \
  1761. $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
  1762. else true; fi
  1763. check-perf: force
  1764. @if [ -f testsuite/Makefile ]; then \
  1765. rootme=`pwd`; export rootme; \
  1766. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1767. cd testsuite; \
  1768. $(MAKE) $(TARGET_FLAGS_TO_PASS) check-perf; \
  1769. else true; fi
  1770. check-read1 check-readmore: force
  1771. @if [ -f testsuite/Makefile ]; then \
  1772. rootme=`pwd`; export rootme; \
  1773. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1774. cd testsuite; \
  1775. $(MAKE) $(TARGET_FLAGS_TO_PASS) $@; \
  1776. else true; fi
  1777. check-parallel: force
  1778. @if [ -f testsuite/Makefile ]; then \
  1779. rootme=`pwd`; export rootme; \
  1780. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1781. cd testsuite; \
  1782. $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \
  1783. else true; fi
  1784. # The idea is to parallelize testing of multilibs, for example:
  1785. # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
  1786. # will run 3 concurrent sessions of check, eventually testing all 10
  1787. # combinations. GNU make is required for the % pattern to work, as is
  1788. # a shell that expands alternations within braces. If GNU make is not
  1789. # used, this rule will harmlessly fail to match. Used FORCE_PARALLEL to
  1790. # prevent serialized checking due to the passed RUNTESTFLAGS.
  1791. # FIXME: use config.status --config not --version, when available.
  1792. check//%: force
  1793. @if [ -f testsuite/config.status ]; then \
  1794. rootme=`pwd`; export rootme; \
  1795. rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
  1796. target=`echo "$@" | sed 's,//.*,,'`; \
  1797. variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
  1798. vardots=`echo "$$variant" | sed 's,/,.,g'`; \
  1799. testdir=testsuite.$$vardots; \
  1800. if [ ! -f $$testdir/Makefile ] && [ -f testsuite/config.status ]; then \
  1801. configargs=`cd testsuite && ./config.status --version | \
  1802. sed -n -e 's,"$$,,' -e 's,^ *with options ",,p'`; \
  1803. $(SHELL) $(srcdir)/../mkinstalldirs $$testdir && \
  1804. (cd $$testdir && \
  1805. eval $(SHELL) "\"\$$rootsrc/testsuite/configure\" $$configargs" \
  1806. "\"--srcdir=\$$rootsrc/testsuite\"" \
  1807. ); \
  1808. else :; fi && cd $$testdir && \
  1809. $(MAKE) $(TARGET_FLAGS_TO_PASS) \
  1810. RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
  1811. FORCE_PARALLEL=$(if $(FORCE_PARALLEL),1,$(if $(RUNTESTFLAGS),,1)) \
  1812. "$$target"; \
  1813. else true; fi
  1814. # The set of headers checked by 'check-headers' by default.
  1815. CHECK_HEADERS = $(HFILES_NO_SRCDIR)
  1816. # Try to compile each header in isolation, thus ensuring headers are
  1817. # self-contained.
  1818. #
  1819. # Defaults to checking all $HFILES_NO_SRCDIR headers.
  1820. #
  1821. # Do:
  1822. #
  1823. # make check-headers CHECK_HEADERS="header.h list.h"
  1824. #
  1825. # to check specific headers.
  1826. #
  1827. check-headers:
  1828. @echo Checking headers.
  1829. for i in $(CHECK_HEADERS) ; do \
  1830. $(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
  1831. $(INTERNAL_CFLAGS) $(CXXFLAGS) -include defs.h $(srcdir)/$$i ; \
  1832. done
  1833. .PHONY: check-headers
  1834. info install-info clean-info dvi pdf install-pdf html install-html: force
  1835. @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
  1836. # Traditionally "install" depends on "all". But it may be useful
  1837. # not to; for example, if the user has made some trivial change to a
  1838. # source file and doesn't care about rebuilding or just wants to save the
  1839. # time it takes for make to check that all is up to date.
  1840. # install-only is intended to address that need.
  1841. install: all
  1842. @$(MAKE) $(FLAGS_TO_PASS) install-only
  1843. install-only: $(CONFIG_INSTALL)
  1844. transformed_name=`t='$(program_transform_name)'; \
  1845. echo gdb | sed -e "$$t"` ; \
  1846. if test "x$$transformed_name" = x; then \
  1847. transformed_name=gdb ; \
  1848. else \
  1849. true ; \
  1850. fi ; \
  1851. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
  1852. $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) gdb$(EXEEXT) \
  1853. $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  1854. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
  1855. $(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
  1856. if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
  1857. then \
  1858. transformed_name=`t='$(program_transform_name)'; \
  1859. echo gcore | sed -e "$$t"` ; \
  1860. if test "x$$transformed_name" = x; then \
  1861. transformed_name=gcore ; \
  1862. else \
  1863. true ; \
  1864. fi ; \
  1865. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
  1866. $(INSTALL_SCRIPT) gcore \
  1867. $(DESTDIR)$(bindir)/$$transformed_name; \
  1868. fi
  1869. transformed_name=`t='$(program_transform_name)'; \
  1870. echo gdb-add-index | sed -e "$$t"` ; \
  1871. if test "x$$transformed_name" = x; then \
  1872. transformed_name=gdb-add-index ; \
  1873. else \
  1874. true ; \
  1875. fi ; \
  1876. $(INSTALL_SCRIPT) $(srcdir)/contrib/gdb-add-index.sh \
  1877. $(DESTDIR)$(bindir)/$$transformed_name
  1878. @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
  1879. install-strip:
  1880. $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  1881. install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
  1882. `test -z '$(STRIP)' || \
  1883. echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
  1884. install-guile:
  1885. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/guile/gdb
  1886. install-python:
  1887. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
  1888. uninstall: force $(CONFIG_UNINSTALL)
  1889. transformed_name=`t='$(program_transform_name)'; \
  1890. echo gdb | sed -e $$t` ; \
  1891. if test "x$$transformed_name" = x; then \
  1892. transformed_name=gdb ; \
  1893. else \
  1894. true ; \
  1895. fi ; \
  1896. rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
  1897. rm -f $(DESTDIR)$(includedir)/gdb/jit-reader.h
  1898. if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
  1899. then \
  1900. transformed_name=`t='$(program_transform_name)'; \
  1901. echo gcore | sed -e "$$t"` ; \
  1902. if test "x$$transformed_name" = x; then \
  1903. transformed_name=gcore ; \
  1904. else \
  1905. true ; \
  1906. fi ; \
  1907. rm -f $(DESTDIR)$(bindir)/$$transformed_name; \
  1908. fi
  1909. transformed_name=`t='$(program_transform_name)'; \
  1910. echo gdb-add-index | sed -e "$$t"` ; \
  1911. if test "x$$transformed_name" = x; then \
  1912. transformed_name=gdb-add-index ; \
  1913. else \
  1914. true ; \
  1915. fi ; \
  1916. rm -f $(DESTDIR)$(bindir)/$$transformed_name
  1917. @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
  1918. # The C++ name parser can be built standalone for testing.
  1919. test-cp-name-parser.o: cp-name-parser.c
  1920. $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
  1921. $(POSTCOMPILE)
  1922. test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
  1923. $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) \
  1924. -o test-cp-name-parser$(EXEEXT) test-cp-name-parser.o \
  1925. $(LIBIBERTY)
  1926. # We do this by grepping through sources. If that turns out to be too slow,
  1927. # maybe we could just require every .o file to have an initialization routine
  1928. # of a given name (top.o -> _initialize_top, etc.).
  1929. #
  1930. # Note that the set of files with init functions might change, or the names
  1931. # of the functions might change, so this files needs to depend on all the
  1932. # source files that will be linked into gdb. However, due to the way
  1933. # this Makefile has generally been written, we do this indirectly, by
  1934. # computing the list of source files from the list of object files.
  1935. INIT_FILES_FILTER_OUT = \
  1936. cp-name-parser.o \
  1937. init.o \
  1938. version.o \
  1939. xml-builtin.o \
  1940. %_S.o \
  1941. %_U.o
  1942. INIT_FILES = \
  1943. $(patsubst %.o,%.c, \
  1944. $(patsubst %-exp.o,%-exp.y, \
  1945. $(filter-out $(INIT_FILES_FILTER_OUT), $(COMMON_OBS))))
  1946. init.c: stamp-init; @true
  1947. stamp-init: $(INIT_FILES) config.status $(srcdir)/make-init-c
  1948. $(ECHO_INIT_C)
  1949. $(SILENCE) $(srcdir)/make-init-c $(addprefix $(srcdir)/,$(INIT_FILES)) > init.c-tmp
  1950. $(SILENCE) $(SHELL) $(srcdir)/../move-if-change init.c-tmp init.c
  1951. $(SILENCE) echo stamp > stamp-init
  1952. .PRECIOUS: init.c
  1953. # Create a library of the gdb object files and build GDB by linking
  1954. # against that.
  1955. #
  1956. # init.o is very important. It pulls in the rest of GDB.
  1957. LIBGDB_OBS = $(sort $(COMMON_OBS)) init.o
  1958. libgdb.a: $(LIBGDB_OBS)
  1959. -rm -f libgdb.a
  1960. $(AR) q libgdb.a $(LIBGDB_OBS)
  1961. $(RANLIB) libgdb.a
  1962. # Removing the old gdb first works better if it is running, at least on SunOS.
  1963. gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS)
  1964. $(SILENCE) rm -f gdb$(EXEEXT)
  1965. $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
  1966. -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
  1967. $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
  1968. ifneq ($(CODESIGN_CERT),)
  1969. $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT)
  1970. endif
  1971. # This is useful when debugging GDB, because some Unix's don't let you run GDB
  1972. # on itself without copying the executable. So "make gdb1" will make
  1973. # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
  1974. # Removing gdb1 before the copy is the right thing if gdb1 is open
  1975. # in another process.
  1976. gdb1$(EXEEXT): gdb$(EXEEXT)
  1977. rm -f gdb1$(EXEEXT)
  1978. cp gdb$(EXEEXT) gdb1$(EXEEXT)
  1979. # Put the proper machine-specific files first, so M-. on a machine
  1980. # specific routine gets the one for the correct machine. (FIXME: those
  1981. # files go in twice; we should be removing them from the main list).
  1982. # TAGS depends on all the files that go into it so you can rebuild TAGS
  1983. # with `make TAGS' and not have to say `rm TAGS' first.
  1984. GDB_NM_FILE = @GDB_NM_FILE@
  1985. TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
  1986. @echo Making TAGS
  1987. etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
  1988. `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
  1989. echo $(srcdir)/$$i ; \
  1990. done ; for i in $(TAGFILES_WITH_SRCDIR); do \
  1991. echo $$i ; \
  1992. done) | sed -e 's/\.o$$/\.c/'` \
  1993. `find $(srcdir)/config -name '*.h' -print`
  1994. tags: TAGS
  1995. clean mostlyclean: $(CONFIG_CLEAN)
  1996. @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do
  1997. rm -f *.o *.a *~ init.c-tmp init.l-tmp version.c-tmp
  1998. rm -f init.c stamp-init version.c stamp-version
  1999. rm -f gdb$(EXEEXT) core make.log
  2000. rm -f gdb[0-9]$(EXEEXT)
  2001. rm -f test-cp-name-parser$(EXEEXT)
  2002. rm -f xml-builtin.c stamp-xml
  2003. rm -f $(DEPDIR)/*
  2004. for i in $(CONFIG_SRC_SUBDIR); do \
  2005. rm -f $$i/*.o; \
  2006. rm -f $$i/$(DEPDIR)/*; \
  2007. done
  2008. # This used to depend on c-exp.c m2-exp.c TAGS
  2009. # I believe this is wrong; the makefile standards for distclean just
  2010. # describe removing files; the only sort of "re-create a distribution"
  2011. # functionality described is if the distributed files are unmodified.
  2012. distclean: clean
  2013. @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(CLEANDIRS)" subdir_do
  2014. rm -f nm.h config.status config.h stamp-h b jit-reader.h gcore stamp-nmh
  2015. rm -f gdb-gdb.py gdb-gdb.gdb
  2016. rm -f y.output yacc.acts yacc.tmp y.tab.h
  2017. rm -f config.log config.cache
  2018. rm -f Makefile
  2019. rm -rf $(DEPDIR)
  2020. for i in $(CONFIG_SRC_SUBDIR); do \
  2021. if test -d $$i/$(DEPDIR); then rmdir $$i/$(DEPDIR); fi \
  2022. done
  2023. maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
  2024. realclean: maintainer-clean
  2025. local-maintainer-clean:
  2026. @echo "This command is intended for maintainers to use;"
  2027. @echo "it deletes files that may require special tools to rebuild."
  2028. rm -f c-exp.c \
  2029. cp-name-parser.c \
  2030. ada-lex.c ada-exp.c \
  2031. d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c
  2032. rm -f TAGS
  2033. rm -f $(YYFILES)
  2034. rm -f nm.h config.status
  2035. do-maintainer-clean:
  2036. @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(CLEANDIRS)" \
  2037. subdir_do
  2038. diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
  2039. cd doc; $(MAKE) $(MFLAGS) diststuff
  2040. subdir_do: force
  2041. @for i in $(DODIRS); do \
  2042. case $$i in \
  2043. $(REQUIRED_SUBDIRS)) \
  2044. if [ ! -f ./$$i/Makefile ] ; then \
  2045. echo "Missing $$i/Makefile" >&2 ; \
  2046. exit 1 ; \
  2047. fi ;; \
  2048. esac ; \
  2049. if [ -f ./$$i/Makefile ] ; then \
  2050. if (cd ./$$i; \
  2051. $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
  2052. else exit 1 ; fi ; \
  2053. else true ; fi ; \
  2054. done
  2055. Makefile: Makefile.in config.status
  2056. $(SHELL) config.status $@
  2057. .PHONY: run
  2058. run: Makefile
  2059. ./gdb$(EXEEXT) --data-directory=`pwd`/data-directory $(GDBFLAGS)
  2060. jit-reader.h: $(srcdir)/jit-reader.in
  2061. $(SHELL) config.status $@
  2062. gcore: $(srcdir)/gcore.in
  2063. $(SHELL) config.status $@
  2064. gdb-gdb.py: $(srcdir)/gdb-gdb.py.in
  2065. $(SHELL) config.status $@
  2066. gdb-gdb.gdb: $(srcdir)/gdb-gdb.gdb.in
  2067. $(SHELL) config.status $@
  2068. config.h: stamp-h ; @true
  2069. stamp-h: $(srcdir)/config.in config.status
  2070. $(SHELL) config.status config.h
  2071. nm.h: stamp-nmh ; @true
  2072. stamp-nmh: config.status
  2073. $(SHELL) config.status nm.h
  2074. config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh
  2075. $(SHELL) config.status --recheck
  2076. ACLOCAL = aclocal
  2077. ACLOCAL_AMFLAGS = -I ../config
  2078. # Keep these in sync with the includes in acinclude.m4.
  2079. aclocal_m4_deps = \
  2080. configure.ac \
  2081. acx_configure_dir.m4 \
  2082. transform.m4 \
  2083. ../bfd/bfd.m4 \
  2084. ../config/acinclude.m4 \
  2085. ../config/enable.m4 \
  2086. ../config/plugins.m4 \
  2087. ../config/lead-dot.m4 \
  2088. ../config/override.m4 \
  2089. ../config/largefile.m4 \
  2090. ../config/gettext-sister.m4 \
  2091. ../config/lib-ld.m4 \
  2092. ../config/lib-prefix.m4 \
  2093. ../config/lib-link.m4 \
  2094. ../config/acx.m4 \
  2095. ../config/tcl.m4 \
  2096. ../config/depstand.m4 \
  2097. ../config/lcmessage.m4 \
  2098. ../config/codeset.m4 \
  2099. ../config/zlib.m4 \
  2100. ../config/ax_pthread.m4
  2101. $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
  2102. cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
  2103. AUTOCONF = autoconf
  2104. configure_deps = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
  2105. $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(configure_deps)
  2106. cd $(srcdir) && $(AUTOCONF)
  2107. AUTOHEADER = autoheader
  2108. $(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(configure_deps)
  2109. cd $(srcdir) && $(AUTOHEADER)
  2110. rm -f stamp-h
  2111. touch $@
  2112. # automatic rebuilding in automake-generated Makefiles requires
  2113. # this rule in the toplevel Makefile, which, with GNU make, causes
  2114. # the desired updates through the implicit regeneration of the Makefile
  2115. # and all of its prerequisites.
  2116. am--refresh:
  2117. @:
  2118. force:
  2119. # Documentation!
  2120. # GDB QUICK REFERENCE (TeX dvi file, CM fonts)
  2121. doc/refcard.dvi:
  2122. cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS)
  2123. # GDB QUICK REFERENCE (PostScript output, common PS fonts)
  2124. doc/refcard.ps:
  2125. cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS)
  2126. # GDB MANUAL: TeX dvi file
  2127. doc/gdb.dvi:
  2128. cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS)
  2129. # GDB MANUAL: info file
  2130. doc/gdb.info:
  2131. cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
  2132. # Make copying.c from COPYING
  2133. $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk
  2134. awk -f $(srcdir)/copying.awk \
  2135. < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
  2136. mv $(srcdir)/copying.tmp $(srcdir)/copying.c
  2137. version.c: stamp-version; @true
  2138. # Note that the obvious names for the temp file are taken by
  2139. # create-version.sh.
  2140. stamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/../gdbsupport/create-version.sh
  2141. $(ECHO_GEN) $(SHELL) $(srcdir)/../gdbsupport/create-version.sh $(srcdir) \
  2142. $(host_alias) $(target_alias) version-t.t
  2143. @$(SHELL) $(srcdir)/../move-if-change version-t.t version.c
  2144. @echo stamp > stamp-version
  2145. gdb.cxref: $(SFILES)
  2146. cxref -I. $(SFILES) >gdb.cxref
  2147. force_update:
  2148. # GNU Make has an annoying habit of putting *all* the Makefile variables
  2149. # into the environment, unless you include this target as a circumvention.
  2150. # Rumor is that this will be fixed (and this target can be removed)
  2151. # in GNU Make 4.0.
  2152. .NOEXPORT:
  2153. # GNU Make 3.63 has a different problem: it keeps tacking command line
  2154. # overrides onto the definition of $(MAKE). This variable setting
  2155. # will remove them.
  2156. MAKEOVERRIDES =
  2157. # Some files need explicit build rules (due to -Werror problems) or due
  2158. # to sub-directory fun 'n' games.
  2159. # ada-exp.c can appear in srcdir, for releases; or in ., for
  2160. # development builds.
  2161. ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
  2162. ada-exp.o: ada-exp.c
  2163. $(COMPILE) $(ADA_EXP_C)
  2164. $(POSTCOMPILE)
  2165. # Message files. Based on code in gcc/Makefile.in.
  2166. # Rules for generating translated message descriptions. Disabled by
  2167. # autoconf if the tools are not available.
  2168. .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
  2169. all-po: $(CATALOGS)
  2170. # This notation should be acceptable to all Make implementations used
  2171. # by people who are interested in updating .po files.
  2172. update-po: $(CATALOGS:.gmo=.pox)
  2173. # N.B. We do not attempt to copy these into $(srcdir). The snapshot
  2174. # script does that.
  2175. %.gmo: %.po
  2176. -test -d po || mkdir po
  2177. $(GMSGFMT) --statistics -o $@ $<
  2178. # The new .po has to be gone over by hand, so we deposit it into
  2179. # build/po with a different extension. If build/po/$(PACKAGE).pot
  2180. # exists, use it (it was just created), else use the one in srcdir.
  2181. %.pox: %.po
  2182. -test -d po || mkdir po
  2183. $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
  2184. then echo po/$(PACKAGE).pot; \
  2185. else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
  2186. # This rule has to look for .gmo modules in both srcdir and the cwd,
  2187. # and has to check that we actually have a catalog for each language,
  2188. # in case they weren't built or included with the distribution.
  2189. install-po:
  2190. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)
  2191. cats="$(CATALOGS)"; for cat in $$cats; do \
  2192. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  2193. if [ -f $$cat ]; then :; \
  2194. elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  2195. else continue; \
  2196. fi; \
  2197. dir=$(localedir)/$$lang/LC_MESSAGES; \
  2198. echo $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir; \
  2199. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$$dir || exit 1; \
  2200. echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  2201. $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  2202. done
  2203. uninstall-po:
  2204. cats="$(CATALOGS)"; for cat in $$cats; do \
  2205. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  2206. if [ -f $$cat ]; then :; \
  2207. elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  2208. else continue; \
  2209. fi; \
  2210. dir=$(localedir)/$$lang/LC_MESSAGES; \
  2211. rm -f $(DESTDIR)$$dir/$(PACKAGE).mo; \
  2212. done
  2213. # Delete po/*.gmo only if we are not building in the source directory.
  2214. clean-po:
  2215. -if [ ! -f Makefile.in ]; then rm -f po/*.gmo; fi
  2216. # Rule for regenerating the message template (gdb.pot). Instead of
  2217. # forcing everyone to edit POTFILES.in, which proved impractical, this
  2218. # rule has no dependencies and always regenerates gdb.pot. This is
  2219. # relatively harmless since the .po files do not directly depend on
  2220. # it. The .pot file is left in the build directory. Since GDB's
  2221. # Makefile lacks a cannonical list of sources (missing xm, tm and nm
  2222. # files) force this rule.
  2223. $(PACKAGE).pot: po/$(PACKAGE).pot
  2224. po/$(PACKAGE).pot: force
  2225. -test -d po || mkdir po
  2226. sh -e $(srcdir)/po/gdbtext $(XGETTEXT) $(PACKAGE) . $(srcdir)
  2227. #
  2228. # YACC/LEX dependencies
  2229. #
  2230. # LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't
  2231. # exist in srcdir, then compiled in objdir to LANG-exp.o. If we
  2232. # said LANG-exp.c rather than ./c-exp.c some makes would
  2233. # sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus
  2234. # decls for malloc/realloc/free which conflict with everything else.
  2235. # Strictly speaking c-exp.c should therefore depend on
  2236. # Makefile.in, but that was a pretty big annoyance.
  2237. %.c: %.y
  2238. $(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \
  2239. $(YACC) $(YFLAGS) || (rm -f $@.tmp; false)
  2240. @sed -e '/extern.*malloc/d' \
  2241. -e '/extern.*realloc/d' \
  2242. -e '/extern.*free/d' \
  2243. -e '/include.*malloc.h/d' \
  2244. -e 's/\([^x]\)malloc/\1xmalloc/g' \
  2245. -e 's/\([^x]\)realloc/\1xrealloc/g' \
  2246. -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
  2247. -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
  2248. -e '/^#line.*y.tab.c/d' \
  2249. -e 's/YY_NULL/YY_NULLPTR/g' \
  2250. < $@.tmp > $@.new && \
  2251. rm -f $@.tmp && \
  2252. mv $@.new $@
  2253. %.c: %.l
  2254. $(ECHO_LEX) $(FLEX) -t $< > $@.tmp || (rm -f $@.tmp; false)
  2255. @sed -e '/extern.*malloc/d' \
  2256. -e '/extern.*realloc/d' \
  2257. -e '/extern.*free/d' \
  2258. -e '/include.*malloc.h/d' \
  2259. -e 's/\([^x]\)malloc/\1xmalloc/g' \
  2260. -e 's/\([^x]\)realloc/\1xrealloc/g' \
  2261. -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
  2262. -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
  2263. -e 's/yy_flex_xrealloc/yyxrealloc/g' \
  2264. < $@.tmp > $@.new && \
  2265. rm -f $@.tmp && \
  2266. mv $@.new $@
  2267. # XML rules
  2268. xml-builtin.c: stamp-xml; @true
  2269. stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
  2270. $(SILENCE) rm -f xml-builtin.tmp
  2271. $(ECHO_GEN_XML_BUILTIN) AWK="$(AWK)" \
  2272. $(SHELL) $(srcdir)/features/feature_to_c.sh \
  2273. xml-builtin.tmp $(XMLFILES)
  2274. $(SILENCE) $(SHELL) $(srcdir)/../move-if-change xml-builtin.tmp xml-builtin.c
  2275. $(SILENCE) echo stamp > stamp-xml
  2276. .PRECIOUS: xml-builtin.c
  2277. #
  2278. # GDBTK sub-directory
  2279. #
  2280. all-gdbtk: insight$(EXEEXT)
  2281. install-gdbtk:
  2282. transformed_name=`t='$(program_transform_name)'; \
  2283. echo insight | sed -e $$t` ; \
  2284. if test "x$$transformed_name" = x; then \
  2285. transformed_name=insight ; \
  2286. else \
  2287. true ; \
  2288. fi ; \
  2289. $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \
  2290. $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) insight$(EXEEXT) \
  2291. $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  2292. $(SHELL) $(srcdir)/../mkinstalldirs \
  2293. $(DESTDIR)$(GDBTK_LIBRARY) ; \
  2294. $(SHELL) $(srcdir)/../mkinstalldirs \
  2295. $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
  2296. $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
  2297. $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
  2298. $(SHELL) $(srcdir)/../mkinstalldirs \
  2299. $(DESTDIR)$(GDBTK_LIBRARY)/images \
  2300. $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
  2301. $(SHELL) $(srcdir)/../mkinstalldirs \
  2302. $(DESTDIR)$(GDBTK_LIBRARY)/help \
  2303. $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
  2304. $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
  2305. cd $(srcdir)/gdbtk/library ; \
  2306. for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \
  2307. do \
  2308. $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
  2309. done ;
  2310. uninstall-gdbtk:
  2311. transformed_name=`t='$(program_transform_name)'; \
  2312. echo insight | sed -e $$t` ; \
  2313. if test "x$$transformed_name" = x; then \
  2314. transformed_name=insight ; \
  2315. else \
  2316. true ; \
  2317. fi ; \
  2318. rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
  2319. rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
  2320. clean-gdbtk:
  2321. rm -f insight$(EXEEXT)
  2322. # Removing the old gdb first works better if it is running, at least on SunOS.
  2323. insight$(EXEEXT): gdbtk-main.o libgdb.a $(CDEPS) $(TDEPLIBS)
  2324. rm -f insight$(EXEEXT)
  2325. $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
  2326. -o insight$(EXEEXT) gdbtk-main.o libgdb.a \
  2327. $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
  2328. gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
  2329. $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
  2330. all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
  2331. $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
  2332. $(GDBTK_CFLAGS) \
  2333. -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
  2334. -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
  2335. #
  2336. # Dependency tracking.
  2337. #
  2338. ifeq ($(DEPMODE),depmode=gcc3)
  2339. # Note that we put the dependencies into a .Tpo file, then move them
  2340. # into place if the compile succeeds. We need this because gcc does
  2341. # not atomically write the dependency output file.
  2342. override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
  2343. -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
  2344. override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
  2345. $(@D)/$(DEPDIR)/$(basename $(@F)).Po
  2346. else
  2347. override COMPILE.pre = source='$<' object='$@' libtool=no \
  2348. DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
  2349. $(CXX) -x c++ $(CXX_DIALECT)
  2350. # depcomp handles atomicity for us, so we don't need a postcompile
  2351. # step.
  2352. override POSTCOMPILE =
  2353. endif
  2354. # A list of all the objects we might care about in this build, for
  2355. # dependency tracking.
  2356. all_object_files = gdb.o $(LIBGDB_OBS) gdbtk-main.o \
  2357. test-cp-name-parser.o
  2358. # All the .deps files to include.
  2359. all_deps_files = $(foreach dep,$(patsubst %.o,%.Po,$(all_object_files)),\
  2360. $(dir $(dep))/$(DEPDIR)/$(notdir $(dep)))
  2361. # Ensure that generated files are created early. Use order-only
  2362. # dependencies if available. They require GNU make 3.80 or newer,
  2363. # and the .VARIABLES variable was introduced at the same time.
  2364. ifdef .VARIABLES
  2365. $(all_object_files): | $(generated_files)
  2366. else
  2367. $(all_object_files) : $(generated_files)
  2368. endif
  2369. # Dependencies.
  2370. -include $(all_deps_files)
  2371. # Disable implicit make rules.
  2372. include $(srcdir)/disable-implicit-rules.mk
  2373. ### end of the gdb Makefile.in.