Makefile 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/08/11]
  3. #
  4. default: all
  5. MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris qnx haiku
  8. LIMIT83fs = go32v2 os2 emx watcom
  9. OSNeedsComspecToRunBatch = go32v2 watcom
  10. FORCE:
  11. .PHONY: FORCE
  12. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  13. ifneq ($(findstring darwin,$(OSTYPE)),)
  14. inUnix=1 #darwin
  15. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  16. else
  17. ifeq ($(findstring ;,$(PATH)),)
  18. inUnix=1
  19. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  20. else
  21. SEARCHPATH:=$(subst ;, ,$(PATH))
  22. endif
  23. endif
  24. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  25. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  26. ifeq ($(PWD),)
  27. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  28. ifeq ($(PWD),)
  29. $(error You need the GNU utils package to use this Makefile)
  30. else
  31. PWD:=$(firstword $(PWD))
  32. SRCEXEEXT=
  33. endif
  34. else
  35. PWD:=$(firstword $(PWD))
  36. SRCEXEEXT=.exe
  37. endif
  38. ifndef inUnix
  39. ifeq ($(OS),Windows_NT)
  40. inWinNT=1
  41. else
  42. ifdef OS2_SHELL
  43. inOS2=1
  44. endif
  45. endif
  46. else
  47. ifneq ($(findstring cygdrive,$(PATH)),)
  48. inCygWin=1
  49. endif
  50. endif
  51. ifdef inUnix
  52. SRCBATCHEXT=.sh
  53. else
  54. ifdef inOS2
  55. SRCBATCHEXT=.cmd
  56. else
  57. SRCBATCHEXT=.bat
  58. endif
  59. endif
  60. ifdef COMSPEC
  61. ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
  62. ifndef RUNBATCH
  63. RUNBATCH=$(COMSPEC) /C
  64. endif
  65. endif
  66. endif
  67. ifdef inUnix
  68. PATHSEP=/
  69. else
  70. PATHSEP:=$(subst /,\,/)
  71. ifdef inCygWin
  72. PATHSEP=/
  73. endif
  74. endif
  75. ifdef PWD
  76. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  77. ifdef inCygWin
  78. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  79. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  80. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  81. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  82. endif
  83. endif
  84. else
  85. BASEDIR=.
  86. endif
  87. ifdef inOS2
  88. ifndef ECHO
  89. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  90. ifeq ($(ECHO),)
  91. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  92. ifeq ($(ECHO),)
  93. ECHO=echo
  94. else
  95. ECHO:=$(firstword $(ECHO))
  96. endif
  97. else
  98. ECHO:=$(firstword $(ECHO))
  99. endif
  100. endif
  101. export ECHO
  102. endif
  103. override DEFAULT_FPCDIR=../..
  104. ifndef FPC
  105. ifdef PP
  106. FPC=$(PP)
  107. endif
  108. endif
  109. ifndef FPC
  110. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  111. ifneq ($(FPCPROG),)
  112. FPCPROG:=$(firstword $(FPCPROG))
  113. ifneq ($(CPU_TARGET),)
  114. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  115. else
  116. FPC:=$(shell $(FPCPROG) -PB)
  117. endif
  118. ifneq ($(findstring Error,$(FPC)),)
  119. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  120. else
  121. ifeq ($(strip $(wildcard $(FPC))),)
  122. FPC:=$(firstword $(FPCPROG))
  123. endif
  124. endif
  125. else
  126. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  127. endif
  128. endif
  129. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  130. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  131. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  132. ifeq ($(FOUNDFPC),)
  133. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  134. ifeq ($(FOUNDFPC),)
  135. $(error Compiler $(FPC) not found)
  136. endif
  137. endif
  138. ifndef FPC_COMPILERINFO
  139. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  140. endif
  141. ifndef FPC_VERSION
  142. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  143. endif
  144. export FPC FPC_VERSION FPC_COMPILERINFO
  145. unexport CHECKDEPEND ALLDEPENDENCIES
  146. ifndef CPU_TARGET
  147. ifdef CPU_TARGET_DEFAULT
  148. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  149. endif
  150. endif
  151. ifndef OS_TARGET
  152. ifdef OS_TARGET_DEFAULT
  153. OS_TARGET=$(OS_TARGET_DEFAULT)
  154. endif
  155. endif
  156. ifneq ($(words $(FPC_COMPILERINFO)),5)
  157. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  158. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  159. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  160. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  161. endif
  162. ifndef CPU_SOURCE
  163. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  164. endif
  165. ifndef CPU_TARGET
  166. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  167. endif
  168. ifndef OS_SOURCE
  169. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  170. endif
  171. ifndef OS_TARGET
  172. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  173. endif
  174. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  175. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  176. ifeq ($(CPU_TARGET),armeb)
  177. ARCH=arm
  178. override FPCOPT+=-Cb
  179. else
  180. ifeq ($(CPU_TARGET),armel)
  181. ARCH=arm
  182. override FPCOPT+=-CaEABI
  183. else
  184. ARCH=$(CPU_TARGET)
  185. endif
  186. endif
  187. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  188. TARGETSUFFIX=$(OS_TARGET)
  189. SOURCESUFFIX=$(OS_SOURCE)
  190. else
  191. ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
  192. TARGETSUFFIX=$(OS_TARGET)
  193. else
  194. TARGETSUFFIX=$(FULL_TARGET)
  195. endif
  196. SOURCESUFFIX=$(FULL_SOURCE)
  197. endif
  198. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  199. CROSSCOMPILE=1
  200. endif
  201. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  202. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  203. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  204. endif
  205. endif
  206. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  207. BSDhier=1
  208. endif
  209. ifeq ($(OS_TARGET),linux)
  210. linuxHier=1
  211. endif
  212. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  213. ifdef FPCDIR
  214. override FPCDIR:=$(subst \,/,$(FPCDIR))
  215. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  216. override FPCDIR=wrong
  217. endif
  218. else
  219. override FPCDIR=wrong
  220. endif
  221. ifdef DEFAULT_FPCDIR
  222. ifeq ($(FPCDIR),wrong)
  223. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  224. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  225. override FPCDIR=wrong
  226. endif
  227. endif
  228. endif
  229. ifeq ($(FPCDIR),wrong)
  230. ifdef inUnix
  231. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  232. ifeq ($(wildcard $(FPCDIR)/units),)
  233. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  234. endif
  235. else
  236. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  237. override FPCDIR:=$(FPCDIR)/..
  238. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  239. override FPCDIR:=$(FPCDIR)/..
  240. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  241. override FPCDIR:=$(BASEDIR)
  242. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  243. override FPCDIR=c:/pp
  244. endif
  245. endif
  246. endif
  247. endif
  248. endif
  249. ifndef CROSSBINDIR
  250. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  251. endif
  252. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  253. ifeq ($(OS_SOURCE),darwin)
  254. DARWIN2DARWIN=1
  255. endif
  256. endif
  257. ifndef BINUTILSPREFIX
  258. ifndef CROSSBINDIR
  259. ifdef CROSSCOMPILE
  260. ifndef DARWIN2DARWIN
  261. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  262. endif
  263. endif
  264. endif
  265. endif
  266. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  267. ifeq ($(UNITSDIR),)
  268. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  269. endif
  270. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  271. ifndef FPCFPMAKE
  272. ifdef CROSSCOMPILE
  273. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  274. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  275. ifneq ($(FPCPROG),)
  276. FPCPROG:=$(firstword $(FPCPROG))
  277. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  278. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  279. FPCFPMAKE:=$(firstword $(FPCPROG))
  280. endif
  281. else
  282. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  283. endif
  284. else
  285. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  286. FPMAKE_SKIP_CONFIG=-n
  287. export FPCFPMAKE
  288. export FPMAKE_SKIP_CONFIG
  289. endif
  290. else
  291. FPMAKE_SKIP_CONFIG=-n
  292. FPCFPMAKE=$(FPC)
  293. endif
  294. endif
  295. override PACKAGE_NAME=gdbint
  296. override PACKAGE_VERSION=2.7.1
  297. ifdef inUnix
  298. CURRDIR=./
  299. else
  300. CURRDIR=
  301. endif
  302. ifdef GDBLIBDIR
  303. override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
  304. endif
  305. ifeq ($(LIBGDBFILE),)
  306. override GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))
  307. ifeq ($(GDBLIBDIR),)
  308. override GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)
  309. endif
  310. override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
  311. endif
  312. ifeq ($(LIBGDBFILE),)
  313. GDBFOUND=0
  314. else
  315. GDBFOUND=1
  316. override LIBGDBINC:=$(firstword $(wildcard $(addsuffix /gdblib.inc,$(GDBLIBDIR))))
  317. ifeq ($(LIBGDBINC),)
  318. GDBLIBINCFOUND=0
  319. GDBLIBINCCOND=
  320. else
  321. GDBLIBINCFOUND=1
  322. GDBLIBINCCOND=-dUSE_GDBLIBINC
  323. endif
  324. ifdef NO_GDBLIBINC
  325. GDBLIBINCFOUND=0
  326. GDBLIBINCCOND=
  327. endif
  328. endif
  329. ifeq ($(FULL_TARGET),i386-linux)
  330. override TARGET_UNITS+=gdbint gdbcon
  331. endif
  332. ifeq ($(FULL_TARGET),i386-go32v2)
  333. override TARGET_UNITS+=gdbint gdbcon
  334. endif
  335. ifeq ($(FULL_TARGET),i386-win32)
  336. override TARGET_UNITS+=gdbint gdbcon
  337. endif
  338. ifeq ($(FULL_TARGET),i386-os2)
  339. override TARGET_UNITS+=gdbint gdbcon
  340. endif
  341. ifeq ($(FULL_TARGET),i386-freebsd)
  342. override TARGET_UNITS+=gdbint gdbcon
  343. endif
  344. ifeq ($(FULL_TARGET),i386-beos)
  345. override TARGET_UNITS+=gdbint gdbcon
  346. endif
  347. ifeq ($(FULL_TARGET),i386-haiku)
  348. override TARGET_UNITS+=gdbint gdbcon
  349. endif
  350. ifeq ($(FULL_TARGET),i386-netbsd)
  351. override TARGET_UNITS+=gdbint gdbcon
  352. endif
  353. ifeq ($(FULL_TARGET),i386-solaris)
  354. override TARGET_UNITS+=gdbint gdbcon
  355. endif
  356. ifeq ($(FULL_TARGET),i386-qnx)
  357. override TARGET_UNITS+=gdbint gdbcon
  358. endif
  359. ifeq ($(FULL_TARGET),i386-netware)
  360. override TARGET_UNITS+=gdbint gdbcon
  361. endif
  362. ifeq ($(FULL_TARGET),i386-openbsd)
  363. override TARGET_UNITS+=gdbint gdbcon
  364. endif
  365. ifeq ($(FULL_TARGET),i386-wdosx)
  366. override TARGET_UNITS+=gdbint gdbcon
  367. endif
  368. ifeq ($(FULL_TARGET),i386-darwin)
  369. override TARGET_UNITS+=gdbint gdbcon
  370. endif
  371. ifeq ($(FULL_TARGET),i386-emx)
  372. override TARGET_UNITS+=gdbint gdbcon
  373. endif
  374. ifeq ($(FULL_TARGET),i386-watcom)
  375. override TARGET_UNITS+=gdbint gdbcon
  376. endif
  377. ifeq ($(FULL_TARGET),i386-netwlibc)
  378. override TARGET_UNITS+=gdbint gdbcon
  379. endif
  380. ifeq ($(FULL_TARGET),i386-wince)
  381. override TARGET_UNITS+=gdbint gdbcon
  382. endif
  383. ifeq ($(FULL_TARGET),i386-embedded)
  384. override TARGET_UNITS+=gdbint gdbcon
  385. endif
  386. ifeq ($(FULL_TARGET),i386-symbian)
  387. override TARGET_UNITS+=gdbint gdbcon
  388. endif
  389. ifeq ($(FULL_TARGET),i386-nativent)
  390. override TARGET_UNITS+=gdbint gdbcon
  391. endif
  392. ifeq ($(FULL_TARGET),i386-iphonesim)
  393. override TARGET_UNITS+=gdbint gdbcon
  394. endif
  395. ifeq ($(FULL_TARGET),m68k-linux)
  396. override TARGET_UNITS+=gdbint gdbcon
  397. endif
  398. ifeq ($(FULL_TARGET),m68k-freebsd)
  399. override TARGET_UNITS+=gdbint gdbcon
  400. endif
  401. ifeq ($(FULL_TARGET),m68k-netbsd)
  402. override TARGET_UNITS+=gdbint gdbcon
  403. endif
  404. ifeq ($(FULL_TARGET),m68k-amiga)
  405. override TARGET_UNITS+=gdbint gdbcon
  406. endif
  407. ifeq ($(FULL_TARGET),m68k-atari)
  408. override TARGET_UNITS+=gdbint gdbcon
  409. endif
  410. ifeq ($(FULL_TARGET),m68k-openbsd)
  411. override TARGET_UNITS+=gdbint gdbcon
  412. endif
  413. ifeq ($(FULL_TARGET),m68k-palmos)
  414. override TARGET_UNITS+=gdbint gdbcon
  415. endif
  416. ifeq ($(FULL_TARGET),m68k-embedded)
  417. override TARGET_UNITS+=gdbint gdbcon
  418. endif
  419. ifeq ($(FULL_TARGET),powerpc-linux)
  420. override TARGET_UNITS+=gdbint gdbcon
  421. endif
  422. ifeq ($(FULL_TARGET),powerpc-netbsd)
  423. override TARGET_UNITS+=gdbint gdbcon
  424. endif
  425. ifeq ($(FULL_TARGET),powerpc-amiga)
  426. override TARGET_UNITS+=gdbint gdbcon
  427. endif
  428. ifeq ($(FULL_TARGET),powerpc-macos)
  429. override TARGET_UNITS+=gdbint gdbcon
  430. endif
  431. ifeq ($(FULL_TARGET),powerpc-darwin)
  432. override TARGET_UNITS+=gdbint gdbcon
  433. endif
  434. ifeq ($(FULL_TARGET),powerpc-morphos)
  435. override TARGET_UNITS+=gdbint gdbcon
  436. endif
  437. ifeq ($(FULL_TARGET),powerpc-embedded)
  438. override TARGET_UNITS+=gdbint gdbcon
  439. endif
  440. ifeq ($(FULL_TARGET),powerpc-wii)
  441. override TARGET_UNITS+=gdbint gdbcon
  442. endif
  443. ifeq ($(FULL_TARGET),sparc-linux)
  444. override TARGET_UNITS+=gdbint gdbcon
  445. endif
  446. ifeq ($(FULL_TARGET),sparc-netbsd)
  447. override TARGET_UNITS+=gdbint gdbcon
  448. endif
  449. ifeq ($(FULL_TARGET),sparc-solaris)
  450. override TARGET_UNITS+=gdbint gdbcon
  451. endif
  452. ifeq ($(FULL_TARGET),sparc-embedded)
  453. override TARGET_UNITS+=gdbint gdbcon
  454. endif
  455. ifeq ($(FULL_TARGET),x86_64-linux)
  456. override TARGET_UNITS+=gdbint gdbcon
  457. endif
  458. ifeq ($(FULL_TARGET),x86_64-freebsd)
  459. override TARGET_UNITS+=gdbint gdbcon
  460. endif
  461. ifeq ($(FULL_TARGET),x86_64-solaris)
  462. override TARGET_UNITS+=gdbint gdbcon
  463. endif
  464. ifeq ($(FULL_TARGET),x86_64-darwin)
  465. override TARGET_UNITS+=gdbint gdbcon
  466. endif
  467. ifeq ($(FULL_TARGET),x86_64-win64)
  468. override TARGET_UNITS+=gdbint gdbcon
  469. endif
  470. ifeq ($(FULL_TARGET),x86_64-embedded)
  471. override TARGET_UNITS+=gdbint gdbcon
  472. endif
  473. ifeq ($(FULL_TARGET),arm-linux)
  474. override TARGET_UNITS+=gdbint gdbcon
  475. endif
  476. ifeq ($(FULL_TARGET),arm-palmos)
  477. override TARGET_UNITS+=gdbint gdbcon
  478. endif
  479. ifeq ($(FULL_TARGET),arm-darwin)
  480. override TARGET_UNITS+=gdbint gdbcon
  481. endif
  482. ifeq ($(FULL_TARGET),arm-wince)
  483. override TARGET_UNITS+=gdbint gdbcon
  484. endif
  485. ifeq ($(FULL_TARGET),arm-gba)
  486. override TARGET_UNITS+=gdbint gdbcon
  487. endif
  488. ifeq ($(FULL_TARGET),arm-nds)
  489. override TARGET_UNITS+=gdbint gdbcon
  490. endif
  491. ifeq ($(FULL_TARGET),arm-embedded)
  492. override TARGET_UNITS+=gdbint gdbcon
  493. endif
  494. ifeq ($(FULL_TARGET),arm-symbian)
  495. override TARGET_UNITS+=gdbint gdbcon
  496. endif
  497. ifeq ($(FULL_TARGET),powerpc64-linux)
  498. override TARGET_UNITS+=gdbint gdbcon
  499. endif
  500. ifeq ($(FULL_TARGET),powerpc64-darwin)
  501. override TARGET_UNITS+=gdbint gdbcon
  502. endif
  503. ifeq ($(FULL_TARGET),powerpc64-embedded)
  504. override TARGET_UNITS+=gdbint gdbcon
  505. endif
  506. ifeq ($(FULL_TARGET),avr-embedded)
  507. override TARGET_UNITS+=gdbint gdbcon
  508. endif
  509. ifeq ($(FULL_TARGET),armeb-linux)
  510. override TARGET_UNITS+=gdbint gdbcon
  511. endif
  512. ifeq ($(FULL_TARGET),armeb-embedded)
  513. override TARGET_UNITS+=gdbint gdbcon
  514. endif
  515. ifeq ($(FULL_TARGET),mipsel-linux)
  516. override TARGET_UNITS+=gdbint gdbcon
  517. endif
  518. ifeq ($(FULL_TARGET),i386-linux)
  519. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  520. endif
  521. ifeq ($(FULL_TARGET),i386-go32v2)
  522. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  523. endif
  524. ifeq ($(FULL_TARGET),i386-win32)
  525. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  526. endif
  527. ifeq ($(FULL_TARGET),i386-os2)
  528. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  529. endif
  530. ifeq ($(FULL_TARGET),i386-freebsd)
  531. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  532. endif
  533. ifeq ($(FULL_TARGET),i386-beos)
  534. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  535. endif
  536. ifeq ($(FULL_TARGET),i386-haiku)
  537. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  538. endif
  539. ifeq ($(FULL_TARGET),i386-netbsd)
  540. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  541. endif
  542. ifeq ($(FULL_TARGET),i386-solaris)
  543. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  544. endif
  545. ifeq ($(FULL_TARGET),i386-qnx)
  546. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  547. endif
  548. ifeq ($(FULL_TARGET),i386-netware)
  549. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  550. endif
  551. ifeq ($(FULL_TARGET),i386-openbsd)
  552. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  553. endif
  554. ifeq ($(FULL_TARGET),i386-wdosx)
  555. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  556. endif
  557. ifeq ($(FULL_TARGET),i386-darwin)
  558. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  559. endif
  560. ifeq ($(FULL_TARGET),i386-emx)
  561. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  562. endif
  563. ifeq ($(FULL_TARGET),i386-watcom)
  564. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  565. endif
  566. ifeq ($(FULL_TARGET),i386-netwlibc)
  567. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  568. endif
  569. ifeq ($(FULL_TARGET),i386-wince)
  570. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  571. endif
  572. ifeq ($(FULL_TARGET),i386-embedded)
  573. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  574. endif
  575. ifeq ($(FULL_TARGET),i386-symbian)
  576. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  577. endif
  578. ifeq ($(FULL_TARGET),i386-nativent)
  579. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  580. endif
  581. ifeq ($(FULL_TARGET),i386-iphonesim)
  582. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  583. endif
  584. ifeq ($(FULL_TARGET),m68k-linux)
  585. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  586. endif
  587. ifeq ($(FULL_TARGET),m68k-freebsd)
  588. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  589. endif
  590. ifeq ($(FULL_TARGET),m68k-netbsd)
  591. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  592. endif
  593. ifeq ($(FULL_TARGET),m68k-amiga)
  594. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  595. endif
  596. ifeq ($(FULL_TARGET),m68k-atari)
  597. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  598. endif
  599. ifeq ($(FULL_TARGET),m68k-openbsd)
  600. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  601. endif
  602. ifeq ($(FULL_TARGET),m68k-palmos)
  603. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  604. endif
  605. ifeq ($(FULL_TARGET),m68k-embedded)
  606. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  607. endif
  608. ifeq ($(FULL_TARGET),powerpc-linux)
  609. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  610. endif
  611. ifeq ($(FULL_TARGET),powerpc-netbsd)
  612. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  613. endif
  614. ifeq ($(FULL_TARGET),powerpc-amiga)
  615. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  616. endif
  617. ifeq ($(FULL_TARGET),powerpc-macos)
  618. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  619. endif
  620. ifeq ($(FULL_TARGET),powerpc-darwin)
  621. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  622. endif
  623. ifeq ($(FULL_TARGET),powerpc-morphos)
  624. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  625. endif
  626. ifeq ($(FULL_TARGET),powerpc-embedded)
  627. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  628. endif
  629. ifeq ($(FULL_TARGET),powerpc-wii)
  630. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  631. endif
  632. ifeq ($(FULL_TARGET),sparc-linux)
  633. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  634. endif
  635. ifeq ($(FULL_TARGET),sparc-netbsd)
  636. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  637. endif
  638. ifeq ($(FULL_TARGET),sparc-solaris)
  639. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  640. endif
  641. ifeq ($(FULL_TARGET),sparc-embedded)
  642. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  643. endif
  644. ifeq ($(FULL_TARGET),x86_64-linux)
  645. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  646. endif
  647. ifeq ($(FULL_TARGET),x86_64-freebsd)
  648. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  649. endif
  650. ifeq ($(FULL_TARGET),x86_64-solaris)
  651. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  652. endif
  653. ifeq ($(FULL_TARGET),x86_64-darwin)
  654. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  655. endif
  656. ifeq ($(FULL_TARGET),x86_64-win64)
  657. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  658. endif
  659. ifeq ($(FULL_TARGET),x86_64-embedded)
  660. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  661. endif
  662. ifeq ($(FULL_TARGET),arm-linux)
  663. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  664. endif
  665. ifeq ($(FULL_TARGET),arm-palmos)
  666. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  667. endif
  668. ifeq ($(FULL_TARGET),arm-darwin)
  669. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  670. endif
  671. ifeq ($(FULL_TARGET),arm-wince)
  672. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  673. endif
  674. ifeq ($(FULL_TARGET),arm-gba)
  675. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  676. endif
  677. ifeq ($(FULL_TARGET),arm-nds)
  678. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  679. endif
  680. ifeq ($(FULL_TARGET),arm-embedded)
  681. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  682. endif
  683. ifeq ($(FULL_TARGET),arm-symbian)
  684. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  685. endif
  686. ifeq ($(FULL_TARGET),powerpc64-linux)
  687. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  688. endif
  689. ifeq ($(FULL_TARGET),powerpc64-darwin)
  690. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  691. endif
  692. ifeq ($(FULL_TARGET),powerpc64-embedded)
  693. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  694. endif
  695. ifeq ($(FULL_TARGET),avr-embedded)
  696. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  697. endif
  698. ifeq ($(FULL_TARGET),armeb-linux)
  699. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  700. endif
  701. ifeq ($(FULL_TARGET),armeb-embedded)
  702. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  703. endif
  704. ifeq ($(FULL_TARGET),mipsel-linux)
  705. override TARGET_EXAMPLES+=examples/testgdb examples/symify
  706. endif
  707. override INSTALL_FPCPACKAGE=y
  708. ifeq ($(FULL_TARGET),i386-linux)
  709. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  710. endif
  711. ifeq ($(FULL_TARGET),i386-go32v2)
  712. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  713. endif
  714. ifeq ($(FULL_TARGET),i386-win32)
  715. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  716. endif
  717. ifeq ($(FULL_TARGET),i386-os2)
  718. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  719. endif
  720. ifeq ($(FULL_TARGET),i386-freebsd)
  721. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  722. endif
  723. ifeq ($(FULL_TARGET),i386-beos)
  724. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  725. endif
  726. ifeq ($(FULL_TARGET),i386-haiku)
  727. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  728. endif
  729. ifeq ($(FULL_TARGET),i386-netbsd)
  730. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  731. endif
  732. ifeq ($(FULL_TARGET),i386-solaris)
  733. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  734. endif
  735. ifeq ($(FULL_TARGET),i386-qnx)
  736. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  737. endif
  738. ifeq ($(FULL_TARGET),i386-netware)
  739. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  740. endif
  741. ifeq ($(FULL_TARGET),i386-openbsd)
  742. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  743. endif
  744. ifeq ($(FULL_TARGET),i386-wdosx)
  745. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  746. endif
  747. ifeq ($(FULL_TARGET),i386-darwin)
  748. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  749. endif
  750. ifeq ($(FULL_TARGET),i386-emx)
  751. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  752. endif
  753. ifeq ($(FULL_TARGET),i386-watcom)
  754. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  755. endif
  756. ifeq ($(FULL_TARGET),i386-netwlibc)
  757. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  758. endif
  759. ifeq ($(FULL_TARGET),i386-wince)
  760. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  761. endif
  762. ifeq ($(FULL_TARGET),i386-embedded)
  763. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  764. endif
  765. ifeq ($(FULL_TARGET),i386-symbian)
  766. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  767. endif
  768. ifeq ($(FULL_TARGET),i386-nativent)
  769. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  770. endif
  771. ifeq ($(FULL_TARGET),i386-iphonesim)
  772. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  773. endif
  774. ifeq ($(FULL_TARGET),m68k-linux)
  775. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  776. endif
  777. ifeq ($(FULL_TARGET),m68k-freebsd)
  778. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  779. endif
  780. ifeq ($(FULL_TARGET),m68k-netbsd)
  781. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  782. endif
  783. ifeq ($(FULL_TARGET),m68k-amiga)
  784. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  785. endif
  786. ifeq ($(FULL_TARGET),m68k-atari)
  787. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  788. endif
  789. ifeq ($(FULL_TARGET),m68k-openbsd)
  790. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  791. endif
  792. ifeq ($(FULL_TARGET),m68k-palmos)
  793. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  794. endif
  795. ifeq ($(FULL_TARGET),m68k-embedded)
  796. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  797. endif
  798. ifeq ($(FULL_TARGET),powerpc-linux)
  799. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  800. endif
  801. ifeq ($(FULL_TARGET),powerpc-netbsd)
  802. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  803. endif
  804. ifeq ($(FULL_TARGET),powerpc-amiga)
  805. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  806. endif
  807. ifeq ($(FULL_TARGET),powerpc-macos)
  808. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  809. endif
  810. ifeq ($(FULL_TARGET),powerpc-darwin)
  811. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  812. endif
  813. ifeq ($(FULL_TARGET),powerpc-morphos)
  814. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  815. endif
  816. ifeq ($(FULL_TARGET),powerpc-embedded)
  817. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  818. endif
  819. ifeq ($(FULL_TARGET),powerpc-wii)
  820. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  821. endif
  822. ifeq ($(FULL_TARGET),sparc-linux)
  823. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  824. endif
  825. ifeq ($(FULL_TARGET),sparc-netbsd)
  826. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  827. endif
  828. ifeq ($(FULL_TARGET),sparc-solaris)
  829. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  830. endif
  831. ifeq ($(FULL_TARGET),sparc-embedded)
  832. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  833. endif
  834. ifeq ($(FULL_TARGET),x86_64-linux)
  835. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  836. endif
  837. ifeq ($(FULL_TARGET),x86_64-freebsd)
  838. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  839. endif
  840. ifeq ($(FULL_TARGET),x86_64-solaris)
  841. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  842. endif
  843. ifeq ($(FULL_TARGET),x86_64-darwin)
  844. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  845. endif
  846. ifeq ($(FULL_TARGET),x86_64-win64)
  847. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  848. endif
  849. ifeq ($(FULL_TARGET),x86_64-embedded)
  850. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  851. endif
  852. ifeq ($(FULL_TARGET),arm-linux)
  853. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  854. endif
  855. ifeq ($(FULL_TARGET),arm-palmos)
  856. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  857. endif
  858. ifeq ($(FULL_TARGET),arm-darwin)
  859. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  860. endif
  861. ifeq ($(FULL_TARGET),arm-wince)
  862. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  863. endif
  864. ifeq ($(FULL_TARGET),arm-gba)
  865. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  866. endif
  867. ifeq ($(FULL_TARGET),arm-nds)
  868. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  869. endif
  870. ifeq ($(FULL_TARGET),arm-embedded)
  871. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  872. endif
  873. ifeq ($(FULL_TARGET),arm-symbian)
  874. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  875. endif
  876. ifeq ($(FULL_TARGET),powerpc64-linux)
  877. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  878. endif
  879. ifeq ($(FULL_TARGET),powerpc64-darwin)
  880. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  881. endif
  882. ifeq ($(FULL_TARGET),powerpc64-embedded)
  883. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  884. endif
  885. ifeq ($(FULL_TARGET),avr-embedded)
  886. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  887. endif
  888. ifeq ($(FULL_TARGET),armeb-linux)
  889. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  890. endif
  891. ifeq ($(FULL_TARGET),armeb-embedded)
  892. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  893. endif
  894. ifeq ($(FULL_TARGET),mipsel-linux)
  895. override COMPILER_INCLUDEDIR+=$(GDBLIBDIR) src
  896. endif
  897. ifeq ($(FULL_TARGET),i386-linux)
  898. override COMPILER_SOURCEDIR+=src tests
  899. endif
  900. ifeq ($(FULL_TARGET),i386-go32v2)
  901. override COMPILER_SOURCEDIR+=src tests
  902. endif
  903. ifeq ($(FULL_TARGET),i386-win32)
  904. override COMPILER_SOURCEDIR+=src tests
  905. endif
  906. ifeq ($(FULL_TARGET),i386-os2)
  907. override COMPILER_SOURCEDIR+=src tests
  908. endif
  909. ifeq ($(FULL_TARGET),i386-freebsd)
  910. override COMPILER_SOURCEDIR+=src tests
  911. endif
  912. ifeq ($(FULL_TARGET),i386-beos)
  913. override COMPILER_SOURCEDIR+=src tests
  914. endif
  915. ifeq ($(FULL_TARGET),i386-haiku)
  916. override COMPILER_SOURCEDIR+=src tests
  917. endif
  918. ifeq ($(FULL_TARGET),i386-netbsd)
  919. override COMPILER_SOURCEDIR+=src tests
  920. endif
  921. ifeq ($(FULL_TARGET),i386-solaris)
  922. override COMPILER_SOURCEDIR+=src tests
  923. endif
  924. ifeq ($(FULL_TARGET),i386-qnx)
  925. override COMPILER_SOURCEDIR+=src tests
  926. endif
  927. ifeq ($(FULL_TARGET),i386-netware)
  928. override COMPILER_SOURCEDIR+=src tests
  929. endif
  930. ifeq ($(FULL_TARGET),i386-openbsd)
  931. override COMPILER_SOURCEDIR+=src tests
  932. endif
  933. ifeq ($(FULL_TARGET),i386-wdosx)
  934. override COMPILER_SOURCEDIR+=src tests
  935. endif
  936. ifeq ($(FULL_TARGET),i386-darwin)
  937. override COMPILER_SOURCEDIR+=src tests
  938. endif
  939. ifeq ($(FULL_TARGET),i386-emx)
  940. override COMPILER_SOURCEDIR+=src tests
  941. endif
  942. ifeq ($(FULL_TARGET),i386-watcom)
  943. override COMPILER_SOURCEDIR+=src tests
  944. endif
  945. ifeq ($(FULL_TARGET),i386-netwlibc)
  946. override COMPILER_SOURCEDIR+=src tests
  947. endif
  948. ifeq ($(FULL_TARGET),i386-wince)
  949. override COMPILER_SOURCEDIR+=src tests
  950. endif
  951. ifeq ($(FULL_TARGET),i386-embedded)
  952. override COMPILER_SOURCEDIR+=src tests
  953. endif
  954. ifeq ($(FULL_TARGET),i386-symbian)
  955. override COMPILER_SOURCEDIR+=src tests
  956. endif
  957. ifeq ($(FULL_TARGET),i386-nativent)
  958. override COMPILER_SOURCEDIR+=src tests
  959. endif
  960. ifeq ($(FULL_TARGET),i386-iphonesim)
  961. override COMPILER_SOURCEDIR+=src tests
  962. endif
  963. ifeq ($(FULL_TARGET),m68k-linux)
  964. override COMPILER_SOURCEDIR+=src tests
  965. endif
  966. ifeq ($(FULL_TARGET),m68k-freebsd)
  967. override COMPILER_SOURCEDIR+=src tests
  968. endif
  969. ifeq ($(FULL_TARGET),m68k-netbsd)
  970. override COMPILER_SOURCEDIR+=src tests
  971. endif
  972. ifeq ($(FULL_TARGET),m68k-amiga)
  973. override COMPILER_SOURCEDIR+=src tests
  974. endif
  975. ifeq ($(FULL_TARGET),m68k-atari)
  976. override COMPILER_SOURCEDIR+=src tests
  977. endif
  978. ifeq ($(FULL_TARGET),m68k-openbsd)
  979. override COMPILER_SOURCEDIR+=src tests
  980. endif
  981. ifeq ($(FULL_TARGET),m68k-palmos)
  982. override COMPILER_SOURCEDIR+=src tests
  983. endif
  984. ifeq ($(FULL_TARGET),m68k-embedded)
  985. override COMPILER_SOURCEDIR+=src tests
  986. endif
  987. ifeq ($(FULL_TARGET),powerpc-linux)
  988. override COMPILER_SOURCEDIR+=src tests
  989. endif
  990. ifeq ($(FULL_TARGET),powerpc-netbsd)
  991. override COMPILER_SOURCEDIR+=src tests
  992. endif
  993. ifeq ($(FULL_TARGET),powerpc-amiga)
  994. override COMPILER_SOURCEDIR+=src tests
  995. endif
  996. ifeq ($(FULL_TARGET),powerpc-macos)
  997. override COMPILER_SOURCEDIR+=src tests
  998. endif
  999. ifeq ($(FULL_TARGET),powerpc-darwin)
  1000. override COMPILER_SOURCEDIR+=src tests
  1001. endif
  1002. ifeq ($(FULL_TARGET),powerpc-morphos)
  1003. override COMPILER_SOURCEDIR+=src tests
  1004. endif
  1005. ifeq ($(FULL_TARGET),powerpc-embedded)
  1006. override COMPILER_SOURCEDIR+=src tests
  1007. endif
  1008. ifeq ($(FULL_TARGET),powerpc-wii)
  1009. override COMPILER_SOURCEDIR+=src tests
  1010. endif
  1011. ifeq ($(FULL_TARGET),sparc-linux)
  1012. override COMPILER_SOURCEDIR+=src tests
  1013. endif
  1014. ifeq ($(FULL_TARGET),sparc-netbsd)
  1015. override COMPILER_SOURCEDIR+=src tests
  1016. endif
  1017. ifeq ($(FULL_TARGET),sparc-solaris)
  1018. override COMPILER_SOURCEDIR+=src tests
  1019. endif
  1020. ifeq ($(FULL_TARGET),sparc-embedded)
  1021. override COMPILER_SOURCEDIR+=src tests
  1022. endif
  1023. ifeq ($(FULL_TARGET),x86_64-linux)
  1024. override COMPILER_SOURCEDIR+=src tests
  1025. endif
  1026. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1027. override COMPILER_SOURCEDIR+=src tests
  1028. endif
  1029. ifeq ($(FULL_TARGET),x86_64-solaris)
  1030. override COMPILER_SOURCEDIR+=src tests
  1031. endif
  1032. ifeq ($(FULL_TARGET),x86_64-darwin)
  1033. override COMPILER_SOURCEDIR+=src tests
  1034. endif
  1035. ifeq ($(FULL_TARGET),x86_64-win64)
  1036. override COMPILER_SOURCEDIR+=src tests
  1037. endif
  1038. ifeq ($(FULL_TARGET),x86_64-embedded)
  1039. override COMPILER_SOURCEDIR+=src tests
  1040. endif
  1041. ifeq ($(FULL_TARGET),arm-linux)
  1042. override COMPILER_SOURCEDIR+=src tests
  1043. endif
  1044. ifeq ($(FULL_TARGET),arm-palmos)
  1045. override COMPILER_SOURCEDIR+=src tests
  1046. endif
  1047. ifeq ($(FULL_TARGET),arm-darwin)
  1048. override COMPILER_SOURCEDIR+=src tests
  1049. endif
  1050. ifeq ($(FULL_TARGET),arm-wince)
  1051. override COMPILER_SOURCEDIR+=src tests
  1052. endif
  1053. ifeq ($(FULL_TARGET),arm-gba)
  1054. override COMPILER_SOURCEDIR+=src tests
  1055. endif
  1056. ifeq ($(FULL_TARGET),arm-nds)
  1057. override COMPILER_SOURCEDIR+=src tests
  1058. endif
  1059. ifeq ($(FULL_TARGET),arm-embedded)
  1060. override COMPILER_SOURCEDIR+=src tests
  1061. endif
  1062. ifeq ($(FULL_TARGET),arm-symbian)
  1063. override COMPILER_SOURCEDIR+=src tests
  1064. endif
  1065. ifeq ($(FULL_TARGET),powerpc64-linux)
  1066. override COMPILER_SOURCEDIR+=src tests
  1067. endif
  1068. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1069. override COMPILER_SOURCEDIR+=src tests
  1070. endif
  1071. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1072. override COMPILER_SOURCEDIR+=src tests
  1073. endif
  1074. ifeq ($(FULL_TARGET),avr-embedded)
  1075. override COMPILER_SOURCEDIR+=src tests
  1076. endif
  1077. ifeq ($(FULL_TARGET),armeb-linux)
  1078. override COMPILER_SOURCEDIR+=src tests
  1079. endif
  1080. ifeq ($(FULL_TARGET),armeb-embedded)
  1081. override COMPILER_SOURCEDIR+=src tests
  1082. endif
  1083. ifeq ($(FULL_TARGET),mipsel-linux)
  1084. override COMPILER_SOURCEDIR+=src tests
  1085. endif
  1086. ifeq ($(FULL_TARGET),i386-linux)
  1087. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1088. endif
  1089. ifeq ($(FULL_TARGET),i386-go32v2)
  1090. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1091. endif
  1092. ifeq ($(FULL_TARGET),i386-win32)
  1093. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1094. endif
  1095. ifeq ($(FULL_TARGET),i386-os2)
  1096. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1097. endif
  1098. ifeq ($(FULL_TARGET),i386-freebsd)
  1099. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1100. endif
  1101. ifeq ($(FULL_TARGET),i386-beos)
  1102. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1103. endif
  1104. ifeq ($(FULL_TARGET),i386-haiku)
  1105. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1106. endif
  1107. ifeq ($(FULL_TARGET),i386-netbsd)
  1108. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1109. endif
  1110. ifeq ($(FULL_TARGET),i386-solaris)
  1111. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1112. endif
  1113. ifeq ($(FULL_TARGET),i386-qnx)
  1114. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1115. endif
  1116. ifeq ($(FULL_TARGET),i386-netware)
  1117. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1118. endif
  1119. ifeq ($(FULL_TARGET),i386-openbsd)
  1120. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1121. endif
  1122. ifeq ($(FULL_TARGET),i386-wdosx)
  1123. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1124. endif
  1125. ifeq ($(FULL_TARGET),i386-darwin)
  1126. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1127. endif
  1128. ifeq ($(FULL_TARGET),i386-emx)
  1129. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1130. endif
  1131. ifeq ($(FULL_TARGET),i386-watcom)
  1132. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1133. endif
  1134. ifeq ($(FULL_TARGET),i386-netwlibc)
  1135. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1136. endif
  1137. ifeq ($(FULL_TARGET),i386-wince)
  1138. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1139. endif
  1140. ifeq ($(FULL_TARGET),i386-embedded)
  1141. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1142. endif
  1143. ifeq ($(FULL_TARGET),i386-symbian)
  1144. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1145. endif
  1146. ifeq ($(FULL_TARGET),i386-nativent)
  1147. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1148. endif
  1149. ifeq ($(FULL_TARGET),i386-iphonesim)
  1150. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1151. endif
  1152. ifeq ($(FULL_TARGET),m68k-linux)
  1153. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1154. endif
  1155. ifeq ($(FULL_TARGET),m68k-freebsd)
  1156. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1157. endif
  1158. ifeq ($(FULL_TARGET),m68k-netbsd)
  1159. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1160. endif
  1161. ifeq ($(FULL_TARGET),m68k-amiga)
  1162. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1163. endif
  1164. ifeq ($(FULL_TARGET),m68k-atari)
  1165. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1166. endif
  1167. ifeq ($(FULL_TARGET),m68k-openbsd)
  1168. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1169. endif
  1170. ifeq ($(FULL_TARGET),m68k-palmos)
  1171. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1172. endif
  1173. ifeq ($(FULL_TARGET),m68k-embedded)
  1174. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1175. endif
  1176. ifeq ($(FULL_TARGET),powerpc-linux)
  1177. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1178. endif
  1179. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1180. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1181. endif
  1182. ifeq ($(FULL_TARGET),powerpc-amiga)
  1183. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1184. endif
  1185. ifeq ($(FULL_TARGET),powerpc-macos)
  1186. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1187. endif
  1188. ifeq ($(FULL_TARGET),powerpc-darwin)
  1189. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1190. endif
  1191. ifeq ($(FULL_TARGET),powerpc-morphos)
  1192. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1193. endif
  1194. ifeq ($(FULL_TARGET),powerpc-embedded)
  1195. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1196. endif
  1197. ifeq ($(FULL_TARGET),powerpc-wii)
  1198. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1199. endif
  1200. ifeq ($(FULL_TARGET),sparc-linux)
  1201. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1202. endif
  1203. ifeq ($(FULL_TARGET),sparc-netbsd)
  1204. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1205. endif
  1206. ifeq ($(FULL_TARGET),sparc-solaris)
  1207. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1208. endif
  1209. ifeq ($(FULL_TARGET),sparc-embedded)
  1210. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1211. endif
  1212. ifeq ($(FULL_TARGET),x86_64-linux)
  1213. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1214. endif
  1215. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1216. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1217. endif
  1218. ifeq ($(FULL_TARGET),x86_64-solaris)
  1219. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1220. endif
  1221. ifeq ($(FULL_TARGET),x86_64-darwin)
  1222. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1223. endif
  1224. ifeq ($(FULL_TARGET),x86_64-win64)
  1225. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1226. endif
  1227. ifeq ($(FULL_TARGET),x86_64-embedded)
  1228. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1229. endif
  1230. ifeq ($(FULL_TARGET),arm-linux)
  1231. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1232. endif
  1233. ifeq ($(FULL_TARGET),arm-palmos)
  1234. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1235. endif
  1236. ifeq ($(FULL_TARGET),arm-darwin)
  1237. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1238. endif
  1239. ifeq ($(FULL_TARGET),arm-wince)
  1240. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1241. endif
  1242. ifeq ($(FULL_TARGET),arm-gba)
  1243. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1244. endif
  1245. ifeq ($(FULL_TARGET),arm-nds)
  1246. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1247. endif
  1248. ifeq ($(FULL_TARGET),arm-embedded)
  1249. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1250. endif
  1251. ifeq ($(FULL_TARGET),arm-symbian)
  1252. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1253. endif
  1254. ifeq ($(FULL_TARGET),powerpc64-linux)
  1255. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1256. endif
  1257. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1258. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1259. endif
  1260. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1261. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1262. endif
  1263. ifeq ($(FULL_TARGET),avr-embedded)
  1264. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1265. endif
  1266. ifeq ($(FULL_TARGET),armeb-linux)
  1267. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1268. endif
  1269. ifeq ($(FULL_TARGET),armeb-embedded)
  1270. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1271. endif
  1272. ifeq ($(FULL_TARGET),mipsel-linux)
  1273. override COMPILER_OBJECTDIR+=$(GDBLIBDIR)
  1274. endif
  1275. ifeq ($(FULL_TARGET),i386-linux)
  1276. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1277. endif
  1278. ifeq ($(FULL_TARGET),i386-go32v2)
  1279. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1280. endif
  1281. ifeq ($(FULL_TARGET),i386-win32)
  1282. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1283. endif
  1284. ifeq ($(FULL_TARGET),i386-os2)
  1285. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1286. endif
  1287. ifeq ($(FULL_TARGET),i386-freebsd)
  1288. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1289. endif
  1290. ifeq ($(FULL_TARGET),i386-beos)
  1291. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1292. endif
  1293. ifeq ($(FULL_TARGET),i386-haiku)
  1294. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1295. endif
  1296. ifeq ($(FULL_TARGET),i386-netbsd)
  1297. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1298. endif
  1299. ifeq ($(FULL_TARGET),i386-solaris)
  1300. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1301. endif
  1302. ifeq ($(FULL_TARGET),i386-qnx)
  1303. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1304. endif
  1305. ifeq ($(FULL_TARGET),i386-netware)
  1306. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1307. endif
  1308. ifeq ($(FULL_TARGET),i386-openbsd)
  1309. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1310. endif
  1311. ifeq ($(FULL_TARGET),i386-wdosx)
  1312. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1313. endif
  1314. ifeq ($(FULL_TARGET),i386-darwin)
  1315. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1316. endif
  1317. ifeq ($(FULL_TARGET),i386-emx)
  1318. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1319. endif
  1320. ifeq ($(FULL_TARGET),i386-watcom)
  1321. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1322. endif
  1323. ifeq ($(FULL_TARGET),i386-netwlibc)
  1324. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1325. endif
  1326. ifeq ($(FULL_TARGET),i386-wince)
  1327. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1328. endif
  1329. ifeq ($(FULL_TARGET),i386-embedded)
  1330. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1331. endif
  1332. ifeq ($(FULL_TARGET),i386-symbian)
  1333. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1334. endif
  1335. ifeq ($(FULL_TARGET),i386-nativent)
  1336. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1337. endif
  1338. ifeq ($(FULL_TARGET),i386-iphonesim)
  1339. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1340. endif
  1341. ifeq ($(FULL_TARGET),m68k-linux)
  1342. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1343. endif
  1344. ifeq ($(FULL_TARGET),m68k-freebsd)
  1345. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1346. endif
  1347. ifeq ($(FULL_TARGET),m68k-netbsd)
  1348. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1349. endif
  1350. ifeq ($(FULL_TARGET),m68k-amiga)
  1351. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1352. endif
  1353. ifeq ($(FULL_TARGET),m68k-atari)
  1354. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1355. endif
  1356. ifeq ($(FULL_TARGET),m68k-openbsd)
  1357. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1358. endif
  1359. ifeq ($(FULL_TARGET),m68k-palmos)
  1360. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1361. endif
  1362. ifeq ($(FULL_TARGET),m68k-embedded)
  1363. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1364. endif
  1365. ifeq ($(FULL_TARGET),powerpc-linux)
  1366. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1367. endif
  1368. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1369. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1370. endif
  1371. ifeq ($(FULL_TARGET),powerpc-amiga)
  1372. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1373. endif
  1374. ifeq ($(FULL_TARGET),powerpc-macos)
  1375. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1376. endif
  1377. ifeq ($(FULL_TARGET),powerpc-darwin)
  1378. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1379. endif
  1380. ifeq ($(FULL_TARGET),powerpc-morphos)
  1381. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1382. endif
  1383. ifeq ($(FULL_TARGET),powerpc-embedded)
  1384. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1385. endif
  1386. ifeq ($(FULL_TARGET),powerpc-wii)
  1387. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1388. endif
  1389. ifeq ($(FULL_TARGET),sparc-linux)
  1390. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1391. endif
  1392. ifeq ($(FULL_TARGET),sparc-netbsd)
  1393. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1394. endif
  1395. ifeq ($(FULL_TARGET),sparc-solaris)
  1396. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1397. endif
  1398. ifeq ($(FULL_TARGET),sparc-embedded)
  1399. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1400. endif
  1401. ifeq ($(FULL_TARGET),x86_64-linux)
  1402. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1403. endif
  1404. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1405. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1406. endif
  1407. ifeq ($(FULL_TARGET),x86_64-solaris)
  1408. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1409. endif
  1410. ifeq ($(FULL_TARGET),x86_64-darwin)
  1411. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1412. endif
  1413. ifeq ($(FULL_TARGET),x86_64-win64)
  1414. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1415. endif
  1416. ifeq ($(FULL_TARGET),x86_64-embedded)
  1417. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1418. endif
  1419. ifeq ($(FULL_TARGET),arm-linux)
  1420. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1421. endif
  1422. ifeq ($(FULL_TARGET),arm-palmos)
  1423. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1424. endif
  1425. ifeq ($(FULL_TARGET),arm-darwin)
  1426. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1427. endif
  1428. ifeq ($(FULL_TARGET),arm-wince)
  1429. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1430. endif
  1431. ifeq ($(FULL_TARGET),arm-gba)
  1432. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1433. endif
  1434. ifeq ($(FULL_TARGET),arm-nds)
  1435. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1436. endif
  1437. ifeq ($(FULL_TARGET),arm-embedded)
  1438. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1439. endif
  1440. ifeq ($(FULL_TARGET),arm-symbian)
  1441. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1442. endif
  1443. ifeq ($(FULL_TARGET),powerpc64-linux)
  1444. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1445. endif
  1446. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1447. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1448. endif
  1449. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1450. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1451. endif
  1452. ifeq ($(FULL_TARGET),avr-embedded)
  1453. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1454. endif
  1455. ifeq ($(FULL_TARGET),armeb-linux)
  1456. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1457. endif
  1458. ifeq ($(FULL_TARGET),armeb-embedded)
  1459. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1460. endif
  1461. ifeq ($(FULL_TARGET),mipsel-linux)
  1462. override COMPILER_LIBRARYDIR+=$(GDBLIBDIR)
  1463. endif
  1464. ifdef REQUIRE_UNITSDIR
  1465. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  1466. endif
  1467. ifdef REQUIRE_PACKAGESDIR
  1468. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  1469. endif
  1470. ifdef ZIPINSTALL
  1471. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  1472. UNIXHier=1
  1473. endif
  1474. else
  1475. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  1476. UNIXHier=1
  1477. endif
  1478. endif
  1479. ifndef INSTALL_PREFIX
  1480. ifdef PREFIX
  1481. INSTALL_PREFIX=$(PREFIX)
  1482. endif
  1483. endif
  1484. ifndef INSTALL_PREFIX
  1485. ifdef UNIXHier
  1486. INSTALL_PREFIX=/usr/local
  1487. else
  1488. ifdef INSTALL_FPCPACKAGE
  1489. INSTALL_BASEDIR:=/pp
  1490. else
  1491. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  1492. endif
  1493. endif
  1494. endif
  1495. export INSTALL_PREFIX
  1496. ifdef INSTALL_FPCSUBDIR
  1497. export INSTALL_FPCSUBDIR
  1498. endif
  1499. ifndef DIST_DESTDIR
  1500. DIST_DESTDIR:=$(BASEDIR)
  1501. endif
  1502. export DIST_DESTDIR
  1503. ifndef COMPILER_UNITTARGETDIR
  1504. ifdef PACKAGEDIR_MAIN
  1505. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  1506. else
  1507. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  1508. endif
  1509. endif
  1510. ifndef COMPILER_TARGETDIR
  1511. COMPILER_TARGETDIR=.
  1512. endif
  1513. ifndef INSTALL_BASEDIR
  1514. ifdef UNIXHier
  1515. ifdef INSTALL_FPCPACKAGE
  1516. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  1517. else
  1518. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  1519. endif
  1520. else
  1521. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  1522. endif
  1523. endif
  1524. ifndef INSTALL_BINDIR
  1525. ifdef UNIXHier
  1526. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  1527. else
  1528. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  1529. ifdef INSTALL_FPCPACKAGE
  1530. ifdef CROSSCOMPILE
  1531. ifdef CROSSINSTALL
  1532. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  1533. else
  1534. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1535. endif
  1536. else
  1537. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1538. endif
  1539. endif
  1540. endif
  1541. endif
  1542. ifndef INSTALL_UNITDIR
  1543. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  1544. ifdef INSTALL_FPCPACKAGE
  1545. ifdef PACKAGE_NAME
  1546. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  1547. endif
  1548. endif
  1549. endif
  1550. ifndef INSTALL_LIBDIR
  1551. ifdef UNIXHier
  1552. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  1553. else
  1554. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  1555. endif
  1556. endif
  1557. ifndef INSTALL_SOURCEDIR
  1558. ifdef UNIXHier
  1559. ifdef BSDhier
  1560. SRCPREFIXDIR=share/src
  1561. else
  1562. ifdef linuxHier
  1563. SRCPREFIXDIR=share/src
  1564. else
  1565. SRCPREFIXDIR=src
  1566. endif
  1567. endif
  1568. ifdef INSTALL_FPCPACKAGE
  1569. ifdef INSTALL_FPCSUBDIR
  1570. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1571. else
  1572. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1573. endif
  1574. else
  1575. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1576. endif
  1577. else
  1578. ifdef INSTALL_FPCPACKAGE
  1579. ifdef INSTALL_FPCSUBDIR
  1580. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1581. else
  1582. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  1583. endif
  1584. else
  1585. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  1586. endif
  1587. endif
  1588. endif
  1589. ifndef INSTALL_DOCDIR
  1590. ifdef UNIXHier
  1591. ifdef BSDhier
  1592. DOCPREFIXDIR=share/doc
  1593. else
  1594. ifdef linuxHier
  1595. DOCPREFIXDIR=share/doc
  1596. else
  1597. DOCPREFIXDIR=doc
  1598. endif
  1599. endif
  1600. ifdef INSTALL_FPCPACKAGE
  1601. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1602. else
  1603. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1604. endif
  1605. else
  1606. ifdef INSTALL_FPCPACKAGE
  1607. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  1608. else
  1609. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  1610. endif
  1611. endif
  1612. endif
  1613. ifndef INSTALL_EXAMPLEDIR
  1614. ifdef UNIXHier
  1615. ifdef INSTALL_FPCPACKAGE
  1616. ifdef BSDhier
  1617. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1618. else
  1619. ifdef linuxHier
  1620. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  1621. else
  1622. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  1623. endif
  1624. endif
  1625. else
  1626. ifdef BSDhier
  1627. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1628. else
  1629. ifdef linuxHier
  1630. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1631. else
  1632. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1633. endif
  1634. endif
  1635. endif
  1636. else
  1637. ifdef INSTALL_FPCPACKAGE
  1638. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  1639. else
  1640. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  1641. endif
  1642. endif
  1643. endif
  1644. ifndef INSTALL_DATADIR
  1645. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  1646. endif
  1647. ifndef INSTALL_SHAREDDIR
  1648. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  1649. endif
  1650. ifdef CROSSCOMPILE
  1651. ifndef CROSSBINDIR
  1652. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  1653. ifeq ($(CROSSBINDIR),)
  1654. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  1655. endif
  1656. endif
  1657. else
  1658. CROSSBINDIR=
  1659. endif
  1660. ifeq ($(OS_SOURCE),linux)
  1661. ifndef GCCLIBDIR
  1662. ifeq ($(CPU_TARGET),i386)
  1663. ifneq ($(findstring x86_64,$(shell uname -a)),)
  1664. ifeq ($(BINUTILSPREFIX),)
  1665. GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
  1666. endif
  1667. endif
  1668. endif
  1669. ifeq ($(CPU_TARGET),powerpc64)
  1670. ifeq ($(BINUTILSPREFIX),)
  1671. GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
  1672. endif
  1673. endif
  1674. endif
  1675. ifndef GCCLIBDIR
  1676. CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
  1677. ifneq ($(CROSSGCC),)
  1678. GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
  1679. endif
  1680. endif
  1681. ifndef OTHERLIBDIR
  1682. OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
  1683. endif
  1684. endif
  1685. ifdef inUnix
  1686. ifeq ($(OS_SOURCE),netbsd)
  1687. OTHERLIBDIR+=/usr/pkg/lib
  1688. endif
  1689. export GCCLIBDIR OTHERLIB
  1690. endif
  1691. BATCHEXT=.bat
  1692. LOADEREXT=.as
  1693. EXEEXT=.exe
  1694. PPLEXT=.ppl
  1695. PPUEXT=.ppu
  1696. OEXT=.o
  1697. ASMEXT=.s
  1698. SMARTEXT=.sl
  1699. STATICLIBEXT=.a
  1700. SHAREDLIBEXT=.so
  1701. SHAREDLIBPREFIX=libfp
  1702. STATICLIBPREFIX=libp
  1703. IMPORTLIBPREFIX=libimp
  1704. RSTEXT=.rst
  1705. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  1706. ifeq ($(OS_TARGET),go32v1)
  1707. STATICLIBPREFIX=
  1708. SHORTSUFFIX=v1
  1709. endif
  1710. ifeq ($(OS_TARGET),go32v2)
  1711. STATICLIBPREFIX=
  1712. SHORTSUFFIX=dos
  1713. IMPORTLIBPREFIX=
  1714. endif
  1715. ifeq ($(OS_TARGET),watcom)
  1716. STATICLIBPREFIX=
  1717. OEXT=.obj
  1718. ASMEXT=.asm
  1719. SHAREDLIBEXT=.dll
  1720. SHORTSUFFIX=wat
  1721. IMPORTLIBPREFIX=
  1722. endif
  1723. ifeq ($(OS_TARGET),linux)
  1724. BATCHEXT=.sh
  1725. EXEEXT=
  1726. HASSHAREDLIB=1
  1727. SHORTSUFFIX=lnx
  1728. endif
  1729. ifeq ($(OS_TARGET),freebsd)
  1730. BATCHEXT=.sh
  1731. EXEEXT=
  1732. HASSHAREDLIB=1
  1733. SHORTSUFFIX=fbs
  1734. endif
  1735. ifeq ($(OS_TARGET),netbsd)
  1736. BATCHEXT=.sh
  1737. EXEEXT=
  1738. HASSHAREDLIB=1
  1739. SHORTSUFFIX=nbs
  1740. endif
  1741. ifeq ($(OS_TARGET),openbsd)
  1742. BATCHEXT=.sh
  1743. EXEEXT=
  1744. HASSHAREDLIB=1
  1745. SHORTSUFFIX=obs
  1746. endif
  1747. ifeq ($(OS_TARGET),win32)
  1748. SHAREDLIBEXT=.dll
  1749. SHORTSUFFIX=w32
  1750. endif
  1751. ifeq ($(OS_TARGET),os2)
  1752. BATCHEXT=.cmd
  1753. AOUTEXT=.out
  1754. STATICLIBPREFIX=
  1755. SHAREDLIBEXT=.dll
  1756. SHORTSUFFIX=os2
  1757. ECHO=echo
  1758. IMPORTLIBPREFIX=
  1759. endif
  1760. ifeq ($(OS_TARGET),emx)
  1761. BATCHEXT=.cmd
  1762. AOUTEXT=.out
  1763. STATICLIBPREFIX=
  1764. SHAREDLIBEXT=.dll
  1765. SHORTSUFFIX=emx
  1766. ECHO=echo
  1767. IMPORTLIBPREFIX=
  1768. endif
  1769. ifeq ($(OS_TARGET),amiga)
  1770. EXEEXT=
  1771. SHAREDLIBEXT=.library
  1772. SHORTSUFFIX=amg
  1773. endif
  1774. ifeq ($(OS_TARGET),morphos)
  1775. EXEEXT=
  1776. SHAREDLIBEXT=.library
  1777. SHORTSUFFIX=mos
  1778. endif
  1779. ifeq ($(OS_TARGET),atari)
  1780. EXEEXT=.ttp
  1781. SHORTSUFFIX=ata
  1782. endif
  1783. ifeq ($(OS_TARGET),beos)
  1784. BATCHEXT=.sh
  1785. EXEEXT=
  1786. SHORTSUFFIX=be
  1787. endif
  1788. ifeq ($(OS_TARGET),haiku)
  1789. BATCHEXT=.sh
  1790. EXEEXT=
  1791. SHORTSUFFIX=hai
  1792. endif
  1793. ifeq ($(OS_TARGET),solaris)
  1794. BATCHEXT=.sh
  1795. EXEEXT=
  1796. SHORTSUFFIX=sun
  1797. endif
  1798. ifeq ($(OS_TARGET),qnx)
  1799. BATCHEXT=.sh
  1800. EXEEXT=
  1801. SHORTSUFFIX=qnx
  1802. endif
  1803. ifeq ($(OS_TARGET),netware)
  1804. EXEEXT=.nlm
  1805. STATICLIBPREFIX=
  1806. SHORTSUFFIX=nw
  1807. IMPORTLIBPREFIX=imp
  1808. endif
  1809. ifeq ($(OS_TARGET),netwlibc)
  1810. EXEEXT=.nlm
  1811. STATICLIBPREFIX=
  1812. SHORTSUFFIX=nwl
  1813. IMPORTLIBPREFIX=imp
  1814. endif
  1815. ifeq ($(OS_TARGET),macos)
  1816. BATCHEXT=
  1817. EXEEXT=
  1818. DEBUGSYMEXT=.xcoff
  1819. SHORTSUFFIX=mac
  1820. IMPORTLIBPREFIX=imp
  1821. endif
  1822. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  1823. BATCHEXT=.sh
  1824. EXEEXT=
  1825. HASSHAREDLIB=1
  1826. SHORTSUFFIX=dwn
  1827. endif
  1828. ifeq ($(OS_TARGET),gba)
  1829. EXEEXT=.gba
  1830. SHAREDLIBEXT=.so
  1831. SHORTSUFFIX=gba
  1832. endif
  1833. ifeq ($(OS_TARGET),symbian)
  1834. SHAREDLIBEXT=.dll
  1835. SHORTSUFFIX=symbian
  1836. endif
  1837. ifeq ($(OS_TARGET),NativeNT)
  1838. SHAREDLIBEXT=.dll
  1839. SHORTSUFFIX=nativent
  1840. endif
  1841. ifeq ($(OS_TARGET),wii)
  1842. EXEEXT=.dol
  1843. SHAREDLIBEXT=.so
  1844. SHORTSUFFIX=wii
  1845. endif
  1846. else
  1847. ifeq ($(OS_TARGET),go32v1)
  1848. PPUEXT=.pp1
  1849. OEXT=.o1
  1850. ASMEXT=.s1
  1851. SMARTEXT=.sl1
  1852. STATICLIBEXT=.a1
  1853. SHAREDLIBEXT=.so1
  1854. STATICLIBPREFIX=
  1855. SHORTSUFFIX=v1
  1856. IMPORTLIBPREFIX=
  1857. endif
  1858. ifeq ($(OS_TARGET),go32v2)
  1859. STATICLIBPREFIX=
  1860. SHORTSUFFIX=dos
  1861. IMPORTLIBPREFIX=
  1862. endif
  1863. ifeq ($(OS_TARGET),watcom)
  1864. STATICLIBPREFIX=
  1865. SHORTSUFFIX=wat
  1866. IMPORTLIBPREFIX=
  1867. endif
  1868. ifeq ($(OS_TARGET),linux)
  1869. BATCHEXT=.sh
  1870. EXEEXT=
  1871. HASSHAREDLIB=1
  1872. SHORTSUFFIX=lnx
  1873. endif
  1874. ifeq ($(OS_TARGET),freebsd)
  1875. BATCHEXT=.sh
  1876. EXEEXT=
  1877. HASSHAREDLIB=1
  1878. SHORTSUFFIX=fbs
  1879. endif
  1880. ifeq ($(OS_TARGET),netbsd)
  1881. BATCHEXT=.sh
  1882. EXEEXT=
  1883. HASSHAREDLIB=1
  1884. SHORTSUFFIX=nbs
  1885. endif
  1886. ifeq ($(OS_TARGET),openbsd)
  1887. BATCHEXT=.sh
  1888. EXEEXT=
  1889. HASSHAREDLIB=1
  1890. SHORTSUFFIX=obs
  1891. endif
  1892. ifeq ($(OS_TARGET),win32)
  1893. PPUEXT=.ppw
  1894. OEXT=.ow
  1895. ASMEXT=.sw
  1896. SMARTEXT=.slw
  1897. STATICLIBEXT=.aw
  1898. SHAREDLIBEXT=.dll
  1899. SHORTSUFFIX=w32
  1900. endif
  1901. ifeq ($(OS_TARGET),os2)
  1902. BATCHEXT=.cmd
  1903. PPUEXT=.ppo
  1904. ASMEXT=.so2
  1905. OEXT=.oo2
  1906. AOUTEXT=.out
  1907. SMARTEXT=.sl2
  1908. STATICLIBPREFIX=
  1909. STATICLIBEXT=.ao2
  1910. SHAREDLIBEXT=.dll
  1911. SHORTSUFFIX=os2
  1912. ECHO=echo
  1913. IMPORTLIBPREFIX=
  1914. endif
  1915. ifeq ($(OS_TARGET),amiga)
  1916. EXEEXT=
  1917. PPUEXT=.ppu
  1918. ASMEXT=.s
  1919. OEXT=.o
  1920. SMARTEXT=.sl
  1921. STATICLIBEXT=.a
  1922. SHAREDLIBEXT=.library
  1923. SHORTSUFFIX=amg
  1924. endif
  1925. ifeq ($(OS_TARGET),atari)
  1926. PPUEXT=.ppu
  1927. ASMEXT=.s
  1928. OEXT=.o
  1929. SMARTEXT=.sl
  1930. STATICLIBEXT=.a
  1931. EXEEXT=.ttp
  1932. SHORTSUFFIX=ata
  1933. endif
  1934. ifeq ($(OS_TARGET),beos)
  1935. BATCHEXT=.sh
  1936. PPUEXT=.ppu
  1937. ASMEXT=.s
  1938. OEXT=.o
  1939. SMARTEXT=.sl
  1940. STATICLIBEXT=.a
  1941. EXEEXT=
  1942. SHORTSUFFIX=be
  1943. endif
  1944. ifeq ($(OS_TARGET),solaris)
  1945. BATCHEXT=.sh
  1946. PPUEXT=.ppu
  1947. ASMEXT=.s
  1948. OEXT=.o
  1949. SMARTEXT=.sl
  1950. STATICLIBEXT=.a
  1951. EXEEXT=
  1952. SHORTSUFFIX=sun
  1953. endif
  1954. ifeq ($(OS_TARGET),qnx)
  1955. BATCHEXT=.sh
  1956. PPUEXT=.ppu
  1957. ASMEXT=.s
  1958. OEXT=.o
  1959. SMARTEXT=.sl
  1960. STATICLIBEXT=.a
  1961. EXEEXT=
  1962. SHORTSUFFIX=qnx
  1963. endif
  1964. ifeq ($(OS_TARGET),netware)
  1965. STATICLIBPREFIX=
  1966. PPUEXT=.ppu
  1967. OEXT=.o
  1968. ASMEXT=.s
  1969. SMARTEXT=.sl
  1970. STATICLIBEXT=.a
  1971. SHAREDLIBEXT=.nlm
  1972. EXEEXT=.nlm
  1973. SHORTSUFFIX=nw
  1974. IMPORTLIBPREFIX=imp
  1975. endif
  1976. ifeq ($(OS_TARGET),netwlibc)
  1977. STATICLIBPREFIX=
  1978. PPUEXT=.ppu
  1979. OEXT=.o
  1980. ASMEXT=.s
  1981. SMARTEXT=.sl
  1982. STATICLIBEXT=.a
  1983. SHAREDLIBEXT=.nlm
  1984. EXEEXT=.nlm
  1985. SHORTSUFFIX=nwl
  1986. IMPORTLIBPREFIX=imp
  1987. endif
  1988. ifeq ($(OS_TARGET),macos)
  1989. BATCHEXT=
  1990. PPUEXT=.ppu
  1991. ASMEXT=.s
  1992. OEXT=.o
  1993. SMARTEXT=.sl
  1994. STATICLIBEXT=.a
  1995. EXEEXT=
  1996. DEBUGSYMEXT=.xcoff
  1997. SHORTSUFFIX=mac
  1998. IMPORTLIBPREFIX=imp
  1999. endif
  2000. endif
  2001. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  2002. FPCMADE=fpcmade.$(SHORTSUFFIX)
  2003. ZIPSUFFIX=$(SHORTSUFFIX)
  2004. ZIPCROSSPREFIX=
  2005. ZIPSOURCESUFFIX=src
  2006. ZIPEXAMPLESUFFIX=exm
  2007. else
  2008. FPCMADE=fpcmade.$(TARGETSUFFIX)
  2009. ZIPSOURCESUFFIX=.source
  2010. ZIPEXAMPLESUFFIX=.examples
  2011. ifdef CROSSCOMPILE
  2012. ZIPSUFFIX=.$(SOURCESUFFIX)
  2013. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  2014. else
  2015. ZIPSUFFIX=.$(TARGETSUFFIX)
  2016. ZIPCROSSPREFIX=
  2017. endif
  2018. endif
  2019. ifndef ECHO
  2020. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  2021. ifeq ($(ECHO),)
  2022. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  2023. ifeq ($(ECHO),)
  2024. ECHO= __missing_command_ECHO
  2025. else
  2026. ECHO:=$(firstword $(ECHO))
  2027. endif
  2028. else
  2029. ECHO:=$(firstword $(ECHO))
  2030. endif
  2031. endif
  2032. export ECHO
  2033. ifndef DATE
  2034. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  2035. ifeq ($(DATE),)
  2036. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  2037. ifeq ($(DATE),)
  2038. DATE= __missing_command_DATE
  2039. else
  2040. DATE:=$(firstword $(DATE))
  2041. endif
  2042. else
  2043. DATE:=$(firstword $(DATE))
  2044. endif
  2045. endif
  2046. export DATE
  2047. ifndef GINSTALL
  2048. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  2049. ifeq ($(GINSTALL),)
  2050. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  2051. ifeq ($(GINSTALL),)
  2052. GINSTALL= __missing_command_GINSTALL
  2053. else
  2054. GINSTALL:=$(firstword $(GINSTALL))
  2055. endif
  2056. else
  2057. GINSTALL:=$(firstword $(GINSTALL))
  2058. endif
  2059. endif
  2060. export GINSTALL
  2061. ifndef CPPROG
  2062. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  2063. ifeq ($(CPPROG),)
  2064. CPPROG= __missing_command_CPPROG
  2065. else
  2066. CPPROG:=$(firstword $(CPPROG))
  2067. endif
  2068. endif
  2069. export CPPROG
  2070. ifndef RMPROG
  2071. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  2072. ifeq ($(RMPROG),)
  2073. RMPROG= __missing_command_RMPROG
  2074. else
  2075. RMPROG:=$(firstword $(RMPROG))
  2076. endif
  2077. endif
  2078. export RMPROG
  2079. ifndef MVPROG
  2080. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  2081. ifeq ($(MVPROG),)
  2082. MVPROG= __missing_command_MVPROG
  2083. else
  2084. MVPROG:=$(firstword $(MVPROG))
  2085. endif
  2086. endif
  2087. export MVPROG
  2088. ifndef MKDIRPROG
  2089. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2090. ifeq ($(MKDIRPROG),)
  2091. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2092. ifeq ($(MKDIRPROG),)
  2093. MKDIRPROG= __missing_command_MKDIRPROG
  2094. else
  2095. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2096. endif
  2097. else
  2098. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2099. endif
  2100. endif
  2101. export MKDIRPROG
  2102. ifndef ECHOREDIR
  2103. ifndef inUnix
  2104. ECHOREDIR=echo
  2105. else
  2106. ECHOREDIR=$(ECHO)
  2107. endif
  2108. endif
  2109. ifndef COPY
  2110. COPY:=$(CPPROG) -fp
  2111. endif
  2112. ifndef COPYTREE
  2113. COPYTREE:=$(CPPROG) -Rfp
  2114. endif
  2115. ifndef MKDIRTREE
  2116. MKDIRTREE:=$(MKDIRPROG) -p
  2117. endif
  2118. ifndef MOVE
  2119. MOVE:=$(MVPROG) -f
  2120. endif
  2121. ifndef DEL
  2122. DEL:=$(RMPROG) -f
  2123. endif
  2124. ifndef DELTREE
  2125. DELTREE:=$(RMPROG) -rf
  2126. endif
  2127. ifndef INSTALL
  2128. ifdef inUnix
  2129. INSTALL:=$(GINSTALL) -c -m 644
  2130. else
  2131. INSTALL:=$(COPY)
  2132. endif
  2133. endif
  2134. ifndef INSTALLEXE
  2135. ifdef inUnix
  2136. INSTALLEXE:=$(GINSTALL) -c -m 755
  2137. else
  2138. INSTALLEXE:=$(COPY)
  2139. endif
  2140. endif
  2141. ifndef MKDIR
  2142. MKDIR:=$(GINSTALL) -m 755 -d
  2143. endif
  2144. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2145. ifndef PPUMOVE
  2146. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2147. ifeq ($(PPUMOVE),)
  2148. PPUMOVE= __missing_command_PPUMOVE
  2149. else
  2150. PPUMOVE:=$(firstword $(PPUMOVE))
  2151. endif
  2152. endif
  2153. export PPUMOVE
  2154. ifndef FPCMAKE
  2155. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2156. ifeq ($(FPCMAKE),)
  2157. FPCMAKE= __missing_command_FPCMAKE
  2158. else
  2159. FPCMAKE:=$(firstword $(FPCMAKE))
  2160. endif
  2161. endif
  2162. export FPCMAKE
  2163. ifndef ZIPPROG
  2164. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2165. ifeq ($(ZIPPROG),)
  2166. ZIPPROG= __missing_command_ZIPPROG
  2167. else
  2168. ZIPPROG:=$(firstword $(ZIPPROG))
  2169. endif
  2170. endif
  2171. export ZIPPROG
  2172. ifndef TARPROG
  2173. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2174. ifeq ($(TARPROG),)
  2175. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2176. ifeq ($(TARPROG),)
  2177. TARPROG= __missing_command_TARPROG
  2178. else
  2179. TARPROG:=$(firstword $(TARPROG))
  2180. endif
  2181. else
  2182. TARPROG:=$(firstword $(TARPROG))
  2183. endif
  2184. endif
  2185. export TARPROG
  2186. ASNAME=$(BINUTILSPREFIX)as
  2187. LDNAME=$(BINUTILSPREFIX)ld
  2188. ARNAME=$(BINUTILSPREFIX)ar
  2189. RCNAME=$(BINUTILSPREFIX)rc
  2190. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  2191. ifeq ($(OS_TARGET),win32)
  2192. ifeq ($(CROSSBINDIR),)
  2193. ASNAME=asw
  2194. LDNAME=ldw
  2195. ARNAME=arw
  2196. endif
  2197. endif
  2198. endif
  2199. ifndef ASPROG
  2200. ifdef CROSSBINDIR
  2201. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2202. else
  2203. ASPROG=$(ASNAME)
  2204. endif
  2205. endif
  2206. ifndef LDPROG
  2207. ifdef CROSSBINDIR
  2208. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2209. else
  2210. LDPROG=$(LDNAME)
  2211. endif
  2212. endif
  2213. ifndef RCPROG
  2214. ifdef CROSSBINDIR
  2215. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2216. else
  2217. RCPROG=$(RCNAME)
  2218. endif
  2219. endif
  2220. ifndef ARPROG
  2221. ifdef CROSSBINDIR
  2222. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2223. else
  2224. ARPROG=$(ARNAME)
  2225. endif
  2226. endif
  2227. AS=$(ASPROG)
  2228. LD=$(LDPROG)
  2229. RC=$(RCPROG)
  2230. AR=$(ARPROG)
  2231. PPAS=ppas$(SRCBATCHEXT)
  2232. ifdef inUnix
  2233. LDCONFIG=ldconfig
  2234. else
  2235. LDCONFIG=
  2236. endif
  2237. ifdef DATE
  2238. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2239. else
  2240. DATESTR=
  2241. endif
  2242. ifndef UPXPROG
  2243. ifeq ($(OS_TARGET),go32v2)
  2244. UPXPROG:=1
  2245. endif
  2246. ifeq ($(OS_TARGET),win32)
  2247. UPXPROG:=1
  2248. endif
  2249. ifdef UPXPROG
  2250. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  2251. ifeq ($(UPXPROG),)
  2252. UPXPROG=
  2253. else
  2254. UPXPROG:=$(firstword $(UPXPROG))
  2255. endif
  2256. else
  2257. UPXPROG=
  2258. endif
  2259. endif
  2260. export UPXPROG
  2261. ZIPOPT=-9
  2262. ZIPEXT=.zip
  2263. ifeq ($(USETAR),bz2)
  2264. TAROPT=vj
  2265. TAREXT=.tar.bz2
  2266. else
  2267. TAROPT=vz
  2268. TAREXT=.tar.gz
  2269. endif
  2270. override REQUIRE_PACKAGES=rtl
  2271. ifeq ($(FULL_TARGET),i386-linux)
  2272. REQUIRE_PACKAGES_RTL=1
  2273. endif
  2274. ifeq ($(FULL_TARGET),i386-go32v2)
  2275. REQUIRE_PACKAGES_RTL=1
  2276. endif
  2277. ifeq ($(FULL_TARGET),i386-win32)
  2278. REQUIRE_PACKAGES_RTL=1
  2279. endif
  2280. ifeq ($(FULL_TARGET),i386-os2)
  2281. REQUIRE_PACKAGES_RTL=1
  2282. endif
  2283. ifeq ($(FULL_TARGET),i386-freebsd)
  2284. REQUIRE_PACKAGES_RTL=1
  2285. endif
  2286. ifeq ($(FULL_TARGET),i386-beos)
  2287. REQUIRE_PACKAGES_RTL=1
  2288. endif
  2289. ifeq ($(FULL_TARGET),i386-haiku)
  2290. REQUIRE_PACKAGES_RTL=1
  2291. endif
  2292. ifeq ($(FULL_TARGET),i386-netbsd)
  2293. REQUIRE_PACKAGES_RTL=1
  2294. endif
  2295. ifeq ($(FULL_TARGET),i386-solaris)
  2296. REQUIRE_PACKAGES_RTL=1
  2297. endif
  2298. ifeq ($(FULL_TARGET),i386-qnx)
  2299. REQUIRE_PACKAGES_RTL=1
  2300. endif
  2301. ifeq ($(FULL_TARGET),i386-netware)
  2302. REQUIRE_PACKAGES_RTL=1
  2303. endif
  2304. ifeq ($(FULL_TARGET),i386-openbsd)
  2305. REQUIRE_PACKAGES_RTL=1
  2306. endif
  2307. ifeq ($(FULL_TARGET),i386-wdosx)
  2308. REQUIRE_PACKAGES_RTL=1
  2309. endif
  2310. ifeq ($(FULL_TARGET),i386-darwin)
  2311. REQUIRE_PACKAGES_RTL=1
  2312. endif
  2313. ifeq ($(FULL_TARGET),i386-emx)
  2314. REQUIRE_PACKAGES_RTL=1
  2315. endif
  2316. ifeq ($(FULL_TARGET),i386-watcom)
  2317. REQUIRE_PACKAGES_RTL=1
  2318. endif
  2319. ifeq ($(FULL_TARGET),i386-netwlibc)
  2320. REQUIRE_PACKAGES_RTL=1
  2321. endif
  2322. ifeq ($(FULL_TARGET),i386-wince)
  2323. REQUIRE_PACKAGES_RTL=1
  2324. endif
  2325. ifeq ($(FULL_TARGET),i386-embedded)
  2326. REQUIRE_PACKAGES_RTL=1
  2327. endif
  2328. ifeq ($(FULL_TARGET),i386-symbian)
  2329. REQUIRE_PACKAGES_RTL=1
  2330. endif
  2331. ifeq ($(FULL_TARGET),i386-nativent)
  2332. REQUIRE_PACKAGES_RTL=1
  2333. endif
  2334. ifeq ($(FULL_TARGET),i386-iphonesim)
  2335. REQUIRE_PACKAGES_RTL=1
  2336. endif
  2337. ifeq ($(FULL_TARGET),m68k-linux)
  2338. REQUIRE_PACKAGES_RTL=1
  2339. endif
  2340. ifeq ($(FULL_TARGET),m68k-freebsd)
  2341. REQUIRE_PACKAGES_RTL=1
  2342. endif
  2343. ifeq ($(FULL_TARGET),m68k-netbsd)
  2344. REQUIRE_PACKAGES_RTL=1
  2345. endif
  2346. ifeq ($(FULL_TARGET),m68k-amiga)
  2347. REQUIRE_PACKAGES_RTL=1
  2348. endif
  2349. ifeq ($(FULL_TARGET),m68k-atari)
  2350. REQUIRE_PACKAGES_RTL=1
  2351. endif
  2352. ifeq ($(FULL_TARGET),m68k-openbsd)
  2353. REQUIRE_PACKAGES_RTL=1
  2354. endif
  2355. ifeq ($(FULL_TARGET),m68k-palmos)
  2356. REQUIRE_PACKAGES_RTL=1
  2357. endif
  2358. ifeq ($(FULL_TARGET),m68k-embedded)
  2359. REQUIRE_PACKAGES_RTL=1
  2360. endif
  2361. ifeq ($(FULL_TARGET),powerpc-linux)
  2362. REQUIRE_PACKAGES_RTL=1
  2363. endif
  2364. ifeq ($(FULL_TARGET),powerpc-netbsd)
  2365. REQUIRE_PACKAGES_RTL=1
  2366. endif
  2367. ifeq ($(FULL_TARGET),powerpc-amiga)
  2368. REQUIRE_PACKAGES_RTL=1
  2369. endif
  2370. ifeq ($(FULL_TARGET),powerpc-macos)
  2371. REQUIRE_PACKAGES_RTL=1
  2372. endif
  2373. ifeq ($(FULL_TARGET),powerpc-darwin)
  2374. REQUIRE_PACKAGES_RTL=1
  2375. endif
  2376. ifeq ($(FULL_TARGET),powerpc-morphos)
  2377. REQUIRE_PACKAGES_RTL=1
  2378. endif
  2379. ifeq ($(FULL_TARGET),powerpc-embedded)
  2380. REQUIRE_PACKAGES_RTL=1
  2381. endif
  2382. ifeq ($(FULL_TARGET),powerpc-wii)
  2383. REQUIRE_PACKAGES_RTL=1
  2384. endif
  2385. ifeq ($(FULL_TARGET),sparc-linux)
  2386. REQUIRE_PACKAGES_RTL=1
  2387. endif
  2388. ifeq ($(FULL_TARGET),sparc-netbsd)
  2389. REQUIRE_PACKAGES_RTL=1
  2390. endif
  2391. ifeq ($(FULL_TARGET),sparc-solaris)
  2392. REQUIRE_PACKAGES_RTL=1
  2393. endif
  2394. ifeq ($(FULL_TARGET),sparc-embedded)
  2395. REQUIRE_PACKAGES_RTL=1
  2396. endif
  2397. ifeq ($(FULL_TARGET),x86_64-linux)
  2398. REQUIRE_PACKAGES_RTL=1
  2399. endif
  2400. ifeq ($(FULL_TARGET),x86_64-freebsd)
  2401. REQUIRE_PACKAGES_RTL=1
  2402. endif
  2403. ifeq ($(FULL_TARGET),x86_64-solaris)
  2404. REQUIRE_PACKAGES_RTL=1
  2405. endif
  2406. ifeq ($(FULL_TARGET),x86_64-darwin)
  2407. REQUIRE_PACKAGES_RTL=1
  2408. endif
  2409. ifeq ($(FULL_TARGET),x86_64-win64)
  2410. REQUIRE_PACKAGES_RTL=1
  2411. endif
  2412. ifeq ($(FULL_TARGET),x86_64-embedded)
  2413. REQUIRE_PACKAGES_RTL=1
  2414. endif
  2415. ifeq ($(FULL_TARGET),arm-linux)
  2416. REQUIRE_PACKAGES_RTL=1
  2417. endif
  2418. ifeq ($(FULL_TARGET),arm-palmos)
  2419. REQUIRE_PACKAGES_RTL=1
  2420. endif
  2421. ifeq ($(FULL_TARGET),arm-darwin)
  2422. REQUIRE_PACKAGES_RTL=1
  2423. endif
  2424. ifeq ($(FULL_TARGET),arm-wince)
  2425. REQUIRE_PACKAGES_RTL=1
  2426. endif
  2427. ifeq ($(FULL_TARGET),arm-gba)
  2428. REQUIRE_PACKAGES_RTL=1
  2429. endif
  2430. ifeq ($(FULL_TARGET),arm-nds)
  2431. REQUIRE_PACKAGES_RTL=1
  2432. endif
  2433. ifeq ($(FULL_TARGET),arm-embedded)
  2434. REQUIRE_PACKAGES_RTL=1
  2435. endif
  2436. ifeq ($(FULL_TARGET),arm-symbian)
  2437. REQUIRE_PACKAGES_RTL=1
  2438. endif
  2439. ifeq ($(FULL_TARGET),powerpc64-linux)
  2440. REQUIRE_PACKAGES_RTL=1
  2441. endif
  2442. ifeq ($(FULL_TARGET),powerpc64-darwin)
  2443. REQUIRE_PACKAGES_RTL=1
  2444. endif
  2445. ifeq ($(FULL_TARGET),powerpc64-embedded)
  2446. REQUIRE_PACKAGES_RTL=1
  2447. endif
  2448. ifeq ($(FULL_TARGET),avr-embedded)
  2449. REQUIRE_PACKAGES_RTL=1
  2450. endif
  2451. ifeq ($(FULL_TARGET),armeb-linux)
  2452. REQUIRE_PACKAGES_RTL=1
  2453. endif
  2454. ifeq ($(FULL_TARGET),armeb-embedded)
  2455. REQUIRE_PACKAGES_RTL=1
  2456. endif
  2457. ifeq ($(FULL_TARGET),mipsel-linux)
  2458. REQUIRE_PACKAGES_RTL=1
  2459. endif
  2460. ifdef REQUIRE_PACKAGES_RTL
  2461. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  2462. ifneq ($(PACKAGEDIR_RTL),)
  2463. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  2464. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  2465. else
  2466. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  2467. endif
  2468. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
  2469. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
  2470. else
  2471. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
  2472. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
  2473. else
  2474. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
  2475. endif
  2476. endif
  2477. ifdef CHECKDEPEND
  2478. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  2479. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  2480. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  2481. endif
  2482. else
  2483. PACKAGEDIR_RTL=
  2484. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  2485. ifneq ($(UNITDIR_RTL),)
  2486. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  2487. else
  2488. UNITDIR_RTL=
  2489. endif
  2490. endif
  2491. ifdef UNITDIR_RTL
  2492. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  2493. endif
  2494. ifdef UNITDIR_FPMAKE_RTL
  2495. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
  2496. endif
  2497. endif
  2498. ifndef NOCPUDEF
  2499. override FPCOPTDEF=$(ARCH)
  2500. endif
  2501. ifneq ($(OS_TARGET),$(OS_SOURCE))
  2502. override FPCOPT+=-T$(OS_TARGET)
  2503. endif
  2504. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  2505. override FPCOPT+=-P$(ARCH)
  2506. endif
  2507. ifeq ($(OS_SOURCE),openbsd)
  2508. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  2509. endif
  2510. ifndef CROSSBOOTSTRAP
  2511. ifneq ($(BINUTILSPREFIX),)
  2512. override FPCOPT+=-XP$(BINUTILSPREFIX)
  2513. endif
  2514. ifneq ($(BINUTILSPREFIX),)
  2515. override FPCOPT+=-Xr$(RLINKPATH)
  2516. endif
  2517. endif
  2518. ifdef UNITDIR
  2519. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  2520. endif
  2521. ifdef LIBDIR
  2522. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  2523. endif
  2524. ifdef OBJDIR
  2525. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  2526. endif
  2527. ifdef INCDIR
  2528. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  2529. endif
  2530. ifdef LINKSMART
  2531. override FPCOPT+=-XX
  2532. endif
  2533. ifdef CREATESMART
  2534. override FPCOPT+=-CX
  2535. endif
  2536. ifdef DEBUG
  2537. override FPCOPT+=-gl
  2538. override FPCOPTDEF+=DEBUG
  2539. endif
  2540. ifdef RELEASE
  2541. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  2542. ifeq ($(CPU_TARGET),i386)
  2543. FPCCPUOPT:=-OG2p3
  2544. endif
  2545. ifeq ($(CPU_TARGET),powerpc)
  2546. FPCCPUOPT:=-O1r
  2547. endif
  2548. else
  2549. FPCCPUOPT:=-O2
  2550. endif
  2551. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  2552. override FPCOPTDEF+=RELEASE
  2553. endif
  2554. ifdef STRIP
  2555. override FPCOPT+=-Xs
  2556. endif
  2557. ifdef OPTIMIZE
  2558. override FPCOPT+=-O2
  2559. endif
  2560. ifdef VERBOSE
  2561. override FPCOPT+=-vwni
  2562. endif
  2563. ifdef COMPILER_OPTIONS
  2564. override FPCOPT+=$(COMPILER_OPTIONS)
  2565. endif
  2566. ifdef COMPILER_UNITDIR
  2567. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  2568. endif
  2569. ifdef COMPILER_LIBRARYDIR
  2570. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  2571. endif
  2572. ifdef COMPILER_OBJECTDIR
  2573. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  2574. endif
  2575. ifdef COMPILER_INCLUDEDIR
  2576. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  2577. endif
  2578. ifdef CROSSBINDIR
  2579. override FPCOPT+=-FD$(CROSSBINDIR)
  2580. endif
  2581. ifdef COMPILER_TARGETDIR
  2582. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  2583. ifeq ($(COMPILER_TARGETDIR),.)
  2584. override TARGETDIRPREFIX=
  2585. else
  2586. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  2587. endif
  2588. endif
  2589. ifdef COMPILER_UNITTARGETDIR
  2590. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  2591. ifeq ($(COMPILER_UNITTARGETDIR),.)
  2592. override UNITTARGETDIRPREFIX=
  2593. else
  2594. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  2595. endif
  2596. else
  2597. ifdef COMPILER_TARGETDIR
  2598. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  2599. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  2600. endif
  2601. endif
  2602. ifdef CREATESHARED
  2603. override FPCOPT+=-Cg
  2604. ifeq ($(CPU_TARGET),i386)
  2605. override FPCOPT+=-Aas
  2606. endif
  2607. endif
  2608. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  2609. ifneq ($(findstring $(OS_TARGET),linux solaris),)
  2610. ifeq ($(CPU_TARGET),x86_64)
  2611. override FPCOPT+=-Cg
  2612. endif
  2613. endif
  2614. endif
  2615. ifdef LINKSHARED
  2616. endif
  2617. ifdef GCCLIBDIR
  2618. override FPCOPT+=-Fl$(GCCLIBDIR)
  2619. endif
  2620. ifdef OTHERLIBDIR
  2621. override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
  2622. endif
  2623. ifdef OPT
  2624. override FPCOPT+=$(OPT)
  2625. endif
  2626. ifdef FPCOPTDEF
  2627. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  2628. endif
  2629. ifdef CFGFILE
  2630. override FPCOPT+=@$(CFGFILE)
  2631. endif
  2632. ifdef USEENV
  2633. override FPCEXTCMD:=$(FPCOPT)
  2634. override FPCOPT:=!FPCEXTCMD
  2635. export FPCEXTCMD
  2636. endif
  2637. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  2638. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  2639. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  2640. override ACROSSCOMPILE=1
  2641. endif
  2642. ifdef ACROSSCOMPILE
  2643. override FPCOPT+=$(CROSSOPT)
  2644. endif
  2645. override COMPILER:=$(FPC) $(FPCOPT)
  2646. ifeq (,$(findstring -s ,$(COMPILER)))
  2647. EXECPPAS=
  2648. else
  2649. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  2650. ifdef RUNBATCH
  2651. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  2652. else
  2653. EXECPPAS:=@$(PPAS)
  2654. endif
  2655. endif
  2656. endif
  2657. .PHONY: fpc_units
  2658. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  2659. override ALLTARGET+=fpc_units
  2660. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  2661. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  2662. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2663. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  2664. endif
  2665. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  2666. ifdef TARGET_RSTS
  2667. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  2668. override CLEANRSTFILES+=$(RSTFILES)
  2669. endif
  2670. .PHONY: fpc_examples
  2671. ifneq ($(TARGET_EXAMPLES),)
  2672. HASEXAMPLES=1
  2673. override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))
  2674. override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
  2675. override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
  2676. override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
  2677. ifeq ($(OS_TARGET),os2)
  2678. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
  2679. endif
  2680. ifeq ($(OS_TARGET),emx)
  2681. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
  2682. endif
  2683. endif
  2684. ifneq ($(TARGET_EXAMPLEDIRS),)
  2685. HASEXAMPLES=1
  2686. endif
  2687. fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
  2688. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  2689. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  2690. @$(ECHOREDIR) Compiled > $(FPCMADE)
  2691. fpc_all: $(FPCMADE)
  2692. fpc_smart:
  2693. $(MAKE) all LINKSMART=1 CREATESMART=1
  2694. fpc_debug:
  2695. $(MAKE) all DEBUG=1
  2696. fpc_release:
  2697. $(MAKE) all RELEASE=1
  2698. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  2699. $(COMPILER_UNITTARGETDIR):
  2700. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  2701. $(COMPILER_TARGETDIR):
  2702. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  2703. %$(PPUEXT): %.pp
  2704. $(COMPILER) $<
  2705. $(EXECPPAS)
  2706. %$(PPUEXT): %.pas
  2707. $(COMPILER) $<
  2708. $(EXECPPAS)
  2709. %$(EXEEXT): %.pp
  2710. $(COMPILER) $<
  2711. $(EXECPPAS)
  2712. %$(EXEEXT): %.pas
  2713. $(COMPILER) $<
  2714. $(EXECPPAS)
  2715. %$(EXEEXT): %.lpr
  2716. $(COMPILER) $<
  2717. $(EXECPPAS)
  2718. %$(EXEEXT): %.dpr
  2719. $(COMPILER) $<
  2720. $(EXECPPAS)
  2721. %.res: %.rc
  2722. windres -i $< -o $@
  2723. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2724. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2725. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2726. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  2727. vpath %.inc $(COMPILER_INCLUDEDIR)
  2728. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  2729. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  2730. .PHONY: fpc_shared
  2731. override INSTALLTARGET+=fpc_shared_install
  2732. ifndef SHARED_LIBVERSION
  2733. SHARED_LIBVERSION=$(FPC_VERSION)
  2734. endif
  2735. ifndef SHARED_LIBNAME
  2736. SHARED_LIBNAME=$(PACKAGE_NAME)
  2737. endif
  2738. ifndef SHARED_FULLNAME
  2739. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  2740. endif
  2741. ifndef SHARED_LIBUNITS
  2742. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  2743. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  2744. endif
  2745. fpc_shared:
  2746. ifdef HASSHAREDLIB
  2747. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  2748. ifneq ($(SHARED_BUILD),n)
  2749. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  2750. endif
  2751. else
  2752. @$(ECHO) Shared Libraries not supported
  2753. endif
  2754. fpc_shared_install:
  2755. ifneq ($(SHARED_BUILD),n)
  2756. ifneq ($(SHARED_LIBUNITS),)
  2757. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  2758. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  2759. endif
  2760. endif
  2761. endif
  2762. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  2763. ifdef INSTALL_UNITS
  2764. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  2765. endif
  2766. ifdef INSTALL_BUILDUNIT
  2767. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  2768. endif
  2769. ifdef INSTALLPPUFILES
  2770. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  2771. ifneq ($(UNITTARGETDIRPREFIX),)
  2772. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  2773. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  2774. endif
  2775. override INSTALL_CREATEPACKAGEFPC=1
  2776. endif
  2777. ifdef INSTALLEXEFILES
  2778. ifneq ($(TARGETDIRPREFIX),)
  2779. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  2780. endif
  2781. endif
  2782. fpc_install: all $(INSTALLTARGET)
  2783. ifdef INSTALLEXEFILES
  2784. $(MKDIR) $(INSTALL_BINDIR)
  2785. ifdef UPXPROG
  2786. -$(UPXPROG) $(INSTALLEXEFILES)
  2787. endif
  2788. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  2789. endif
  2790. ifdef INSTALL_CREATEPACKAGEFPC
  2791. ifdef FPCMAKE
  2792. ifdef PACKAGE_VERSION
  2793. ifneq ($(wildcard Makefile.fpc),)
  2794. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  2795. $(MKDIR) $(INSTALL_UNITDIR)
  2796. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  2797. endif
  2798. endif
  2799. endif
  2800. endif
  2801. ifdef INSTALLPPUFILES
  2802. $(MKDIR) $(INSTALL_UNITDIR)
  2803. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  2804. ifneq ($(INSTALLPPULINKFILES),)
  2805. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  2806. endif
  2807. ifneq ($(wildcard $(LIB_FULLNAME)),)
  2808. $(MKDIR) $(INSTALL_LIBDIR)
  2809. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  2810. ifdef inUnix
  2811. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  2812. endif
  2813. endif
  2814. endif
  2815. ifdef INSTALL_FILES
  2816. $(MKDIR) $(INSTALL_DATADIR)
  2817. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  2818. endif
  2819. fpc_sourceinstall: distclean
  2820. $(MKDIR) $(INSTALL_SOURCEDIR)
  2821. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  2822. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  2823. ifdef HASEXAMPLES
  2824. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  2825. endif
  2826. ifdef EXAMPLESOURCEFILES
  2827. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  2828. endif
  2829. ifdef TARGET_EXAMPLEDIRS
  2830. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  2831. endif
  2832. .PHONY: fpc_distinstall
  2833. fpc_distinstall: install exampleinstall
  2834. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  2835. ifndef PACKDIR
  2836. ifndef inUnix
  2837. PACKDIR=$(BASEDIR)/../fpc-pack
  2838. else
  2839. PACKDIR=/tmp/fpc-pack
  2840. endif
  2841. endif
  2842. ifndef ZIPNAME
  2843. ifdef DIST_ZIPNAME
  2844. ZIPNAME=$(DIST_ZIPNAME)
  2845. else
  2846. ZIPNAME=$(PACKAGE_NAME)
  2847. endif
  2848. endif
  2849. ifndef FULLZIPNAME
  2850. FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
  2851. endif
  2852. ifndef ZIPTARGET
  2853. ifdef DIST_ZIPTARGET
  2854. ZIPTARGET=DIST_ZIPTARGET
  2855. else
  2856. ZIPTARGET=install
  2857. endif
  2858. endif
  2859. ifndef USEZIP
  2860. ifdef inUnix
  2861. USETAR=1
  2862. endif
  2863. endif
  2864. ifndef inUnix
  2865. USEZIPWRAPPER=1
  2866. endif
  2867. ifdef USEZIPWRAPPER
  2868. ZIPPATHSEP=$(PATHSEP)
  2869. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
  2870. else
  2871. ZIPPATHSEP=/
  2872. endif
  2873. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  2874. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  2875. ifdef USETAR
  2876. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
  2877. ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
  2878. else
  2879. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
  2880. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  2881. endif
  2882. fpc_zipinstall:
  2883. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  2884. $(MKDIR) $(DIST_DESTDIR)
  2885. $(DEL) $(ZIPDESTFILE)
  2886. ifdef USEZIPWRAPPER
  2887. ifneq ($(ECHOREDIR),echo)
  2888. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  2889. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  2890. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  2891. else
  2892. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  2893. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  2894. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  2895. endif
  2896. ifdef inUnix
  2897. /bin/sh $(ZIPWRAPPER)
  2898. else
  2899. ifdef RUNBATCH
  2900. $(RUNBATCH) $(ZIPWRAPPER)
  2901. else
  2902. $(ZIPWRAPPER)
  2903. endif
  2904. endif
  2905. $(DEL) $(ZIPWRAPPER)
  2906. else
  2907. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  2908. endif
  2909. $(DELTREE) $(PACKDIR)
  2910. fpc_zipsourceinstall:
  2911. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
  2912. fpc_zipexampleinstall:
  2913. ifdef HASEXAMPLES
  2914. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
  2915. endif
  2916. fpc_zipdistinstall:
  2917. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  2918. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  2919. ifdef EXEFILES
  2920. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  2921. endif
  2922. ifdef CLEAN_PROGRAMS
  2923. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  2924. endif
  2925. ifdef CLEAN_UNITS
  2926. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  2927. endif
  2928. ifdef CLEANPPUFILES
  2929. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  2930. ifdef DEBUGSYMEXT
  2931. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  2932. endif
  2933. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  2934. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  2935. endif
  2936. fpc_clean: $(CLEANTARGET)
  2937. ifdef CLEANEXEFILES
  2938. -$(DEL) $(CLEANEXEFILES)
  2939. endif
  2940. ifdef CLEANPPUFILES
  2941. -$(DEL) $(CLEANPPUFILES)
  2942. endif
  2943. ifneq ($(CLEANPPULINKFILES),)
  2944. -$(DEL) $(CLEANPPULINKFILES)
  2945. endif
  2946. ifdef CLEANRSTFILES
  2947. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2948. endif
  2949. ifdef CLEAN_FILES
  2950. -$(DEL) $(CLEAN_FILES)
  2951. endif
  2952. ifdef LIB_NAME
  2953. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  2954. endif
  2955. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  2956. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  2957. fpc_cleanall: $(CLEANTARGET)
  2958. ifdef CLEANEXEFILES
  2959. -$(DEL) $(CLEANEXEFILES)
  2960. endif
  2961. ifdef COMPILER_UNITTARGETDIR
  2962. ifdef CLEANPPUFILES
  2963. -$(DEL) $(CLEANPPUFILES)
  2964. endif
  2965. ifneq ($(CLEANPPULINKFILES),)
  2966. -$(DEL) $(CLEANPPULINKFILES)
  2967. endif
  2968. ifdef CLEANRSTFILES
  2969. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2970. endif
  2971. endif
  2972. ifdef CLEAN_FILES
  2973. -$(DEL) $(CLEAN_FILES)
  2974. endif
  2975. -$(DELTREE) units
  2976. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  2977. ifneq ($(PPUEXT),.ppu)
  2978. -$(DEL) *.o *.ppu *.a
  2979. endif
  2980. -$(DELTREE) *$(SMARTEXT)
  2981. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  2982. -$(DEL) *_ppas$(BATCHEXT)
  2983. ifdef AOUTEXT
  2984. -$(DEL) *$(AOUTEXT)
  2985. endif
  2986. ifdef DEBUGSYMEXT
  2987. -$(DEL) *$(DEBUGSYMEXT)
  2988. endif
  2989. fpc_distclean: cleanall
  2990. .PHONY: fpc_baseinfo
  2991. override INFORULES+=fpc_baseinfo
  2992. fpc_baseinfo:
  2993. @$(ECHO)
  2994. @$(ECHO) == Package info ==
  2995. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  2996. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  2997. @$(ECHO)
  2998. @$(ECHO) == Configuration info ==
  2999. @$(ECHO)
  3000. @$(ECHO) FPC.......... $(FPC)
  3001. @$(ECHO) FPC Version.. $(FPC_VERSION)
  3002. @$(ECHO) Source CPU... $(CPU_SOURCE)
  3003. @$(ECHO) Target CPU... $(CPU_TARGET)
  3004. @$(ECHO) Source OS.... $(OS_SOURCE)
  3005. @$(ECHO) Target OS.... $(OS_TARGET)
  3006. @$(ECHO) Full Source.. $(FULL_SOURCE)
  3007. @$(ECHO) Full Target.. $(FULL_TARGET)
  3008. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  3009. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  3010. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  3011. @$(ECHO)
  3012. @$(ECHO) == Directory info ==
  3013. @$(ECHO)
  3014. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  3015. @$(ECHO)
  3016. @$(ECHO) Basedir......... $(BASEDIR)
  3017. @$(ECHO) FPCDir.......... $(FPCDIR)
  3018. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  3019. @$(ECHO) UnitsDir........ $(UNITSDIR)
  3020. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  3021. @$(ECHO)
  3022. @$(ECHO) GCC library..... $(GCCLIBDIR)
  3023. @$(ECHO) Other library... $(OTHERLIBDIR)
  3024. @$(ECHO)
  3025. @$(ECHO) == Tools info ==
  3026. @$(ECHO)
  3027. @$(ECHO) As........ $(AS)
  3028. @$(ECHO) Ld........ $(LD)
  3029. @$(ECHO) Ar........ $(AR)
  3030. @$(ECHO) Rc........ $(RC)
  3031. @$(ECHO)
  3032. @$(ECHO) Mv........ $(MVPROG)
  3033. @$(ECHO) Cp........ $(CPPROG)
  3034. @$(ECHO) Rm........ $(RMPROG)
  3035. @$(ECHO) GInstall.. $(GINSTALL)
  3036. @$(ECHO) Echo...... $(ECHO)
  3037. @$(ECHO) Shell..... $(SHELL)
  3038. @$(ECHO) Date...... $(DATE)
  3039. @$(ECHO) FPCMake... $(FPCMAKE)
  3040. @$(ECHO) PPUMove... $(PPUMOVE)
  3041. @$(ECHO) Upx....... $(UPXPROG)
  3042. @$(ECHO) Zip....... $(ZIPPROG)
  3043. @$(ECHO)
  3044. @$(ECHO) == Object info ==
  3045. @$(ECHO)
  3046. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  3047. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  3048. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  3049. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  3050. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  3051. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  3052. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  3053. @$(ECHO)
  3054. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  3055. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  3056. @$(ECHO)
  3057. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  3058. @$(ECHO) Install Files....... $(INSTALL_FILES)
  3059. @$(ECHO)
  3060. @$(ECHO) == Install info ==
  3061. @$(ECHO)
  3062. @$(ECHO) DateStr.............. $(DATESTR)
  3063. @$(ECHO) ZipName.............. $(ZIPNAME)
  3064. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  3065. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  3066. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  3067. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  3068. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  3069. @$(ECHO)
  3070. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  3071. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  3072. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  3073. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  3074. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  3075. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  3076. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  3077. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  3078. @$(ECHO)
  3079. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  3080. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  3081. @$(ECHO)
  3082. .PHONY: fpc_info
  3083. fpc_info: $(INFORULES)
  3084. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  3085. fpc_makefile_dirs
  3086. fpc_makefile:
  3087. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  3088. fpc_makefile_sub1:
  3089. ifdef TARGET_DIRS
  3090. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  3091. endif
  3092. ifdef TARGET_EXAMPLEDIRS
  3093. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  3094. endif
  3095. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  3096. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  3097. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  3098. all: fpc_all
  3099. debug: fpc_debug
  3100. smart: fpc_smart
  3101. release: fpc_release
  3102. units: fpc_units
  3103. examples: fpc_examples
  3104. shared: fpc_shared
  3105. install: fpc_install
  3106. sourceinstall: fpc_sourceinstall
  3107. exampleinstall: fpc_exampleinstall
  3108. distinstall: fpc_distinstall
  3109. zipinstall: fpc_zipinstall
  3110. zipsourceinstall: fpc_zipsourceinstall
  3111. zipexampleinstall: fpc_zipexampleinstall
  3112. zipdistinstall: fpc_zipdistinstall
  3113. cleanall: fpc_cleanall
  3114. info: fpc_info
  3115. makefiles: fpc_makefiles
  3116. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall cleanall info makefiles
  3117. ifneq ($(wildcard fpcmake.loc),)
  3118. include fpcmake.loc
  3119. endif
  3120. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  3121. CAN_RUN_GDBVER=1
  3122. endif
  3123. ifeq ($(FULL_SOURCE),i386-win32)
  3124. ifeq ($(FULL_TARGET),i386-go32v2)
  3125. CAN_RUN_GDBVER=1
  3126. endif
  3127. endif
  3128. ifdef CAN_RUN_GDBVER
  3129. ifeq ($(GDBFOUND),1)
  3130. $(CURRDIR)getver$(EXEEXT) : gdbver.pp
  3131. $(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp
  3132. ifndef GOTGDBVER
  3133. gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
  3134. $(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
  3135. else
  3136. GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
  3137. gdbver.inc: gdbver$(EXEEXT)
  3138. ./gdbver$(EXEEXT) -o gdbver.inc
  3139. gdbint$(PPUEXT): gdbint.pp gdbver.inc
  3140. ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
  3141. @$(ECHO) Using GDB $(GDBVER)
  3142. $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -Fisrc -Fusrc src/gdbint.pp
  3143. else
  3144. @$(ECHO) Using GDB $(GDBVER) \(MingW\)
  3145. $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -dUSE_MINGW_GDB -Fisrc -Fusrc src/gdbint.pp
  3146. endif
  3147. $(DEL) gdbver$(EXEEXT) gdbver$(OEXT)
  3148. endif
  3149. else
  3150. GDBVER=GDB_V606
  3151. gdbver.inc:
  3152. $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
  3153. gdbint$(PPUEXT): gdbint.pp gdbver.inc
  3154. @$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
  3155. $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -Fisrc -Fusrc src/gdbint.pp
  3156. $(DEL) src/gdbver.inc
  3157. endif
  3158. else
  3159. GDBVER=GDB_V606
  3160. gdbver.inc:
  3161. $(CPPROG) src/gdbver_nogdb.inc src/gdbver.inc
  3162. gdbint$(PPUEXT): gdbint.pp gdbver.inc
  3163. @$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
  3164. $(COMPILER) -d$(GDBVER) $(GDBLIBINCCOND) -Fisrc -Fusrc src/gdbint.pp
  3165. endif
  3166. gdbcon$(PPUEXT): gdbcon.pp gdbint$(PPUEXT)
  3167. ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
  3168. $(COMPILER) src/gdbcon.pp
  3169. else
  3170. $(COMPILER) -dUSE_MINGW_GDB src/gdbcon.pp
  3171. endif
  3172. $(EXECPPAS)
  3173. ifeq ($(OS_TARGET),go32v2)
  3174. DBGCOM=dbgcom$(OEXT)
  3175. else
  3176. DBGCOM=
  3177. endif
  3178. ifdef $(COMPILEDBGCOM)
  3179. $(DBGCOM): ../v4.16/dbgcom.c
  3180. gcc -c -DFPC -Dother_sel -gstabs -o dbgcom.o -I../v4.16 ../v4.16/dbgcom.c
  3181. else
  3182. $(DBGCOM):
  3183. endif
  3184. simple: $(DBGCOM)
  3185. -rm gdbint.ppu
  3186. ppc386 -dUSE_LIBGDB -fisrc -fusrc gdbint
  3187. ppc386 testgdb
  3188. examples/testgdb$(EXEEXT): examples/testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
  3189. ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
  3190. $(COMPILER) -FEexamples examples/testgdb.pp
  3191. else
  3192. $(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/testgdb.pp
  3193. endif
  3194. $(EXECPPAS)
  3195. examples/symify$(EXEEXT): examples/symify.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
  3196. ifeq ($(wildcard $(GDBLIBDIR)/libmingw32.a),)
  3197. $(COMPILER) -FEexamples examples/symify.pp
  3198. else
  3199. $(COMPILER) -FEexamples -dUSE_MINGW_GDB examples/symify.pp
  3200. endif
  3201. $(EXECPPAS)
  3202. .PHONY: test
  3203. test: examples
  3204. clean: fpc_clean
  3205. $(DEL) src/gdbver$(EXEEXT) src/gdbver$(OEXT)
  3206. distclean: fpc_distclean
  3207. $(DEL) src/gdbver.inc
  3208. .NOTPARALLEL: