fpcmake.inc 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450
  1. {$ifdef Delphi}
  2. const fpcmakeini : array[0..228] of string[240]=(
  3. {$else Delphi}
  4. const fpcmakeini : array[0..228,1..240] of char=(
  5. {$endif Delphi}
  6. ';'#013#010+
  7. '; Templates used by fpcmake to create a Makefile from Makefile.fpc'#013+
  8. #010+
  9. ';'#013#010+
  10. #013#010+
  11. '[defines]'#013#010+
  12. '#####################################################################'#013+
  13. #010+
  14. '# Misc defines to be used by anyone'#013#010+
  15. '#############################################','#######################'+
  16. '#'#013#010+
  17. #013#010+
  18. '# OS categories'#013#010+
  19. 'BSDs = freebsd netbsd openbsd darwin'#013#010+
  20. 'UNIXs = linux $(BSDs) solaris qnx haiku'#013#010+
  21. 'LIMIT83fs = go32v2 os2 emx watcom'#013#010+
  22. 'OSNeedsComspecToRunBatch = go32v2 watcom'#013#010+
  23. #013#010+
  24. '#Empty target for rules that always s','hould run. Needed if'#013#010+
  25. '#the target is non-phoney, and there is non-phony prereqisites.'#013#010+
  26. '#Then add FORCE as an prerequisite'#013#010+
  27. '#See gnu make manual: 4.7 Rules without Commands or Prerequisites'#013#010+
  28. 'FORCE:'#013#010+
  29. '.PHONY: FORCE'#013#010+
  30. #013#010+
  31. '[osdetect]'#013#010+
  32. '#############','#######################################################'+
  33. '#'#013#010+
  34. '# Autodetect source OS (Linux or Dos or Windows NT or OS/2 or other)'#013+
  35. #010+
  36. '# define inUnix when running under Unix like environment'#013#010+
  37. '# (Linux,FreeBSD,NetBSD,OpenBSD,Darwin,C','ygwin)'#013#010+
  38. '# define inWinNT when running under WinNT'#013#010+
  39. '# define inOS2 when running under OS/2'#013#010+
  40. '# define inCygwin when running under Cygwin32'#013#010+
  41. '#####################################################################'#013+
  42. #010+
  43. #013#010+
  44. '# We need only / in the path ','also remove the current dir,'#013#010+
  45. '# also remove trailing /'#039's'#013#010+
  46. 'override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))'#013#010+
  47. #013#010+
  48. '# Detect unix'#013#010+
  49. '# Darwin is handled specially'#013#010+
  50. 'ifneq ($(findstring darwin,$(OSTYPE)),)'#013#010+
  51. 'inUnix=1 #darwin'#013#010+
  52. 'SEARCHPATH:=$(filter-','out .,$(subst :, ,$(PATH)))'#013#010+
  53. 'else'#013#010+
  54. '# Determine if we'#039've a unix searchpath by looking for a ;'#013#010+
  55. '# that normally doesn'#039't exists in the unix PATH var.'#013#010+
  56. 'ifeq ($(findstring ;,$(PATH)),)'#013#010+
  57. 'inUnix=1'#013#010+
  58. 'SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))'#013,#010+
  59. 'else'#013#010+
  60. 'SEARCHPATH:=$(subst ;, ,$(PATH))'#013#010+
  61. 'endif'#013#010+
  62. 'endif'#013#010+
  63. #013#010+
  64. '# Add path were make is located'#013#010+
  65. 'SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))'#013#010+
  66. #013#010+
  67. '# Search for PWD'#013#010+
  68. 'PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))'#013#010+
  69. 'ifeq ($(P','WD),)'#013#010+
  70. 'PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))'#013#010+
  71. 'ifeq ($(PWD),)'#013#010+
  72. '$(error You need the GNU utils package to use this Makefile)'#013#010+
  73. 'else'#013#010+
  74. 'PWD:=$(firstword $(PWD))'#013#010+
  75. 'SRCEXEEXT='#013#010+
  76. 'endif'#013#010+
  77. 'else'#013#010+
  78. 'PWD:=$(firstword $(PWD))'#013#010+
  79. 'SRCEXEEXT=.ex','e'#013#010+
  80. 'endif'#013#010+
  81. #013#010+
  82. '# Detect NT - NT sets OS to Windows_NT'#013#010+
  83. '# Detect OS/2 - OS/2 has OS2_SHELL defined'#013#010+
  84. 'ifndef inUnix'#013#010+
  85. 'ifeq ($(OS),Windows_NT)'#013#010+
  86. 'inWinNT=1'#013#010+
  87. 'else'#013#010+
  88. 'ifdef OS2_SHELL'#013#010+
  89. 'inOS2=1'#013#010+
  90. 'endif'#013#010+
  91. 'endif'#013#010+
  92. 'else'#013#010+
  93. 'ifneq ($(findstring cygdrive,$(PATH)),)'#013#010,
  94. 'inCygWin=1'#013#010+
  95. 'endif'#013#010+
  96. 'endif'#013#010+
  97. #013#010+
  98. '# The extension of batch files / scripts'#013#010+
  99. 'ifdef inUnix'#013#010+
  100. 'SRCBATCHEXT=.sh'#013#010+
  101. 'else'#013#010+
  102. 'ifdef inOS2'#013#010+
  103. 'SRCBATCHEXT=.cmd'#013#010+
  104. 'else'#013#010+
  105. 'SRCBATCHEXT=.bat'#013#010+
  106. 'endif'#013#010+
  107. 'endif'#013#010+
  108. #013#010+
  109. 'ifdef COMSPEC'#013#010+
  110. 'ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComsp','ecToRunBatch)),)'#013#010+
  111. 'ifndef RUNBATCH'#013#010+
  112. 'RUNBATCH=$(COMSPEC) /C'#013#010+
  113. 'endif'#013#010+
  114. 'endif'#013#010+
  115. 'endif'#013#010+
  116. #013#010+
  117. '# Path Separator, the subst trick is necessary for the \ that can'#039't'+
  118. ' exists'#013#010+
  119. '# at the end of a line'#013#010+
  120. 'ifdef inUnix'#013#010+
  121. 'PATHSEP=/'#013#010+
  122. 'else'#013#010+
  123. 'PATHSEP:=$(subst /,\,/)'#013#010+
  124. '# ','cygwin bash or sh can not handle backslashs'#013#010+
  125. 'ifdef inCygWin'#013#010+
  126. 'PATHSEP=/'#013#010+
  127. 'endif'#013#010+
  128. 'endif'#013#010+
  129. #013#010+
  130. '# Base dir'#013#010+
  131. 'ifdef PWD'#013#010+
  132. 'BASEDIR:=$(subst \,/,$(shell $(PWD)))'#013#010+
  133. '# For Cygwin we need to replace /cygdrive/c/ with c:/'#013#010+
  134. 'ifdef inCygWin'#013#010+
  135. 'ifneq ($(findstring',' /cygdrive/,$(BASEDIR)),)'#013#010+
  136. 'BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))'#013#010+
  137. 'BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))'#013#010+
  138. 'BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))'#013+
  139. #010+
  140. 'endif'#013#010+
  141. 'endif'#013#010+
  142. 'else'#013#010+
  143. 'BASEDIR=.'#013#010+
  144. 'endif'#013#010+
  145. #013#010+
  146. '# Ech','o is an internal command under OS/2 (and others), so it'#039's a'+
  147. 'lways found'#013#010+
  148. 'ifdef inOS2'#013#010+
  149. 'ifndef ECHO'#013#010+
  150. 'ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))'+
  151. '))'#013#010+
  152. 'ifeq ($(ECHO),)'#013#010+
  153. 'ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEE','XT),$(SEARCHPATH)'+
  154. ')))'#013#010+
  155. 'ifeq ($(ECHO),)'#013#010+
  156. 'ECHO=echo'#013#010+
  157. 'else'#013#010+
  158. 'ECHO:=$(firstword $(ECHO))'#013#010+
  159. 'endif'#013#010+
  160. 'else'#013#010+
  161. 'ECHO:=$(firstword $(ECHO))'#013#010+
  162. 'endif'#013#010+
  163. 'endif'#013#010+
  164. 'export ECHO'#013#010+
  165. 'endif'#013#010+
  166. #013#010+
  167. '[fpcdetect]'#013#010+
  168. '##################################################################','##'+
  169. '#'#013#010+
  170. '# FPC Binary and Version Detection'#013#010+
  171. '#####################################################################'#013+
  172. #010+
  173. #013#010+
  174. '# Compatibility with old makefiles'#013#010+
  175. 'ifndef FPC'#013#010+
  176. 'ifdef PP'#013#010+
  177. 'FPC=$(PP)'#013#010+
  178. 'endif'#013#010+
  179. 'endif'#013#010+
  180. #013#010+
  181. '# Try to detect the ppcXXX file to use by',' using "fpc -PB" option'#013+
  182. #010+
  183. '# to query for the default ppcXXX the fpc executable tries. When'#013#010+
  184. '# fpc is not found use ppc386 by default. Also when fpc -PB gives'#013#010+
  185. '# an error ppc386 will be used.'#013#010+
  186. 'ifndef FPC'#013#010+
  187. '# check if fpc exists'#013#010+
  188. 'FPCPROG:=$(str','ip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPAT'+
  189. 'H))))'#013#010+
  190. 'ifneq ($(FPCPROG),)'#013#010+
  191. 'FPCPROG:=$(firstword $(FPCPROG))'#013#010+
  192. 'ifneq ($(CPU_TARGET),)'#013#010+
  193. 'FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)'#013#010+
  194. 'else'#013#010+
  195. 'FPC:=$(shell $(FPCPROG) -PB)'#013#010+
  196. 'endif'#013#010+
  197. '# Older fpc',' executables didn'#039't support it and return'#013#010+
  198. '# Error: Illegal processor... If found then fallback to ppc386'#013#010+
  199. 'ifneq ($(findstring Error,$(FPC)),)'#013#010+
  200. 'override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEX'+
  201. 'EEXT),$(SEARCHPATH)))))'#013#010+
  202. 'e','lse'#013#010+
  203. '# if the cross compiler is not found, fall back to fpc'#013#010+
  204. 'ifeq ($(strip $(wildcard $(FPC))),)'#013#010+
  205. 'FPC:=$(firstword $(FPCPROG))'#013#010+
  206. 'endif'#013#010+
  207. 'endif'#013#010+
  208. 'else'#013#010+
  209. '# fpc binary not found, fallback to ppc386'#013#010+
  210. 'override FPC=$(firstword $(strip $(wildcard $(ad','dsuffix /ppc386$(SRC'+
  211. 'EXEEXT),$(SEARCHPATH)))))'#013#010+
  212. 'endif'#013#010+
  213. 'endif'#013#010+
  214. #013#010+
  215. '# Get a clean executable name'#013#010+
  216. 'override FPC:=$(subst $(SRCEXEEXT),,$(FPC))'#013#010+
  217. 'override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)'#013#010+
  218. #013#010+
  219. '# Try to find the binary direct first, otherwise in ','the path,'#013#010+
  220. '# if not found give an error'#013#010+
  221. 'FOUNDFPC:=$(strip $(wildcard $(FPC)))'#013#010+
  222. 'ifeq ($(FOUNDFPC),)'#013#010+
  223. 'FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))'#013#010+
  224. 'ifeq ($(FOUNDFPC),)'#013#010+
  225. '$(error Compiler $(FPC) not found)'#013#010+
  226. 'endif'#013#010+
  227. 'endif'#013#010+
  228. #013#010,
  229. '# For 1.1 and up we can use a single compiler call to retrieve'#013#010+
  230. '# all needed information'#013#010+
  231. 'ifndef FPC_COMPILERINFO'#013#010+
  232. 'FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)'#013#010+
  233. 'endif'#013#010+
  234. #013#010+
  235. '# FPC version'#013#010+
  236. 'ifndef FPC_VERSION'#013#010+
  237. 'FPC_VERSION:=$(word 1,$(FPC_COMPIL','ERINFO))'#013#010+
  238. 'endif'#013#010+
  239. #013#010+
  240. 'export FPC FPC_VERSION FPC_COMPILERINFO'#013#010+
  241. '# CHECKDEPEND should not be exported'#013#010+
  242. '# This should limit multiple checks'#013#010+
  243. 'unexport CHECKDEPEND ALLDEPENDENCIES'#013#010+
  244. #013#010+
  245. '#################################################################','###'+
  246. '#'#013#010+
  247. '# FPC Target Detection'#013#010+
  248. '#####################################################################'#013+
  249. #010+
  250. #013#010+
  251. '# Fall back to default values if needed'#013#010+
  252. 'ifndef CPU_TARGET'#013#010+
  253. 'ifdef CPU_TARGET_DEFAULT'#013#010+
  254. 'CPU_TARGET=$(CPU_TARGET_DEFAULT)'#013#010+
  255. 'endif'#013#010+
  256. 'endif'#013#010+
  257. 'ifn','def OS_TARGET'#013#010+
  258. 'ifdef OS_TARGET_DEFAULT'#013#010+
  259. 'OS_TARGET=$(OS_TARGET_DEFAULT)'#013#010+
  260. 'endif'#013#010+
  261. 'endif'#013#010+
  262. #013#010+
  263. '# For 1.0.x we need to use extra calls to retrieve all info'#013#010+
  264. 'ifneq ($(words $(FPC_COMPILERINFO)),5)'#013#010+
  265. 'FPC_COMPILERINFO+=$(shell $(FPC) -iSP)'#013#010+
  266. 'FPC_COMPILE','RINFO+=$(shell $(FPC) -iTP)'#013#010+
  267. 'FPC_COMPILERINFO+=$(shell $(FPC) -iSO)'#013#010+
  268. 'FPC_COMPILERINFO+=$(shell $(FPC) -iTO)'#013#010+
  269. 'endif'#013#010+
  270. #013#010+
  271. '# Retrieve Target/Source CPU and Target/Source OS'#013#010+
  272. 'ifndef CPU_SOURCE'#013#010+
  273. 'CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))'#013#010+
  274. 'endif'#013#010+
  275. 'if','ndef CPU_TARGET'#013#010+
  276. 'CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))'#013#010+
  277. 'endif'#013#010+
  278. 'ifndef OS_SOURCE'#013#010+
  279. 'OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))'#013#010+
  280. 'endif'#013#010+
  281. 'ifndef OS_TARGET'#013#010+
  282. 'OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))'#013#010+
  283. 'endif'#013#010+
  284. 'FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#013,#010+
  285. 'FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)'#013#010+
  286. #013#010+
  287. 'ifeq ($(CPU_TARGET),armeb)'#013#010+
  288. 'ARCH=arm'#013#010+
  289. 'override FPCOPT+=-Cb'#013#010+
  290. 'else'#013#010+
  291. 'ifeq ($(CPU_TARGET),armel)'#013#010+
  292. 'ARCH=arm'#013#010+
  293. 'override FPCOPT+=-CaEABI'#013#010+
  294. 'else'#013#010+
  295. 'ARCH=$(CPU_TARGET)'#013#010+
  296. 'endif'#013#010+
  297. 'endif'#013#010+
  298. #013#010+
  299. '# Full name of the target',', including CPU and OS. For OSs limited'#013+
  300. #010+
  301. '# to 8.3 we only use the target OS'#013#010+
  302. 'ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)'#013#010+
  303. 'TARGETSUFFIX=$(OS_TARGET)'#013#010+
  304. 'SOURCESUFFIX=$(OS_SOURCE)'#013#010+
  305. 'else'#013#010+
  306. 'TARGETSUFFIX=$(FULL_TARGET)'#013#010+
  307. 'SOURCESUFFIX=$(FULL_SOUR','CE)'#013#010+
  308. 'endif'#013#010+
  309. #013#010+
  310. '# Cross compile flag'#013#010+
  311. 'ifneq ($(FULL_TARGET),$(FULL_SOURCE))'#013#010+
  312. 'CROSSCOMPILE=1'#013#010+
  313. 'endif'#013#010+
  314. #013#010+
  315. '# Check if the Makefile supports this target, but not'#013#010+
  316. '# when the make target is to rebuild the makefile'#013#010+
  317. 'ifeq ($(findstring makefile,$(MAKE','CMDGOALS)),)'#013#010+
  318. 'ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)'#013#010+
  319. '$(error The Makefile doesn'#039't support target $(FULL_TARGET), please'+
  320. ' run fpcmake first)'#013#010+
  321. 'endif'#013#010+
  322. 'endif'#013#010+
  323. #013#010+
  324. #013#010+
  325. '# Detect BSD, since BSD uses a slightly different directory hier','arch'+
  326. 'y.'#013#010+
  327. 'ifneq ($(findstring $(OS_TARGET),$(BSDs)),)'#013#010+
  328. 'BSDhier=1'#013#010+
  329. 'endif'#013#010+
  330. #013#010+
  331. '# Detect Linux, will also use its own directory hierarchy.'#013#010+
  332. 'ifeq ($(OS_TARGET),linux)'#013#010+
  333. 'linuxHier=1'#013#010+
  334. 'endif'#013#010+
  335. #013#010+
  336. 'export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL','_TARGET FU'+
  337. 'LL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE'#013#010+
  338. #013#010+
  339. #013#010+
  340. '[fpcdircheckenv]'#013#010+
  341. '#####################################################################'#013+
  342. #010+
  343. '# FPCDIR Setting'#013#010+
  344. '#####################################################################',
  345. #013#010+
  346. #013#010+
  347. '# Test FPCDIR to look if the RTL dir exists'#013#010+
  348. 'ifdef FPCDIR'#013#010+
  349. 'override FPCDIR:=$(subst \,/,$(FPCDIR))'#013#010+
  350. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
  351. 'override FPCDIR=wrong'#013#010+
  352. 'endif'#013#010+
  353. 'else'#013#010+
  354. 'override FPCDIR=wrong'#013#010+
  355. 'endif'#013#010+
  356. #013#010+
  357. '# Default FPC','DIR from Makefile.fpc'#013#010+
  358. 'ifdef DEFAULT_FPCDIR'#013#010+
  359. 'ifeq ($(FPCDIR),wrong)'#013#010+
  360. 'override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))'#013#010+
  361. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
  362. 'override FPCDIR=wrong'#013#010+
  363. 'endif'#013#010+
  364. 'endif'#013#010+
  365. 'endif'#013#010+
  366. #013#010+
  367. '[fpcdirdetect]'#013#010+
  368. '# Det','ect FPCDIR'#013#010+
  369. 'ifeq ($(FPCDIR),wrong)'#013#010+
  370. 'ifdef inUnix'#013#010+
  371. 'override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)'#013#010+
  372. 'ifeq ($(wildcard $(FPCDIR)/units),)'#013#010+
  373. 'override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)'#013#010+
  374. 'endif'#013#010+
  375. 'else'#013#010+
  376. 'override FPCDIR:=$(subst /$(FPC),,$(firstwor','d $(strip $(wildcard $(a'+
  377. 'ddsuffix /$(FPC),$(SEARCHPATH))))))'#013#010+
  378. 'override FPCDIR:=$(FPCDIR)/..'#013#010+
  379. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
  380. 'override FPCDIR:=$(FPCDIR)/..'#013#010+
  381. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
  382. 'overrid','e FPCDIR:=$(BASEDIR)'#013#010+
  383. 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
  384. 'override FPCDIR=c:/pp'#013#010+
  385. 'endif'#013#010+
  386. 'endif'#013#010+
  387. 'endif'#013#010+
  388. 'endif'#013#010+
  389. 'endif'#013#010+
  390. #013#010+
  391. '# Cross binaries dir'#013#010+
  392. 'ifndef CROSSBINDIR'#013#010+
  393. 'CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))'#013#010+
  394. 'endif',#013#010+
  395. #013#010+
  396. '# Default binutils prefix for cross compile when the'#013#010+
  397. '# crossbindir is not set (except for Darwin)'#013#010+
  398. 'ifeq ($(OS_TARGET),darwin)'#013#010+
  399. 'ifeq ($(OS_SOURCE),darwin)'#013#010+
  400. 'DARWIN2DARWIN=1'#013#010+
  401. 'endif'#013#010+
  402. 'endif'#013#010+
  403. #013#010+
  404. 'ifndef BINUTILSPREFIX'#013#010+
  405. 'ifndef CROSSBINDIR'#013#010+
  406. 'ifde','f CROSSCOMPILE'#013#010+
  407. 'ifndef DARWIN2DARWIN'#013#010+
  408. 'BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-'#013#010+
  409. 'endif'#013#010+
  410. 'endif'#013#010+
  411. 'endif'#013#010+
  412. 'endif'#013#010+
  413. #013#010+
  414. '# Try first the full target name, otherwise try only'#013#010+
  415. '# the OS for backwards compatibility'#013#010+
  416. 'UNITSDIR:=$(wildcard $(FPCDIR)/units','/$(TARGETSUFFIX))'#013#010+
  417. 'ifeq ($(UNITSDIR),)'#013#010+
  418. 'UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))'#013#010+
  419. 'endif'#013#010+
  420. #013#010+
  421. '# Packages dir'#013#010+
  422. 'PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/package'+
  423. 's/base $(FPCDIR)/packages/extra)'#013#010+
  424. #013#010+
  425. #013#010+
  426. '[shelltools]'#013#010+
  427. '#','###################################################################'+
  428. '#'#013#010+
  429. '# Shell tools'#013#010+
  430. '#####################################################################'#013+
  431. #010+
  432. #013#010+
  433. '# Echo that can redir (must be able run in the default OS shell)'#013#010+
  434. 'ifndef ECHOREDIR',#013#010+
  435. 'ifndef inUnix'#013#010+
  436. 'ECHOREDIR=echo'#013#010+
  437. 'else'#013#010+
  438. 'ECHOREDIR=$(ECHO)'#013#010+
  439. 'endif'#013#010+
  440. 'endif'#013#010+
  441. #013#010+
  442. '# To copy pograms'#013#010+
  443. 'ifndef COPY'#013#010+
  444. 'COPY:=$(CPPROG) -fp'#013#010+
  445. 'endif'#013#010+
  446. #013#010+
  447. '# Copy a whole tree'#013#010+
  448. 'ifndef COPYTREE'#013#010+
  449. 'COPYTREE:=$(CPPROG) -Rfp'#013#010+
  450. 'endif'#013#010+
  451. #013#010+
  452. '# Copy a whole tree'#013#010+
  453. 'ifndef MKD','IRTREE'#013#010+
  454. 'MKDIRTREE:=$(MKDIRPROG) -p'#013#010+
  455. 'endif'#013#010+
  456. #013#010+
  457. '# To move pograms'#013#010+
  458. 'ifndef MOVE'#013#010+
  459. 'MOVE:=$(MVPROG) -f'#013#010+
  460. 'endif'#013#010+
  461. #013#010+
  462. '# Check delete program'#013#010+
  463. 'ifndef DEL'#013#010+
  464. 'DEL:=$(RMPROG) -f'#013#010+
  465. 'endif'#013#010+
  466. #013#010+
  467. '# Check deltree program'#013#010+
  468. 'ifndef DELTREE'#013#010+
  469. 'DELTREE:=$(RMPROG) -rf'#013#010+
  470. 'endif',#013#010+
  471. #013#010+
  472. '# To install files'#013#010+
  473. 'ifndef INSTALL'#013#010+
  474. 'ifdef inUnix'#013#010+
  475. 'INSTALL:=$(GINSTALL) -c -m 644'#013#010+
  476. 'else'#013#010+
  477. 'INSTALL:=$(COPY)'#013#010+
  478. 'endif'#013#010+
  479. 'endif'#013#010+
  480. #013#010+
  481. '# To install programs'#013#010+
  482. 'ifndef INSTALLEXE'#013#010+
  483. 'ifdef inUnix'#013#010+
  484. 'INSTALLEXE:=$(GINSTALL) -c -m 755'#013#010+
  485. 'else'#013#010+
  486. 'INSTALLEXE:=$(COP','Y)'#013#010+
  487. 'endif'#013#010+
  488. 'endif'#013#010+
  489. #013#010+
  490. '# To make a directory.'#013#010+
  491. 'ifndef MKDIR'#013#010+
  492. 'MKDIR:=$(GINSTALL) -m 755 -d'#013#010+
  493. 'endif'#013#010+
  494. #013#010+
  495. 'export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKD'+
  496. 'IR'#013#010+
  497. #013#010+
  498. #013#010+
  499. '[defaultdirs]'#013#010+
  500. '##################################################','##################'+
  501. '#'#013#010+
  502. '# Default Directories'#013#010+
  503. '#####################################################################'#013+
  504. #010+
  505. #013#010+
  506. '# Units dir'#013#010+
  507. 'ifdef REQUIRE_UNITSDIR'#013#010+
  508. 'override UNITSDIR+=$(REQUIRE_UNITSDIR)'#013#010+
  509. 'endif'#013#010+
  510. #013#010+
  511. '# Units dir'#013#010+
  512. 'ifdef REQUIRE_PACKAGESDI','R'#013#010+
  513. 'override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)'#013#010+
  514. 'endif'#013#010+
  515. #013#010+
  516. #013#010+
  517. '# Unixes use unix dirs with /usr/bin, /usr/lib'#013#010+
  518. '# When zipping use the target os default, when normal install then'#013+
  519. #010+
  520. '# use the source os as default'#013#010+
  521. 'ifdef ZIPINSTALL'#013#010+
  522. '# Zipinstall'#013#010,
  523. 'ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)'#013#010+
  524. 'UNIXHier=1'#013#010+
  525. 'endif'#013#010+
  526. 'else'#013#010+
  527. '# Normal install'#013#010+
  528. 'ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)'#013#010+
  529. 'UNIXHier=1'#013#010+
  530. 'endif'#013#010+
  531. 'endif'#013#010+
  532. #013#010+
  533. '# When install prefix is not set try to use prefix'#013#010+
  534. 'ifndef INSTALL_PREFIX'#013#010+
  535. 'if','def PREFIX'#013#010+
  536. 'INSTALL_PREFIX=$(PREFIX)'#013#010+
  537. 'endif'#013#010+
  538. 'endif'#013#010+
  539. #013#010+
  540. '# set the prefix directory where to install everything'#013#010+
  541. 'ifndef INSTALL_PREFIX'#013#010+
  542. 'ifdef UNIXHier'#013#010+
  543. 'INSTALL_PREFIX=/usr/local'#013#010+
  544. 'else'#013#010+
  545. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  546. 'INSTALL_BASEDIR:=/pp'#013#010+
  547. 'else'#013#010+
  548. 'INST','ALL_BASEDIR:=/$(PACKAGE_NAME)'#013#010+
  549. 'endif'#013#010+
  550. 'endif'#013#010+
  551. 'endif'#013#010+
  552. 'export INSTALL_PREFIX'#013#010+
  553. #013#010+
  554. '# Export also INSTALL_SOURCESUBDIR set so it will be'#013#010+
  555. '# used recursively for all subdirs'#013#010+
  556. 'ifdef INSTALL_FPCSUBDIR'#013#010+
  557. 'export INSTALL_FPCSUBDIR'#013#010+
  558. 'endif'#013#010+
  559. #013#010+
  560. '# Where to pl','ace the resulting zip files'#013#010+
  561. 'ifndef DIST_DESTDIR'#013#010+
  562. 'DIST_DESTDIR:=$(BASEDIR)'#013#010+
  563. 'endif'#013#010+
  564. 'export DIST_DESTDIR'#013#010+
  565. #013#010+
  566. '# EXE/PPU Target directories'#013#010+
  567. 'ifndef COMPILER_UNITTARGETDIR'#013#010+
  568. 'ifdef PACKAGEDIR_MAIN'#013#010+
  569. 'COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(','TARGETSUFFIX)'#013#010+
  570. 'else'#013#010+
  571. 'COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)'#013#010+
  572. 'endif'#013#010+
  573. 'endif'#013#010+
  574. 'ifndef COMPILER_TARGETDIR'#013#010+
  575. 'COMPILER_TARGETDIR=.'#013#010+
  576. 'endif'#013#010+
  577. #013#010+
  578. #013#010+
  579. '#####################################################################'#013+
  580. #010+
  581. '# Install Directories'#013#010+
  582. '#####','###############################################################'+
  583. '#'#013#010+
  584. #013#010+
  585. '# set the base directory where to install everything'#013#010+
  586. 'ifndef INSTALL_BASEDIR'#013#010+
  587. 'ifdef UNIXHier'#013#010+
  588. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  589. 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VER','SION)'#013#010+
  590. 'else'#013#010+
  591. 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)'#013#010+
  592. 'endif'#013#010+
  593. 'else'#013#010+
  594. 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)'#013#010+
  595. 'endif'#013#010+
  596. 'endif'#013#010+
  597. #013#010+
  598. '# set the directory where to install the binaries'#013#010+
  599. 'ifndef INSTALL_BINDIR'#013#010+
  600. 'ifdef UNIXHier'#013#010+
  601. 'INSTALL_BINDIR:=','$(INSTALL_PREFIX)/bin'#013#010+
  602. 'else'#013#010+
  603. 'INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin'#013#010+
  604. '# for FPC packages install the binaries under their target subdir'#013#010+
  605. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  606. 'ifdef CROSSCOMPILE'#013#010+
  607. 'ifdef CROSSINSTALL'#013#010+
  608. 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SO','URCESUFFIX)'#013#010+
  609. 'else'#013#010+
  610. 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)'#013#010+
  611. 'endif'#013#010+
  612. 'else'#013#010+
  613. 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)'#013#010+
  614. 'endif'#013#010+
  615. 'endif'#013#010+
  616. 'endif'#013#010+
  617. 'endif'#013#010+
  618. #013#010+
  619. '# set the directory where to install the units.'#013#010+
  620. 'ifndef INSTALL_UNITDIR'#013#010+
  621. 'INS','TALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)'#013#010+
  622. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  623. 'ifdef PACKAGE_NAME'#013#010+
  624. 'INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)'#013#010+
  625. 'endif'#013#010+
  626. 'endif'#013#010+
  627. 'endif'#013#010+
  628. #013#010+
  629. '# Where to install shared libraries'#013#010+
  630. 'ifndef INSTALL_LIBDIR'#013#010+
  631. 'if','def UNIXHier'#013#010+
  632. 'INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib'#013#010+
  633. 'else'#013#010+
  634. 'INSTALL_LIBDIR:=$(INSTALL_UNITDIR)'#013#010+
  635. 'endif'#013#010+
  636. 'endif'#013#010+
  637. #013#010+
  638. '# Where the source files will be stored'#013#010+
  639. 'ifndef INSTALL_SOURCEDIR'#013#010+
  640. 'ifdef UNIXHier'#013#010+
  641. 'ifdef BSDhier'#013#010+
  642. 'SRCPREFIXDIR=share/src'#013#010+
  643. 'else'#013#010+
  644. 'i','fdef linuxHier'#013#010+
  645. 'SRCPREFIXDIR=share/src'#013#010+
  646. 'else'#013#010+
  647. 'SRCPREFIXDIR=src'#013#010+
  648. 'endif'#013#010+
  649. 'endif'#013#010+
  650. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  651. 'ifdef INSTALL_FPCSUBDIR'#013#010+
  652. 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION'+
  653. ')/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)'#013#010+
  654. 'e','lse'#013#010+
  655. 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION'+
  656. ')/$(PACKAGE_NAME)'#013#010+
  657. 'endif'#013#010+
  658. 'else'#013#010+
  659. 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$'+
  660. '(PACKAGE_VERSION)'#013#010+
  661. 'endif'#013#010+
  662. 'else'#013#010+
  663. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  664. 'ifdef',' INSTALL_FPCSUBDIR'#013#010+
  665. 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PA'+
  666. 'CKAGE_NAME)'#013#010+
  667. 'else'#013#010+
  668. 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)'#013#010+
  669. 'endif'#013#010+
  670. 'else'#013#010+
  671. 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source'#013#010+
  672. 'endif'#013#010+
  673. 'end','if'#013#010+
  674. 'endif'#013#010+
  675. #013#010+
  676. '# Where the doc files will be stored'#013#010+
  677. 'ifndef INSTALL_DOCDIR'#013#010+
  678. 'ifdef UNIXHier'#013#010+
  679. 'ifdef BSDhier'#013#010+
  680. 'DOCPREFIXDIR=share/doc'#013#010+
  681. 'else'#013#010+
  682. 'ifdef linuxHier'#013#010+
  683. 'DOCPREFIXDIR=share/doc'#013#010+
  684. 'else'#013#010+
  685. 'DOCPREFIXDIR=doc'#013#010+
  686. 'endif'#013#010+
  687. 'endif'#013#010+
  688. 'ifdef INSTALL_FPCPACKAGE'#013#010,
  689. 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$'+
  690. '(PACKAGE_NAME)'#013#010+
  691. 'else'#013#010+
  692. 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PA'+
  693. 'CKAGE_VERSION)'#013#010+
  694. 'endif'#013#010+
  695. 'else'#013#010+
  696. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  697. 'INSTALL_DOCDIR:=$(INSTA','LL_BASEDIR)/doc/$(PACKAGE_NAME)'#013#010+
  698. 'else'#013#010+
  699. 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc'#013#010+
  700. 'endif'#013#010+
  701. 'endif'#013#010+
  702. 'endif'#013#010+
  703. #013#010+
  704. '# Where to install the examples, under linux we use the doc dir'#013#010+
  705. '# because the copytree command will create a subdir itself'#013#010+
  706. 'ifndef INSTAL','L_EXAMPLEDIR'#013#010+
  707. 'ifdef UNIXHier'#013#010+
  708. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  709. #013#010+
  710. 'ifdef BSDhier'#013#010+
  711. 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION'+
  712. ')/$(PACKAGE_NAME)'#013#010+
  713. 'else'#013#010+
  714. 'ifdef linuxHier'#013#010+
  715. 'INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples'#013#010+
  716. 'else'#013#010+
  717. 'I','NSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/example'+
  718. 's/$(PACKAGE_NAME)'#013#010+
  719. 'endif'#013#010+
  720. 'endif'#013#010+
  721. #013#010+
  722. 'else'#013#010+
  723. #013#010+
  724. 'ifdef BSDhier'#013#010+
  725. 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$'+
  726. '(PACKAGE_VERSION)'#013#010+
  727. 'else'#013#010+
  728. 'ifdef linuxHier'#013#010+
  729. 'INS','TALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PAC'+
  730. 'KAGE_VERSION)'#013#010+
  731. 'else'#013#010+
  732. 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VE'+
  733. 'RSION)'#013#010+
  734. 'endif'#013#010+
  735. #013#010+
  736. 'endif'#013#010+
  737. 'endif'#013#010+
  738. 'else'#013#010+
  739. 'ifdef INSTALL_FPCPACKAGE'#013#010+
  740. 'INSTALL_EXAMPLEDIR:=$','(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)'#013#010+
  741. 'else'#013#010+
  742. 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples'#013#010+
  743. 'endif'#013#010+
  744. 'endif'#013#010+
  745. 'endif'#013#010+
  746. #013#010+
  747. '# Where the some extra (data)files will be stored'#013#010+
  748. 'ifndef INSTALL_DATADIR'#013#010+
  749. 'INSTALL_DATADIR=$(INSTALL_BASEDIR)'#013#010+
  750. 'endif'#013#010,
  751. #013#010+
  752. 'ifndef INSTALL_SHAREDDIR'#013#010+
  753. 'INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib'#013#010+
  754. 'endif'#013#010+
  755. #013#010+
  756. '#####################################################################'#013+
  757. #010+
  758. '# Cross compile dirs'#013#010+
  759. '#####################################################################',
  760. #013#010+
  761. #013#010+
  762. 'ifdef CROSSCOMPILE'#013#010+
  763. '# Directory where the cross compile tools are stored.'#013#010+
  764. '# First check if they are available in FPCDIR. If no targets/ subdir'#013+
  765. #010+
  766. '# is found use the targets/ subdir in INSTALL_BASEDIR.'#013#010+
  767. 'ifndef CROSSBINDIR'#013#010+
  768. 'CROSSBINDIR:=$(','wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))'#013#010+
  769. 'ifeq ($(CROSSBINDIR),)'#013#010+
  770. 'CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$'+
  771. '(FULL_SOURCE))'#013#010+
  772. 'endif'#013#010+
  773. 'endif'#013#010+
  774. 'else'#013#010+
  775. 'CROSSBINDIR='#013#010+
  776. 'endif'#013#010+
  777. #013#010+
  778. #013#010+
  779. '[dirlibc]'#013#010+
  780. '# On linux, try to find w','here libgcc.a is.'#013#010+
  781. 'ifeq ($(OS_SOURCE),linux)'#013#010+
  782. #013#010+
  783. '# Amd64 to i386?'#013#010+
  784. 'ifndef GCCLIBDIR'#013#010+
  785. 'ifeq ($(CPU_TARGET),i386)'#013#010+
  786. 'ifneq ($(findstring x86_64,$(shell uname -a)),)'#013#010+
  787. 'ifeq ($(BINUTILSPREFIX),)'#013#010+
  788. 'GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-fi','le-name`)'#013#010+
  789. 'endif'#013#010+
  790. 'endif'#013#010+
  791. 'endif'#013#010+
  792. 'ifeq ($(CPU_TARGET),powerpc64)'#013#010+
  793. 'ifeq ($(BINUTILSPREFIX),)'#013#010+
  794. 'GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)'#013#010+
  795. 'endif'#013#010+
  796. 'endif'#013#010+
  797. 'endif'#013#010+
  798. #013#010+
  799. '# Try cross gcc'#013#010+
  800. 'ifndef GCCLIBDIR'#013#010+
  801. 'CROSSGCC=$(strip $(wildcard',' $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEX'+
  802. 'EEXT),$(SEARCHPATH))))'#013#010+
  803. 'ifneq ($(CROSSGCC),)'#013#010+
  804. 'GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)'#013#010+
  805. 'endif'#013#010+
  806. 'endif'#013#010+
  807. #013#010+
  808. '# Other libraries from ld.so.conf'#013#010+
  809. 'ifndef OTHERLIBDIR'#013#010+
  810. 'OTHERLIBDIR:=$(','shell grep -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS='+
  811. '" "; print $1 }'#039')'#013#010+
  812. 'endif'#013#010+
  813. 'endif'#013#010+
  814. #013#010+
  815. 'ifdef inUnix'#013#010+
  816. 'ifeq ($(OS_SOURCE),netbsd)'#013#010+
  817. 'OTHERLIBDIR+=/usr/pkg/lib'#013#010+
  818. 'endif'#013#010+
  819. 'export GCCLIBDIR OTHERLIB'#013#010+
  820. 'endif'#013#010+
  821. #013#010+
  822. #013#010+
  823. '[extensions]'#013#010+
  824. '############################','########################################'+
  825. '#'#013#010+
  826. '# Default extensions'#013#010+
  827. '#####################################################################'#013+
  828. #010+
  829. #013#010+
  830. '# Default needed extensions (Go32v2,Linux)'#013#010+
  831. 'BATCHEXT=.bat'#013#010+
  832. 'LOADEREXT=.as'#013#010+
  833. 'EXEEXT=.exe'#013#010+
  834. 'PPLEXT=.ppl'#013#010+
  835. 'PP','UEXT=.ppu'#013#010+
  836. 'OEXT=.o'#013#010+
  837. 'ASMEXT=.s'#013#010+
  838. 'SMARTEXT=.sl'#013#010+
  839. 'STATICLIBEXT=.a'#013#010+
  840. 'SHAREDLIBEXT=.so'#013#010+
  841. 'SHAREDLIBPREFIX=libfp'#013#010+
  842. 'STATICLIBPREFIX=libp'#013#010+
  843. 'IMPORTLIBPREFIX=libimp'#013#010+
  844. 'RSTEXT=.rst'#013#010+
  845. '#DEBUGSYMEXT #for debugger symbol files, define only for targets which'+
  846. ' has thi','s'#013#010+
  847. #013#010+
  848. '# 1.0.x has target specific extensions for ppu files and objects'#013#010+
  849. 'ifeq ($(findstring 1.0.,$(FPC_VERSION)),)'#013#010+
  850. '# short version for 1.1 and above - no target specific extensions'#013#010+
  851. #013#010+
  852. '# Go32v1'#013#010+
  853. 'ifeq ($(OS_TARGET),go32v1)'#013#010+
  854. 'STATICLIBPREFIX='#013#010+
  855. 'S','HORTSUFFIX=v1'#013#010+
  856. 'endif'#013#010+
  857. #013#010+
  858. '# Go32v2'#013#010+
  859. 'ifeq ($(OS_TARGET),go32v2)'#013#010+
  860. 'STATICLIBPREFIX='#013#010+
  861. 'SHORTSUFFIX=dos'#013#010+
  862. 'IMPORTLIBPREFIX='#013#010+
  863. 'endif'#013#010+
  864. #013#010+
  865. '# watcom'#013#010+
  866. 'ifeq ($(OS_TARGET),watcom)'#013#010+
  867. 'STATICLIBPREFIX='#013#010+
  868. 'OEXT=.obj'#013#010+
  869. 'ASMEXT=.asm'#013#010+
  870. 'SHAREDLIBEXT=.dll'#013#010+
  871. 'SHORTSUFFIX=wat'#013#010,
  872. 'IMPORTLIBPREFIX='#013#010+
  873. 'endif'#013#010+
  874. #013#010+
  875. '# Linux'#013#010+
  876. 'ifeq ($(OS_TARGET),linux)'#013#010+
  877. 'BATCHEXT=.sh'#013#010+
  878. 'EXEEXT='#013#010+
  879. 'HASSHAREDLIB=1'#013#010+
  880. 'SHORTSUFFIX=lnx'#013#010+
  881. 'endif'#013#010+
  882. #013#010+
  883. '# FreeBSD'#013#010+
  884. 'ifeq ($(OS_TARGET),freebsd)'#013#010+
  885. 'BATCHEXT=.sh'#013#010+
  886. 'EXEEXT='#013#010+
  887. 'HASSHAREDLIB=1'#013#010+
  888. 'SHORTSUFFIX=fbs'#013#010+
  889. 'endif'#013#010+
  890. #013#010+
  891. '# NetBS','D'#013#010+
  892. 'ifeq ($(OS_TARGET),netbsd)'#013#010+
  893. 'BATCHEXT=.sh'#013#010+
  894. 'EXEEXT='#013#010+
  895. 'HASSHAREDLIB=1'#013#010+
  896. 'SHORTSUFFIX=nbs'#013#010+
  897. 'endif'#013#010+
  898. #013#010+
  899. '# OpenBSD'#013#010+
  900. 'ifeq ($(OS_TARGET),openbsd)'#013#010+
  901. 'BATCHEXT=.sh'#013#010+
  902. 'EXEEXT='#013#010+
  903. 'HASSHAREDLIB=1'#013#010+
  904. 'SHORTSUFFIX=obs'#013#010+
  905. 'endif'#013#010+
  906. #013#010+
  907. '# Win32'#013#010+
  908. 'ifeq ($(OS_TARGET),win32)'#013#010+
  909. 'SHA','REDLIBEXT=.dll'#013#010+
  910. 'SHORTSUFFIX=w32'#013#010+
  911. 'endif'#013#010+
  912. #013#010+
  913. '# OS/2'#013#010+
  914. 'ifeq ($(OS_TARGET),os2)'#013#010+
  915. 'BATCHEXT=.cmd'#013#010+
  916. 'AOUTEXT=.out'#013#010+
  917. 'STATICLIBPREFIX='#013#010+
  918. 'SHAREDLIBEXT=.dll'#013#010+
  919. 'SHORTSUFFIX=os2'#013#010+
  920. 'ECHO=echo'#013#010+
  921. 'IMPORTLIBPREFIX='#013#010+
  922. 'endif'#013#010+
  923. #013#010+
  924. '# EMX'#013#010+
  925. 'ifeq ($(OS_TARGET),emx)'#013#010+
  926. 'BATCHEXT=.cm','d'#013#010+
  927. 'AOUTEXT=.out'#013#010+
  928. 'STATICLIBPREFIX='#013#010+
  929. 'SHAREDLIBEXT=.dll'#013#010+
  930. 'SHORTSUFFIX=emx'#013#010+
  931. 'ECHO=echo'#013#010+
  932. 'IMPORTLIBPREFIX='#013#010+
  933. 'endif'#013#010+
  934. #013#010+
  935. '# Amiga'#013#010+
  936. 'ifeq ($(OS_TARGET),amiga)'#013#010+
  937. 'EXEEXT='#013#010+
  938. 'SHAREDLIBEXT=.library'#013#010+
  939. 'SHORTSUFFIX=amg'#013#010+
  940. 'endif'#013#010+
  941. #013#010+
  942. '# MorphOS'#013#010+
  943. 'ifeq ($(OS_TARGET),morphos',')'#013#010+
  944. 'EXEEXT='#013#010+
  945. 'SHAREDLIBEXT=.library'#013#010+
  946. 'SHORTSUFFIX=mos'#013#010+
  947. 'endif'#013#010+
  948. #013#010+
  949. '# Atari'#013#010+
  950. 'ifeq ($(OS_TARGET),atari)'#013#010+
  951. 'EXEEXT=.ttp'#013#010+
  952. 'SHORTSUFFIX=ata'#013#010+
  953. 'endif'#013#010+
  954. #013#010+
  955. '# BeOS'#013#010+
  956. 'ifeq ($(OS_TARGET),beos)'#013#010+
  957. 'BATCHEXT=.sh'#013#010+
  958. 'EXEEXT='#013#010+
  959. 'SHORTSUFFIX=be'#013#010+
  960. 'endif'#013#010+
  961. #013#010+
  962. '# Haiku'#013#010+
  963. 'ifeq ($(OS_TA','RGET),haiku)'#013#010+
  964. 'BATCHEXT=.sh'#013#010+
  965. 'EXEEXT='#013#010+
  966. 'SHORTSUFFIX=hai'#013#010+
  967. 'endif'#013#010+
  968. #013#010+
  969. '# Solaris'#013#010+
  970. 'ifeq ($(OS_TARGET),solaris)'#013#010+
  971. 'BATCHEXT=.sh'#013#010+
  972. 'EXEEXT='#013#010+
  973. 'SHORTSUFFIX=sun'#013#010+
  974. 'endif'#013#010+
  975. #013#010+
  976. '# QNX'#013#010+
  977. 'ifeq ($(OS_TARGET),qnx)'#013#010+
  978. 'BATCHEXT=.sh'#013#010+
  979. 'EXEEXT='#013#010+
  980. 'SHORTSUFFIX=qnx'#013#010+
  981. 'endif'#013#010+
  982. #013#010+
  983. '# Netwa','re clib'#013#010+
  984. 'ifeq ($(OS_TARGET),netware)'#013#010+
  985. 'EXEEXT=.nlm'#013#010+
  986. 'STATICLIBPREFIX='#013#010+
  987. 'SHORTSUFFIX=nw'#013#010+
  988. 'IMPORTLIBPREFIX=imp'#013#010+
  989. 'endif'#013#010+
  990. #013#010+
  991. '# Netware libc'#013#010+
  992. 'ifeq ($(OS_TARGET),netwlibc)'#013#010+
  993. 'EXEEXT=.nlm'#013#010+
  994. 'STATICLIBPREFIX='#013#010+
  995. 'SHORTSUFFIX=nwl'#013#010+
  996. 'IMPORTLIBPREFIX=imp'#013#010+
  997. 'endif'#013#010+
  998. #013#010+
  999. '#',' MacOS'#013#010+
  1000. 'ifeq ($(OS_TARGET),macos)'#013#010+
  1001. 'BATCHEXT='#013#010+
  1002. 'EXEEXT='#013#010+
  1003. 'DEBUGSYMEXT=.xcoff'#013#010+
  1004. 'SHORTSUFFIX=mac'#013#010+
  1005. 'IMPORTLIBPREFIX=imp'#013#010+
  1006. 'endif'#013#010+
  1007. #013#010+
  1008. '# Darwin'#013#010+
  1009. 'ifeq ($(OS_TARGET),darwin)'#013#010+
  1010. 'BATCHEXT=.sh'#013#010+
  1011. 'EXEEXT='#013#010+
  1012. 'HASSHAREDLIB=1'#013#010+
  1013. 'SHORTSUFFIX=dwn'#013#010+
  1014. 'endif'#013#010+
  1015. #013#010+
  1016. '# gba'#013#010+
  1017. 'ifeq ($(','OS_TARGET),gba)'#013#010+
  1018. 'EXEEXT=.gba'#013#010+
  1019. 'SHAREDLIBEXT=.so'#013#010+
  1020. 'SHORTSUFFIX=gba'#013#010+
  1021. 'endif'#013#010+
  1022. #013#010+
  1023. '# Symbian OS'#013#010+
  1024. 'ifeq ($(OS_TARGET),symbian)'#013#010+
  1025. 'SHAREDLIBEXT=.dll'#013#010+
  1026. 'SHORTSUFFIX=symbian'#013#010+
  1027. 'endif'#013#010+
  1028. #013#010+
  1029. '# NativeNT'#013#010+
  1030. 'ifeq ($(OS_TARGET),NativeNT)'#013#010+
  1031. 'SHAREDLIBEXT=.dll'#013#010+
  1032. 'SHORTSUFFIX=n','ativent'#013#010+
  1033. 'endif'#013#010+
  1034. #013#010+
  1035. 'else'#013#010+
  1036. '# long version for 1.0.x - target specific extensions'#013#010+
  1037. #013#010+
  1038. '# Go32v1'#013#010+
  1039. 'ifeq ($(OS_TARGET),go32v1)'#013#010+
  1040. 'PPUEXT=.pp1'#013#010+
  1041. 'OEXT=.o1'#013#010+
  1042. 'ASMEXT=.s1'#013#010+
  1043. 'SMARTEXT=.sl1'#013#010+
  1044. 'STATICLIBEXT=.a1'#013#010+
  1045. 'SHAREDLIBEXT=.so1'#013#010+
  1046. 'STATICLIBPREFIX='#013#010+
  1047. 'SHORTSUFFIX=v1'#013#010,
  1048. 'IMPORTLIBPREFIX='#013#010+
  1049. 'endif'#013#010+
  1050. #013#010+
  1051. '# Go32v2'#013#010+
  1052. 'ifeq ($(OS_TARGET),go32v2)'#013#010+
  1053. 'STATICLIBPREFIX='#013#010+
  1054. 'SHORTSUFFIX=dos'#013#010+
  1055. 'IMPORTLIBPREFIX='#013#010+
  1056. 'endif'#013#010+
  1057. #013#010+
  1058. '# watcom'#013#010+
  1059. 'ifeq ($(OS_TARGET),watcom)'#013#010+
  1060. 'STATICLIBPREFIX='#013#010+
  1061. 'SHORTSUFFIX=wat'#013#010+
  1062. 'IMPORTLIBPREFIX='#013#010+
  1063. 'endif'#013#010+
  1064. #013#010+
  1065. '# Linux'#013#010+
  1066. 'ifeq',' ($(OS_TARGET),linux)'#013#010+
  1067. 'BATCHEXT=.sh'#013#010+
  1068. 'EXEEXT='#013#010+
  1069. 'HASSHAREDLIB=1'#013#010+
  1070. 'SHORTSUFFIX=lnx'#013#010+
  1071. 'endif'#013#010+
  1072. #013#010+
  1073. '# FreeBSD'#013#010+
  1074. 'ifeq ($(OS_TARGET),freebsd)'#013#010+
  1075. 'BATCHEXT=.sh'#013#010+
  1076. 'EXEEXT='#013#010+
  1077. 'HASSHAREDLIB=1'#013#010+
  1078. 'SHORTSUFFIX=fbs'#013#010+
  1079. 'endif'#013#010+
  1080. #013#010+
  1081. '# NetBSD'#013#010+
  1082. 'ifeq ($(OS_TARGET),netbsd)'#013#010+
  1083. 'BATCHEXT=','.sh'#013#010+
  1084. 'EXEEXT='#013#010+
  1085. 'HASSHAREDLIB=1'#013#010+
  1086. 'SHORTSUFFIX=nbs'#013#010+
  1087. 'endif'#013#010+
  1088. #013#010+
  1089. '# OpenBSD'#013#010+
  1090. 'ifeq ($(OS_TARGET),openbsd)'#013#010+
  1091. 'BATCHEXT=.sh'#013#010+
  1092. 'EXEEXT='#013#010+
  1093. 'HASSHAREDLIB=1'#013#010+
  1094. 'SHORTSUFFIX=obs'#013#010+
  1095. 'endif'#013#010+
  1096. #013#010+
  1097. '# Win32'#013#010+
  1098. 'ifeq ($(OS_TARGET),win32)'#013#010+
  1099. 'PPUEXT=.ppw'#013#010+
  1100. 'OEXT=.ow'#013#010+
  1101. 'ASMEXT=.sw'#013#010+
  1102. 'SMARTEXT','=.slw'#013#010+
  1103. 'STATICLIBEXT=.aw'#013#010+
  1104. 'SHAREDLIBEXT=.dll'#013#010+
  1105. 'SHORTSUFFIX=w32'#013#010+
  1106. 'endif'#013#010+
  1107. #013#010+
  1108. '# OS/2'#013#010+
  1109. 'ifeq ($(OS_TARGET),os2)'#013#010+
  1110. 'BATCHEXT=.cmd'#013#010+
  1111. 'PPUEXT=.ppo'#013#010+
  1112. 'ASMEXT=.so2'#013#010+
  1113. 'OEXT=.oo2'#013#010+
  1114. 'AOUTEXT=.out'#013#010+
  1115. 'SMARTEXT=.sl2'#013#010+
  1116. 'STATICLIBPREFIX='#013#010+
  1117. 'STATICLIBEXT=.ao2'#013#010+
  1118. 'SHAREDLIBEXT=.dll'#013#010,
  1119. 'SHORTSUFFIX=os2'#013#010+
  1120. 'ECHO=echo'#013#010+
  1121. 'IMPORTLIBPREFIX='#013#010+
  1122. 'endif'#013#010+
  1123. #013#010+
  1124. '# Amiga'#013#010+
  1125. 'ifeq ($(OS_TARGET),amiga)'#013#010+
  1126. 'EXEEXT='#013#010+
  1127. 'PPUEXT=.ppu'#013#010+
  1128. 'ASMEXT=.s'#013#010+
  1129. 'OEXT=.o'#013#010+
  1130. 'SMARTEXT=.sl'#013#010+
  1131. 'STATICLIBEXT=.a'#013#010+
  1132. 'SHAREDLIBEXT=.library'#013#010+
  1133. 'SHORTSUFFIX=amg'#013#010+
  1134. 'endif'#013#010+
  1135. #013#010+
  1136. '# Atari'#013#010+
  1137. 'ifeq ($(OS_TARGET)',',atari)'#013#010+
  1138. 'PPUEXT=.ppu'#013#010+
  1139. 'ASMEXT=.s'#013#010+
  1140. 'OEXT=.o'#013#010+
  1141. 'SMARTEXT=.sl'#013#010+
  1142. 'STATICLIBEXT=.a'#013#010+
  1143. 'EXEEXT=.ttp'#013#010+
  1144. 'SHORTSUFFIX=ata'#013#010+
  1145. 'endif'#013#010+
  1146. #013#010+
  1147. '# BeOS'#013#010+
  1148. 'ifeq ($(OS_TARGET),beos)'#013#010+
  1149. 'BATCHEXT=.sh'#013#010+
  1150. 'PPUEXT=.ppu'#013#010+
  1151. 'ASMEXT=.s'#013#010+
  1152. 'OEXT=.o'#013#010+
  1153. 'SMARTEXT=.sl'#013#010+
  1154. 'STATICLIBEXT=.a'#013#010+
  1155. 'EXEEXT='#013#010+
  1156. 'SHORTSU','FFIX=be'#013#010+
  1157. 'endif'#013#010+
  1158. #013#010+
  1159. '# Solaris'#013#010+
  1160. 'ifeq ($(OS_TARGET),solaris)'#013#010+
  1161. 'BATCHEXT=.sh'#013#010+
  1162. 'PPUEXT=.ppu'#013#010+
  1163. 'ASMEXT=.s'#013#010+
  1164. 'OEXT=.o'#013#010+
  1165. 'SMARTEXT=.sl'#013#010+
  1166. 'STATICLIBEXT=.a'#013#010+
  1167. 'EXEEXT='#013#010+
  1168. 'SHORTSUFFIX=sun'#013#010+
  1169. 'endif'#013#010+
  1170. #013#010+
  1171. '# QNX'#013#010+
  1172. 'ifeq ($(OS_TARGET),qnx)'#013#010+
  1173. 'BATCHEXT=.sh'#013#010+
  1174. 'PPUEXT=.ppu'#013#010+
  1175. 'ASMEXT=.s'#013,#010+
  1176. 'OEXT=.o'#013#010+
  1177. 'SMARTEXT=.sl'#013#010+
  1178. 'STATICLIBEXT=.a'#013#010+
  1179. 'EXEEXT='#013#010+
  1180. 'SHORTSUFFIX=qnx'#013#010+
  1181. 'endif'#013#010+
  1182. #013#010+
  1183. '# Netware'#013#010+
  1184. 'ifeq ($(OS_TARGET),netware)'#013#010+
  1185. 'STATICLIBPREFIX='#013#010+
  1186. 'PPUEXT=.ppu'#013#010+
  1187. 'OEXT=.o'#013#010+
  1188. 'ASMEXT=.s'#013#010+
  1189. 'SMARTEXT=.sl'#013#010+
  1190. 'STATICLIBEXT=.a'#013#010+
  1191. 'SHAREDLIBEXT=.nlm'#013#010+
  1192. 'EXEEXT=.nlm'#013#010+
  1193. 'SHORTSUFFI','X=nw'#013#010+
  1194. 'IMPORTLIBPREFIX=imp'#013#010+
  1195. 'endif'#013#010+
  1196. #013#010+
  1197. '# Netware libc'#013#010+
  1198. 'ifeq ($(OS_TARGET),netwlibc)'#013#010+
  1199. 'STATICLIBPREFIX='#013#010+
  1200. 'PPUEXT=.ppu'#013#010+
  1201. 'OEXT=.o'#013#010+
  1202. 'ASMEXT=.s'#013#010+
  1203. 'SMARTEXT=.sl'#013#010+
  1204. 'STATICLIBEXT=.a'#013#010+
  1205. 'SHAREDLIBEXT=.nlm'#013#010+
  1206. 'EXEEXT=.nlm'#013#010+
  1207. 'SHORTSUFFIX=nwl'#013#010+
  1208. 'IMPORTLIBPREFIX=imp'#013#010+
  1209. 'endif'#013,#010+
  1210. #013#010+
  1211. '# MacOS'#013#010+
  1212. 'ifeq ($(OS_TARGET),macos)'#013#010+
  1213. 'BATCHEXT='#013#010+
  1214. 'PPUEXT=.ppu'#013#010+
  1215. 'ASMEXT=.s'#013#010+
  1216. 'OEXT=.o'#013#010+
  1217. 'SMARTEXT=.sl'#013#010+
  1218. 'STATICLIBEXT=.a'#013#010+
  1219. 'EXEEXT='#013#010+
  1220. 'DEBUGSYMEXT=.xcoff'#013#010+
  1221. 'SHORTSUFFIX=mac'#013#010+
  1222. 'IMPORTLIBPREFIX=imp'#013#010+
  1223. 'endif'#013#010+
  1224. #013#010+
  1225. '#end of target specific settings'#013#010+
  1226. 'endif'#013#010+
  1227. #013#010+
  1228. '# For 8','.3 limited OS'#039's the short suffixes'#013#010+
  1229. '# Otherwise use the full source/target names'#013#010+
  1230. 'ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)'#013#010+
  1231. 'FPCMADE=fpcmade.$(SHORTSUFFIX)'#013#010+
  1232. 'ZIPSUFFIX=$(SHORTSUFFIX)'#013#010+
  1233. 'ZIPCROSSPREFIX='#013#010+
  1234. 'ZIPSOURCESUFFIX=src'#013#010+
  1235. 'ZIPEXAMPLESU','FFIX=exm'#013#010+
  1236. 'else'#013#010+
  1237. 'FPCMADE=fpcmade.$(TARGETSUFFIX)'#013#010+
  1238. 'ZIPSOURCESUFFIX=.source'#013#010+
  1239. 'ZIPEXAMPLESUFFIX=.examples'#013#010+
  1240. 'ifdef CROSSCOMPILE'#013#010+
  1241. 'ZIPSUFFIX=.$(SOURCESUFFIX)'#013#010+
  1242. 'ZIPCROSSPREFIX=$(TARGETSUFFIX)-'#013#010+
  1243. 'else'#013#010+
  1244. 'ZIPSUFFIX=.$(TARGETSUFFIX)'#013#010+
  1245. 'ZIPCROSSPREFIX='#013#010+
  1246. 'endif'#013,#010+
  1247. 'endif'#013#010+
  1248. #013#010+
  1249. '[defaulttools]'#013#010+
  1250. '#####################################################################'#013+
  1251. #010+
  1252. '# Default Tools'#013#010+
  1253. '#####################################################################'#013+
  1254. #010+
  1255. #013#010+
  1256. '# Names of the binutils tools'#013#010+
  1257. 'ASNAME=$(BINUTILSPREFI','X)as'#013#010+
  1258. 'LDNAME=$(BINUTILSPREFIX)ld'#013#010+
  1259. 'ARNAME=$(BINUTILSPREFIX)ar'#013#010+
  1260. 'RCNAME=$(BINUTILSPREFIX)rc'#013#010+
  1261. 'ifneq ($(findstring 1.0.,$(FPC_VERSION)),)'#013#010+
  1262. 'ifeq ($(OS_TARGET),win32)'#013#010+
  1263. 'ifeq ($(CROSSBINDIR),)'#013#010+
  1264. 'ASNAME=asw'#013#010+
  1265. 'LDNAME=ldw'#013#010+
  1266. 'ARNAME=arw'#013#010+
  1267. 'endif'#013#010+
  1268. 'endif'#013#010+
  1269. 'endif',#013#010+
  1270. #013#010+
  1271. '# assembler, redefine it if cross compiling'#013#010+
  1272. 'ifndef ASPROG'#013#010+
  1273. 'ifdef CROSSBINDIR'#013#010+
  1274. 'ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)'#013#010+
  1275. 'else'#013#010+
  1276. 'ASPROG=$(ASNAME)'#013#010+
  1277. 'endif'#013#010+
  1278. 'endif'#013#010+
  1279. #013#010+
  1280. '# linker, but probably not used'#013#010+
  1281. 'ifndef LDPROG'#013#010+
  1282. 'ifdef CROSSBINDIR'#013#010+
  1283. 'LDPRO','G=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)'#013#010+
  1284. 'else'#013#010+
  1285. 'LDPROG=$(LDNAME)'#013#010+
  1286. 'endif'#013#010+
  1287. 'endif'#013#010+
  1288. #013#010+
  1289. '# Resource compiler'#013#010+
  1290. 'ifndef RCPROG'#013#010+
  1291. 'ifdef CROSSBINDIR'#013#010+
  1292. 'RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)'#013#010+
  1293. 'else'#013#010+
  1294. 'RCPROG=$(RCNAME)'#013#010+
  1295. 'endif'#013#010+
  1296. 'endif'#013#010+
  1297. #013#010+
  1298. '# Archiver'#013#010+
  1299. 'ifndef A','RPROG'#013#010+
  1300. 'ifdef CROSSBINDIR'#013#010+
  1301. 'ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)'#013#010+
  1302. 'else'#013#010+
  1303. 'ARPROG=$(ARNAME)'#013#010+
  1304. 'endif'#013#010+
  1305. 'endif'#013#010+
  1306. #013#010+
  1307. '# Override defaults'#013#010+
  1308. 'AS=$(ASPROG)'#013#010+
  1309. 'LD=$(LDPROG)'#013#010+
  1310. 'RC=$(RCPROG)'#013#010+
  1311. 'AR=$(ARPROG)'#013#010+
  1312. #013#010+
  1313. '# ppas.bat / ppas.sh'#013#010+
  1314. 'PPAS=ppas$(SRCBATCHEXT)'#013#010+
  1315. #013#010+
  1316. '#',' ldconfig to rebuild .so cache'#013#010+
  1317. 'ifdef inUnix'#013#010+
  1318. 'LDCONFIG=ldconfig'#013#010+
  1319. 'else'#013#010+
  1320. 'LDCONFIG='#013#010+
  1321. 'endif'#013#010+
  1322. #013#010+
  1323. 'ifdef DATE'#013#010+
  1324. 'DATESTR:=$(shell $(DATE) +%Y%m%d)'#013#010+
  1325. 'else'#013#010+
  1326. 'DATESTR='#013#010+
  1327. 'endif'#013#010+
  1328. #013#010+
  1329. '# Look if UPX is found for go32v2 and win32. We can'#039't use $UPX bec'+
  1330. 'uase'#013#010+
  1331. '# upx',' uses that one itself (PFV)'#013#010+
  1332. 'ifndef UPXPROG'#013#010+
  1333. 'ifeq ($(OS_TARGET),go32v2)'#013#010+
  1334. 'UPXPROG:=1'#013#010+
  1335. 'endif'#013#010+
  1336. 'ifeq ($(OS_TARGET),win32)'#013#010+
  1337. 'UPXPROG:=1'#013#010+
  1338. 'endif'#013#010+
  1339. 'ifdef UPXPROG'#013#010+
  1340. 'UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)'+
  1341. ')))'#013#010+
  1342. 'ifeq ($(UPXP','ROG),)'#013#010+
  1343. 'UPXPROG='#013#010+
  1344. 'else'#013#010+
  1345. 'UPXPROG:=$(firstword $(UPXPROG))'#013#010+
  1346. 'endif'#013#010+
  1347. 'else'#013#010+
  1348. 'UPXPROG='#013#010+
  1349. 'endif'#013#010+
  1350. 'endif'#013#010+
  1351. 'export UPXPROG'#013#010+
  1352. #013#010+
  1353. '# Zip options'#013#010+
  1354. 'ZIPOPT=-9'#013#010+
  1355. 'ZIPEXT=.zip'#013#010+
  1356. #013#010+
  1357. '# Tar options'#013#010+
  1358. 'ifeq ($(USETAR),bz2)'#013#010+
  1359. 'TAROPT=vj'#013#010+
  1360. 'TAREXT=.tar.bz2'#013#010+
  1361. 'else'#013#010+
  1362. 'TAROPT=vz'#013#010+
  1363. 'TARE','XT=.tar.gz'#013#010+
  1364. 'endif'#013#010+
  1365. #013#010+
  1366. #013#010+
  1367. '[command_begin]'#013#010+
  1368. '#####################################################################'#013+
  1369. #010+
  1370. '# Compiler Command Line'#013#010+
  1371. '#####################################################################'#013+
  1372. #010+
  1373. #013#010+
  1374. '# Load commandline OPTDEF and a','dd FPC_CPU define, for compiling the'#013+
  1375. #010+
  1376. '# compiler this needs to be turned off'#013#010+
  1377. 'ifndef NOCPUDEF'#013#010+
  1378. 'override FPCOPTDEF=$(ARCH)'#013#010+
  1379. 'endif'#013#010+
  1380. #013#010+
  1381. #013#010+
  1382. '# Load commandline OPT and add target and unit dir to be sure'#013#010+
  1383. 'ifneq ($(OS_TARGET),$(OS_SOURCE))'#013#010+
  1384. 'override',' FPCOPT+=-T$(OS_TARGET)'#013#010+
  1385. 'endif'#013#010+
  1386. #013#010+
  1387. 'ifneq ($(CPU_TARGET),$(CPU_SOURCE))'#013#010+
  1388. 'override FPCOPT+=-P$(ARCH)'#013#010+
  1389. 'endif'#013#010+
  1390. #013#010+
  1391. 'ifeq ($(OS_SOURCE),openbsd)'#013#010+
  1392. 'override FPCOPT+=-FD$(NEW_BINUTILS_PATH)'#013#010+
  1393. 'endif'#013#010+
  1394. #013#010+
  1395. 'ifndef CROSSBOOTSTRAP'#013#010+
  1396. 'ifneq ($(BINUTILSPREFIX),)'#013#010+
  1397. 'o','verride FPCOPT+=-XP$(BINUTILSPREFIX)'#013#010+
  1398. 'endif'#013#010+
  1399. 'ifneq ($(BINUTILSPREFIX),)'#013#010+
  1400. 'override FPCOPT+=-Xr$(RLINKPATH)'#013#010+
  1401. 'endif'#013#010+
  1402. 'endif'#013#010+
  1403. #013#010+
  1404. '# User dirs should be first, so they are looked at first'#013#010+
  1405. 'ifdef UNITDIR'#013#010+
  1406. 'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))',#013#010+
  1407. 'endif'#013#010+
  1408. 'ifdef LIBDIR'#013#010+
  1409. 'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#013#010+
  1410. 'endif'#013#010+
  1411. 'ifdef OBJDIR'#013#010+
  1412. 'override FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#013#010+
  1413. 'endif'#013#010+
  1414. 'ifdef INCDIR'#013#010+
  1415. 'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#013#010+
  1416. 'endif'#013#010+
  1417. #013#010+
  1418. '# Smartlinking'#013#010+
  1419. 'ifdef LINKSMART',#013#010+
  1420. 'override FPCOPT+=-XX'#013#010+
  1421. 'endif'#013#010+
  1422. #013#010+
  1423. '# Smartlinking creation'#013#010+
  1424. 'ifdef CREATESMART'#013#010+
  1425. 'override FPCOPT+=-CX'#013#010+
  1426. 'endif'#013#010+
  1427. #013#010+
  1428. '# Debug'#013#010+
  1429. 'ifdef DEBUG'#013#010+
  1430. 'override FPCOPT+=-gl'#013#010+
  1431. 'override FPCOPTDEF+=DEBUG'#013#010+
  1432. 'endif'#013#010+
  1433. #013#010+
  1434. '# Release mode'#013#010+
  1435. '# (strip, optimize and don'#039't load fp','c.cfg)'#013#010+
  1436. '# fpc 2.1 has -O2 for all targets'#013#010+
  1437. 'ifdef RELEASE'#013#010+
  1438. 'ifneq ($(findstring 2.0.,$(FPC_VERSION)),)'#013#010+
  1439. 'ifeq ($(CPU_TARGET),i386)'#013#010+
  1440. 'FPCCPUOPT:=-OG2p3'#013#010+
  1441. 'endif'#013#010+
  1442. 'ifeq ($(CPU_TARGET),powerpc)'#013#010+
  1443. 'FPCCPUOPT:=-O1r'#013#010+
  1444. 'endif'#013#010+
  1445. 'else'#013#010+
  1446. 'FPCCPUOPT:=-O2'#013#010+
  1447. 'endif'#013#010+
  1448. 'ov','erride FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n'#013#010+
  1449. 'override FPCOPTDEF+=RELEASE'#013#010+
  1450. 'endif'#013#010+
  1451. #013#010+
  1452. '# Strip'#013#010+
  1453. 'ifdef STRIP'#013#010+
  1454. 'override FPCOPT+=-Xs'#013#010+
  1455. 'endif'#013#010+
  1456. #013#010+
  1457. '# Optimizer'#013#010+
  1458. 'ifdef OPTIMIZE'#013#010+
  1459. 'override FPCOPT+=-O2'#013#010+
  1460. 'endif'#013#010+
  1461. #013#010+
  1462. '# Verbose settings (warning,note,info)'#013#010+
  1463. 'ifdef VER','BOSE'#013#010+
  1464. 'override FPCOPT+=-vwni'#013#010+
  1465. 'endif'#013#010+
  1466. #013#010+
  1467. '# Needed compiler options'#013#010+
  1468. 'ifdef COMPILER_OPTIONS'#013#010+
  1469. 'override FPCOPT+=$(COMPILER_OPTIONS)'#013#010+
  1470. 'endif'#013#010+
  1471. 'ifdef COMPILER_UNITDIR'#013#010+
  1472. 'override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))'#013#010+
  1473. 'endif'#013#010+
  1474. 'ifdef COMPILER_LIBR','ARYDIR'#013#010+
  1475. 'override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))'#013#010+
  1476. 'endif'#013#010+
  1477. 'ifdef COMPILER_OBJECTDIR'#013#010+
  1478. 'override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#013#010+
  1479. 'endif'#013#010+
  1480. 'ifdef COMPILER_INCLUDEDIR'#013#010+
  1481. 'override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUD','EDIR))'#013#010+
  1482. 'endif'#013#010+
  1483. #013#010+
  1484. '# Cross compiler utils'#013#010+
  1485. 'ifdef CROSSBINDIR'#013#010+
  1486. 'override FPCOPT+=-FD$(CROSSBINDIR)'#013#010+
  1487. 'endif'#013#010+
  1488. #013#010+
  1489. '# Target dirs and the prefix to use for clean/install'#013#010+
  1490. 'ifdef COMPILER_TARGETDIR'#013#010+
  1491. 'override FPCOPT+=-FE$(COMPILER_TARGETDIR)'#013#010+
  1492. 'ifeq ($(COM','PILER_TARGETDIR),.)'#013#010+
  1493. 'override TARGETDIRPREFIX='#013#010+
  1494. 'else'#013#010+
  1495. 'override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/'#013#010+
  1496. 'endif'#013#010+
  1497. 'endif'#013#010+
  1498. #013#010+
  1499. '# Unit target dir (default is units/<cpu>-<os>/'#013#010+
  1500. 'ifdef COMPILER_UNITTARGETDIR'#013#010+
  1501. 'override FPCOPT+=-FU$(COMPILER_UNITTARGETD','IR)'#013#010+
  1502. 'ifeq ($(COMPILER_UNITTARGETDIR),.)'#013#010+
  1503. 'override UNITTARGETDIRPREFIX='#013#010+
  1504. 'else'#013#010+
  1505. 'override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/'#013#010+
  1506. 'endif'#013#010+
  1507. 'else'#013#010+
  1508. 'ifdef COMPILER_TARGETDIR'#013#010+
  1509. 'override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)'#013#010+
  1510. 'override UN','ITTARGETDIRPREFIX=$(TARGETDIRPREFIX)'#013#010+
  1511. 'endif'#013#010+
  1512. 'endif'#013#010+
  1513. #013#010+
  1514. 'ifdef CREATESHARED'#013#010+
  1515. 'override FPCOPT+=-Cg'#013#010+
  1516. #013#010+
  1517. 'ifeq ($(CPU_TARGET),i386)'#013#010+
  1518. 'override FPCOPT+=-Aas'#013#010+
  1519. 'endif'#013#010+
  1520. #013#010+
  1521. 'endif'#013#010+
  1522. #013#010+
  1523. '# create always pic'#039'ed code on x86_64'#013#010+
  1524. 'ifeq ($(findstring 2.0.,$(FPC_VERSI','ON)),)'#013#010+
  1525. 'ifeq ($(OS_TARGET),linux)'#013#010+
  1526. 'ifeq ($(CPU_TARGET),x86_64)'#013#010+
  1527. 'override FPCOPT+=-Cg'#013#010+
  1528. 'endif'#013#010+
  1529. 'endif'#013#010+
  1530. 'endif'#013#010+
  1531. #013#010+
  1532. 'ifdef LINKSHARED'#013#010+
  1533. '#!!! deactived for testing override FPCOPT+=-XD'#013#010+
  1534. 'endif'#013#010+
  1535. #013#010+
  1536. #013#010+
  1537. '[command_libc]'#013#010+
  1538. '# Add GCC lib path if asked'#013#010+
  1539. 'ifdef GC','CLIBDIR'#013#010+
  1540. 'override FPCOPT+=-Fl$(GCCLIBDIR)'#013#010+
  1541. 'endif'#013#010+
  1542. 'ifdef OTHERLIBDIR'#013#010+
  1543. 'override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))'#013#010+
  1544. 'endif'#013#010+
  1545. #013#010+
  1546. #013#010+
  1547. '[command_end]'#013#010+
  1548. '# Add commandline options last so they can override'#013#010+
  1549. 'ifdef OPT'#013#010+
  1550. 'override FPCOPT+=$(OPT)'#013#010+
  1551. 'endif'#013,#010+
  1552. #013#010+
  1553. '# Add defines from FPCOPTDEF to FPCOPT'#013#010+
  1554. 'ifdef FPCOPTDEF'#013#010+
  1555. 'override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))'#013#010+
  1556. 'endif'#013#010+
  1557. #013#010+
  1558. '# Was a config file specified ?'#013#010+
  1559. 'ifdef CFGFILE'#013#010+
  1560. 'override FPCOPT+=@$(CFGFILE)'#013#010+
  1561. 'endif'#013#010+
  1562. #013#010+
  1563. '# Use the environment to pass command','line options?'#013#010+
  1564. 'ifdef USEENV'#013#010+
  1565. 'override FPCEXTCMD:=$(FPCOPT)'#013#010+
  1566. 'override FPCOPT:=!FPCEXTCMD'#013#010+
  1567. 'export FPCEXTCMD'#013#010+
  1568. 'endif'#013#010+
  1569. #013#010+
  1570. 'override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#013#010+
  1571. 'override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)'#013#010+
  1572. #013#010+
  1573. 'ifneq ($(AFULL_TARGET)',',$(AFULL_SOURCE))'#013#010+
  1574. 'override ACROSSCOMPILE=1'#013#010+
  1575. 'endif'#013#010+
  1576. #013#010+
  1577. 'ifdef ACROSSCOMPILE'#013#010+
  1578. 'override FPCOPT+=$(CROSSOPT)'#013#010+
  1579. 'endif'#013#010+
  1580. #013#010+
  1581. '# Compiler commandline'#013#010+
  1582. 'override COMPILER:=$(FPC) $(FPCOPT)'#013#010+
  1583. #013#010+
  1584. '# also call ppas if with command option -s'#013#010+
  1585. '# but only if the F','ULL_SOURCE and FULL_TARGET are equal'#013#010+
  1586. 'ifeq (,$(findstring -s ,$(COMPILER)))'#013#010+
  1587. 'EXECPPAS='#013#010+
  1588. 'else'#013#010+
  1589. 'ifeq ($(FULL_SOURCE),$(FULL_TARGET))'#013#010+
  1590. 'ifdef RUNBATCH'#013#010+
  1591. 'EXECPPAS:=@$(RUNBATCH) $(PPAS)'#013#010+
  1592. 'else'#013#010+
  1593. 'EXECPPAS:=@$(PPAS)'#013#010+
  1594. 'endif'#013#010+
  1595. 'endif'#013#010+
  1596. 'endif'#013#010+
  1597. #013#010+
  1598. #013#010+
  1599. '[loaderru','les]'#013#010+
  1600. '#####################################################################'#013+
  1601. #010+
  1602. '# Loaders'#013#010+
  1603. '#####################################################################'#013+
  1604. #010+
  1605. #013#010+
  1606. '.PHONY: fpc_loaders'#013#010+
  1607. #013#010+
  1608. 'ifneq ($(TARGET_LOADERS),)'#013#010+
  1609. 'override ALLTARGET+=fpc_load','ers'#013#010+
  1610. 'override CLEANTARGET+=fpc_loaders_clean'#013#010+
  1611. 'override INSTALLTARGET+=fpc_loaders_install'#013#010+
  1612. #013#010+
  1613. 'override LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))'#013#010+
  1614. 'endif'#013#010+
  1615. #013#010+
  1616. '%$(OEXT): %$(LOADEREXT)'#013#010+
  1617. 'ifdef COMPILER_UNITTARGETDIR'#013#010+
  1618. ' $(AS) -o $(C','OMPILER_UNITTARGETDIR)/$*$(OEXT) $<'#013#010+
  1619. 'else'#013#010+
  1620. ' $(AS) -o $*$(OEXT) $<'#013#010+
  1621. 'endif'#013#010+
  1622. #013#010+
  1623. 'fpc_loaders: $(COMPILER_UNITTARGETDIR) $(LOADEROFILES)'#013#010+
  1624. #013#010+
  1625. 'fpc_loaders_clean:'#013#010+
  1626. 'ifdef COMPILER_UNITTARGETDIR'#013#010+
  1627. ' -$(DEL) $(addprefix $(COMPILER_UNITTARGET','DIR)/,$(LOADEROFILE'+
  1628. 'S))'#013#010+
  1629. 'else'#013#010+
  1630. ' -$(DEL) $(LOADEROFILES)'#013#010+
  1631. 'endif'#013#010+
  1632. #013#010+
  1633. 'fpc_loaders_install:'#013#010+
  1634. ' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
  1635. 'ifdef COMPILER_UNITTARGETDIR'#013#010+
  1636. ' $(INSTALL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFIL'+
  1637. 'ES)) $(IN','STALL_UNITDIR)'#013#010+
  1638. 'else'#013#010+
  1639. ' $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)'#013#010+
  1640. 'endif'#013#010+
  1641. #013#010+
  1642. #013#010+
  1643. '[unitrules]'#013#010+
  1644. '#####################################################################'#013+
  1645. #010+
  1646. '# Units'#013#010+
  1647. '###########################################################','#########'+
  1648. '#'#013#010+
  1649. #013#010+
  1650. '.PHONY: fpc_units'#013#010+
  1651. #013#010+
  1652. 'ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)'#013#010+
  1653. 'override ALLTARGET+=fpc_units'#013#010+
  1654. #013#010+
  1655. 'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))'#013#010+
  1656. 'override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_','IMPLICI'+
  1657. 'TUNITS))'#013#010+
  1658. 'override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#013#010+
  1659. 'override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#013#010+
  1660. 'endif'#013#010+
  1661. #013#010+
  1662. 'fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)'#013#010+
  1663. #013#010+
  1664. #013#010+
  1665. '[exerules]'#013#010+
  1666. '############','########################################################'+
  1667. '#'#013#010+
  1668. '# Exes'#013#010+
  1669. '#####################################################################'#013+
  1670. #010+
  1671. #013#010+
  1672. '.PHONY: fpc_exes'#013#010+
  1673. #013#010+
  1674. '# Programs are not needed for a cross installation'#013#010+
  1675. 'ifndef CROSSINSTALL'#013#010+
  1676. 'ifneq (','$(TARGET_PROGRAMS),)'#013#010+
  1677. 'override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))'#013#010+
  1678. 'override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefi'+
  1679. 'x $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) '+
  1680. '$(addprefix $(IMP','ORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_'+
  1681. 'PROGRAMS)))'#013#010+
  1682. #013#010+
  1683. 'override ALLTARGET+=fpc_exes'#013#010+
  1684. 'override INSTALLEXEFILES+=$(EXEFILES)'#013#010+
  1685. 'override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#013#010+
  1686. 'ifeq ($(OS_TARGET),os2)'#013#010+
  1687. 'override CLEANEXEFILES+=$(adds','uffix $(AOUTEXT),$(TARGET_PROGRAMS))'#013+
  1688. #010+
  1689. 'endif'#013#010+
  1690. 'ifeq ($(OS_TARGET),emx)'#013#010+
  1691. 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#013+
  1692. #010+
  1693. 'endif'#013#010+
  1694. 'endif'#013#010+
  1695. 'endif'#013#010+
  1696. #013#010+
  1697. 'fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)'#013+
  1698. #010+
  1699. #013#010+
  1700. #013#010+
  1701. '[rst','rules]'#013#010+
  1702. '#####################################################################'#013+
  1703. #010+
  1704. '# Resource strings'#013#010+
  1705. '#####################################################################'#013+
  1706. #010+
  1707. #013#010+
  1708. 'ifdef TARGET_RSTS'#013#010+
  1709. 'override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_','RSTS))'#013#010+
  1710. #013#010+
  1711. 'override CLEANRSTFILES+=$(RSTFILES)'#013#010+
  1712. 'endif'#013#010+
  1713. #013#010+
  1714. #013#010+
  1715. '[examplerules]'#013#010+
  1716. '#####################################################################'#013+
  1717. #010+
  1718. '# Examples'#013#010+
  1719. '#####################################################################'#013+
  1720. #010+
  1721. #013#010+
  1722. '.PHONY: fp','c_examples'#013#010+
  1723. #013#010+
  1724. 'ifneq ($(TARGET_EXAMPLES),)'#013#010+
  1725. 'HASEXAMPLES=1'#013#010+
  1726. 'override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMP'+
  1727. 'LES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_E'+
  1728. 'XAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPL','ES)))'#013#010+
  1729. 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))'#013#010+
  1730. 'override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addp'+
  1731. 'refix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES'+
  1732. '))) $(addprefix $(IMPORTLIB','PREFIX),$(addsuffix $(STATICLIBEXT),$(TAR'+
  1733. 'GET_EXAMPLES)))'#013#010+
  1734. #013#010+
  1735. 'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#013#010+
  1736. 'ifeq ($(OS_TARGET),os2)'#013#010+
  1737. 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#013+
  1738. #010+
  1739. 'endif'#013#010+
  1740. 'ifeq ($(OS_TARGET),emx',')'#013#010+
  1741. 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#013+
  1742. #010+
  1743. 'endif'#013#010+
  1744. 'endif'#013#010+
  1745. 'ifneq ($(TARGET_EXAMPLEDIRS),)'#013#010+
  1746. 'HASEXAMPLES=1'#013#010+
  1747. 'endif'#013#010+
  1748. #013#010+
  1749. 'fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIR'+
  1750. 'S))'#013#010+
  1751. #013#010+
  1752. #013#010+
  1753. '[compilerules]'#013#010+
  1754. '####','################################################################'+
  1755. '#'#013#010+
  1756. '# General compile rules'#013#010+
  1757. '#####################################################################'#013+
  1758. #010+
  1759. #013#010+
  1760. '.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared'#013#010+
  1761. #013#010+
  1762. '$(FPCMADE): $','(ALLDEPENDENCIES) $(ALLTARGET)'#013#010+
  1763. ' @$(ECHOREDIR) Compiled > $(FPCMADE)'#013#010+
  1764. #013#010+
  1765. 'fpc_all: $(FPCMADE)'#013#010+
  1766. #013#010+
  1767. 'fpc_smart:'#013#010+
  1768. ' $(MAKE) all LINKSMART=1 CREATESMART=1'#013#010+
  1769. #013#010+
  1770. 'fpc_debug:'#013#010+
  1771. ' $(MAKE) all DEBUG=1'#013#010+
  1772. #013#010+
  1773. 'fpc_release:'#013#010+
  1774. ' $(MAKE) all ','RELEASE=1'#013#010+
  1775. #013#010+
  1776. '# General compile rules, available for both possible .pp and .pas exte'+
  1777. 'nsions'#013#010+
  1778. #013#010+
  1779. '.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res'#013+
  1780. #010+
  1781. #013#010+
  1782. '$(COMPILER_UNITTARGETDIR):'#013#010+
  1783. ' $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)'#013#010+
  1784. #013,#010+
  1785. '$(COMPILER_TARGETDIR):'#013#010+
  1786. ' $(MKDIRTREE) $(COMPILER_TARGETDIR)'#013#010+
  1787. #013#010+
  1788. '%$(PPUEXT): %.pp'#013#010+
  1789. ' $(COMPILER) $<'#013#010+
  1790. ' $(EXECPPAS)'#013#010+
  1791. #013#010+
  1792. '%$(PPUEXT): %.pas'#013#010+
  1793. ' $(COMPILER) $<'#013#010+
  1794. ' $(EXECPPAS)'#013#010+
  1795. #013#010+
  1796. '%$(EXEEXT): %.pp'#013#010+
  1797. ' $(COMPILER) ','$<'#013#010+
  1798. ' $(EXECPPAS)'#013#010+
  1799. #013#010+
  1800. '%$(EXEEXT): %.pas'#013#010+
  1801. ' $(COMPILER) $<'#013#010+
  1802. ' $(EXECPPAS)'#013#010+
  1803. #013#010+
  1804. '%$(EXEEXT): %.lpr'#013#010+
  1805. ' $(COMPILER) $<'#013#010+
  1806. ' $(EXECPPAS)'#013#010+
  1807. #013#010+
  1808. '%$(EXEEXT): %.dpr'#013#010+
  1809. ' $(COMPILER) $<'#013#010+
  1810. ' $(EXECPPAS)'#013#010+
  1811. #013#010+
  1812. '%.res: %.rc'#013#010+
  1813. ' ',' windres -i $< -o $@'#013#010+
  1814. #013#010+
  1815. '# Search paths for .ppu, .pp, .pas, .lpr, .dpr'#013#010+
  1816. 'vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
  1817. 'vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
  1818. 'vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INC','LUDEDIR)'#013#010+
  1819. 'vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
  1820. 'vpath %.inc $(COMPILER_INCLUDEDIR)'#013#010+
  1821. 'vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)'#013#010+
  1822. 'vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)'#013#010+
  1823. #013#010+
  1824. '[sharedrules]'#013#010+
  1825. '#################################','###################################'+
  1826. '#'#013#010+
  1827. '# Library'#013#010+
  1828. '#####################################################################'#013+
  1829. #010+
  1830. #013#010+
  1831. '.PHONY: fpc_shared'#013#010+
  1832. #013#010+
  1833. 'override INSTALLTARGET+=fpc_shared_install'#013#010+
  1834. #013#010+
  1835. 'ifndef SHARED_LIBVERSION'#013#010+
  1836. 'SHARED_LIBVERSION=$(FPC_','VERSION)'#013#010+
  1837. 'endif'#013#010+
  1838. #013#010+
  1839. 'ifndef SHARED_LIBNAME'#013#010+
  1840. 'SHARED_LIBNAME=$(PACKAGE_NAME)'#013#010+
  1841. 'endif'#013#010+
  1842. #013#010+
  1843. 'ifndef SHARED_FULLNAME'#013#010+
  1844. 'SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSIO'+
  1845. 'N)$(SHAREDLIBEXT)'#013#010+
  1846. 'endif'#013#010+
  1847. #013#010+
  1848. '# Default sharedlib units are all u','nit objects'#013#010+
  1849. 'ifndef SHARED_LIBUNITS'#013#010+
  1850. 'SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)'#013#010+
  1851. 'override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_L'+
  1852. 'IBUNITS))'#013#010+
  1853. 'endif'#013#010+
  1854. #013#010+
  1855. 'fpc_shared:'#013#010+
  1856. 'ifdef HASSHAREDLIB'#013#010+
  1857. ' $(MAKE) all CR','EATESHARED=1 LINKSHARED=1 CREATESMART=1'#013#010+
  1858. 'ifneq ($(SHARED_BUILD),n)'#013#010+
  1859. ' $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -'+
  1860. 'o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)'#013#010+
  1861. 'endif'#013#010+
  1862. 'else'#013#010+
  1863. ' @$(ECHO) Shared Libraries not su','pported'#013#010+
  1864. 'endif'#013#010+
  1865. #013#010+
  1866. 'fpc_shared_install:'#013#010+
  1867. 'ifneq ($(SHARED_BUILD),n)'#013#010+
  1868. 'ifneq ($(SHARED_LIBUNITS),)'#013#010+
  1869. 'ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)'#013#010+
  1870. ' $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INST'+
  1871. 'ALL_SHAR','EDDIR)'#013#010+
  1872. 'endif'#013#010+
  1873. 'endif'#013#010+
  1874. 'endif'#013#010+
  1875. #013#010+
  1876. '[installrules]'#013#010+
  1877. '#####################################################################'#013+
  1878. #010+
  1879. '# Install rules'#013#010+
  1880. '#####################################################################'#013+
  1881. #010+
  1882. #013#010+
  1883. '.PHONY: fpc_install fpc_sourcein','stall fpc_exampleinstall'#013#010+
  1884. #013#010+
  1885. 'ifdef INSTALL_UNITS'#013#010+
  1886. 'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))'#013#010+
  1887. 'endif'#013#010+
  1888. #013#010+
  1889. 'ifdef INSTALL_BUILDUNIT'#013#010+
  1890. 'override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$'+
  1891. '(INSTALLPPUFILES))'#013#010,
  1892. 'endif'#013#010+
  1893. #013#010+
  1894. 'ifdef INSTALLPPUFILES'#013#010+
  1895. 'override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFI'+
  1896. 'LES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT)'+
  1897. ',$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEX','T'+
  1898. '),$(STATICLIBEXT),$(INSTALLPPUFILES)))'#013#010+
  1899. 'ifneq ($(UNITTARGETDIRPREFIX),)'#013#010+
  1900. 'override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir '+
  1901. '$(INSTALLPPUFILES)))'#013#010+
  1902. 'override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPR'+
  1903. 'EFIX','),$(notdir $(INSTALLPPULINKFILES))))'#013#010+
  1904. 'endif'#013#010+
  1905. '# Implicitly install Package.fpc'#013#010+
  1906. 'override INSTALL_CREATEPACKAGEFPC=1'#013#010+
  1907. 'endif'#013#010+
  1908. #013#010+
  1909. 'ifdef INSTALLEXEFILES'#013#010+
  1910. 'ifneq ($(TARGETDIRPREFIX),)'#013#010+
  1911. 'override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notd','ir $('+
  1912. 'INSTALLEXEFILES)))'#013#010+
  1913. 'endif'#013#010+
  1914. 'endif'#013#010+
  1915. #013#010+
  1916. 'fpc_install: all $(INSTALLTARGET)'#013#010+
  1917. 'ifdef INSTALLEXEFILES'#013#010+
  1918. ' $(MKDIR) $(INSTALL_BINDIR)'#013#010+
  1919. '# Compress the exes if upx is defined'#013#010+
  1920. 'ifdef UPXPROG'#013#010+
  1921. ' -$(UPXPROG) $(INSTALLEXEFILES)'#013#010+
  1922. 'endif'#013#010+
  1923. ' ',' $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)'#013#010+
  1924. 'endif'#013#010+
  1925. 'ifdef INSTALL_CREATEPACKAGEFPC'#013#010+
  1926. 'ifdef FPCMAKE'#013#010+
  1927. '# If the fpcpackage variable is set then create and install Package.fp'+
  1928. 'c,'#013#010+
  1929. '# a safety check is done if Makefile.fpc is available'#013#010+
  1930. 'i','fdef PACKAGE_VERSION'#013#010+
  1931. 'ifneq ($(wildcard Makefile.fpc),)'#013#010+
  1932. ' $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc'#013#010+
  1933. ' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
  1934. ' $(INSTALL) Package.fpc $(INSTALL_UNITDIR)'#013#010+
  1935. 'endif'#013#010+
  1936. 'endif'#013#010+
  1937. 'endif'#013#010+
  1938. 'endif'#013#010+
  1939. 'if','def INSTALLPPUFILES'#013#010+
  1940. ' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
  1941. ' $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)'#013#010+
  1942. 'ifneq ($(INSTALLPPULINKFILES),)'#013#010+
  1943. ' $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#013#010+
  1944. 'endif'#013#010+
  1945. 'ifneq ($(wildcard $(LI','B_FULLNAME)),)'#013#010+
  1946. ' $(MKDIR) $(INSTALL_LIBDIR)'#013#010+
  1947. ' $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)'#013#010+
  1948. 'ifdef inUnix'#013#010+
  1949. ' ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)'#013#010+
  1950. 'endif'#013#010+
  1951. 'endif'#013#010+
  1952. 'endif'#013#010+
  1953. 'ifdef INSTALL_FILES'#013#010+
  1954. ' $(MKDIR)',' $(INSTALL_DATADIR)'#013#010+
  1955. ' $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)'#013#010+
  1956. 'endif'#013#010+
  1957. #013#010+
  1958. 'fpc_sourceinstall: distclean'#013#010+
  1959. ' $(MKDIR) $(INSTALL_SOURCEDIR)'#013#010+
  1960. ' $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)'#013#010+
  1961. #013#010+
  1962. 'fpc_exampleinstall: $(addsuf','fix _distclean,$(TARGET_EXAMPLEDIRS))'#013+
  1963. #010+
  1964. 'ifdef HASEXAMPLES'#013#010+
  1965. ' $(MKDIR) $(INSTALL_EXAMPLEDIR)'#013#010+
  1966. 'endif'#013#010+
  1967. 'ifdef EXAMPLESOURCEFILES'#013#010+
  1968. ' $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)'#013#010+
  1969. 'endif'#013#010+
  1970. 'ifdef TARGET_EXAMPLEDIRS'#013#010+
  1971. ' $(COPYT','REE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_'+
  1972. 'EXAMPLEDIR)'#013#010+
  1973. 'endif'#013#010+
  1974. #013#010+
  1975. '[distinstallrules]'#013#010+
  1976. '#####################################################################'#013+
  1977. #010+
  1978. '# Dist Install'#013#010+
  1979. '##########################################################','##########'+
  1980. '#'#013#010+
  1981. #013#010+
  1982. '.PHONY: fpc_distinstall'#013#010+
  1983. #013#010+
  1984. 'fpc_distinstall: install exampleinstall'#013#010+
  1985. #013#010+
  1986. #013#010+
  1987. '[zipinstallrules]'#013#010+
  1988. '#####################################################################'#013+
  1989. #010+
  1990. '# Zip'#013#010+
  1991. '########################################################','############'+
  1992. '#'#013#010+
  1993. #013#010+
  1994. '.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall'#013#010+
  1995. #013#010+
  1996. '# Temporary path to pack a file, can only use a single deep'#013#010+
  1997. '# subdir, because the deltree can'#039't see the whole tree to remove'#013+
  1998. #010+
  1999. 'ifndef PACKDIR'#013#010+
  2000. 'ifndef inUn','ix'#013#010+
  2001. 'PACKDIR=$(BASEDIR)/../fpc-pack'#013#010+
  2002. 'else'#013#010+
  2003. 'PACKDIR=/tmp/fpc-pack'#013#010+
  2004. 'endif'#013#010+
  2005. 'endif'#013#010+
  2006. #013#010+
  2007. '# Maybe create default zipname from packagename'#013#010+
  2008. 'ifndef ZIPNAME'#013#010+
  2009. 'ifdef DIST_ZIPNAME'#013#010+
  2010. 'ZIPNAME=$(DIST_ZIPNAME)'#013#010+
  2011. 'else'#013#010+
  2012. 'ZIPNAME=$(PACKAGE_NAME)'#013#010+
  2013. 'endif'#013#010+
  2014. 'endif'#013#010+
  2015. #013#010+
  2016. 'if','ndef FULLZIPNAME'#013#010+
  2017. 'FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)'#013#010+
  2018. 'endif'#013#010+
  2019. #013#010+
  2020. '# ZipTarget'#013#010+
  2021. 'ifndef ZIPTARGET'#013#010+
  2022. 'ifdef DIST_ZIPTARGET'#013#010+
  2023. 'ZIPTARGET=DIST_ZIPTARGET'#013#010+
  2024. 'else'#013#010+
  2025. 'ZIPTARGET=install'#013#010+
  2026. 'endif'#013#010+
  2027. 'endif'#013#010+
  2028. #013#010+
  2029. '# Use tar by default under l','inux'#013#010+
  2030. 'ifndef USEZIP'#013#010+
  2031. 'ifdef inUnix'#013#010+
  2032. 'USETAR=1'#013#010+
  2033. 'endif'#013#010+
  2034. 'endif'#013#010+
  2035. #013#010+
  2036. '# Use a wrapper script by default for Os/2'#013#010+
  2037. 'ifndef inUnix'#013#010+
  2038. 'USEZIPWRAPPER=1'#013#010+
  2039. 'endif'#013#010+
  2040. #013#010+
  2041. '# We need to be able to run in the current OS so fix'#013#010+
  2042. '# the path separator'#013#010+
  2043. 'ifdef USEZIPWRAPPE','R'#013#010+
  2044. 'ZIPPATHSEP=$(PATHSEP)'#013#010+
  2045. 'ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))'#013+
  2046. #010+
  2047. 'else'#013#010+
  2048. 'ZIPPATHSEP=/'#013#010+
  2049. 'endif'#013#010+
  2050. #013#010+
  2051. '# Create commands to create the zip/tar file'#013#010+
  2052. 'ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))'#013#010+
  2053. 'ZIPCMD_CDBASE',':=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))'#013#010+
  2054. 'ifdef USETAR'#013#010+
  2055. 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)'#013#010+
  2056. 'ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *'#013#010+
  2057. 'else'#013#010+
  2058. 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)'#013#010+
  2059. 'ZIPCMD_ZIP:=$(sub','st /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPD'+
  2060. 'ESTFILE) *'#013#010+
  2061. 'endif'#013#010+
  2062. #013#010+
  2063. 'fpc_zipinstall:'#013#010+
  2064. ' $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1'#013+
  2065. #010+
  2066. ' $(MKDIR) $(DIST_DESTDIR)'#013#010+
  2067. ' $(DEL) $(ZIPDESTFILE)'#013#010+
  2068. 'ifdef USEZIPWRAPP','ER'#013#010+
  2069. '# Handle gecho separate as we need to espace \ with \\'#013#010+
  2070. 'ifneq ($(ECHOREDIR),echo)'#013#010+
  2071. ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPE'+
  2072. 'R)'#013#010+
  2073. ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)'+
  2074. #013#010+
  2075. ' ',' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRA'+
  2076. 'PPER)'#013#010+
  2077. 'else'#013#010+
  2078. ' echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)'#013#010+
  2079. ' echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)'#013#010+
  2080. ' echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)'#013#010+
  2081. 'endif'#013#010+
  2082. 'ifdef inUnix'#013#010+
  2083. ' ',' /bin/sh $(ZIPWRAPPER)'#013#010+
  2084. 'else'#013#010+
  2085. 'ifdef RUNBATCH'#013#010+
  2086. ' $(RUNBATCH) $(ZIPWRAPPER)'#013#010+
  2087. 'else'#013#010+
  2088. ' $(ZIPWRAPPER)'#013#010+
  2089. 'endif'#013#010+
  2090. 'endif'#013#010+
  2091. ' $(DEL) $(ZIPWRAPPER)'#013#010+
  2092. 'else'#013#010+
  2093. ' $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)'#013#010+
  2094. 'endif'#013#010+
  2095. ' $(','DELTREE) $(PACKDIR)'#013#010+
  2096. #013#010+
  2097. 'fpc_zipsourceinstall:'#013#010+
  2098. ' $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIP'+
  2099. 'SOURCESUFFIX)'#013#010+
  2100. #013#010+
  2101. 'fpc_zipexampleinstall:'#013#010+
  2102. 'ifdef HASEXAMPLES'#013#010+
  2103. ' $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFI','X=$('+
  2104. 'ZIPEXAMPLESUFFIX)'#013#010+
  2105. 'endif'#013#010+
  2106. #013#010+
  2107. 'fpc_zipdistinstall:'#013#010+
  2108. ' $(MAKE) fpc_zipinstall ZIPTARGET=distinstall'#013#010+
  2109. #013#010+
  2110. #013#010+
  2111. '[cleanrules]'#013#010+
  2112. '#####################################################################'#013+
  2113. #010+
  2114. '# Clean rules'#013#010+
  2115. '#############################','#######################################'+
  2116. '#'#013#010+
  2117. #013#010+
  2118. '.PHONY: fpc_clean fpc_cleanall fpc_distclean'#013#010+
  2119. #013#010+
  2120. 'ifdef EXEFILES'#013#010+
  2121. 'override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES'+
  2122. '))'#013#010+
  2123. 'endif'#013#010+
  2124. #013#010+
  2125. 'ifdef CLEAN_UNITS'#013#010+
  2126. 'override CLEANPPUFILES+=$(adds','uffix $(PPUEXT),$(CLEAN_UNITS))'#013#010+
  2127. 'endif'#013#010+
  2128. #013#010+
  2129. 'ifdef CLEANPPUFILES'#013#010+
  2130. 'override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)'+
  2131. ') $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(C'+
  2132. 'LEANPPUFILES))) $(addprefix $(IMPORTL','IBPREFIX),$(subst $(PPUEXT),$(S'+
  2133. 'TATICLIBEXT),$(CLEANPPUFILES)))'#013#010+
  2134. 'ifdef DEBUGSYMEXT'#013#010+
  2135. 'override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPP'+
  2136. 'UFILES))'#013#010+
  2137. 'endif'#013#010+
  2138. 'override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUF',
  2139. 'ILES))'#013#010+
  2140. 'override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREF'+
  2141. 'IX),$(CLEANPPULINKFILES)))'#013#010+
  2142. 'endif'#013#010+
  2143. #013#010+
  2144. 'fpc_clean: $(CLEANTARGET)'#013#010+
  2145. 'ifdef CLEANEXEFILES'#013#010+
  2146. ' -$(DEL) $(CLEANEXEFILES)'#013#010+
  2147. 'endif'#013#010+
  2148. 'ifdef CLEANPPUFILES'#013#010+
  2149. ' -$(DEL)',' $(CLEANPPUFILES)'#013#010+
  2150. 'endif'#013#010+
  2151. 'ifneq ($(CLEANPPULINKFILES),)'#013#010+
  2152. ' -$(DEL) $(CLEANPPULINKFILES)'#013#010+
  2153. 'endif'#013#010+
  2154. 'ifdef CLEANRSTFILES'#013#010+
  2155. ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#013+
  2156. #010+
  2157. 'endif'#013#010+
  2158. 'ifdef CLEAN_FILES'#013#010+
  2159. ' -$(DEL) $(CLE','AN_FILES)'#013#010+
  2160. 'endif'#013#010+
  2161. 'ifdef LIB_NAME'#013#010+
  2162. ' -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)'#013#010+
  2163. 'endif'#013#010+
  2164. ' -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(F'+
  2165. 'PCEXTFILE) $(REDIRFILE)'#013#010+
  2166. ' -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)'#013#010+
  2167. #013#010+
  2168. 'fpc_cleanal','l: $(CLEANTARGET)'#013#010+
  2169. 'ifdef CLEANEXEFILES'#013#010+
  2170. ' -$(DEL) $(CLEANEXEFILES)'#013#010+
  2171. 'endif'#013#010+
  2172. 'ifdef COMPILER_UNITTARGETDIR'#013#010+
  2173. 'ifdef CLEANPPUFILES'#013#010+
  2174. ' -$(DEL) $(CLEANPPUFILES)'#013#010+
  2175. 'endif'#013#010+
  2176. 'ifneq ($(CLEANPPULINKFILES),)'#013#010+
  2177. ' -$(DEL) $(CLEANPPULINKFILES)',#013#010+
  2178. 'endif'#013#010+
  2179. 'ifdef CLEANRSTFILES'#013#010+
  2180. ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#013+
  2181. #010+
  2182. 'endif'#013#010+
  2183. 'endif'#013#010+
  2184. ' -$(DELTREE) units'#013#010+
  2185. ' -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIB'+
  2186. 'EXT) *$(SHAREDLIBEXT) *$(PPLE','XT)'#013#010+
  2187. 'ifneq ($(PPUEXT),.ppu)'#013#010+
  2188. ' -$(DEL) *.o *.ppu *.a'#013#010+
  2189. 'endif'#013#010+
  2190. ' -$(DELTREE) *$(SMARTEXT)'#013#010+
  2191. ' -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FP'+
  2192. 'CEXTFILE) $(REDIRFILE)'#013#010+
  2193. ' -$(DEL) *_ppas$(BATCHEXT)'#013#010+
  2194. 'ifdef AOUT','EXT'#013#010+
  2195. ' -$(DEL) *$(AOUTEXT)'#013#010+
  2196. 'endif'#013#010+
  2197. 'ifdef DEBUGSYMEXT'#013#010+
  2198. ' -$(DEL) *$(DEBUGSYMEXT)'#013#010+
  2199. 'endif'#013#010+
  2200. #013#010+
  2201. 'fpc_distclean: cleanall'#013#010+
  2202. #013#010+
  2203. #013#010+
  2204. '[baseinforules]'#013#010+
  2205. '#####################################################################'#013+
  2206. #010+
  2207. '# Base info rules'#013#010+
  2208. '##','##################################################################'+
  2209. '#'#013#010+
  2210. #013#010+
  2211. '.PHONY: fpc_baseinfo'#013#010+
  2212. #013#010+
  2213. 'override INFORULES+=fpc_baseinfo'#013#010+
  2214. #013#010+
  2215. 'fpc_baseinfo:'#013#010+
  2216. ' @$(ECHO)'#013#010+
  2217. ' @$(ECHO) == Package info =='#013#010+
  2218. ' @$(ECHO) Package Name..... $(','PACKAGE_NAME)'#013#010+
  2219. ' @$(ECHO) Package Version.. $(PACKAGE_VERSION)'#013#010+
  2220. ' @$(ECHO)'#013#010+
  2221. ' @$(ECHO) == Configuration info =='#013#010+
  2222. ' @$(ECHO)'#013#010+
  2223. ' @$(ECHO) FPC.......... $(FPC)'#013#010+
  2224. ' @$(ECHO) FPC Version.. $(FPC_VERSION)'#013#010+
  2225. ' ',' @$(ECHO) Source CPU... $(CPU_SOURCE)'#013#010+
  2226. ' @$(ECHO) Target CPU... $(CPU_TARGET)'#013#010+
  2227. ' @$(ECHO) Source OS.... $(OS_SOURCE)'#013#010+
  2228. ' @$(ECHO) Target OS.... $(OS_TARGET)'#013#010+
  2229. ' @$(ECHO) Full Source.. $(FULL_SOURCE)'#013#010+
  2230. ' ',' @$(ECHO) Full Target.. $(FULL_TARGET)'#013#010+
  2231. ' @$(ECHO) SourceSuffix. $(SOURCESUFFIX)'#013#010+
  2232. ' @$(ECHO) TargetSuffix. $(TARGETSUFFIX)'#013#010+
  2233. ' @$(ECHO)'#013#010+
  2234. ' @$(ECHO) == Directory info =='#013#010+
  2235. ' @$(ECHO)'#013#010+
  2236. ' @$(ECHO) Require','d pkgs... $(REQUIRE_PACKAGES)'#013#010+
  2237. ' @$(ECHO)'#013#010+
  2238. ' @$(ECHO) Basedir......... $(BASEDIR)'#013#010+
  2239. ' @$(ECHO) FPCDir.......... $(FPCDIR)'#013#010+
  2240. ' @$(ECHO) CrossBinDir..... $(CROSSBINDIR)'#013#010+
  2241. ' @$(ECHO) UnitsDir........ $(UNITSDIR)'#013,#010+
  2242. ' @$(ECHO) PackagesDir..... $(PACKAGESDIR)'#013#010+
  2243. ' @$(ECHO)'#013#010+
  2244. ' @$(ECHO) GCC library..... $(GCCLIBDIR)'#013#010+
  2245. ' @$(ECHO) Other library... $(OTHERLIBDIR)'#013#010+
  2246. ' @$(ECHO)'#013#010+
  2247. ' @$(ECHO) == Tools info =='#013#010+
  2248. ' @$(ECHO)',#013#010+
  2249. ' @$(ECHO) As........ $(AS)'#013#010+
  2250. ' @$(ECHO) Ld........ $(LD)'#013#010+
  2251. ' @$(ECHO) Ar........ $(AR)'#013#010+
  2252. ' @$(ECHO) Rc........ $(RC)'#013#010+
  2253. ' @$(ECHO)'#013#010+
  2254. ' @$(ECHO) Mv........ $(MVPROG)'#013#010+
  2255. ' @$(ECHO) Cp........ $(CPPRO','G)'#013#010+
  2256. ' @$(ECHO) Rm........ $(RMPROG)'#013#010+
  2257. ' @$(ECHO) GInstall.. $(GINSTALL)'#013#010+
  2258. ' @$(ECHO) Echo...... $(ECHO)'#013#010+
  2259. ' @$(ECHO) Shell..... $(SHELL)'#013#010+
  2260. ' @$(ECHO) Date...... $(DATE)'#013#010+
  2261. ' @$(ECHO) FPCMake... $(FPCMAKE)',#013#010+
  2262. ' @$(ECHO) PPUMove... $(PPUMOVE)'#013#010+
  2263. ' @$(ECHO) Upx....... $(UPXPROG)'#013#010+
  2264. ' @$(ECHO) Zip....... $(ZIPPROG)'#013#010+
  2265. ' @$(ECHO)'#013#010+
  2266. ' @$(ECHO) == Object info =='#013#010+
  2267. ' @$(ECHO)'#013#010+
  2268. ' @$(ECHO) Target Loaders........ $','(TARGET_LOADERS)'#013#010+
  2269. ' @$(ECHO) Target Units.......... $(TARGET_UNITS)'#013#010+
  2270. ' @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)'#013#010+
  2271. ' @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)'#013#010+
  2272. ' @$(ECHO) Target Dirs........','... $(TARGET_DIRS)'#013#010+
  2273. ' @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)'#013#010+
  2274. ' @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)'#013#010+
  2275. ' @$(ECHO)'#013#010+
  2276. ' @$(ECHO) Clean Units......... $(CLEAN_UNITS)'#013#010+
  2277. ' @$(ECHO) Clea','n Files......... $(CLEAN_FILES)'#013#010+
  2278. ' @$(ECHO)'#013#010+
  2279. ' @$(ECHO) Install Units....... $(INSTALL_UNITS)'#013#010+
  2280. ' @$(ECHO) Install Files....... $(INSTALL_FILES)'#013#010+
  2281. ' @$(ECHO)'#013#010+
  2282. ' @$(ECHO) == Install info =='#013#010+
  2283. ' @$(ECHO)'#013#010+
  2284. ' ',' @$(ECHO) DateStr.............. $(DATESTR)'#013#010+
  2285. ' @$(ECHO) ZipName.............. $(ZIPNAME)'#013#010+
  2286. ' @$(ECHO) ZipPrefix............ $(ZIPPREFIX)'#013#010+
  2287. ' @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)'#013#010+
  2288. ' @$(ECHO) ZipSuf','fix............ $(ZIPSUFFIX)'#013#010+
  2289. ' @$(ECHO) FullZipName.......... $(FULLZIPNAME)'#013#010+
  2290. ' @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)'#013#010+
  2291. ' @$(ECHO)'#013#010+
  2292. ' @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)'#013#010+
  2293. ' @$(EC','HO) Install binary dir... $(INSTALL_BINDIR)'#013#010+
  2294. ' @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)'#013#010+
  2295. ' @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)'#013#010+
  2296. ' @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)'#013#010+
  2297. ' @$(EC','HO) Install doc dir...... $(INSTALL_DOCDIR)'#013#010+
  2298. ' @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)'#013#010+
  2299. ' @$(ECHO) Install data dir..... $(INSTALL_DATADIR)'#013#010+
  2300. ' @$(ECHO)'#013#010+
  2301. ' @$(ECHO) Dist destination dir. $(DIST_DESTDI','R)'#013#010+
  2302. ' @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)'#013#010+
  2303. ' @$(ECHO)'#013#010+
  2304. #013#010+
  2305. '[inforules]'#013#010+
  2306. '#####################################################################'#013+
  2307. #010+
  2308. '# Info rules'#013#010+
  2309. '#############################################################','#######'+
  2310. '#'#013#010+
  2311. #013#010+
  2312. '.PHONY: fpc_info'#013#010+
  2313. #013#010+
  2314. 'fpc_info: $(INFORULES)'#013#010+
  2315. #013#010+
  2316. '[makefilerules]'#013#010+
  2317. '#####################################################################'#013+
  2318. #010+
  2319. '# Rebuild Makefile'#013#010+
  2320. '#####################################################################'#013+
  2321. #010+
  2322. #013#010+
  2323. '.','PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_su'+
  2324. 'b2 \'#013#010+
  2325. ' fpc_makefile_dirs'#013#010+
  2326. #013#010+
  2327. 'fpc_makefile:'#013#010+
  2328. ' $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc'#013#010+
  2329. #013#010+
  2330. 'fpc_makefile_sub1:'#013#010+
  2331. 'ifdef TARGET_DIRS'#013#010+
  2332. ' $(FPCMAKE) -w -T$(OS_TA','RGET) $(addsuffix /Makefile.fpc,$(TAR'+
  2333. 'GET_DIRS))'#013#010+
  2334. 'endif'#013#010+
  2335. 'ifdef TARGET_EXAMPLEDIRS'#013#010+
  2336. ' $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGE'+
  2337. 'T_EXAMPLEDIRS))'#013#010+
  2338. 'endif'#013#010+
  2339. #013#010+
  2340. 'fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $','(TARGE'+
  2341. 'T_EXAMPLEDIRS))'#013#010+
  2342. #013#010+
  2343. 'fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2'#013#010+
  2344. #013#010+
  2345. 'fpc_makefiles: fpc_makefile fpc_makefile_dirs'#013#010+
  2346. #013#010+
  2347. '[localmakefile]'#013#010+
  2348. '#####################################################################'#013+
  2349. #010+
  2350. '# Local Makefile'#013#010+
  2351. '##','##################################################################'+
  2352. '#'#013#010+
  2353. #013#010+
  2354. 'ifneq ($(wildcard fpcmake.loc),)'#013#010+
  2355. 'include fpcmake.loc'#013#010+
  2356. 'endif'#013#010+
  2357. #013#010+
  2358. #013#010+
  2359. '[userrules]'#013#010+
  2360. '#####################################################################'#013+
  2361. #010+
  2362. '# Users rules'#013#010+
  2363. '####','################################################################'+
  2364. '#'#013#010+
  2365. #013#010+
  2366. '[lclrules]'#013#010+
  2367. '#####################################################################'#013+
  2368. #010+
  2369. '# LCL Rules'#013#010+
  2370. '#####################################################################'#013+
  2371. #010+
  2372. #013#010+
  2373. '# ','LCL Platform'#013#010+
  2374. 'ifndef LCL_PLATFORM'#013#010+
  2375. 'ifneq ($(findstring $(OS_TARGET),win32 win64),)'#013#010+
  2376. 'LCL_PLATFORM=win32'#013#010+
  2377. 'else'#013#010+
  2378. 'LCL_PLATFORM=gtk'#013#010+
  2379. 'endif'#013#010+
  2380. 'endif'#013#010+
  2381. 'export LCL_PLATFORM'#013#010+
  2382. #013#010+
  2383. '# Check if the specified LCLDIR is correct'#013#010+
  2384. 'ifdef LCLDIR'#013#010+
  2385. 'override LCLDIR:=','$(subst \,/,$(LCLDIR))'#013#010+
  2386. 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM)),)'#013#010+
  2387. 'override LCLDIR=wrong'#013#010+
  2388. 'endif'#013#010+
  2389. 'else'#013#010+
  2390. 'override LCLDIR=wrong'#013#010+
  2391. 'endif'#013#010+
  2392. #013#010+
  2393. '# Check if the default LCLDIR is correct'#013#010+
  2394. 'ifdef DEFAULT_LCLDIR'#013#010+
  2395. 'override LCLDIR:=$(subst \,/,$(','DEFAULT_LCLDIR))'#013#010+
  2396. 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM)),)'#013#010+
  2397. 'override LCLDIR=wrong'#013#010+
  2398. 'endif'#013#010+
  2399. 'endif'#013#010+
  2400. #013#010+
  2401. '# Check for development version'#013#010+
  2402. 'ifeq ($(LCLDIR),wrong)'#013#010+
  2403. 'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wildcard'+
  2404. ' $(','addsuffix /units/$(LCL_PLATFORM),$(BASEDIR)/lcl $(BASEDIR)))))'#013+
  2405. #010+
  2406. 'ifeq ($(LCLDIR),)'#013#010+
  2407. 'override LCLDIR=wrong'#013#010+
  2408. 'endif'#013#010+
  2409. 'endif'#013#010+
  2410. #013#010+
  2411. '# Check for release version'#013#010+
  2412. 'ifeq ($(LCLDIR),wrong)'#013#010+
  2413. 'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wil','dca'+
  2414. 'rd $(addsuffix /lib/lazarus/units/$(LCL_PLATFORM),/usr/local /usr))))'#013+
  2415. #010+
  2416. 'ifeq ($(LCLDIR),)'#013#010+
  2417. 'override LCLDIR=wrong'#013#010+
  2418. 'endif'#013#010+
  2419. 'endif'#013#010+
  2420. #013#010+
  2421. '# Generate dirs'#013#010+
  2422. 'override LCLUNITDIR:=$(wildcard $(LCLDIR)/units/$(LCL_PLATFORM) $(LCLD'+
  2423. 'IR)/units)'#013#010+
  2424. 'override ','LCLCOMPONENTDIR:=$(wildcard $(LCLDIR)/.. $(LCLDIR)/../compo'+
  2425. 'nents $(LCLDIR)/components)'#013#010+
  2426. 'export LCLDIR LCLUNITDIR LCLCOMPONENTDIR'#013#010+
  2427. #013#010+
  2428. '# Add LCL dirs to paths'#013#010+
  2429. 'override REQUIRE_PACKAGESDIR+=$(LCLCOMPONENTDIR)'#013#010+
  2430. 'override COMPILER_UNITDIR+=$(LCLU','NITDIR)'#013#010+
  2431. #013#010+
  2432. '[lclinforules]'#013#010+
  2433. '#####################################################################'#013+
  2434. #010+
  2435. '# LCL Info rules'#013#010+
  2436. '#####################################################################'#013+
  2437. #010+
  2438. 'override INFORULES+=lclinfo'#013#010+
  2439. #013#010+
  2440. '.PHONY: lclinfo'#013#010+
  2441. #013#010+
  2442. 'lcl','info:'#013#010+
  2443. ' @$(ECHO) == LCL info =='#013#010+
  2444. ' @$(ECHO)'#013#010+
  2445. ' @$(ECHO) Platform............. $(LCL_PLATFORM)'#013#010+
  2446. ' @$(ECHO) LCLDIR............... $(LCLDIR)'#013#010+
  2447. ' @$(ECHO) LCL Unit dir......... $(LCLUNITDIR)'#013#010+
  2448. ' @$(ECHO) ','LCL Component dir.... $(LCLCOMPONENTDIR)'#013#010+
  2449. ' @$(ECHO)'#013#010
  2450. );