Makefile 47 KB

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