Makefile 65 KB

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