Makefile 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/03/19]
  3. #
  4. default: all
  5. MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris qnx
  8. LIMIT83fs = go32v2 os2 emx watcom
  9. FORCE:
  10. .PHONY: FORCE
  11. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  12. ifneq ($(findstring darwin,$(OSTYPE)),)
  13. inUnix=1 #darwin
  14. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  15. else
  16. ifeq ($(findstring ;,$(PATH)),)
  17. inUnix=1
  18. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  19. else
  20. SEARCHPATH:=$(subst ;, ,$(PATH))
  21. endif
  22. endif
  23. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  24. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  25. ifeq ($(PWD),)
  26. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  27. ifeq ($(PWD),)
  28. $(error You need the GNU utils package to use this Makefile)
  29. else
  30. PWD:=$(firstword $(PWD))
  31. SRCEXEEXT=
  32. endif
  33. else
  34. PWD:=$(firstword $(PWD))
  35. SRCEXEEXT=.exe
  36. endif
  37. ifndef inUnix
  38. ifeq ($(OS),Windows_NT)
  39. inWinNT=1
  40. else
  41. ifdef OS2_SHELL
  42. inOS2=1
  43. endif
  44. endif
  45. else
  46. ifneq ($(findstring cygdrive,$(PATH)),)
  47. inCygWin=1
  48. endif
  49. endif
  50. ifdef inUnix
  51. SRCBATCHEXT=.sh
  52. else
  53. ifdef inOS2
  54. SRCBATCHEXT=.cmd
  55. else
  56. SRCBATCHEXT=.bat
  57. endif
  58. endif
  59. ifdef inUnix
  60. PATHSEP=/
  61. else
  62. PATHSEP:=$(subst /,\,/)
  63. ifdef inCygWin
  64. PATHSEP=/
  65. endif
  66. endif
  67. ifdef PWD
  68. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  69. ifdef inCygWin
  70. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  71. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  72. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  73. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  74. endif
  75. endif
  76. else
  77. BASEDIR=.
  78. endif
  79. ifdef inOS2
  80. ifndef ECHO
  81. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  82. ifeq ($(ECHO),)
  83. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  84. ifeq ($(ECHO),)
  85. ECHO=echo
  86. else
  87. ECHO:=$(firstword $(ECHO))
  88. endif
  89. else
  90. ECHO:=$(firstword $(ECHO))
  91. endif
  92. endif
  93. export ECHO
  94. endif
  95. override DEFAULT_FPCDIR=../../..
  96. ifndef FPC
  97. ifdef PP
  98. FPC=$(PP)
  99. endif
  100. endif
  101. ifndef FPC
  102. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  103. ifneq ($(FPCPROG),)
  104. FPCPROG:=$(firstword $(FPCPROG))
  105. FPC:=$(shell $(FPCPROG) -PB)
  106. ifneq ($(findstring Error,$(FPC)),)
  107. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  108. endif
  109. else
  110. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  111. endif
  112. endif
  113. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  114. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  115. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  116. ifeq ($(FOUNDFPC),)
  117. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  118. ifeq ($(FOUNDFPC),)
  119. $(error Compiler $(FPC) not found)
  120. endif
  121. endif
  122. ifndef FPC_COMPILERINFO
  123. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  124. endif
  125. ifndef FPC_VERSION
  126. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  127. endif
  128. export FPC FPC_VERSION FPC_COMPILERINFO
  129. unexport CHECKDEPEND ALLDEPENDENCIES
  130. ifndef CPU_TARGET
  131. ifdef CPU_TARGET_DEFAULT
  132. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  133. endif
  134. endif
  135. ifndef OS_TARGET
  136. ifdef OS_TARGET_DEFAULT
  137. OS_TARGET=$(OS_TARGET_DEFAULT)
  138. endif
  139. endif
  140. ifneq ($(words $(FPC_COMPILERINFO)),5)
  141. FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
  142. FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
  143. FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
  144. FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
  145. endif
  146. ifndef CPU_SOURCE
  147. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  148. endif
  149. ifndef CPU_TARGET
  150. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  151. endif
  152. ifndef OS_SOURCE
  153. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  154. endif
  155. ifndef OS_TARGET
  156. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  157. endif
  158. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  159. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  160. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  161. TARGETSUFFIX=$(OS_TARGET)
  162. SOURCESUFFIX=$(OS_SOURCE)
  163. else
  164. TARGETSUFFIX=$(FULL_TARGET)
  165. SOURCESUFFIX=$(FULL_SOURCE)
  166. endif
  167. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  168. CROSSCOMPILE=1
  169. endif
  170. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  171. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  172. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  173. endif
  174. endif
  175. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  176. BSDhier=1
  177. endif
  178. ifeq ($(OS_TARGET),linux)
  179. linuxHier=1
  180. endif
  181. export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  182. ifdef FPCDIR
  183. override FPCDIR:=$(subst \,/,$(FPCDIR))
  184. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  185. override FPCDIR=wrong
  186. endif
  187. else
  188. override FPCDIR=wrong
  189. endif
  190. ifdef DEFAULT_FPCDIR
  191. ifeq ($(FPCDIR),wrong)
  192. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  193. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  194. override FPCDIR=wrong
  195. endif
  196. endif
  197. endif
  198. ifeq ($(FPCDIR),wrong)
  199. ifdef inUnix
  200. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  201. ifeq ($(wildcard $(FPCDIR)/units),)
  202. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  203. endif
  204. else
  205. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  206. override FPCDIR:=$(FPCDIR)/..
  207. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  208. override FPCDIR:=$(FPCDIR)/..
  209. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  210. override FPCDIR:=$(BASEDIR)
  211. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  212. override FPCDIR=c:/pp
  213. endif
  214. endif
  215. endif
  216. endif
  217. endif
  218. ifndef CROSSBINDIR
  219. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  220. endif
  221. ifndef BINUTILSPREFIX
  222. ifndef CROSSBINDIR
  223. ifdef CROSSCOMPILE
  224. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  225. endif
  226. endif
  227. endif
  228. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  229. ifeq ($(UNITSDIR),)
  230. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  231. endif
  232. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  233. ifeq ($(FULL_TARGET),i386-linux)
  234. override TARGET_PROGRAMS+=debugserver
  235. endif
  236. ifeq ($(FULL_TARGET),i386-go32v2)
  237. override TARGET_PROGRAMS+=debugserver
  238. endif
  239. ifeq ($(FULL_TARGET),i386-win32)
  240. override TARGET_PROGRAMS+=debugserver
  241. endif
  242. ifeq ($(FULL_TARGET),i386-os2)
  243. override TARGET_PROGRAMS+=debugserver
  244. endif
  245. ifeq ($(FULL_TARGET),i386-freebsd)
  246. override TARGET_PROGRAMS+=debugserver
  247. endif
  248. ifeq ($(FULL_TARGET),i386-beos)
  249. override TARGET_PROGRAMS+=debugserver
  250. endif
  251. ifeq ($(FULL_TARGET),i386-netbsd)
  252. override TARGET_PROGRAMS+=debugserver
  253. endif
  254. ifeq ($(FULL_TARGET),i386-solaris)
  255. override TARGET_PROGRAMS+=debugserver
  256. endif
  257. ifeq ($(FULL_TARGET),i386-qnx)
  258. override TARGET_PROGRAMS+=debugserver
  259. endif
  260. ifeq ($(FULL_TARGET),i386-netware)
  261. override TARGET_PROGRAMS+=debugserver
  262. endif
  263. ifeq ($(FULL_TARGET),i386-openbsd)
  264. override TARGET_PROGRAMS+=debugserver
  265. endif
  266. ifeq ($(FULL_TARGET),i386-wdosx)
  267. override TARGET_PROGRAMS+=debugserver
  268. endif
  269. ifeq ($(FULL_TARGET),i386-darwin)
  270. override TARGET_PROGRAMS+=debugserver
  271. endif
  272. ifeq ($(FULL_TARGET),i386-emx)
  273. override TARGET_PROGRAMS+=debugserver
  274. endif
  275. ifeq ($(FULL_TARGET),i386-watcom)
  276. override TARGET_PROGRAMS+=debugserver
  277. endif
  278. ifeq ($(FULL_TARGET),i386-netwlibc)
  279. override TARGET_PROGRAMS+=debugserver
  280. endif
  281. ifeq ($(FULL_TARGET),i386-wince)
  282. override TARGET_PROGRAMS+=debugserver
  283. endif
  284. ifeq ($(FULL_TARGET),m68k-linux)
  285. override TARGET_PROGRAMS+=debugserver
  286. endif
  287. ifeq ($(FULL_TARGET),m68k-freebsd)
  288. override TARGET_PROGRAMS+=debugserver
  289. endif
  290. ifeq ($(FULL_TARGET),m68k-netbsd)
  291. override TARGET_PROGRAMS+=debugserver
  292. endif
  293. ifeq ($(FULL_TARGET),m68k-amiga)
  294. override TARGET_PROGRAMS+=debugserver
  295. endif
  296. ifeq ($(FULL_TARGET),m68k-atari)
  297. override TARGET_PROGRAMS+=debugserver
  298. endif
  299. ifeq ($(FULL_TARGET),m68k-openbsd)
  300. override TARGET_PROGRAMS+=debugserver
  301. endif
  302. ifeq ($(FULL_TARGET),m68k-palmos)
  303. override TARGET_PROGRAMS+=debugserver
  304. endif
  305. ifeq ($(FULL_TARGET),powerpc-linux)
  306. override TARGET_PROGRAMS+=debugserver
  307. endif
  308. ifeq ($(FULL_TARGET),powerpc-netbsd)
  309. override TARGET_PROGRAMS+=debugserver
  310. endif
  311. ifeq ($(FULL_TARGET),powerpc-macos)
  312. override TARGET_PROGRAMS+=debugserver
  313. endif
  314. ifeq ($(FULL_TARGET),powerpc-darwin)
  315. override TARGET_PROGRAMS+=debugserver
  316. endif
  317. ifeq ($(FULL_TARGET),powerpc-morphos)
  318. override TARGET_PROGRAMS+=debugserver
  319. endif
  320. ifeq ($(FULL_TARGET),sparc-linux)
  321. override TARGET_PROGRAMS+=debugserver
  322. endif
  323. ifeq ($(FULL_TARGET),sparc-netbsd)
  324. override TARGET_PROGRAMS+=debugserver
  325. endif
  326. ifeq ($(FULL_TARGET),sparc-solaris)
  327. override TARGET_PROGRAMS+=debugserver
  328. endif
  329. ifeq ($(FULL_TARGET),x86_64-linux)
  330. override TARGET_PROGRAMS+=debugserver
  331. endif
  332. ifeq ($(FULL_TARGET),x86_64-freebsd)
  333. override TARGET_PROGRAMS+=debugserver
  334. endif
  335. ifeq ($(FULL_TARGET),x86_64-win64)
  336. override TARGET_PROGRAMS+=debugserver
  337. endif
  338. ifeq ($(FULL_TARGET),arm-linux)
  339. override TARGET_PROGRAMS+=debugserver
  340. endif
  341. ifeq ($(FULL_TARGET),arm-palmos)
  342. override TARGET_PROGRAMS+=debugserver
  343. endif
  344. ifeq ($(FULL_TARGET),arm-wince)
  345. override TARGET_PROGRAMS+=debugserver
  346. endif
  347. ifeq ($(FULL_TARGET),powerpc64-linux)
  348. override TARGET_PROGRAMS+=debugserver
  349. endif
  350. ifeq ($(FULL_TARGET),i386-linux)
  351. override TARGET_UNITS+=frmabout frmmain bitmapdata
  352. endif
  353. ifeq ($(FULL_TARGET),i386-go32v2)
  354. override TARGET_UNITS+=frmabout frmmain bitmapdata
  355. endif
  356. ifeq ($(FULL_TARGET),i386-win32)
  357. override TARGET_UNITS+=frmabout frmmain bitmapdata
  358. endif
  359. ifeq ($(FULL_TARGET),i386-os2)
  360. override TARGET_UNITS+=frmabout frmmain bitmapdata
  361. endif
  362. ifeq ($(FULL_TARGET),i386-freebsd)
  363. override TARGET_UNITS+=frmabout frmmain bitmapdata
  364. endif
  365. ifeq ($(FULL_TARGET),i386-beos)
  366. override TARGET_UNITS+=frmabout frmmain bitmapdata
  367. endif
  368. ifeq ($(FULL_TARGET),i386-netbsd)
  369. override TARGET_UNITS+=frmabout frmmain bitmapdata
  370. endif
  371. ifeq ($(FULL_TARGET),i386-solaris)
  372. override TARGET_UNITS+=frmabout frmmain bitmapdata
  373. endif
  374. ifeq ($(FULL_TARGET),i386-qnx)
  375. override TARGET_UNITS+=frmabout frmmain bitmapdata
  376. endif
  377. ifeq ($(FULL_TARGET),i386-netware)
  378. override TARGET_UNITS+=frmabout frmmain bitmapdata
  379. endif
  380. ifeq ($(FULL_TARGET),i386-openbsd)
  381. override TARGET_UNITS+=frmabout frmmain bitmapdata
  382. endif
  383. ifeq ($(FULL_TARGET),i386-wdosx)
  384. override TARGET_UNITS+=frmabout frmmain bitmapdata
  385. endif
  386. ifeq ($(FULL_TARGET),i386-darwin)
  387. override TARGET_UNITS+=frmabout frmmain bitmapdata
  388. endif
  389. ifeq ($(FULL_TARGET),i386-emx)
  390. override TARGET_UNITS+=frmabout frmmain bitmapdata
  391. endif
  392. ifeq ($(FULL_TARGET),i386-watcom)
  393. override TARGET_UNITS+=frmabout frmmain bitmapdata
  394. endif
  395. ifeq ($(FULL_TARGET),i386-netwlibc)
  396. override TARGET_UNITS+=frmabout frmmain bitmapdata
  397. endif
  398. ifeq ($(FULL_TARGET),i386-wince)
  399. override TARGET_UNITS+=frmabout frmmain bitmapdata
  400. endif
  401. ifeq ($(FULL_TARGET),m68k-linux)
  402. override TARGET_UNITS+=frmabout frmmain bitmapdata
  403. endif
  404. ifeq ($(FULL_TARGET),m68k-freebsd)
  405. override TARGET_UNITS+=frmabout frmmain bitmapdata
  406. endif
  407. ifeq ($(FULL_TARGET),m68k-netbsd)
  408. override TARGET_UNITS+=frmabout frmmain bitmapdata
  409. endif
  410. ifeq ($(FULL_TARGET),m68k-amiga)
  411. override TARGET_UNITS+=frmabout frmmain bitmapdata
  412. endif
  413. ifeq ($(FULL_TARGET),m68k-atari)
  414. override TARGET_UNITS+=frmabout frmmain bitmapdata
  415. endif
  416. ifeq ($(FULL_TARGET),m68k-openbsd)
  417. override TARGET_UNITS+=frmabout frmmain bitmapdata
  418. endif
  419. ifeq ($(FULL_TARGET),m68k-palmos)
  420. override TARGET_UNITS+=frmabout frmmain bitmapdata
  421. endif
  422. ifeq ($(FULL_TARGET),powerpc-linux)
  423. override TARGET_UNITS+=frmabout frmmain bitmapdata
  424. endif
  425. ifeq ($(FULL_TARGET),powerpc-netbsd)
  426. override TARGET_UNITS+=frmabout frmmain bitmapdata
  427. endif
  428. ifeq ($(FULL_TARGET),powerpc-macos)
  429. override TARGET_UNITS+=frmabout frmmain bitmapdata
  430. endif
  431. ifeq ($(FULL_TARGET),powerpc-darwin)
  432. override TARGET_UNITS+=frmabout frmmain bitmapdata
  433. endif
  434. ifeq ($(FULL_TARGET),powerpc-morphos)
  435. override TARGET_UNITS+=frmabout frmmain bitmapdata
  436. endif
  437. ifeq ($(FULL_TARGET),sparc-linux)
  438. override TARGET_UNITS+=frmabout frmmain bitmapdata
  439. endif
  440. ifeq ($(FULL_TARGET),sparc-netbsd)
  441. override TARGET_UNITS+=frmabout frmmain bitmapdata
  442. endif
  443. ifeq ($(FULL_TARGET),sparc-solaris)
  444. override TARGET_UNITS+=frmabout frmmain bitmapdata
  445. endif
  446. ifeq ($(FULL_TARGET),x86_64-linux)
  447. override TARGET_UNITS+=frmabout frmmain bitmapdata
  448. endif
  449. ifeq ($(FULL_TARGET),x86_64-freebsd)
  450. override TARGET_UNITS+=frmabout frmmain bitmapdata
  451. endif
  452. ifeq ($(FULL_TARGET),x86_64-win64)
  453. override TARGET_UNITS+=frmabout frmmain bitmapdata
  454. endif
  455. ifeq ($(FULL_TARGET),arm-linux)
  456. override TARGET_UNITS+=frmabout frmmain bitmapdata
  457. endif
  458. ifeq ($(FULL_TARGET),arm-palmos)
  459. override TARGET_UNITS+=frmabout frmmain bitmapdata
  460. endif
  461. ifeq ($(FULL_TARGET),arm-wince)
  462. override TARGET_UNITS+=frmabout frmmain bitmapdata
  463. endif
  464. ifeq ($(FULL_TARGET),powerpc64-linux)
  465. override TARGET_UNITS+=frmabout frmmain bitmapdata
  466. endif
  467. ifeq ($(FULL_TARGET),i386-linux)
  468. override TARGET_RSTS+=frmabout frmmain
  469. endif
  470. ifeq ($(FULL_TARGET),i386-go32v2)
  471. override TARGET_RSTS+=frmabout frmmain
  472. endif
  473. ifeq ($(FULL_TARGET),i386-win32)
  474. override TARGET_RSTS+=frmabout frmmain
  475. endif
  476. ifeq ($(FULL_TARGET),i386-os2)
  477. override TARGET_RSTS+=frmabout frmmain
  478. endif
  479. ifeq ($(FULL_TARGET),i386-freebsd)
  480. override TARGET_RSTS+=frmabout frmmain
  481. endif
  482. ifeq ($(FULL_TARGET),i386-beos)
  483. override TARGET_RSTS+=frmabout frmmain
  484. endif
  485. ifeq ($(FULL_TARGET),i386-netbsd)
  486. override TARGET_RSTS+=frmabout frmmain
  487. endif
  488. ifeq ($(FULL_TARGET),i386-solaris)
  489. override TARGET_RSTS+=frmabout frmmain
  490. endif
  491. ifeq ($(FULL_TARGET),i386-qnx)
  492. override TARGET_RSTS+=frmabout frmmain
  493. endif
  494. ifeq ($(FULL_TARGET),i386-netware)
  495. override TARGET_RSTS+=frmabout frmmain
  496. endif
  497. ifeq ($(FULL_TARGET),i386-openbsd)
  498. override TARGET_RSTS+=frmabout frmmain
  499. endif
  500. ifeq ($(FULL_TARGET),i386-wdosx)
  501. override TARGET_RSTS+=frmabout frmmain
  502. endif
  503. ifeq ($(FULL_TARGET),i386-darwin)
  504. override TARGET_RSTS+=frmabout frmmain
  505. endif
  506. ifeq ($(FULL_TARGET),i386-emx)
  507. override TARGET_RSTS+=frmabout frmmain
  508. endif
  509. ifeq ($(FULL_TARGET),i386-watcom)
  510. override TARGET_RSTS+=frmabout frmmain
  511. endif
  512. ifeq ($(FULL_TARGET),i386-netwlibc)
  513. override TARGET_RSTS+=frmabout frmmain
  514. endif
  515. ifeq ($(FULL_TARGET),i386-wince)
  516. override TARGET_RSTS+=frmabout frmmain
  517. endif
  518. ifeq ($(FULL_TARGET),m68k-linux)
  519. override TARGET_RSTS+=frmabout frmmain
  520. endif
  521. ifeq ($(FULL_TARGET),m68k-freebsd)
  522. override TARGET_RSTS+=frmabout frmmain
  523. endif
  524. ifeq ($(FULL_TARGET),m68k-netbsd)
  525. override TARGET_RSTS+=frmabout frmmain
  526. endif
  527. ifeq ($(FULL_TARGET),m68k-amiga)
  528. override TARGET_RSTS+=frmabout frmmain
  529. endif
  530. ifeq ($(FULL_TARGET),m68k-atari)
  531. override TARGET_RSTS+=frmabout frmmain
  532. endif
  533. ifeq ($(FULL_TARGET),m68k-openbsd)
  534. override TARGET_RSTS+=frmabout frmmain
  535. endif
  536. ifeq ($(FULL_TARGET),m68k-palmos)
  537. override TARGET_RSTS+=frmabout frmmain
  538. endif
  539. ifeq ($(FULL_TARGET),powerpc-linux)
  540. override TARGET_RSTS+=frmabout frmmain
  541. endif
  542. ifeq ($(FULL_TARGET),powerpc-netbsd)
  543. override TARGET_RSTS+=frmabout frmmain
  544. endif
  545. ifeq ($(FULL_TARGET),powerpc-macos)
  546. override TARGET_RSTS+=frmabout frmmain
  547. endif
  548. ifeq ($(FULL_TARGET),powerpc-darwin)
  549. override TARGET_RSTS+=frmabout frmmain
  550. endif
  551. ifeq ($(FULL_TARGET),powerpc-morphos)
  552. override TARGET_RSTS+=frmabout frmmain
  553. endif
  554. ifeq ($(FULL_TARGET),sparc-linux)
  555. override TARGET_RSTS+=frmabout frmmain
  556. endif
  557. ifeq ($(FULL_TARGET),sparc-netbsd)
  558. override TARGET_RSTS+=frmabout frmmain
  559. endif
  560. ifeq ($(FULL_TARGET),sparc-solaris)
  561. override TARGET_RSTS+=frmabout frmmain
  562. endif
  563. ifeq ($(FULL_TARGET),x86_64-linux)
  564. override TARGET_RSTS+=frmabout frmmain
  565. endif
  566. ifeq ($(FULL_TARGET),x86_64-freebsd)
  567. override TARGET_RSTS+=frmabout frmmain
  568. endif
  569. ifeq ($(FULL_TARGET),x86_64-win64)
  570. override TARGET_RSTS+=frmabout frmmain
  571. endif
  572. ifeq ($(FULL_TARGET),arm-linux)
  573. override TARGET_RSTS+=frmabout frmmain
  574. endif
  575. ifeq ($(FULL_TARGET),arm-palmos)
  576. override TARGET_RSTS+=frmabout frmmain
  577. endif
  578. ifeq ($(FULL_TARGET),arm-wince)
  579. override TARGET_RSTS+=frmabout frmmain
  580. endif
  581. ifeq ($(FULL_TARGET),powerpc64-linux)
  582. override TARGET_RSTS+=frmabout frmmain
  583. endif
  584. override INSTALL_FPCPACKAGE=y
  585. ifeq ($(FULL_TARGET),i386-linux)
  586. override COMPILER_UNITDIR+=..
  587. endif
  588. ifeq ($(FULL_TARGET),i386-go32v2)
  589. override COMPILER_UNITDIR+=..
  590. endif
  591. ifeq ($(FULL_TARGET),i386-win32)
  592. override COMPILER_UNITDIR+=..
  593. endif
  594. ifeq ($(FULL_TARGET),i386-os2)
  595. override COMPILER_UNITDIR+=..
  596. endif
  597. ifeq ($(FULL_TARGET),i386-freebsd)
  598. override COMPILER_UNITDIR+=..
  599. endif
  600. ifeq ($(FULL_TARGET),i386-beos)
  601. override COMPILER_UNITDIR+=..
  602. endif
  603. ifeq ($(FULL_TARGET),i386-netbsd)
  604. override COMPILER_UNITDIR+=..
  605. endif
  606. ifeq ($(FULL_TARGET),i386-solaris)
  607. override COMPILER_UNITDIR+=..
  608. endif
  609. ifeq ($(FULL_TARGET),i386-qnx)
  610. override COMPILER_UNITDIR+=..
  611. endif
  612. ifeq ($(FULL_TARGET),i386-netware)
  613. override COMPILER_UNITDIR+=..
  614. endif
  615. ifeq ($(FULL_TARGET),i386-openbsd)
  616. override COMPILER_UNITDIR+=..
  617. endif
  618. ifeq ($(FULL_TARGET),i386-wdosx)
  619. override COMPILER_UNITDIR+=..
  620. endif
  621. ifeq ($(FULL_TARGET),i386-darwin)
  622. override COMPILER_UNITDIR+=..
  623. endif
  624. ifeq ($(FULL_TARGET),i386-emx)
  625. override COMPILER_UNITDIR+=..
  626. endif
  627. ifeq ($(FULL_TARGET),i386-watcom)
  628. override COMPILER_UNITDIR+=..
  629. endif
  630. ifeq ($(FULL_TARGET),i386-netwlibc)
  631. override COMPILER_UNITDIR+=..
  632. endif
  633. ifeq ($(FULL_TARGET),i386-wince)
  634. override COMPILER_UNITDIR+=..
  635. endif
  636. ifeq ($(FULL_TARGET),m68k-linux)
  637. override COMPILER_UNITDIR+=..
  638. endif
  639. ifeq ($(FULL_TARGET),m68k-freebsd)
  640. override COMPILER_UNITDIR+=..
  641. endif
  642. ifeq ($(FULL_TARGET),m68k-netbsd)
  643. override COMPILER_UNITDIR+=..
  644. endif
  645. ifeq ($(FULL_TARGET),m68k-amiga)
  646. override COMPILER_UNITDIR+=..
  647. endif
  648. ifeq ($(FULL_TARGET),m68k-atari)
  649. override COMPILER_UNITDIR+=..
  650. endif
  651. ifeq ($(FULL_TARGET),m68k-openbsd)
  652. override COMPILER_UNITDIR+=..
  653. endif
  654. ifeq ($(FULL_TARGET),m68k-palmos)
  655. override COMPILER_UNITDIR+=..
  656. endif
  657. ifeq ($(FULL_TARGET),powerpc-linux)
  658. override COMPILER_UNITDIR+=..
  659. endif
  660. ifeq ($(FULL_TARGET),powerpc-netbsd)
  661. override COMPILER_UNITDIR+=..
  662. endif
  663. ifeq ($(FULL_TARGET),powerpc-macos)
  664. override COMPILER_UNITDIR+=..
  665. endif
  666. ifeq ($(FULL_TARGET),powerpc-darwin)
  667. override COMPILER_UNITDIR+=..
  668. endif
  669. ifeq ($(FULL_TARGET),powerpc-morphos)
  670. override COMPILER_UNITDIR+=..
  671. endif
  672. ifeq ($(FULL_TARGET),sparc-linux)
  673. override COMPILER_UNITDIR+=..
  674. endif
  675. ifeq ($(FULL_TARGET),sparc-netbsd)
  676. override COMPILER_UNITDIR+=..
  677. endif
  678. ifeq ($(FULL_TARGET),sparc-solaris)
  679. override COMPILER_UNITDIR+=..
  680. endif
  681. ifeq ($(FULL_TARGET),x86_64-linux)
  682. override COMPILER_UNITDIR+=..
  683. endif
  684. ifeq ($(FULL_TARGET),x86_64-freebsd)
  685. override COMPILER_UNITDIR+=..
  686. endif
  687. ifeq ($(FULL_TARGET),x86_64-win64)
  688. override COMPILER_UNITDIR+=..
  689. endif
  690. ifeq ($(FULL_TARGET),arm-linux)
  691. override COMPILER_UNITDIR+=..
  692. endif
  693. ifeq ($(FULL_TARGET),arm-palmos)
  694. override COMPILER_UNITDIR+=..
  695. endif
  696. ifeq ($(FULL_TARGET),arm-wince)
  697. override COMPILER_UNITDIR+=..
  698. endif
  699. ifeq ($(FULL_TARGET),powerpc64-linux)
  700. override COMPILER_UNITDIR+=..
  701. endif
  702. ifdef REQUIRE_UNITSDIR
  703. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  704. endif
  705. ifdef REQUIRE_PACKAGESDIR
  706. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  707. endif
  708. ifdef ZIPINSTALL
  709. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  710. UNIXHier=1
  711. endif
  712. else
  713. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  714. UNIXHier=1
  715. endif
  716. endif
  717. ifndef INSTALL_PREFIX
  718. ifdef PREFIX
  719. INSTALL_PREFIX=$(PREFIX)
  720. endif
  721. endif
  722. ifndef INSTALL_PREFIX
  723. ifdef UNIXHier
  724. INSTALL_PREFIX=/usr/local
  725. else
  726. ifdef INSTALL_FPCPACKAGE
  727. INSTALL_BASEDIR:=/pp
  728. else
  729. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  730. endif
  731. endif
  732. endif
  733. export INSTALL_PREFIX
  734. ifdef INSTALL_FPCSUBDIR
  735. export INSTALL_FPCSUBDIR
  736. endif
  737. ifndef DIST_DESTDIR
  738. DIST_DESTDIR:=$(BASEDIR)
  739. endif
  740. export DIST_DESTDIR
  741. ifndef COMPILER_UNITTARGETDIR
  742. ifdef PACKAGEDIR_MAIN
  743. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  744. else
  745. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  746. endif
  747. endif
  748. ifndef COMPILER_TARGETDIR
  749. COMPILER_TARGETDIR=.
  750. endif
  751. ifndef INSTALL_BASEDIR
  752. ifdef UNIXHier
  753. ifdef INSTALL_FPCPACKAGE
  754. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  755. else
  756. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  757. endif
  758. else
  759. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  760. endif
  761. endif
  762. ifndef INSTALL_BINDIR
  763. ifdef UNIXHier
  764. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  765. else
  766. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  767. ifdef INSTALL_FPCPACKAGE
  768. ifdef CROSSCOMPILE
  769. ifdef CROSSINSTALL
  770. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  771. else
  772. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  773. endif
  774. else
  775. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  776. endif
  777. endif
  778. endif
  779. endif
  780. ifndef INSTALL_UNITDIR
  781. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  782. ifdef INSTALL_FPCPACKAGE
  783. ifdef PACKAGE_NAME
  784. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  785. endif
  786. endif
  787. endif
  788. ifndef INSTALL_LIBDIR
  789. ifdef UNIXHier
  790. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  791. else
  792. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  793. endif
  794. endif
  795. ifndef INSTALL_SOURCEDIR
  796. ifdef UNIXHier
  797. ifdef BSDhier
  798. SRCPREFIXDIR=share/src
  799. else
  800. ifdef linuxHier
  801. SRCPREFIXDIR=share/src
  802. else
  803. SRCPREFIXDIR=src
  804. endif
  805. endif
  806. ifdef INSTALL_FPCPACKAGE
  807. ifdef INSTALL_FPCSUBDIR
  808. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  809. else
  810. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  811. endif
  812. else
  813. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  814. endif
  815. else
  816. ifdef INSTALL_FPCPACKAGE
  817. ifdef INSTALL_FPCSUBDIR
  818. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  819. else
  820. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  821. endif
  822. else
  823. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  824. endif
  825. endif
  826. endif
  827. ifndef INSTALL_DOCDIR
  828. ifdef UNIXHier
  829. ifdef BSDhier
  830. DOCPREFIXDIR=share/doc
  831. else
  832. ifdef linuxHier
  833. DOCPREFIXDIR=share/doc
  834. else
  835. DOCPREFIXDIR=doc
  836. endif
  837. endif
  838. ifdef INSTALL_FPCPACKAGE
  839. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  840. else
  841. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  842. endif
  843. else
  844. ifdef INSTALL_FPCPACKAGE
  845. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  846. else
  847. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  848. endif
  849. endif
  850. endif
  851. ifndef INSTALL_EXAMPLEDIR
  852. ifdef UNIXHier
  853. ifdef INSTALL_FPCPACKAGE
  854. ifdef BSDhier
  855. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  856. else
  857. ifdef linuxHier
  858. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  859. else
  860. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  861. endif
  862. endif
  863. else
  864. ifdef BSDhier
  865. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  866. else
  867. ifdef linuxHier
  868. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  869. else
  870. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  871. endif
  872. endif
  873. endif
  874. else
  875. ifdef INSTALL_FPCPACKAGE
  876. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  877. else
  878. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  879. endif
  880. endif
  881. endif
  882. ifndef INSTALL_DATADIR
  883. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  884. endif
  885. ifndef INSTALL_SHAREDDIR
  886. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  887. endif
  888. ifdef CROSSCOMPILE
  889. ifndef CROSSBINDIR
  890. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  891. ifeq ($(CROSSBINDIR),)
  892. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  893. endif
  894. endif
  895. else
  896. CROSSBINDIR=
  897. endif
  898. BATCHEXT=.bat
  899. LOADEREXT=.as
  900. EXEEXT=.exe
  901. PPLEXT=.ppl
  902. PPUEXT=.ppu
  903. OEXT=.o
  904. ASMEXT=.s
  905. SMARTEXT=.sl
  906. STATICLIBEXT=.a
  907. SHAREDLIBEXT=.so
  908. SHAREDLIBPREFIX=libfp
  909. STATICLIBPREFIX=libp
  910. RSTEXT=.rst
  911. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  912. ifeq ($(OS_TARGET),go32v1)
  913. STATICLIBPREFIX=
  914. SHORTSUFFIX=v1
  915. endif
  916. ifeq ($(OS_TARGET),go32v2)
  917. STATICLIBPREFIX=
  918. SHORTSUFFIX=dos
  919. endif
  920. ifeq ($(OS_TARGET),watcom)
  921. STATICLIBPREFIX=
  922. OEXT=.obj
  923. ASMEXT=.asm
  924. SHAREDLIBEXT=.dll
  925. SHORTSUFFIX=wat
  926. endif
  927. ifeq ($(OS_TARGET),linux)
  928. BATCHEXT=.sh
  929. EXEEXT=
  930. HASSHAREDLIB=1
  931. SHORTSUFFIX=lnx
  932. endif
  933. ifeq ($(OS_TARGET),freebsd)
  934. BATCHEXT=.sh
  935. EXEEXT=
  936. HASSHAREDLIB=1
  937. SHORTSUFFIX=fbs
  938. endif
  939. ifeq ($(OS_TARGET),netbsd)
  940. BATCHEXT=.sh
  941. EXEEXT=
  942. HASSHAREDLIB=1
  943. SHORTSUFFIX=nbs
  944. endif
  945. ifeq ($(OS_TARGET),openbsd)
  946. BATCHEXT=.sh
  947. EXEEXT=
  948. HASSHAREDLIB=1
  949. SHORTSUFFIX=obs
  950. endif
  951. ifeq ($(OS_TARGET),win32)
  952. SHAREDLIBEXT=.dll
  953. SHORTSUFFIX=w32
  954. endif
  955. ifeq ($(OS_TARGET),os2)
  956. BATCHEXT=.cmd
  957. AOUTEXT=.out
  958. STATICLIBPREFIX=
  959. SHAREDLIBEXT=.dll
  960. SHORTSUFFIX=os2
  961. ECHO=echo
  962. endif
  963. ifeq ($(OS_TARGET),emx)
  964. BATCHEXT=.cmd
  965. AOUTEXT=.out
  966. STATICLIBPREFIX=
  967. SHAREDLIBEXT=.dll
  968. SHORTSUFFIX=emx
  969. ECHO=echo
  970. endif
  971. ifeq ($(OS_TARGET),amiga)
  972. EXEEXT=
  973. SHAREDLIBEXT=.library
  974. SHORTSUFFIX=amg
  975. endif
  976. ifeq ($(OS_TARGET),morphos)
  977. EXEEXT=
  978. SHAREDLIBEXT=.library
  979. SHORTSUFFIX=mos
  980. endif
  981. ifeq ($(OS_TARGET),atari)
  982. EXEEXT=.ttp
  983. SHORTSUFFIX=ata
  984. endif
  985. ifeq ($(OS_TARGET),beos)
  986. BATCHEXT=.sh
  987. EXEEXT=
  988. SHORTSUFFIX=be
  989. endif
  990. ifeq ($(OS_TARGET),solaris)
  991. BATCHEXT=.sh
  992. EXEEXT=
  993. SHORTSUFFIX=sun
  994. endif
  995. ifeq ($(OS_TARGET),qnx)
  996. BATCHEXT=.sh
  997. EXEEXT=
  998. SHORTSUFFIX=qnx
  999. endif
  1000. ifeq ($(OS_TARGET),netware)
  1001. EXEEXT=.nlm
  1002. STATICLIBPREFIX=
  1003. SHORTSUFFIX=nw
  1004. endif
  1005. ifeq ($(OS_TARGET),netwlibc)
  1006. EXEEXT=.nlm
  1007. STATICLIBPREFIX=
  1008. SHORTSUFFIX=nwl
  1009. endif
  1010. ifeq ($(OS_TARGET),macos)
  1011. BATCHEXT=
  1012. EXEEXT=
  1013. DEBUGSYMEXT=.xcoff
  1014. SHORTSUFFIX=mac
  1015. endif
  1016. ifeq ($(OS_TARGET),darwin)
  1017. BATCHEXT=.sh
  1018. EXEEXT=
  1019. HASSHAREDLIB=1
  1020. SHORTSUFFIX=dwn
  1021. endif
  1022. else
  1023. ifeq ($(OS_TARGET),go32v1)
  1024. PPUEXT=.pp1
  1025. OEXT=.o1
  1026. ASMEXT=.s1
  1027. SMARTEXT=.sl1
  1028. STATICLIBEXT=.a1
  1029. SHAREDLIBEXT=.so1
  1030. STATICLIBPREFIX=
  1031. SHORTSUFFIX=v1
  1032. endif
  1033. ifeq ($(OS_TARGET),go32v2)
  1034. STATICLIBPREFIX=
  1035. SHORTSUFFIX=dos
  1036. endif
  1037. ifeq ($(OS_TARGET),watcom)
  1038. STATICLIBPREFIX=
  1039. SHORTSUFFIX=wat
  1040. endif
  1041. ifeq ($(OS_TARGET),linux)
  1042. BATCHEXT=.sh
  1043. EXEEXT=
  1044. HASSHAREDLIB=1
  1045. SHORTSUFFIX=lnx
  1046. endif
  1047. ifeq ($(OS_TARGET),freebsd)
  1048. BATCHEXT=.sh
  1049. EXEEXT=
  1050. HASSHAREDLIB=1
  1051. SHORTSUFFIX=fbs
  1052. endif
  1053. ifeq ($(OS_TARGET),netbsd)
  1054. BATCHEXT=.sh
  1055. EXEEXT=
  1056. HASSHAREDLIB=1
  1057. SHORTSUFFIX=nbs
  1058. endif
  1059. ifeq ($(OS_TARGET),openbsd)
  1060. BATCHEXT=.sh
  1061. EXEEXT=
  1062. HASSHAREDLIB=1
  1063. SHORTSUFFIX=obs
  1064. endif
  1065. ifeq ($(OS_TARGET),win32)
  1066. PPUEXT=.ppw
  1067. OEXT=.ow
  1068. ASMEXT=.sw
  1069. SMARTEXT=.slw
  1070. STATICLIBEXT=.aw
  1071. SHAREDLIBEXT=.dll
  1072. SHORTSUFFIX=w32
  1073. endif
  1074. ifeq ($(OS_TARGET),os2)
  1075. BATCHEXT=.cmd
  1076. PPUEXT=.ppo
  1077. ASMEXT=.so2
  1078. OEXT=.oo2
  1079. AOUTEXT=.out
  1080. SMARTEXT=.sl2
  1081. STATICLIBPREFIX=
  1082. STATICLIBEXT=.ao2
  1083. SHAREDLIBEXT=.dll
  1084. SHORTSUFFIX=os2
  1085. ECHO=echo
  1086. endif
  1087. ifeq ($(OS_TARGET),amiga)
  1088. EXEEXT=
  1089. PPUEXT=.ppu
  1090. ASMEXT=.asm
  1091. OEXT=.o
  1092. SMARTEXT=.sl
  1093. STATICLIBEXT=.a
  1094. SHAREDLIBEXT=.library
  1095. SHORTSUFFIX=amg
  1096. endif
  1097. ifeq ($(OS_TARGET),atari)
  1098. PPUEXT=.ppu
  1099. ASMEXT=.s
  1100. OEXT=.o
  1101. SMARTEXT=.sl
  1102. STATICLIBEXT=.a
  1103. EXEEXT=.ttp
  1104. SHORTSUFFIX=ata
  1105. endif
  1106. ifeq ($(OS_TARGET),beos)
  1107. BATCHEXT=.sh
  1108. PPUEXT=.ppu
  1109. ASMEXT=.s
  1110. OEXT=.o
  1111. SMARTEXT=.sl
  1112. STATICLIBEXT=.a
  1113. EXEEXT=
  1114. SHORTSUFFIX=be
  1115. endif
  1116. ifeq ($(OS_TARGET),solaris)
  1117. BATCHEXT=.sh
  1118. PPUEXT=.ppu
  1119. ASMEXT=.s
  1120. OEXT=.o
  1121. SMARTEXT=.sl
  1122. STATICLIBEXT=.a
  1123. EXEEXT=
  1124. SHORTSUFFIX=sun
  1125. endif
  1126. ifeq ($(OS_TARGET),qnx)
  1127. BATCHEXT=.sh
  1128. PPUEXT=.ppu
  1129. ASMEXT=.s
  1130. OEXT=.o
  1131. SMARTEXT=.sl
  1132. STATICLIBEXT=.a
  1133. EXEEXT=
  1134. SHORTSUFFIX=qnx
  1135. endif
  1136. ifeq ($(OS_TARGET),netware)
  1137. STATICLIBPREFIX=
  1138. PPUEXT=.ppu
  1139. OEXT=.o
  1140. ASMEXT=.s
  1141. SMARTEXT=.sl
  1142. STATICLIBEXT=.a
  1143. SHAREDLIBEXT=.nlm
  1144. EXEEXT=.nlm
  1145. SHORTSUFFIX=nw
  1146. endif
  1147. ifeq ($(OS_TARGET),netwlibc)
  1148. STATICLIBPREFIX=
  1149. PPUEXT=.ppu
  1150. OEXT=.o
  1151. ASMEXT=.s
  1152. SMARTEXT=.sl
  1153. STATICLIBEXT=.a
  1154. SHAREDLIBEXT=.nlm
  1155. EXEEXT=.nlm
  1156. SHORTSUFFIX=nwl
  1157. endif
  1158. ifeq ($(OS_TARGET),macos)
  1159. BATCHEXT=
  1160. PPUEXT=.ppu
  1161. ASMEXT=.s
  1162. OEXT=.o
  1163. SMARTEXT=.sl
  1164. STATICLIBEXT=.a
  1165. EXEEXT=
  1166. DEBUGSYMEXT=.xcoff
  1167. SHORTSUFFIX=mac
  1168. endif
  1169. endif
  1170. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  1171. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1172. ZIPSUFFIX=$(SHORTSUFFIX)
  1173. ZIPCROSSPREFIX=
  1174. ZIPSOURCESUFFIX=src
  1175. ZIPEXAMPLESUFFIX=exm
  1176. else
  1177. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1178. ZIPSOURCESUFFIX=.source
  1179. ZIPEXAMPLESUFFIX=.examples
  1180. ifdef CROSSCOMPILE
  1181. ZIPSUFFIX=.$(SOURCESUFFIX)
  1182. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1183. else
  1184. ZIPSUFFIX=.$(TARGETSUFFIX)
  1185. ZIPCROSSPREFIX=
  1186. endif
  1187. endif
  1188. ifndef ECHO
  1189. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1190. ifeq ($(ECHO),)
  1191. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1192. ifeq ($(ECHO),)
  1193. ECHO= __missing_command_ECHO
  1194. else
  1195. ECHO:=$(firstword $(ECHO))
  1196. endif
  1197. else
  1198. ECHO:=$(firstword $(ECHO))
  1199. endif
  1200. endif
  1201. export ECHO
  1202. ifndef DATE
  1203. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1204. ifeq ($(DATE),)
  1205. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1206. ifeq ($(DATE),)
  1207. DATE= __missing_command_DATE
  1208. else
  1209. DATE:=$(firstword $(DATE))
  1210. endif
  1211. else
  1212. DATE:=$(firstword $(DATE))
  1213. endif
  1214. endif
  1215. export DATE
  1216. ifndef GINSTALL
  1217. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1218. ifeq ($(GINSTALL),)
  1219. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1220. ifeq ($(GINSTALL),)
  1221. GINSTALL= __missing_command_GINSTALL
  1222. else
  1223. GINSTALL:=$(firstword $(GINSTALL))
  1224. endif
  1225. else
  1226. GINSTALL:=$(firstword $(GINSTALL))
  1227. endif
  1228. endif
  1229. export GINSTALL
  1230. ifndef CPPROG
  1231. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1232. ifeq ($(CPPROG),)
  1233. CPPROG= __missing_command_CPPROG
  1234. else
  1235. CPPROG:=$(firstword $(CPPROG))
  1236. endif
  1237. endif
  1238. export CPPROG
  1239. ifndef RMPROG
  1240. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1241. ifeq ($(RMPROG),)
  1242. RMPROG= __missing_command_RMPROG
  1243. else
  1244. RMPROG:=$(firstword $(RMPROG))
  1245. endif
  1246. endif
  1247. export RMPROG
  1248. ifndef MVPROG
  1249. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1250. ifeq ($(MVPROG),)
  1251. MVPROG= __missing_command_MVPROG
  1252. else
  1253. MVPROG:=$(firstword $(MVPROG))
  1254. endif
  1255. endif
  1256. export MVPROG
  1257. ifndef MKDIRPROG
  1258. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1259. ifeq ($(MKDIRPROG),)
  1260. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1261. ifeq ($(MKDIRPROG),)
  1262. MKDIRPROG= __missing_command_MKDIRPROG
  1263. else
  1264. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1265. endif
  1266. else
  1267. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1268. endif
  1269. endif
  1270. export MKDIRPROG
  1271. ifndef ECHOREDIR
  1272. ifndef inUnix
  1273. ECHOREDIR=echo
  1274. else
  1275. ECHOREDIR=$(ECHO)
  1276. endif
  1277. endif
  1278. ifndef COPY
  1279. COPY:=$(CPPROG) -fp
  1280. endif
  1281. ifndef COPYTREE
  1282. COPYTREE:=$(CPPROG) -Rfp
  1283. endif
  1284. ifndef MKDIRTREE
  1285. MKDIRTREE:=$(MKDIRPROG) -p
  1286. endif
  1287. ifndef MOVE
  1288. MOVE:=$(MVPROG) -f
  1289. endif
  1290. ifndef DEL
  1291. DEL:=$(RMPROG) -f
  1292. endif
  1293. ifndef DELTREE
  1294. DELTREE:=$(RMPROG) -rf
  1295. endif
  1296. ifndef INSTALL
  1297. ifdef inUnix
  1298. INSTALL:=$(GINSTALL) -c -m 644
  1299. else
  1300. INSTALL:=$(COPY)
  1301. endif
  1302. endif
  1303. ifndef INSTALLEXE
  1304. ifdef inUnix
  1305. INSTALLEXE:=$(GINSTALL) -c -m 755
  1306. else
  1307. INSTALLEXE:=$(COPY)
  1308. endif
  1309. endif
  1310. ifndef MKDIR
  1311. MKDIR:=$(GINSTALL) -m 755 -d
  1312. endif
  1313. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1314. ifndef PPUMOVE
  1315. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1316. ifeq ($(PPUMOVE),)
  1317. PPUMOVE= __missing_command_PPUMOVE
  1318. else
  1319. PPUMOVE:=$(firstword $(PPUMOVE))
  1320. endif
  1321. endif
  1322. export PPUMOVE
  1323. ifndef FPCMAKE
  1324. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1325. ifeq ($(FPCMAKE),)
  1326. FPCMAKE= __missing_command_FPCMAKE
  1327. else
  1328. FPCMAKE:=$(firstword $(FPCMAKE))
  1329. endif
  1330. endif
  1331. export FPCMAKE
  1332. ifndef ZIPPROG
  1333. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1334. ifeq ($(ZIPPROG),)
  1335. ZIPPROG= __missing_command_ZIPPROG
  1336. else
  1337. ZIPPROG:=$(firstword $(ZIPPROG))
  1338. endif
  1339. endif
  1340. export ZIPPROG
  1341. ifndef TARPROG
  1342. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1343. ifeq ($(TARPROG),)
  1344. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1345. ifeq ($(TARPROG),)
  1346. TARPROG= __missing_command_TARPROG
  1347. else
  1348. TARPROG:=$(firstword $(TARPROG))
  1349. endif
  1350. else
  1351. TARPROG:=$(firstword $(TARPROG))
  1352. endif
  1353. endif
  1354. export TARPROG
  1355. ASNAME=$(BINUTILSPREFIX)as
  1356. LDNAME=$(BINUTILSPREFIX)ld
  1357. ARNAME=$(BINUTILSPREFIX)ar
  1358. RCNAME=$(BINUTILSPREFIX)rc
  1359. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1360. ifeq ($(OS_TARGET),win32)
  1361. ifeq ($(CROSSBINDIR),)
  1362. ASNAME=asw
  1363. LDNAME=ldw
  1364. ARNAME=arw
  1365. endif
  1366. endif
  1367. endif
  1368. ifndef ASPROG
  1369. ifdef CROSSBINDIR
  1370. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1371. else
  1372. ASPROG=$(ASNAME)
  1373. endif
  1374. endif
  1375. ifndef LDPROG
  1376. ifdef CROSSBINDIR
  1377. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1378. else
  1379. LDPROG=$(LDNAME)
  1380. endif
  1381. endif
  1382. ifndef RCPROG
  1383. ifdef CROSSBINDIR
  1384. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1385. else
  1386. RCPROG=$(RCNAME)
  1387. endif
  1388. endif
  1389. ifndef ARPROG
  1390. ifdef CROSSBINDIR
  1391. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1392. else
  1393. ARPROG=$(ARNAME)
  1394. endif
  1395. endif
  1396. AS=$(ASPROG)
  1397. LD=$(LDPROG)
  1398. RC=$(RCPROG)
  1399. AR=$(ARPROG)
  1400. PPAS=ppas$(SRCBATCHEXT)
  1401. ifdef inUnix
  1402. LDCONFIG=ldconfig
  1403. else
  1404. LDCONFIG=
  1405. endif
  1406. ifdef DATE
  1407. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1408. else
  1409. DATESTR=
  1410. endif
  1411. ifndef UPXPROG
  1412. ifeq ($(OS_TARGET),go32v2)
  1413. UPXPROG:=1
  1414. endif
  1415. ifeq ($(OS_TARGET),win32)
  1416. UPXPROG:=1
  1417. endif
  1418. ifdef UPXPROG
  1419. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1420. ifeq ($(UPXPROG),)
  1421. UPXPROG=
  1422. else
  1423. UPXPROG:=$(firstword $(UPXPROG))
  1424. endif
  1425. else
  1426. UPXPROG=
  1427. endif
  1428. endif
  1429. export UPXPROG
  1430. ZIPOPT=-9
  1431. ZIPEXT=.zip
  1432. ifeq ($(USETAR),bz2)
  1433. TAROPT=vj
  1434. TAREXT=.tar.bz2
  1435. else
  1436. TAROPT=vz
  1437. TAREXT=.tar.gz
  1438. endif
  1439. override REQUIRE_PACKAGES=rtl
  1440. ifeq ($(FULL_TARGET),i386-linux)
  1441. REQUIRE_PACKAGES_RTL=1
  1442. endif
  1443. ifeq ($(FULL_TARGET),i386-go32v2)
  1444. REQUIRE_PACKAGES_RTL=1
  1445. endif
  1446. ifeq ($(FULL_TARGET),i386-win32)
  1447. REQUIRE_PACKAGES_RTL=1
  1448. endif
  1449. ifeq ($(FULL_TARGET),i386-os2)
  1450. REQUIRE_PACKAGES_RTL=1
  1451. endif
  1452. ifeq ($(FULL_TARGET),i386-freebsd)
  1453. REQUIRE_PACKAGES_RTL=1
  1454. endif
  1455. ifeq ($(FULL_TARGET),i386-beos)
  1456. REQUIRE_PACKAGES_RTL=1
  1457. endif
  1458. ifeq ($(FULL_TARGET),i386-netbsd)
  1459. REQUIRE_PACKAGES_RTL=1
  1460. endif
  1461. ifeq ($(FULL_TARGET),i386-solaris)
  1462. REQUIRE_PACKAGES_RTL=1
  1463. endif
  1464. ifeq ($(FULL_TARGET),i386-qnx)
  1465. REQUIRE_PACKAGES_RTL=1
  1466. endif
  1467. ifeq ($(FULL_TARGET),i386-netware)
  1468. REQUIRE_PACKAGES_RTL=1
  1469. endif
  1470. ifeq ($(FULL_TARGET),i386-openbsd)
  1471. REQUIRE_PACKAGES_RTL=1
  1472. endif
  1473. ifeq ($(FULL_TARGET),i386-wdosx)
  1474. REQUIRE_PACKAGES_RTL=1
  1475. endif
  1476. ifeq ($(FULL_TARGET),i386-darwin)
  1477. REQUIRE_PACKAGES_RTL=1
  1478. endif
  1479. ifeq ($(FULL_TARGET),i386-emx)
  1480. REQUIRE_PACKAGES_RTL=1
  1481. endif
  1482. ifeq ($(FULL_TARGET),i386-watcom)
  1483. REQUIRE_PACKAGES_RTL=1
  1484. endif
  1485. ifeq ($(FULL_TARGET),i386-netwlibc)
  1486. REQUIRE_PACKAGES_RTL=1
  1487. endif
  1488. ifeq ($(FULL_TARGET),i386-wince)
  1489. REQUIRE_PACKAGES_RTL=1
  1490. endif
  1491. ifeq ($(FULL_TARGET),m68k-linux)
  1492. REQUIRE_PACKAGES_RTL=1
  1493. endif
  1494. ifeq ($(FULL_TARGET),m68k-freebsd)
  1495. REQUIRE_PACKAGES_RTL=1
  1496. endif
  1497. ifeq ($(FULL_TARGET),m68k-netbsd)
  1498. REQUIRE_PACKAGES_RTL=1
  1499. endif
  1500. ifeq ($(FULL_TARGET),m68k-amiga)
  1501. REQUIRE_PACKAGES_RTL=1
  1502. endif
  1503. ifeq ($(FULL_TARGET),m68k-atari)
  1504. REQUIRE_PACKAGES_RTL=1
  1505. endif
  1506. ifeq ($(FULL_TARGET),m68k-openbsd)
  1507. REQUIRE_PACKAGES_RTL=1
  1508. endif
  1509. ifeq ($(FULL_TARGET),m68k-palmos)
  1510. REQUIRE_PACKAGES_RTL=1
  1511. endif
  1512. ifeq ($(FULL_TARGET),powerpc-linux)
  1513. REQUIRE_PACKAGES_RTL=1
  1514. endif
  1515. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1516. REQUIRE_PACKAGES_RTL=1
  1517. endif
  1518. ifeq ($(FULL_TARGET),powerpc-macos)
  1519. REQUIRE_PACKAGES_RTL=1
  1520. endif
  1521. ifeq ($(FULL_TARGET),powerpc-darwin)
  1522. REQUIRE_PACKAGES_RTL=1
  1523. endif
  1524. ifeq ($(FULL_TARGET),powerpc-morphos)
  1525. REQUIRE_PACKAGES_RTL=1
  1526. endif
  1527. ifeq ($(FULL_TARGET),sparc-linux)
  1528. REQUIRE_PACKAGES_RTL=1
  1529. endif
  1530. ifeq ($(FULL_TARGET),sparc-netbsd)
  1531. REQUIRE_PACKAGES_RTL=1
  1532. endif
  1533. ifeq ($(FULL_TARGET),sparc-solaris)
  1534. REQUIRE_PACKAGES_RTL=1
  1535. endif
  1536. ifeq ($(FULL_TARGET),x86_64-linux)
  1537. REQUIRE_PACKAGES_RTL=1
  1538. endif
  1539. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1540. REQUIRE_PACKAGES_RTL=1
  1541. endif
  1542. ifeq ($(FULL_TARGET),x86_64-win64)
  1543. REQUIRE_PACKAGES_RTL=1
  1544. endif
  1545. ifeq ($(FULL_TARGET),arm-linux)
  1546. REQUIRE_PACKAGES_RTL=1
  1547. endif
  1548. ifeq ($(FULL_TARGET),arm-palmos)
  1549. REQUIRE_PACKAGES_RTL=1
  1550. endif
  1551. ifeq ($(FULL_TARGET),arm-wince)
  1552. REQUIRE_PACKAGES_RTL=1
  1553. endif
  1554. ifeq ($(FULL_TARGET),powerpc64-linux)
  1555. REQUIRE_PACKAGES_RTL=1
  1556. endif
  1557. ifdef REQUIRE_PACKAGES_RTL
  1558. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  1559. ifneq ($(PACKAGEDIR_RTL),)
  1560. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  1561. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  1562. else
  1563. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  1564. endif
  1565. ifdef CHECKDEPEND
  1566. $(PACKAGEDIR_RTL)/$(FPCMADE):
  1567. $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
  1568. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
  1569. endif
  1570. else
  1571. PACKAGEDIR_RTL=
  1572. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  1573. ifneq ($(UNITDIR_RTL),)
  1574. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  1575. else
  1576. UNITDIR_RTL=
  1577. endif
  1578. endif
  1579. ifdef UNITDIR_RTL
  1580. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  1581. endif
  1582. endif
  1583. ifndef NOCPUDEF
  1584. override FPCOPTDEF=$(CPU_TARGET)
  1585. endif
  1586. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1587. override FPCOPT+=-T$(OS_TARGET)
  1588. endif
  1589. ifeq ($(OS_SOURCE),openbsd)
  1590. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1591. endif
  1592. ifndef CROSSBOOTSTRAP
  1593. ifneq ($(BINUTILSPREFIX),)
  1594. override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc
  1595. endif
  1596. ifneq ($(BINUTILSPREFIX),)
  1597. override FPCOPT+=-Xr$(RLINKPATH)
  1598. endif
  1599. endif
  1600. ifdef UNITDIR
  1601. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1602. endif
  1603. ifdef LIBDIR
  1604. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1605. endif
  1606. ifdef OBJDIR
  1607. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1608. endif
  1609. ifdef INCDIR
  1610. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1611. endif
  1612. ifdef LINKSMART
  1613. override FPCOPT+=-XX
  1614. endif
  1615. ifdef CREATESMART
  1616. override FPCOPT+=-CX
  1617. endif
  1618. ifdef DEBUG
  1619. override FPCOPT+=-gl
  1620. override FPCOPTDEF+=DEBUG
  1621. endif
  1622. ifdef RELEASE
  1623. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1624. ifeq ($(CPU_TARGET),i386)
  1625. FPCCPUOPT:=-OG2p3
  1626. endif
  1627. ifeq ($(CPU_TARGET),powerpc)
  1628. FPCCPUOPT:=-O1r
  1629. endif
  1630. else
  1631. FPCCPUOPT:=-O2
  1632. endif
  1633. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1634. override FPCOPTDEF+=RELEASE
  1635. endif
  1636. ifdef STRIP
  1637. override FPCOPT+=-Xs
  1638. endif
  1639. ifdef OPTIMIZE
  1640. override FPCOPT+=-O2
  1641. endif
  1642. ifdef VERBOSE
  1643. override FPCOPT+=-vwni
  1644. endif
  1645. ifdef COMPILER_OPTIONS
  1646. override FPCOPT+=$(COMPILER_OPTIONS)
  1647. endif
  1648. ifdef COMPILER_UNITDIR
  1649. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1650. endif
  1651. ifdef COMPILER_LIBRARYDIR
  1652. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1653. endif
  1654. ifdef COMPILER_OBJECTDIR
  1655. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1656. endif
  1657. ifdef COMPILER_INCLUDEDIR
  1658. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1659. endif
  1660. ifdef CROSSBINDIR
  1661. override FPCOPT+=-FD$(CROSSBINDIR)
  1662. endif
  1663. ifdef COMPILER_TARGETDIR
  1664. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1665. ifeq ($(COMPILER_TARGETDIR),.)
  1666. override TARGETDIRPREFIX=
  1667. else
  1668. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1669. endif
  1670. endif
  1671. ifdef COMPILER_UNITTARGETDIR
  1672. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1673. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1674. override UNITTARGETDIRPREFIX=
  1675. else
  1676. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1677. endif
  1678. else
  1679. ifdef COMPILER_TARGETDIR
  1680. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1681. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1682. endif
  1683. endif
  1684. ifdef CREATESHARED
  1685. override FPCOPT+=-Cg
  1686. ifeq ($(CPU_TARGET),i386)
  1687. override FPCOPT+=-Aas
  1688. endif
  1689. endif
  1690. ifdef LINKSHARED
  1691. endif
  1692. ifdef OPT
  1693. override FPCOPT+=$(OPT)
  1694. endif
  1695. ifdef FPCOPTDEF
  1696. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1697. endif
  1698. ifdef CFGFILE
  1699. override FPCOPT+=@$(CFGFILE)
  1700. endif
  1701. ifdef USEENV
  1702. override FPCEXTCMD:=$(FPCOPT)
  1703. override FPCOPT:=!FPCEXTCMD
  1704. export FPCEXTCMD
  1705. endif
  1706. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1707. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1708. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1709. override ACROSSCOMPILE=1
  1710. endif
  1711. ifdef ACROSSCOMPILE
  1712. override FPCOPT+=$(CROSSOPT)
  1713. endif
  1714. override COMPILER:=$(FPC) $(FPCOPT)
  1715. ifeq (,$(findstring -s ,$(COMPILER)))
  1716. EXECPPAS=
  1717. else
  1718. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1719. EXECPPAS:=@$(PPAS)
  1720. endif
  1721. endif
  1722. .PHONY: fpc_units
  1723. ifneq ($(TARGET_UNITS),)
  1724. override ALLTARGET+=fpc_units
  1725. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1726. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1727. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1728. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1729. endif
  1730. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  1731. .PHONY: fpc_exes
  1732. ifndef CROSSINSTALL
  1733. ifneq ($(TARGET_PROGRAMS),)
  1734. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  1735. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  1736. override ALLTARGET+=fpc_exes
  1737. override INSTALLEXEFILES+=$(EXEFILES)
  1738. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  1739. ifeq ($(OS_TARGET),os2)
  1740. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1741. endif
  1742. ifeq ($(OS_TARGET),emx)
  1743. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1744. endif
  1745. endif
  1746. endif
  1747. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  1748. ifdef TARGET_RSTS
  1749. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1750. override CLEANRSTFILES+=$(RSTFILES)
  1751. endif
  1752. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1753. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1754. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1755. fpc_all: $(FPCMADE)
  1756. fpc_smart:
  1757. $(MAKE) all LINKSMART=1 CREATESMART=1
  1758. fpc_debug:
  1759. $(MAKE) all DEBUG=1
  1760. fpc_release:
  1761. $(MAKE) all RELEASE=1
  1762. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  1763. $(COMPILER_UNITTARGETDIR):
  1764. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1765. $(COMPILER_TARGETDIR):
  1766. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1767. %$(PPUEXT): %.pp
  1768. $(COMPILER) $<
  1769. $(EXECPPAS)
  1770. %$(PPUEXT): %.pas
  1771. $(COMPILER) $<
  1772. $(EXECPPAS)
  1773. %$(EXEEXT): %.pp
  1774. $(COMPILER) $<
  1775. $(EXECPPAS)
  1776. %$(EXEEXT): %.pas
  1777. $(COMPILER) $<
  1778. $(EXECPPAS)
  1779. %$(EXEEXT): %.lpr
  1780. $(COMPILER) $<
  1781. $(EXECPPAS)
  1782. %$(EXEEXT): %.dpr
  1783. $(COMPILER) $<
  1784. $(EXECPPAS)
  1785. %.res: %.rc
  1786. windres -i $< -o $@
  1787. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1788. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1789. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1790. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1791. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1792. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1793. .PHONY: fpc_shared
  1794. override INSTALLTARGET+=fpc_shared_install
  1795. ifndef SHARED_LIBVERSION
  1796. SHARED_LIBVERSION=$(FPC_VERSION)
  1797. endif
  1798. ifndef SHARED_LIBNAME
  1799. SHARED_LIBNAME=$(PACKAGE_NAME)
  1800. endif
  1801. ifndef SHARED_FULLNAME
  1802. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1803. endif
  1804. ifndef SHARED_LIBUNITS
  1805. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1806. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1807. endif
  1808. fpc_shared:
  1809. ifdef HASSHAREDLIB
  1810. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1811. ifneq ($(SHARED_BUILD),n)
  1812. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  1813. endif
  1814. else
  1815. @$(ECHO) Shared Libraries not supported
  1816. endif
  1817. fpc_shared_install:
  1818. ifneq ($(SHARED_BUILD),n)
  1819. ifneq ($(SHARED_LIBUNITS),)
  1820. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1821. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1822. endif
  1823. endif
  1824. endif
  1825. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1826. ifdef INSTALL_UNITS
  1827. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1828. endif
  1829. ifdef INSTALL_BUILDUNIT
  1830. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1831. endif
  1832. ifdef INSTALLPPUFILES
  1833. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1834. ifneq ($(UNITTARGETDIRPREFIX),)
  1835. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  1836. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  1837. endif
  1838. override INSTALL_CREATEPACKAGEFPC=1
  1839. endif
  1840. ifdef INSTALLEXEFILES
  1841. ifneq ($(TARGETDIRPREFIX),)
  1842. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1843. endif
  1844. endif
  1845. fpc_install: all $(INSTALLTARGET)
  1846. ifdef INSTALLEXEFILES
  1847. $(MKDIR) $(INSTALL_BINDIR)
  1848. ifdef UPXPROG
  1849. -$(UPXPROG) $(INSTALLEXEFILES)
  1850. endif
  1851. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1852. endif
  1853. ifdef INSTALL_CREATEPACKAGEFPC
  1854. ifdef FPCMAKE
  1855. ifdef PACKAGE_VERSION
  1856. ifneq ($(wildcard Makefile.fpc),)
  1857. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1858. $(MKDIR) $(INSTALL_UNITDIR)
  1859. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1860. endif
  1861. endif
  1862. endif
  1863. endif
  1864. ifdef INSTALLPPUFILES
  1865. $(MKDIR) $(INSTALL_UNITDIR)
  1866. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1867. ifneq ($(INSTALLPPULINKFILES),)
  1868. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1869. endif
  1870. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1871. $(MKDIR) $(INSTALL_LIBDIR)
  1872. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1873. ifdef inUnix
  1874. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1875. endif
  1876. endif
  1877. endif
  1878. ifdef INSTALL_FILES
  1879. $(MKDIR) $(INSTALL_DATADIR)
  1880. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1881. endif
  1882. fpc_sourceinstall: distclean
  1883. $(MKDIR) $(INSTALL_SOURCEDIR)
  1884. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1885. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1886. ifdef HASEXAMPLES
  1887. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1888. endif
  1889. ifdef EXAMPLESOURCEFILES
  1890. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1891. endif
  1892. ifdef TARGET_EXAMPLEDIRS
  1893. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1894. endif
  1895. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1896. ifdef EXEFILES
  1897. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1898. endif
  1899. ifdef CLEAN_UNITS
  1900. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1901. endif
  1902. ifdef CLEANPPUFILES
  1903. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1904. ifdef DEBUGSYMEXT
  1905. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1906. endif
  1907. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1908. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1909. endif
  1910. fpc_clean: $(CLEANTARGET)
  1911. ifdef CLEANEXEFILES
  1912. -$(DEL) $(CLEANEXEFILES)
  1913. endif
  1914. ifdef CLEANPPUFILES
  1915. -$(DEL) $(CLEANPPUFILES)
  1916. endif
  1917. ifneq ($(CLEANPPULINKFILES),)
  1918. -$(DEL) $(CLEANPPULINKFILES)
  1919. endif
  1920. ifdef CLEANRSTFILES
  1921. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1922. endif
  1923. ifdef CLEAN_FILES
  1924. -$(DEL) $(CLEAN_FILES)
  1925. endif
  1926. ifdef LIB_NAME
  1927. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1928. endif
  1929. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1930. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  1931. fpc_cleanall: $(CLEANTARGET)
  1932. ifdef CLEANEXEFILES
  1933. -$(DEL) $(CLEANEXEFILES)
  1934. endif
  1935. ifdef COMPILER_UNITTARGETDIR
  1936. ifdef CLEANPPUFILES
  1937. -$(DEL) $(CLEANPPUFILES)
  1938. endif
  1939. ifneq ($(CLEANPPULINKFILES),)
  1940. -$(DEL) $(CLEANPPULINKFILES)
  1941. endif
  1942. ifdef CLEANRSTFILES
  1943. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1944. endif
  1945. endif
  1946. -$(DELTREE) units
  1947. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1948. ifneq ($(PPUEXT),.ppu)
  1949. -$(DEL) *.o *.ppu *.a
  1950. endif
  1951. -$(DELTREE) *$(SMARTEXT)
  1952. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1953. -$(DEL) *_ppas$(BATCHEXT)
  1954. ifdef AOUTEXT
  1955. -$(DEL) *$(AOUTEXT)
  1956. endif
  1957. ifdef DEBUGSYMEXT
  1958. -$(DEL) *$(DEBUGSYMEXT)
  1959. endif
  1960. fpc_distclean: cleanall
  1961. .PHONY: fpc_baseinfo
  1962. override INFORULES+=fpc_baseinfo
  1963. fpc_baseinfo:
  1964. @$(ECHO)
  1965. @$(ECHO) == Package info ==
  1966. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1967. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1968. @$(ECHO)
  1969. @$(ECHO) == Configuration info ==
  1970. @$(ECHO)
  1971. @$(ECHO) FPC.......... $(FPC)
  1972. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1973. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1974. @$(ECHO) Target CPU... $(CPU_TARGET)
  1975. @$(ECHO) Source OS.... $(OS_SOURCE)
  1976. @$(ECHO) Target OS.... $(OS_TARGET)
  1977. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1978. @$(ECHO) Full Target.. $(FULL_TARGET)
  1979. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  1980. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  1981. @$(ECHO)
  1982. @$(ECHO) == Directory info ==
  1983. @$(ECHO)
  1984. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1985. @$(ECHO)
  1986. @$(ECHO) Basedir......... $(BASEDIR)
  1987. @$(ECHO) FPCDir.......... $(FPCDIR)
  1988. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1989. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1990. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1991. @$(ECHO)
  1992. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1993. @$(ECHO) Other library... $(OTHERLIBDIR)
  1994. @$(ECHO)
  1995. @$(ECHO) == Tools info ==
  1996. @$(ECHO)
  1997. @$(ECHO) As........ $(AS)
  1998. @$(ECHO) Ld........ $(LD)
  1999. @$(ECHO) Ar........ $(AR)
  2000. @$(ECHO) Rc........ $(RC)
  2001. @$(ECHO)
  2002. @$(ECHO) Mv........ $(MVPROG)
  2003. @$(ECHO) Cp........ $(CPPROG)
  2004. @$(ECHO) Rm........ $(RMPROG)
  2005. @$(ECHO) GInstall.. $(GINSTALL)
  2006. @$(ECHO) Echo...... $(ECHO)
  2007. @$(ECHO) Shell..... $(SHELL)
  2008. @$(ECHO) Date...... $(DATE)
  2009. @$(ECHO) FPCMake... $(FPCMAKE)
  2010. @$(ECHO) PPUMove... $(PPUMOVE)
  2011. @$(ECHO) Upx....... $(UPXPROG)
  2012. @$(ECHO) Zip....... $(ZIPPROG)
  2013. @$(ECHO)
  2014. @$(ECHO) == Object info ==
  2015. @$(ECHO)
  2016. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  2017. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  2018. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  2019. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  2020. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  2021. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  2022. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  2023. @$(ECHO)
  2024. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  2025. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  2026. @$(ECHO)
  2027. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  2028. @$(ECHO) Install Files....... $(INSTALL_FILES)
  2029. @$(ECHO)
  2030. @$(ECHO) == Install info ==
  2031. @$(ECHO)
  2032. @$(ECHO) DateStr.............. $(DATESTR)
  2033. @$(ECHO) ZipName.............. $(ZIPNAME)
  2034. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  2035. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  2036. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  2037. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  2038. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  2039. @$(ECHO)
  2040. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  2041. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  2042. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  2043. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  2044. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  2045. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  2046. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  2047. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  2048. @$(ECHO)
  2049. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  2050. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  2051. @$(ECHO)
  2052. .PHONY: fpc_info
  2053. fpc_info: $(INFORULES)
  2054. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  2055. fpc_makefile_dirs
  2056. fpc_makefile:
  2057. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  2058. fpc_makefile_sub1:
  2059. ifdef TARGET_DIRS
  2060. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  2061. endif
  2062. ifdef TARGET_EXAMPLEDIRS
  2063. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  2064. endif
  2065. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  2066. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  2067. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  2068. all: fpc_all
  2069. debug: fpc_debug
  2070. smart: fpc_smart
  2071. release: fpc_release
  2072. units: fpc_units
  2073. examples:
  2074. shared: fpc_shared
  2075. install: fpc_install
  2076. sourceinstall: fpc_sourceinstall
  2077. exampleinstall: fpc_exampleinstall
  2078. distinstall:
  2079. zipinstall:
  2080. zipsourceinstall:
  2081. zipexampleinstall:
  2082. zipdistinstall:
  2083. clean: fpc_clean
  2084. distclean: fpc_distclean
  2085. cleanall: fpc_cleanall
  2086. info: fpc_info
  2087. makefiles: fpc_makefiles
  2088. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  2089. ifneq ($(wildcard fpcmake.loc),)
  2090. include fpcmake.loc
  2091. endif
  2092. debugserver$(EXEEXT): frmabout$(PPUEXT) frmmain$(PPUEXT) bitmapdata$(PPUEXT) debugserver.pp
  2093. $(COMPILER) debugserver.pp