Makefile 71 KB

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