Makefile 54 KB

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