Makefile 48 KB

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