Makefile 74 KB

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