Makefile 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0
  3. #
  4. default: all
  5. MAKEFILETARGETS=m68k-macosclassic powerpc-macosclassic
  6. BSDs = freebsd netbsd openbsd darwin dragonfly
  7. UNIXs = linux $(BSDs) solaris qnx haiku aix
  8. LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari human68k
  9. OSNeedsComspecToRunBatch = go32v2 watcom
  10. FORCE:
  11. .PHONY: FORCE
  12. lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
  13. override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
  14. ifneq ($(findstring darwin,$(OSTYPE)),)
  15. inUnix=1 #darwin
  16. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  17. else
  18. ifeq ($(findstring ;,$(PATH)),)
  19. inUnix=1
  20. SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
  21. else
  22. SEARCHPATH:=$(subst ;, ,$(PATH))
  23. endif
  24. endif
  25. SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
  26. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
  27. ifeq ($(PWD),)
  28. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
  29. ifeq ($(PWD),)
  30. $(error You need the GNU utils package to use this Makefile)
  31. else
  32. PWD:=$(firstword $(PWD))
  33. SRCEXEEXT=
  34. endif
  35. else
  36. PWD:=$(firstword $(PWD))
  37. SRCEXEEXT=.exe
  38. endif
  39. ifndef inUnix
  40. ifeq ($(OS),Windows_NT)
  41. inWinNT=1
  42. else
  43. ifdef OS2_SHELL
  44. inOS2=1
  45. endif
  46. endif
  47. else
  48. ifneq ($(findstring cygdrive,$(PATH)),)
  49. inCygWin=1
  50. endif
  51. endif
  52. ifdef inUnix
  53. SRCBATCHEXT=.sh
  54. else
  55. ifdef inOS2
  56. SRCBATCHEXT=.cmd
  57. else
  58. SRCBATCHEXT=.bat
  59. endif
  60. endif
  61. ifdef COMSPEC
  62. ifneq ($(filter $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
  63. ifndef RUNBATCH
  64. RUNBATCH=$(COMSPEC) /C
  65. endif
  66. endif
  67. endif
  68. ifdef inUnix
  69. PATHSEP=/
  70. else
  71. PATHSEP:=$(subst /,\,/)
  72. ifdef inCygWin
  73. PATHSEP=/
  74. endif
  75. endif
  76. ifdef PWD
  77. BASEDIR:=$(subst \,/,$(shell $(PWD)))
  78. ifdef inCygWin
  79. ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
  80. BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
  81. BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
  82. BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
  83. endif
  84. endif
  85. else
  86. BASEDIR=.
  87. endif
  88. ifdef inOS2
  89. ifndef ECHO
  90. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  91. ifeq ($(ECHO),)
  92. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  93. ifeq ($(ECHO),)
  94. ECHO=echo
  95. else
  96. ECHO:=$(firstword $(ECHO))
  97. endif
  98. else
  99. ECHO:=$(firstword $(ECHO))
  100. endif
  101. endif
  102. export ECHO
  103. endif
  104. override OS_TARGET_DEFAULT=macosclassic
  105. override DEFAULT_FPCDIR=../..
  106. ifndef FPC
  107. ifdef PP
  108. FPC=$(PP)
  109. endif
  110. endif
  111. ifndef FPC
  112. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  113. ifneq ($(FPCPROG),)
  114. FPCPROG:=$(firstword $(FPCPROG))
  115. ifneq ($(CPU_TARGET),)
  116. FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
  117. else
  118. FPC:=$(shell $(FPCPROG) -PB)
  119. endif
  120. ifneq ($(findstring Error,$(FPC)),)
  121. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  122. else
  123. ifeq ($(strip $(wildcard $(FPC))),)
  124. FPC:=$(firstword $(FPCPROG))
  125. endif
  126. endif
  127. else
  128. override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  129. endif
  130. endif
  131. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  132. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  133. FOUNDFPC:=$(strip $(wildcard $(FPC)))
  134. ifeq ($(FOUNDFPC),)
  135. FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
  136. ifeq ($(FOUNDFPC),)
  137. $(error Compiler $(FPC) not found)
  138. endif
  139. endif
  140. ifndef FPC_COMPILERINFO
  141. FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
  142. endif
  143. ifndef FPC_VERSION
  144. FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
  145. endif
  146. export FPC FPC_VERSION FPC_COMPILERINFO
  147. unexport CHECKDEPEND ALLDEPENDENCIES
  148. ifndef CPU_TARGET
  149. ifdef CPU_TARGET_DEFAULT
  150. CPU_TARGET=$(CPU_TARGET_DEFAULT)
  151. endif
  152. endif
  153. ifndef OS_TARGET
  154. ifdef OS_TARGET_DEFAULT
  155. OS_TARGET=$(OS_TARGET_DEFAULT)
  156. endif
  157. endif
  158. ifndef CPU_SOURCE
  159. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  160. endif
  161. ifndef CPU_TARGET
  162. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  163. endif
  164. ifndef OS_SOURCE
  165. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  166. endif
  167. ifndef OS_TARGET
  168. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  169. endif
  170. CPU_OS_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  171. ifdef SUB_TARGET
  172. L_SUB_TARGET=$(call lc,$(SUB_TARGET))
  173. FULL_TARGET:=$(CPU_TARGET)-$(OS_TARGET)-$(L_SUB_TARGET)
  174. else
  175. FULL_TARGET:=$(CPU_TARGET)-$(OS_TARGET)
  176. endif
  177. CPU_OS_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  178. ifdef SUB_SOURCE
  179. L_SUB_SOURCE=$(call lc,$(SUB_SOURCE))
  180. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)-$(L_SUB_SOURCE)
  181. else
  182. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  183. endif
  184. ifeq ($(CPU_TARGET),armeb)
  185. ARCH=arm
  186. override FPCOPT+=-Cb
  187. else
  188. ifeq ($(CPU_TARGET),armel)
  189. ARCH=arm
  190. override FPCOPT+=-CaEABI
  191. else
  192. ARCH=$(CPU_TARGET)
  193. endif
  194. endif
  195. ifeq ($(CPU_OS_TARGET),aarch64-embedded)
  196. endif
  197. ifdef SUB_TARGET
  198. FPCOPT+=-t$(SUB_TARGET)
  199. FPMAKE_OPT+=--subtarget=$(SUB_TARGET)
  200. endif
  201. ifeq ($(CPU_OS_TARGET),arm-embedded)
  202. ifeq ($(SUBARCH),)
  203. $(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
  204. endif
  205. override FPCOPT+=-Cp$(SUBARCH)
  206. endif
  207. ifeq ($(CPU_OS_TARGET),avr-embedded)
  208. ifeq ($(SUBARCH),)
  209. $(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
  210. endif
  211. override FPCOPT+=-Cp$(SUBARCH)
  212. endif
  213. ifeq ($(CPU_OS_TARGET),mipsel-embedded)
  214. ifeq ($(SUBARCH),)
  215. $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
  216. endif
  217. override FPCOPT+=-Cp$(SUBARCH)
  218. endif
  219. ifeq ($(CPU_OS_TARGET),xtensa-embedded)
  220. ifeq ($(SUBARCH),)
  221. $(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  222. endif
  223. override FPCOPT+=-Cp$(SUBARCH)
  224. endif
  225. ifeq ($(CPU_OS_TARGET),xtensa-freertos)
  226. ifeq ($(SUBARCH),)
  227. $(error When compiling for xtensa-freertos, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
  228. endif
  229. override FPCOPT+=-Cp$(SUBARCH)
  230. endif
  231. ifeq ($(CPU_OS_TARGET),arm-freertos)
  232. ifeq ($(SUBARCH),)
  233. $(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m or SUBARCH=armv7em) must be defined)
  234. endif
  235. override FPCOPT+=-Cp$(SUBARCH)
  236. endif
  237. ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
  238. TARGETSUFFIX=$(OS_TARGET)
  239. SOURCESUFFIX=$(OS_SOURCE)
  240. else
  241. ifneq ($(filter $(OS_TARGET),$(LIMIT83fs)),)
  242. TARGETSUFFIX=$(OS_TARGET)
  243. else
  244. TARGETSUFFIX=$(FULL_TARGET)
  245. endif
  246. SOURCESUFFIX=$(FULL_SOURCE)
  247. endif
  248. ifneq ($(CPU_OS_TARGET),$(CPU_OS_SOURCE))
  249. CROSSCOMPILE=1
  250. endif
  251. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  252. ifeq ($(filter $(CPU_OS_TARGET),$(MAKEFILETARGETS)),)
  253. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  254. endif
  255. endif
  256. ifneq ($(filter $(OS_TARGET),$(BSDs)),)
  257. BSDhier=1
  258. endif
  259. ifeq ($(OS_TARGET),linux)
  260. linuxHier=1
  261. endif
  262. ifndef CROSSCOMPILE
  263. BUILDFULLNATIVE=1
  264. export BUILDFULLNATIVE
  265. endif
  266. ifdef BUILDFULLNATIVE
  267. BUILDNATIVE=1
  268. export BUILDNATIVE
  269. endif
  270. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE SUB_TARGET SUB_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE CPU_OS_TARGET CPU_OS_SOURCE
  271. ifdef FPCDIR
  272. override FPCDIR:=$(subst \,/,$(FPCDIR))
  273. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  274. override FPCDIR=wrong
  275. endif
  276. else
  277. override FPCDIR=wrong
  278. endif
  279. ifdef DEFAULT_FPCDIR
  280. ifeq ($(FPCDIR),wrong)
  281. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  282. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  283. override FPCDIR=wrong
  284. endif
  285. endif
  286. endif
  287. ifeq ($(FPCDIR),wrong)
  288. ifdef inUnix
  289. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  290. ifeq ($(wildcard $(FPCDIR)/units),)
  291. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  292. endif
  293. else
  294. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  295. override FPCDIR:=$(FPCDIR)/..
  296. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  297. override FPCDIR:=$(FPCDIR)/..
  298. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  299. override FPCDIR:=$(BASEDIR)
  300. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl)),)
  301. override FPCDIR=c:/pp
  302. endif
  303. endif
  304. endif
  305. endif
  306. endif
  307. ifndef CROSSBINDIR
  308. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  309. endif
  310. ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
  311. ifneq ($(filter $(OS_SOURCE),darwin ios),)
  312. DARWIN2DARWIN=1
  313. endif
  314. endif
  315. ifndef BINUTILSPREFIX
  316. ifndef CROSSBINDIR
  317. ifdef CROSSCOMPILE
  318. ifneq ($(OS_TARGET),msdos)
  319. ifndef DARWIN2DARWIN
  320. ifneq ($(CPU_TARGET),jvm)
  321. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  322. ifeq ($(OS_TARGET),android)
  323. ifeq ($(CPU_TARGET),arm)
  324. BINUTILSPREFIX=arm-linux-androideabi-
  325. else
  326. ifeq ($(CPU_TARGET),i386)
  327. BINUTILSPREFIX=i686-linux-android-
  328. else
  329. BINUTILSPREFIX=$(CPU_TARGET)-linux-android-
  330. endif
  331. endif
  332. endif
  333. endif
  334. endif
  335. else
  336. BINUTILSPREFIX=$(OS_TARGET)-
  337. endif
  338. endif
  339. endif
  340. endif
  341. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  342. ifeq ($(UNITSDIR),)
  343. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  344. endif
  345. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
  346. ifndef FPCFPMAKE
  347. ifdef CROSSCOMPILE
  348. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  349. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  350. ifneq ($(FPCPROG),)
  351. FPCPROG:=$(firstword $(FPCPROG))
  352. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  353. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  354. FPCFPMAKE:=$(firstword $(FPCPROG))
  355. endif
  356. else
  357. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  358. endif
  359. else
  360. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  361. FPMAKE_SKIP_CONFIG=-n
  362. export FPCFPMAKE
  363. export FPMAKE_SKIP_CONFIG
  364. endif
  365. else
  366. FPMAKE_SKIP_CONFIG=-n
  367. FPCFPMAKE=$(FPC)
  368. endif
  369. endif
  370. override PACKAGE_NAME=rtl
  371. PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  372. ifdef FPC_DOTTEDUNITS
  373. AIOUNIT=NetWareApi.Aio
  374. ALLWINNER_A20UNIT=Embedded.Allwinner_a20
  375. ANDROIDR14UNIT=AndroidAPI.AndroidR14
  376. ATHREADSUNIT=AmigaApi.AThreads
  377. BASEUNIXUNIT=UnixApi.Base
  378. BETHREADSUNIT=BeosApi.Bethreads
  379. BLOCKRTLUNIT=blockrtl
  380. BSDUNIT=BsdApi
  381. CHARACTERUNIT=System.Character
  382. CHARSETUNIT=System.CharSet
  383. CLASSESUNIT=System.Classes
  384. CMEMUNIT=System.CMem
  385. COMMONUNIT=PalmApi.Common
  386. CONSOLEUNIT=System.Console
  387. CONSOLEIOUNIT=EmbeddedApi.ConsoleIO
  388. CORTEXM0UNIT=ARMApi.cortexm0
  389. CORTEXM3UNIT=ARMApi.cortexm3
  390. CORTEXM4UNIT=ARMApi.cortexm4
  391. CORTEXM7UNIT=ARMApi.cortexm7
  392. CP1250UNIT=System.CodePages.CP1250
  393. CP1251UNIT=System.CodePages.CP1251
  394. CP1252UNIT=System.CodePages.CP1252
  395. CP1253UNIT=System.CodePages.CP1253
  396. CP1254UNIT=System.CodePages.CP1254
  397. CP1255UNIT=System.CodePages.CP1255
  398. CP1256UNIT=System.CodePages.CP1256
  399. CP1257UNIT=System.CodePages.CP1257
  400. CP1258UNIT=System.CodePages.CP1258
  401. CP3021UNIT=System.CodePages.CP3021
  402. CP437UNIT=System.CodePages.CP437
  403. CP646UNIT=System.CodePages.CP646
  404. CP737UNIT=System.CodePages.CP737
  405. CP775UNIT=System.CodePages.CP775
  406. CP850UNIT=System.CodePages.CP850
  407. CP852UNIT=System.CodePages.CP852
  408. CP855UNIT=System.CodePages.CP855
  409. CP856UNIT=System.CodePages.CP856
  410. CP857UNIT=System.CodePages.CP857
  411. CP860UNIT=System.CodePages.CP860
  412. CP861UNIT=System.CodePages.CP861
  413. CP862UNIT=System.CodePages.CP862
  414. CP863UNIT=System.CodePages.CP863
  415. CP864UNIT=System.CodePages.CP864
  416. CP865UNIT=System.CodePages.CP865
  417. CP866UNIT=System.CodePages.CP866
  418. CP869UNIT=System.CodePages.CP869
  419. CP874UNIT=System.CodePages.CP874
  420. CP8859_1UNIT=System.CodePages.CP8859_1
  421. CP8859_10UNIT=System.CodePages.CP8859_10
  422. CP8859_11UNIT=System.CodePages.CP8859_11
  423. CP8859_13UNIT=System.CodePages.CP8859_13
  424. CP8859_14UNIT=System.CodePages.CP8859_14
  425. CP8859_15UNIT=System.CodePages.CP8859_15
  426. CP8859_16UNIT=System.CodePages.CP8859_16
  427. CP8859_2UNIT=System.CodePages.CP8859_2
  428. CP8859_3UNIT=System.CodePages.CP8859_3
  429. CP8859_4UNIT=System.CodePages.CP8859_4
  430. CP8859_5UNIT=System.CodePages.CP8859_5
  431. CP8859_6UNIT=System.CodePages.CP8859_6
  432. CP8859_7UNIT=System.CodePages.CP8859_7
  433. CP8859_8UNIT=System.CodePages.CP8859_8
  434. CP8859_9UNIT=System.CodePages.CP8859_9
  435. CPALLUNIT=System.CodePages.All
  436. CPKOI8_RUNIT=System.CodePages.CPkoi8_r
  437. CPKOI8_UUNIT=System.CodePages.CPkoi8_u
  438. CPUUNIT=System.CPU
  439. CTHREADSUNIT=UnixApi.CThreads
  440. CTYPESUNIT=System.CTypes
  441. CWSTRINGUNIT=UnixApi.CWString
  442. DDKUNIT=NTApi.Ddk
  443. DLUNIT=UnixApi.Dl
  444. DOSUNIT=TP.DOS
  445. DOSCALL2UNIT=OS2Api.doscall2
  446. DOSCALLSUNIT=OS2Api.doscalls
  447. DPMIEXCPUNIT=DOSApi.Dpmiexcp
  448. DXELOADUNIT=DOSApi.Dxeload
  449. DXETYPEUNIT=DOSApi.Dxetype
  450. DYNLIBSUNIT=System.DynLibs
  451. EMU387UNIT=DOSApi.EMU387
  452. EMXUNIT=DOSApi.EMX
  453. ERRORSUNIT=UnixApi.Errors
  454. ESP32UNIT=System.Esp32
  455. ESP32C2UNIT=System.Esp32c2
  456. ESP32C3UNIT=System.Esp32c3
  457. ESP32C6UNIT=System.Esp32c6
  458. ESP32C2IDF_50000UNIT=System.Esp32c2idf_50000
  459. ESP32C2IDF_50200UNIT=System.Esp32c2idf_50200
  460. ESP32C3IDF_40400UNIT=System.Esp32c3idf_40400
  461. ESP32C3IDF_50000UNIT=System.Esp32c3idf_50000
  462. ESP32C3IDF_50200UNIT=System.Esp32c3idf_50200
  463. ESP32C6IDF_50200UNIT=System.Esp32c6idf_50200
  464. ESP8266UNIT=System.Esp8266
  465. ESP8266RTOS_30300UNIT=System.Esp8266rtos_30300
  466. ESP8266RTOS_30400UNIT=System.Esp8266rtos_30400
  467. ESPIDF_40100UNIT=System.Espidf_40100
  468. ESPIDF_40200UNIT=System.Espidf_40200
  469. ESPIDF_40400UNIT=System.Espidf_40400
  470. ESPIDF_50000UNIT=System.Espidf_50000
  471. ESPIDF_50200UNIT=System.Espidf_50200
  472. EXEUNIT=OS2Api.exe
  473. EXEINFOUNIT=System.ExeInfo
  474. EXTPASUNIT=extpas
  475. FE310G000UNIT=EmbeddedApi.fe310g000
  476. FE310G002UNIT=EmbeddedApi.fe310g002
  477. FGLUNIT=System.FGL
  478. FPCMEMDLLUNIT=System.FPCMemDLL
  479. FPCYLIXUNIT=fpcylix
  480. FPINTRESUNIT=fpintres
  481. FPWIDESTRINGUNIT=System.FPWideString
  482. FREEBSDUNIT=FreeBSDApi.FreeBSD
  483. GD32VF103XXUNIT=EmbeddedApi.gd32vf103xx
  484. GETOPTSUNIT=System.GetOpts
  485. GO32UNIT=DOSApi.GO32
  486. GPIOUNIT=EmbeddedApi.gpio
  487. HEAPMGRUNIT=EmbeddedApi.HeapMGR
  488. HEAPTRCUNIT=heaptrc
  489. INITCUNIT=System.InitC
  490. INTRINSICSUNIT=System.Intrinsics
  491. ISO7185UNIT=iso7185
  492. JDK15UNIT=JavaApi.JDK15
  493. KBDCALLSUNIT=OS2Api.kbdcalls
  494. LIBCUNIT=NetwareLibCApi.Libc
  495. LINEINFOUNIT=lineinfo
  496. LINUXUNIT=LinuxApi
  497. LINUXVCSUNIT=LinuxApi.Vcs
  498. LM3FURYUNIT=EmbeddedApi.lm3fury
  499. LM3TEMPESTUNIT=EmbeddedApi.lm3tempest
  500. LM4F120UNIT=EmbeddedApi.lm4f120
  501. LNFODWRFUNIT=lnfodwrf
  502. LNFOGDBUNIT=lnfogdb
  503. LPC11XXUNIT=EmbeddedApi.lpc11xx
  504. LPC122XUNIT=EmbeddedApi.lpc122x
  505. LPC13XXUNIT=EmbeddedApi.lpc13xx
  506. LPC1768UNIT=EmbeddedApi.lpc1768
  507. LPC21X4UNIT=EmbeddedApi.lpc21x4
  508. LPC8XXUNIT=EmbeddedApi.lpc8xx
  509. LSTRINGSUNIT=System.LStrings
  510. MACOSUNIT=MacOSApi.MacOS
  511. MACOSTPUNIT=MacOSApi.MacOSTP
  512. MACPASUNIT=macpas
  513. MACUTILSUNIT=MacOSApi.MacUtils
  514. MAILBOXUNIT=EmbeddedApi.mailbox
  515. MATHUNIT=System.Math
  516. MESSAGESUNIT=WinApi.Messages
  517. MK20D5UNIT=EmbeddedApi.mk20d5
  518. MK20D7UNIT=EmbeddedApi.mk20d7
  519. MK22F51212UNIT=EmbeddedApi.mk22f51212
  520. MK64F12UNIT=EmbeddedApi.mk64f12
  521. MMIOUNIT=EmbeddedApi.mmio
  522. MMXUNIT=System.CPU.MMX
  523. MONCALLSUNIT=OS2Api.moncalls
  524. MOUCALLSUNIT=OS2Api.moucalls
  525. MSMOUSEUNIT=DOSApi.MSMouse
  526. MULTIBOOTUNIT=EmbeddedApi.multiboot
  527. NDKUNIT=NTApi.NDK
  528. NDKUTILSUNIT=NTApi.NDKUtils
  529. NETWAREUNIT=NetwareApi.NetWare
  530. NEWEXEUNIT=OS2Api.newexe
  531. NRF51UNIT=EmbeddedApi.nrf51
  532. NRF52UNIT=EmbeddedApi.nrf52
  533. NWCALLSUNIT=NetWareApi.Nwcalls
  534. NWNITUNIT=NetWareApi.Nwnit
  535. NWPREUNIT=NetWareApi.Nwpre
  536. NWPROTUNIT=NetWareApi.Nwprot
  537. NWSERVUNIT=NetWareApi.Nwserv
  538. NWSNUTUNIT=NetWareApi.Nwsnut
  539. OBJCUNIT=objc
  540. OBJCBASEUNIT=objcbase
  541. OBJPASUNIT=objpas
  542. OS2DEFUNIT=OS2Api.os2def
  543. PAGEMEMUNIT=System.PageMem
  544. PILOTUNIT=PalmApi.Pilot
  545. PMBIDIUNIT=OS2Api.pmbidi
  546. PMBITMAPUNIT=OS2Api.pmbitmap
  547. PMDEVUNIT=OS2Api.pmdev
  548. PMGPIUNIT=OS2Api.pmgpi
  549. PMHELPUNIT=OS2Api.pmhelp
  550. PMSHLUNIT=OS2Api.pmshl
  551. PMSPLUNIT=OS2Api.pmspl
  552. PMSTDDLGUNIT=OS2Api.pmstddlg
  553. PMWINUNIT=OS2Api.pmwin
  554. PMWPUNIT=OS2Api.pmwp
  555. PMWSOCKUNIT=OS2Api.pmwsock
  556. PORTSUNIT=System.Ports
  557. POSIXUNIT=QNXApi.Posix
  558. PROFILEUNIT=DOSApi.Profile
  559. RASPI2UNIT=EmbeddedApi.raspi2
  560. RASPI3UNIT=EmbeddedApi.raspi3
  561. RASPIUARTUNIT=EmbeddedApi.raspiuart
  562. RP2040UNIT=EmbeddedApi.rp2040
  563. RTLCONSTSUNIT=System.RtlConsts
  564. SAM3X8EUNIT=EmbeddedApi.sam3x8e
  565. SAMD51P19AUNIT=EmbeddedApi.samd51p19a
  566. SC32442BUNIT=EmbeddedApi .sc32442b
  567. SFPU128UNIT=System.SoftFpu128
  568. SFPUX80UNIT=System.SoftFpuX80
  569. SHAREMEMUNIT=WinApi.ShareMem
  570. SIGNALSUNIT=WinApi.Signals
  571. SO32DLLUNIT=OS2Api.so32dll
  572. SOFTFPUUNIT=System.SoftFPU
  573. SORTBASEUNIT=System.SortBase
  574. STM32F0XXUNIT=EmbeddedApi.stm32f0xx
  575. STM32F103XEUNIT=EmbeddedApi.stm32f103xe
  576. STM32F10X_CLUNIT=EmbeddedApi.stm32f10x_cl
  577. STM32F10X_CONNUNIT=EmbeddedApi.stm32f10x_conn
  578. STM32F10X_HDUNIT=EmbeddedApi.stm32f10x_hd
  579. STM32F10X_LDUNIT=EmbeddedApi.stm32f10x_ld
  580. STM32F10X_MDUNIT=EmbeddedApi.stm32f10x_md
  581. STM32F10X_XLUNIT=EmbeddedApi.stm32f10x_xl
  582. STM32F401XEUNIT=EmbeddedApi.stm32f401xe
  583. STM32F401XXUNIT=EmbeddedApi.stm32f401xx
  584. STM32F407XXUNIT=EmbeddedApi.stm32f407xx
  585. STM32F411XEUNIT=EmbeddedApi.stm32f411xe
  586. STM32F429UNIT=EmbeddedApi.stm32f429
  587. STM32F429XXUNIT=EmbeddedApi.stm32f429xx
  588. STM32F446XXUNIT=EmbeddedApi.stm32f446xx
  589. STM32F745UNIT=EmbeddedApi.stm32f745
  590. STM32F746UNIT=EmbeddedApi.stm32f746
  591. STM32F756UNIT=EmbeddedApi.stm32f756
  592. STM32G071XXUNIT=EmbeddedApi.stm32g071xx
  593. STRINGSUNIT=System.Strings
  594. SYMBIANUNIT=SymbianApi.Symbian
  595. SYSALLUNIT=PalmApi.Sysall
  596. SYSCALLUNIT=UnixApi.SysCall
  597. SYSCONSTUNIT=System.SysConst
  598. SYSCTLUNIT=BsdApi.SysCtl
  599. SYSEMXUNIT=DOSApi.Sysemx
  600. SYSOS2UNIT=OS2Api.sysos2
  601. SYSTEMUNIT=system
  602. SYSTRAPSUNIT=PalmApi.Systraps
  603. SYSUTILSUNIT=System.SysUtils
  604. TERMIOUNIT=UnixApi.TermIO
  605. TYPESUNIT=System.Types
  606. TYPINFOUNIT=System.TypInfo
  607. UFLOAT128UNIT=System.UFloat128
  608. UFLOATX80UNIT=System.UFloatX80
  609. UIUNIT=PalmApi.Ui
  610. UIQUNIT=SymbianApi.Uiq
  611. UIQCLASSESUNIT=SymbianApi.Uiqclasses
  612. UNICODEDATAUNIT=System.CodePages.unicodedata
  613. UNIX98PTYUNIT=UnixApi.Unix98.PTY
  614. UNIXUNIT=UnixApi.Unix
  615. UNIXCPUNIT=UnixApi.CP
  616. UNIXTYPEUNIT=UnixApi.Types
  617. UNIXUTILUNIT=UnixApi.Utils
  618. UUCHARUNIT=uuchar
  619. VIOCALLSUNIT=OS2Api.viocalls
  620. WASIAPIUNIT=WASIApi.WASIApi
  621. WASIUTILUNIT=WASIApi.WASIUtil
  622. WATCOMUNIT=WatcomApi.WatCom
  623. WEBASSEMBLYUNIT=Wasm.Api
  624. WIN31UNIT=WinApi.Win31
  625. WINDIRSUNIT=WinApi.WinDirs
  626. WINDOWSUNIT=WinApi.Windows
  627. WINPROCSUNIT=WinApi.WinProcs
  628. WINSYSUTUNIT=WinApi.WinSysUt
  629. WINTYPESUNIT=WinApi.WinTypes
  630. X86UNIT=System.X86
  631. XMC4500UNIT=EmbeddedApi.xmc4500
  632. NOTHREADSUNIT=System.NoThreads
  633. else
  634. AIOUNIT=aio
  635. ALLWINNER_A20UNIT=allwinner_a20
  636. ANDROIDR14UNIT=androidr14
  637. ATHREADSUNIT=athreads
  638. BASEUNIXUNIT=baseunix
  639. BETHREADSUNIT=bethreads
  640. BLOCKRTLUNIT=blockrtl
  641. BSDUNIT=bsd
  642. CHARACTERUNIT=character
  643. CHARSETUNIT=charset
  644. CLASSESUNIT=classes
  645. CMEMUNIT=cmem
  646. COMMONUNIT=common
  647. CONSOLEUNIT=console
  648. CONSOLEIOUNIT=consoleio
  649. CORTEXM0UNIT=cortexm0
  650. CORTEXM3UNIT=cortexm3
  651. CORTEXM4UNIT=cortexm4
  652. CORTEXM7UNIT=cortexm7
  653. CP1250UNIT=cp1250
  654. CP1251UNIT=cp1251
  655. CP1252UNIT=cp1252
  656. CP1253UNIT=cp1253
  657. CP1254UNIT=cp1254
  658. CP1255UNIT=cp1255
  659. CP1256UNIT=cp1256
  660. CP1257UNIT=cp1257
  661. CP1258UNIT=cp1258
  662. CP3021UNIT=cp3021
  663. CP437UNIT=cp437
  664. CP646UNIT=cp646
  665. CP737UNIT=cp737
  666. CP775UNIT=cp775
  667. CP850UNIT=cp850
  668. CP852UNIT=cp852
  669. CP855UNIT=cp855
  670. CP856UNIT=cp856
  671. CP857UNIT=cp857
  672. CP860UNIT=cp860
  673. CP861UNIT=cp861
  674. CP862UNIT=cp862
  675. CP863UNIT=cp863
  676. CP864UNIT=cp864
  677. CP865UNIT=cp865
  678. CP866UNIT=cp866
  679. CP869UNIT=cp869
  680. CP874UNIT=cp874
  681. CP8859_1UNIT=cp8859_1
  682. CP8859_10UNIT=cp8859_10
  683. CP8859_11UNIT=cp8859_11
  684. CP8859_13UNIT=cp8859_13
  685. CP8859_14UNIT=cp8859_14
  686. CP8859_15UNIT=cp8859_15
  687. CP8859_16UNIT=cp8859_16
  688. CP8859_2UNIT=cp8859_2
  689. CP8859_3UNIT=cp8859_3
  690. CP8859_4UNIT=cp8859_4
  691. CP8859_5UNIT=cp8859_5
  692. CP8859_6UNIT=cp8859_6
  693. CP8859_7UNIT=cp8859_7
  694. CP8859_8UNIT=cp8859_8
  695. CP8859_9UNIT=cp8859_9
  696. CPALLUNIT=cpall
  697. CPKOI8_RUNIT=cpkoi8_r
  698. CPKOI8_UUNIT=cpkoi8_u
  699. CPUUNIT=cpu
  700. CTHREADSUNIT=cthreads
  701. CTYPESUNIT=ctypes
  702. CWSTRINGUNIT=cwstring
  703. DDKUNIT=ddk
  704. DLUNIT=dl
  705. DOSUNIT=dos
  706. DOSCALL2UNIT=doscall2
  707. DOSCALLSUNIT=doscalls
  708. DPMIEXCPUNIT=dpmiexcp
  709. DXELOADUNIT=dxeload
  710. DXETYPEUNIT=dxetype
  711. DYNLIBSUNIT=dynlibs
  712. EMU387UNIT=emu387
  713. EMXUNIT=emx
  714. ERRORSUNIT=errors
  715. ESP32UNIT=esp32
  716. ESP32S2UNIT=esp32s2
  717. ESP32S3UNIT=esp32s3
  718. ESP32C2UNIT=esp32c2
  719. ESP32C3UNIT=esp32c3
  720. ESP32C6UNIT=esp32c6
  721. ESP32C2IDF_50000UNIT=esp32c2idf_50000
  722. ESP32C2IDF_50200UNIT=esp32c2idf_50200
  723. ESP32C3IDF_40400UNIT=esp32c3idf_40400
  724. ESP32C3IDF_50000UNIT=esp32c3idf_50000
  725. ESP32C6IDF_50200UNIT=esp32c6idf_50200
  726. ESP8266UNIT=esp8266
  727. ESP8266RTOS_30300UNIT=esp8266rtos_30300
  728. ESP8266RTOS_30400UNIT=esp8266rtos_30400
  729. ESPIDF_40100UNIT=espidf_40100
  730. ESPIDF_40200UNIT=espidf_40200
  731. ESPIDF_40400UNIT=espidf_40400
  732. ESPIDF_50000UNIT=espidf_50000
  733. ESPIDF_50200UNIT=espidf_50200
  734. EXEUNIT=exe
  735. EXEINFOUNIT=exeinfo
  736. EXTPASUNIT=extpas
  737. FE310G000UNIT=fe310g000
  738. FE310G002UNIT=fe310g002
  739. FGLUNIT=fgl
  740. FPCMEMDLLUNIT=fpcmemdll
  741. FPCYLIXUNIT=fpcylix
  742. FPINTRESUNIT=fpintres
  743. FPWIDESTRINGUNIT=fpwidestring
  744. FREEBSDUNIT=freebsd
  745. GD32VF103XXUNIT=gd32vf103xx
  746. GETOPTSUNIT=getopts
  747. GO32UNIT=go32
  748. GPIOUNIT=gpio
  749. HEAPMGRUNIT=heapmgr
  750. HEAPTRCUNIT=heaptrc
  751. INITCUNIT=initc
  752. INTRINSICSUNIT=intrinsics
  753. ISO7185UNIT=iso7185
  754. JDK15UNIT=jdk15
  755. KBDCALLSUNIT=kbdcalls
  756. LIBCUNIT=libc
  757. LINEINFOUNIT=lineinfo
  758. LINUXUNIT=linux
  759. LINUXVCSUNIT=linuxvcs
  760. LM3FURYUNIT=lm3fury
  761. LM3TEMPESTUNIT=lm3tempest
  762. LM4F120UNIT=lm4f120
  763. LNFODWRFUNIT=lnfodwrf
  764. LNFOGDBUNIT=lnfogdb
  765. LPC11XXUNIT=lpc11xx
  766. LPC122XUNIT=lpc122x
  767. LPC13XXUNIT=lpc13xx
  768. LPC1768UNIT=lpc1768
  769. LPC21X4UNIT=lpc21x4
  770. LPC8XXUNIT=lpc8xx
  771. LSTRINGSUNIT=lstrings
  772. MACOSUNIT=macos
  773. MACOSTPUNIT=macostp
  774. MACUTILSUNIT=macutils
  775. MACPASUNIT=macpas
  776. MAILBOXUNIT=mailbox
  777. MATHUNIT=math
  778. MESSAGESUNIT=messages
  779. MK20D5UNIT=mk20d5
  780. MK20D7UNIT=mk20d7
  781. MK22F51212UNIT=mk22f51212
  782. MK64F12UNIT=mk64f12
  783. MMIOUNIT=mmio
  784. MMXUNIT=mmx
  785. MONCALLSUNIT=moncalls
  786. MOUCALLSUNIT=moucalls
  787. MSMOUSEUNIT=msmouse
  788. MULTIBOOTUNIT=multiboot
  789. NDKUNIT=ndk
  790. NDKUTILSUNIT=ndkutils
  791. NETWAREUNIT=netware
  792. NEWEXEUNIT=newexe
  793. NRF51UNIT=nrf51
  794. NRF52UNIT=nrf52
  795. NWCALLSUNIT=nwcalls
  796. NWNITUNIT=nwnit
  797. NWPREUNIT=nwpre
  798. NWPROTUNIT=nwprot
  799. NWSERVUNIT=nwserv
  800. NWSNUTUNIT=nwsnut
  801. OBJCUNIT=objc
  802. OBJCBASEUNIT=objcbase
  803. OBJPASUNIT=objpas
  804. OS2DEFUNIT=os2def
  805. PAGEMEMUNIT=pagemem
  806. PILOTUNIT=pilot
  807. PMBIDIUNIT=pmbidi
  808. PMBITMAPUNIT=pmbitmap
  809. PMDEVUNIT=pmdev
  810. PMGPIUNIT=pmgpi
  811. PMHELPUNIT=pmhelp
  812. PMSHLUNIT=pmshl
  813. PMSPLUNIT=pmspl
  814. PMSTDDLGUNIT=pmstddlg
  815. PMWINUNIT=pmwin
  816. PMWPUNIT=pmwp
  817. PMWSOCKUNIT=pmwsock
  818. PORTSUNIT=ports
  819. POSIXUNIT=posix
  820. PROFILEUNIT=profile
  821. RASPI2UNIT=raspi2
  822. RASPI3UNIT=raspi3
  823. RASPIUARTUNIT=raspiuart
  824. RP2040UNIT=rp2040
  825. RTLCONSTSUNIT=rtlconsts
  826. SAM3X8EUNIT=sam3x8e
  827. SAMD51P19AUNIT=samd51p19a
  828. SC32442BUNIT=sc32442b
  829. SFPU128UNIT=sfpu128
  830. SFPUX80UNIT=sfpux80
  831. SHAREMEMUNIT=sharemem
  832. SIGNALSUNIT=signals
  833. SO32DLLUNIT=so32dll
  834. SOFTFPUUNIT=softfpu
  835. SORTBASEUNIT=sortbase
  836. STM32F0XXUNIT=stm32f0xx
  837. STM32F103XEUNIT=stm32f103xe
  838. STM32F10X_CLUNIT=stm32f10x_cl
  839. STM32F10X_CONNUNIT=stm32f10x_conn
  840. STM32F10X_HDUNIT=stm32f10x_hd
  841. STM32F10X_LDUNIT=stm32f10x_ld
  842. STM32F10X_MDUNIT=stm32f10x_md
  843. STM32F10X_XLUNIT=stm32f10x_xl
  844. STM32F401XEUNIT=stm32f401xe
  845. STM32F401XXUNIT=stm32f401xx
  846. STM32F407XXUNIT=stm32f407xx
  847. STM32F411XEUNIT=stm32f411xe
  848. STM32F429UNIT=stm32f429
  849. STM32F429XXUNIT=stm32f429xx
  850. STM32F446XXUNIT=stm32f446xx
  851. STM32F745UNIT=stm32f745
  852. STM32F746UNIT=stm32f746
  853. STM32F756UNIT=stm32f756
  854. STM32G071XXUNIT=stm32g071xx
  855. STRINGSUNIT=strings
  856. SYMBIANUNIT=symbian
  857. SYSALLUNIT=sysall
  858. SYSCALLUNIT=syscall
  859. SYSCONSTUNIT=sysconst
  860. SYSCTLUNIT=sysctl
  861. SYSEMXUNIT=sysemx
  862. SYSOS2UNIT=sysos2
  863. SYSTEMUNIT=system
  864. SYSTRAPSUNIT=systraps
  865. SYSUTILSUNIT=sysutils
  866. TERMIOUNIT=termio
  867. TYPESUNIT=types
  868. TYPINFOUNIT=typinfo
  869. UFLOAT128UNIT=ufloat128
  870. UFLOATX80UNIT=ufloatx80
  871. UIUNIT=ui
  872. UIQUNIT=uiq
  873. UIQCLASSESUNIT=uiqclasses
  874. UNICODEDATAUNIT=unicodedata
  875. UNIX98PTYUNIT=unix98pty
  876. UNIXUNIT=unix
  877. UNIXCPUNIT=unixcp
  878. UNIXTYPEUNIT=unixtype
  879. UNIXUTILUNIT=unixutil
  880. UUCHARUNIT=uuchar
  881. VIOCALLSUNIT=viocalls
  882. WASIAPIUNIT=wasiapi
  883. WASIUTILUNIT=wasiutil
  884. WATCOMUNIT=watcom
  885. WEBASSEMBLYUNIT=webassembly
  886. WIN31UNIT=win31
  887. WINDIRSUNIT=windirs
  888. WINDOWSUNIT=windows
  889. WINPROCSUNIT=winprocs
  890. WINSYSUTUNIT=winsysut
  891. WINTYPESUNIT=wintypes
  892. X86UNIT=x86
  893. XMC4500UNIT=xmc4500
  894. NOTHREADSUNIT=nothreads
  895. endif
  896. ifdef FPC_DOTTEDUNITS
  897. NS_SYSTEM=System.
  898. NS_CPUNITS=System.CodePages.
  899. NSDIR=$(RTL)/namespaced
  900. NSINC=$(NSDIR)/common
  901. BASEINCLUDE=$(INC) $(PROCINC)
  902. BASESOURCE=$(INC) $(PROCINC) $($(COMMONUNIT))
  903. endif
  904. CP_UNITS=$(CP1250UNIT) $(CP1251UNIT) $(CP1252UNIT) $(CP1253UNIT) $(CP1254UNIT) $(CP1255UNIT) $(CP1256UNIT) $(CP1257UNIT) $(CP1258UNIT) \
  905. $(CP437UNIT) $(CP646UNIT) $(CP737UNIT) $(CP775UNIT) $(CP850UNIT) $(CP852UNIT) $(CP855UNIT) $(CP856UNIT) $(CP857UNIT) $(CP860UNIT) $(CP861UNIT) $(CP862UNIT) \
  906. $(CP863UNIT) $(CP864UNIT) $(CP865UNIT) $(CP866UNIT) $(CP869UNIT) $(CP874UNIT) $(CP3021UNIT) $(CP8859_1UNIT) $(CP8859_2UNIT) $(CP8859_3UNIT) $(CP8859_4UNIT) \
  907. $(CP8859_5UNIT) $(CP8859_6UNIT) $(CP8859_7UNIT) $(CP8859_8UNIT) $(CP8859_9UNIT) $(CP8859_10UNIT) $(CP8859_11UNIT) \
  908. $(CP8859_13UNIT) $(CP8859_14UNIT) $(CP8859_15UNIT) $(CP8859_16UNIT) $(CPKOI8_RUNIT) $(CPKOI8_UUNIT)
  909. ifdef FPC_DOTTEDUNITS
  910. CP_UNITS_SRC=$(addsuffix .pas,$(addprefix $(NSINC)/,$(CP_UNITS)))
  911. else
  912. CP_UNITS_SRC=$(addsuffix .pas,$(addprefix $(RTL)/charmaps/,$(CP_UNITS)))
  913. endif
  914. RTL=..
  915. INC=../inc
  916. PROCINC=../$(CPU_TARGET)
  917. UNIXINC=../unix
  918. PPUEXT=pput
  919. ASMEXT=.s
  920. DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT)
  921. DYNLIBSINCDIR=$(UNIXINC)
  922. UNITPREFIX=rtl
  923. OBJPASDIR=$(RTL)/objpas
  924. DOS_DEPS_OS=$(MACOSTPUNIT)$(PPUEXT) $(MACUTILSUNIT)$(PPUEXT)
  925. SYSUTILS_DEPS_OS=$(DOSUNIT)$(PPUEXT)
  926. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  927. override TARGET_UNITS+=$(SYSTEMUNIT) $(UUCHARUNIT) $(STRINGSUNIT) $(MACPASUNIT) $(OBJPASUNIT) $(ISO7185UNIT) $(MACOSTPUNIT) $(MACUTILSUNIT) $(EXTPASUNIT) $(HEAPTRCUNIT) $(GETOPTSUNIT) $(UNIXUTILUNIT) $(DOSUNIT) $(CMEMUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(CTYPESUNIT) $(SYSCONSTUNIT) $(SORTBASEUNIT) $(SYSUTILSUNIT) $(CLASSESUNIT) $(TYPINFOUNIT) $(FGLUNIT) $(TYPESUNIT) $(MATHUNIT) $(UFLOAT128UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(SFPUX80UNIT) $(SOFTFPUUNIT)
  928. endif
  929. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  930. override TARGET_UNITS+=$(SYSTEMUNIT) $(UUCHARUNIT) $(STRINGSUNIT) $(MACPASUNIT) $(OBJPASUNIT) $(ISO7185UNIT) $(MACOSTPUNIT) $(MACUTILSUNIT) $(EXTPASUNIT) $(HEAPTRCUNIT) $(GETOPTSUNIT) $(UNIXUTILUNIT) $(DOSUNIT) $(CMEMUNIT) $(CHARSETUNIT) $(CPALLUNIT) $(CTYPESUNIT) $(SYSCONSTUNIT) $(SORTBASEUNIT) $(SYSUTILSUNIT) $(CLASSESUNIT) $(TYPINFOUNIT) $(FGLUNIT) $(TYPESUNIT) $(MATHUNIT) $(UFLOAT128UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(SFPUX80UNIT) $(SOFTFPUUNIT)
  931. endif
  932. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  933. override TARGET_IMPLICITUNITS+=$(CP_UNITS)
  934. endif
  935. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  936. override TARGET_IMPLICITUNITS+=$(CP_UNITS)
  937. endif
  938. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  939. override TARGET_RSTS+=$(MATHUNIT) $(SYSCONSTUNIT)
  940. endif
  941. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  942. override TARGET_RSTS+=$(MATHUNIT) $(SYSCONSTUNIT)
  943. endif
  944. override INSTALL_FPCPACKAGE=y y
  945. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  946. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  947. endif
  948. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  949. override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
  950. endif
  951. ifeq ($(CPU_OS_TARGET),m68k-macosclassic)
  952. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  953. endif
  954. ifeq ($(CPU_OS_TARGET),powerpc-macosclassic)
  955. override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
  956. endif
  957. ifdef REQUIRE_UNITSDIR
  958. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  959. endif
  960. ifdef REQUIRE_PACKAGESDIR
  961. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  962. endif
  963. ifdef ZIPINSTALL
  964. ifneq ($(filter $(OS_TARGET),$(UNIXs)),)
  965. UNIXHier=1
  966. endif
  967. else
  968. ifneq ($(filter $(OS_SOURCE),$(UNIXs)),)
  969. UNIXHier=1
  970. endif
  971. endif
  972. ifndef INSTALL_PREFIX
  973. ifdef PREFIX
  974. INSTALL_PREFIX=$(PREFIX)
  975. endif
  976. endif
  977. ifndef INSTALL_PREFIX
  978. ifdef UNIXHier
  979. INSTALL_PREFIX=/usr/local
  980. else
  981. ifdef INSTALL_FPCPACKAGE
  982. INSTALL_BASEDIR:=/pp
  983. else
  984. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  985. endif
  986. endif
  987. endif
  988. export INSTALL_PREFIX
  989. ifdef INSTALL_FPCSUBDIR
  990. export INSTALL_FPCSUBDIR
  991. endif
  992. ifndef DIST_DESTDIR
  993. DIST_DESTDIR:=$(BASEDIR)
  994. endif
  995. export DIST_DESTDIR
  996. ifndef COMPILER_UNITTARGETDIR
  997. ifdef PACKAGEDIR_MAIN
  998. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  999. else
  1000. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  1001. endif
  1002. endif
  1003. ifndef COMPILER_TARGETDIR
  1004. COMPILER_TARGETDIR=.
  1005. endif
  1006. ifndef INSTALL_BASEDIR
  1007. ifdef UNIXHier
  1008. ifdef INSTALL_FPCPACKAGE
  1009. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  1010. else
  1011. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  1012. endif
  1013. else
  1014. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  1015. endif
  1016. endif
  1017. ifndef INSTALL_BINDIR
  1018. ifdef UNIXHier
  1019. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  1020. else
  1021. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  1022. ifdef INSTALL_FPCPACKAGE
  1023. ifdef CROSSCOMPILE
  1024. ifdef CROSSINSTALL
  1025. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  1026. else
  1027. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1028. endif
  1029. else
  1030. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  1031. endif
  1032. endif
  1033. endif
  1034. endif
  1035. ifndef INSTALL_UNITDIR
  1036. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  1037. ifdef INSTALL_FPCPACKAGE
  1038. ifdef PACKAGE_NAME
  1039. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  1040. endif
  1041. endif
  1042. endif
  1043. ifndef INSTALL_LIBDIR
  1044. ifdef UNIXHier
  1045. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  1046. else
  1047. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  1048. endif
  1049. endif
  1050. ifndef INSTALL_SOURCEDIR
  1051. ifdef UNIXHier
  1052. ifdef BSDhier
  1053. SRCPREFIXDIR=share/src
  1054. else
  1055. ifdef linuxHier
  1056. SRCPREFIXDIR=share/src
  1057. else
  1058. SRCPREFIXDIR=src
  1059. endif
  1060. endif
  1061. ifdef INSTALL_FPCPACKAGE
  1062. ifdef INSTALL_FPCSUBDIR
  1063. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1064. else
  1065. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1066. endif
  1067. else
  1068. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1069. endif
  1070. else
  1071. ifdef INSTALL_FPCPACKAGE
  1072. ifdef INSTALL_FPCSUBDIR
  1073. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  1074. else
  1075. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  1076. endif
  1077. else
  1078. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  1079. endif
  1080. endif
  1081. endif
  1082. ifndef INSTALL_DOCDIR
  1083. ifdef UNIXHier
  1084. ifdef BSDhier
  1085. DOCPREFIXDIR=share/doc
  1086. else
  1087. ifdef linuxHier
  1088. DOCPREFIXDIR=share/doc
  1089. else
  1090. DOCPREFIXDIR=doc
  1091. endif
  1092. endif
  1093. ifdef INSTALL_FPCPACKAGE
  1094. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1095. else
  1096. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1097. endif
  1098. else
  1099. ifdef INSTALL_FPCPACKAGE
  1100. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  1101. else
  1102. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  1103. endif
  1104. endif
  1105. endif
  1106. ifndef INSTALL_EXAMPLEDIR
  1107. ifdef UNIXHier
  1108. ifdef INSTALL_FPCPACKAGE
  1109. ifdef BSDhier
  1110. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  1111. else
  1112. ifdef linuxHier
  1113. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  1114. else
  1115. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  1116. endif
  1117. endif
  1118. else
  1119. ifdef BSDhier
  1120. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1121. else
  1122. ifdef linuxHier
  1123. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1124. else
  1125. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  1126. endif
  1127. endif
  1128. endif
  1129. else
  1130. ifdef INSTALL_FPCPACKAGE
  1131. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  1132. else
  1133. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  1134. endif
  1135. endif
  1136. endif
  1137. ifndef INSTALL_DATADIR
  1138. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  1139. endif
  1140. ifndef INSTALL_SHAREDDIR
  1141. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  1142. endif
  1143. ifdef CROSSCOMPILE
  1144. ifndef CROSSBINDIR
  1145. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  1146. ifeq ($(CROSSBINDIR),)
  1147. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  1148. endif
  1149. endif
  1150. else
  1151. CROSSBINDIR=
  1152. endif
  1153. BATCHEXT=.bat
  1154. LOADEREXT=.as
  1155. EXEEXT=.exe
  1156. PPLEXT=.ppl
  1157. PPUEXT=.ppu
  1158. OEXT=.o
  1159. LTOEXT=.bc
  1160. ASMEXT=.s
  1161. SMARTEXT=.sl
  1162. STATICLIBEXT=.a
  1163. SHAREDLIBEXT=.so
  1164. SHAREDLIBPREFIX=libfp
  1165. STATICLIBPREFIX=libp
  1166. IMPORTLIBPREFIX=libimp
  1167. RSTEXT=.rst
  1168. EXEDBGEXT=.dbg
  1169. ifeq ($(OS_TARGET),go32v1)
  1170. STATICLIBPREFIX=
  1171. SHORTSUFFIX=v1
  1172. endif
  1173. ifeq ($(OS_TARGET),go32v2)
  1174. STATICLIBPREFIX=
  1175. SHORTSUFFIX=dos
  1176. IMPORTLIBPREFIX=
  1177. endif
  1178. ifeq ($(OS_TARGET),watcom)
  1179. STATICLIBPREFIX=
  1180. OEXT=.obj
  1181. ASMEXT=.asm
  1182. SHAREDLIBEXT=.dll
  1183. SHORTSUFFIX=wat
  1184. IMPORTLIBPREFIX=
  1185. endif
  1186. ifneq ($(CPU_TARGET),jvm)
  1187. ifeq ($(OS_TARGET),android)
  1188. BATCHEXT=.sh
  1189. EXEEXT=
  1190. HASSHAREDLIB=1
  1191. SHORTSUFFIX=lnx
  1192. endif
  1193. endif
  1194. ifeq ($(OS_TARGET),linux)
  1195. BATCHEXT=.sh
  1196. EXEEXT=
  1197. HASSHAREDLIB=1
  1198. SHORTSUFFIX=lnx
  1199. endif
  1200. ifeq ($(OS_TARGET),dragonfly)
  1201. BATCHEXT=.sh
  1202. EXEEXT=
  1203. HASSHAREDLIB=1
  1204. SHORTSUFFIX=df
  1205. endif
  1206. ifeq ($(OS_TARGET),freebsd)
  1207. BATCHEXT=.sh
  1208. EXEEXT=
  1209. HASSHAREDLIB=1
  1210. SHORTSUFFIX=fbs
  1211. endif
  1212. ifeq ($(OS_TARGET),netbsd)
  1213. BATCHEXT=.sh
  1214. EXEEXT=
  1215. HASSHAREDLIB=1
  1216. SHORTSUFFIX=nbs
  1217. endif
  1218. ifeq ($(OS_TARGET),openbsd)
  1219. BATCHEXT=.sh
  1220. EXEEXT=
  1221. HASSHAREDLIB=1
  1222. SHORTSUFFIX=obs
  1223. endif
  1224. ifeq ($(OS_TARGET),win32)
  1225. SHAREDLIBEXT=.dll
  1226. SHORTSUFFIX=w32
  1227. endif
  1228. ifeq ($(OS_TARGET),os2)
  1229. BATCHEXT=.cmd
  1230. AOUTEXT=.out
  1231. STATICLIBPREFIX=
  1232. SHAREDLIBEXT=.dll
  1233. SHORTSUFFIX=os2
  1234. ECHO=echo
  1235. IMPORTLIBPREFIX=
  1236. endif
  1237. ifeq ($(OS_TARGET),emx)
  1238. BATCHEXT=.cmd
  1239. AOUTEXT=.out
  1240. STATICLIBPREFIX=
  1241. SHAREDLIBEXT=.dll
  1242. SHORTSUFFIX=emx
  1243. ECHO=echo
  1244. IMPORTLIBPREFIX=
  1245. endif
  1246. ifeq ($(OS_TARGET),amiga)
  1247. EXEEXT=
  1248. SHAREDLIBEXT=.library
  1249. SHORTSUFFIX=amg
  1250. endif
  1251. ifeq ($(OS_TARGET),aros)
  1252. EXEEXT=
  1253. SHAREDLIBEXT=.library
  1254. SHORTSUFFIX=aros
  1255. endif
  1256. ifeq ($(OS_TARGET),morphos)
  1257. EXEEXT=
  1258. SHAREDLIBEXT=.library
  1259. SHORTSUFFIX=mos
  1260. endif
  1261. ifeq ($(OS_TARGET),atari)
  1262. EXEEXT=.ttp
  1263. SHORTSUFFIX=ata
  1264. endif
  1265. ifeq ($(OS_TARGET),beos)
  1266. BATCHEXT=.sh
  1267. EXEEXT=
  1268. SHORTSUFFIX=be
  1269. endif
  1270. ifeq ($(OS_TARGET),haiku)
  1271. BATCHEXT=.sh
  1272. EXEEXT=
  1273. SHORTSUFFIX=hai
  1274. endif
  1275. ifeq ($(OS_TARGET),solaris)
  1276. BATCHEXT=.sh
  1277. EXEEXT=
  1278. SHORTSUFFIX=sun
  1279. endif
  1280. ifeq ($(OS_TARGET),qnx)
  1281. BATCHEXT=.sh
  1282. EXEEXT=
  1283. SHORTSUFFIX=qnx
  1284. endif
  1285. ifeq ($(OS_TARGET),netware)
  1286. EXEEXT=.nlm
  1287. STATICLIBPREFIX=
  1288. SHORTSUFFIX=nw
  1289. IMPORTLIBPREFIX=imp
  1290. endif
  1291. ifeq ($(OS_TARGET),netwlibc)
  1292. EXEEXT=.nlm
  1293. STATICLIBPREFIX=
  1294. SHORTSUFFIX=nwl
  1295. IMPORTLIBPREFIX=imp
  1296. endif
  1297. ifeq ($(OS_TARGET),macosclassic)
  1298. BATCHEXT=
  1299. EXEEXT=
  1300. DEBUGSYMEXT=.xcoff
  1301. SHORTSUFFIX=mac
  1302. IMPORTLIBPREFIX=imp
  1303. endif
  1304. ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
  1305. BATCHEXT=.sh
  1306. EXEEXT=
  1307. HASSHAREDLIB=1
  1308. SHORTSUFFIX=dwn
  1309. EXEDBGEXT=.dSYM
  1310. endif
  1311. ifeq ($(OS_TARGET),gba)
  1312. EXEEXT=.gba
  1313. SHAREDLIBEXT=.so
  1314. SHORTSUFFIX=gba
  1315. endif
  1316. ifeq ($(OS_TARGET),symbian)
  1317. SHAREDLIBEXT=.dll
  1318. SHORTSUFFIX=symbian
  1319. endif
  1320. ifeq ($(OS_TARGET),NativeNT)
  1321. SHAREDLIBEXT=.dll
  1322. SHORTSUFFIX=nativent
  1323. endif
  1324. ifeq ($(OS_TARGET),wii)
  1325. EXEEXT=.dol
  1326. SHAREDLIBEXT=.so
  1327. SHORTSUFFIX=wii
  1328. endif
  1329. ifeq ($(OS_TARGET),aix)
  1330. BATCHEXT=.sh
  1331. EXEEXT=
  1332. SHAREDLIBEXT=.a
  1333. SHORTSUFFIX=aix
  1334. endif
  1335. ifeq ($(OS_TARGET),java)
  1336. OEXT=.class
  1337. ASMEXT=.j
  1338. SHAREDLIBEXT=.jar
  1339. SHORTSUFFIX=java
  1340. endif
  1341. ifeq ($(CPU_TARGET),jvm)
  1342. ifeq ($(OS_TARGET),android)
  1343. OEXT=.class
  1344. ASMEXT=.j
  1345. SHAREDLIBEXT=.jar
  1346. SHORTSUFFIX=android
  1347. endif
  1348. endif
  1349. ifeq ($(OS_TARGET),msdos)
  1350. STATICLIBPREFIX=
  1351. STATICLIBEXT=.a
  1352. SHORTSUFFIX=d16
  1353. endif
  1354. ifeq ($(OS_TARGET),msxdos)
  1355. STATICLIBPREFIX=
  1356. STATICLIBEXT=.a
  1357. SHORTSUFFIX=msd
  1358. endif
  1359. ifeq ($(OS_TARGET),embedded)
  1360. ifeq ($(CPU_TARGET),i8086)
  1361. STATICLIBPREFIX=
  1362. STATICLIBEXT=.a
  1363. else
  1364. EXEEXT=.bin
  1365. endif
  1366. ifeq ($(CPU_TARGET),z80)
  1367. OEXT=.rel
  1368. endif
  1369. SHORTSUFFIX=emb
  1370. endif
  1371. ifeq ($(OS_TARGET),win16)
  1372. STATICLIBPREFIX=
  1373. STATICLIBEXT=.a
  1374. SHAREDLIBEXT=.dll
  1375. SHORTSUFFIX=w16
  1376. endif
  1377. ifeq ($(OS_TARGET),zxspectrum)
  1378. OEXT=.rel
  1379. endif
  1380. ifeq ($(OS_TARGET),wasi)
  1381. EXEEXT=.wasm
  1382. endif
  1383. ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
  1384. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1385. ZIPSUFFIX=$(SHORTSUFFIX)
  1386. ZIPCROSSPREFIX=
  1387. ZIPSOURCESUFFIX=src
  1388. ZIPEXAMPLESUFFIX=exm
  1389. else
  1390. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1391. ZIPSOURCESUFFIX=.source
  1392. ZIPEXAMPLESUFFIX=.examples
  1393. ifdef CROSSCOMPILE
  1394. ZIPSUFFIX=.$(SOURCESUFFIX)
  1395. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1396. else
  1397. ZIPSUFFIX=.$(TARGETSUFFIX)
  1398. ZIPCROSSPREFIX=
  1399. endif
  1400. endif
  1401. ifndef ECHO
  1402. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1403. ifeq ($(ECHO),)
  1404. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1405. ifeq ($(ECHO),)
  1406. ECHO= __missing_command_ECHO
  1407. else
  1408. ECHO:=$(firstword $(ECHO))
  1409. endif
  1410. else
  1411. ECHO:=$(firstword $(ECHO))
  1412. endif
  1413. endif
  1414. export ECHO
  1415. ifndef DATE
  1416. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1417. ifeq ($(DATE),)
  1418. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1419. ifeq ($(DATE),)
  1420. DATE= __missing_command_DATE
  1421. else
  1422. DATE:=$(firstword $(DATE))
  1423. endif
  1424. else
  1425. DATE:=$(firstword $(DATE))
  1426. endif
  1427. endif
  1428. export DATE
  1429. ifndef GINSTALL
  1430. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1431. ifeq ($(GINSTALL),)
  1432. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1433. ifeq ($(GINSTALL),)
  1434. GINSTALL= __missing_command_GINSTALL
  1435. else
  1436. GINSTALL:=$(firstword $(GINSTALL))
  1437. endif
  1438. else
  1439. GINSTALL:=$(firstword $(GINSTALL))
  1440. endif
  1441. endif
  1442. export GINSTALL
  1443. ifndef CPPROG
  1444. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1445. ifeq ($(CPPROG),)
  1446. CPPROG= __missing_command_CPPROG
  1447. else
  1448. CPPROG:=$(firstword $(CPPROG))
  1449. endif
  1450. endif
  1451. export CPPROG
  1452. ifndef RMPROG
  1453. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1454. ifeq ($(RMPROG),)
  1455. RMPROG= __missing_command_RMPROG
  1456. else
  1457. RMPROG:=$(firstword $(RMPROG))
  1458. endif
  1459. endif
  1460. export RMPROG
  1461. ifndef MVPROG
  1462. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1463. ifeq ($(MVPROG),)
  1464. MVPROG= __missing_command_MVPROG
  1465. else
  1466. MVPROG:=$(firstword $(MVPROG))
  1467. endif
  1468. endif
  1469. export MVPROG
  1470. ifndef MKDIRPROG
  1471. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1472. ifeq ($(MKDIRPROG),)
  1473. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1474. ifeq ($(MKDIRPROG),)
  1475. MKDIRPROG= __missing_command_MKDIRPROG
  1476. else
  1477. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1478. endif
  1479. else
  1480. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1481. endif
  1482. endif
  1483. export MKDIRPROG
  1484. ifndef ECHOREDIR
  1485. ifndef inUnix
  1486. ECHOREDIR=echo
  1487. else
  1488. ECHOREDIR=$(ECHO)
  1489. endif
  1490. endif
  1491. ifndef COPY
  1492. COPY:=$(CPPROG) -fp
  1493. endif
  1494. ifndef COPYTREE
  1495. COPYTREE:=$(CPPROG) -Rfp
  1496. endif
  1497. ifndef MKDIRTREE
  1498. MKDIRTREE:=$(MKDIRPROG) -p
  1499. endif
  1500. ifndef MOVE
  1501. MOVE:=$(MVPROG) -f
  1502. endif
  1503. ifndef DEL
  1504. DEL:=$(RMPROG) -f
  1505. endif
  1506. ifndef DELTREE
  1507. DELTREE:=$(RMPROG) -rf
  1508. endif
  1509. ifndef INSTALL
  1510. ifdef inUnix
  1511. INSTALL:=$(GINSTALL) -c -m 644
  1512. else
  1513. INSTALL:=$(COPY)
  1514. endif
  1515. endif
  1516. ifndef INSTALLEXE
  1517. ifdef inUnix
  1518. INSTALLEXE:=$(GINSTALL) -c -m 755
  1519. else
  1520. INSTALLEXE:=$(COPY)
  1521. endif
  1522. endif
  1523. ifndef MKDIR
  1524. MKDIR:=$(GINSTALL) -m 755 -d
  1525. endif
  1526. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1527. ifndef PPUMOVE
  1528. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1529. ifeq ($(PPUMOVE),)
  1530. PPUMOVE= __missing_command_PPUMOVE
  1531. else
  1532. PPUMOVE:=$(firstword $(PPUMOVE))
  1533. endif
  1534. endif
  1535. export PPUMOVE
  1536. ifndef FPCMAKE
  1537. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1538. ifeq ($(FPCMAKE),)
  1539. FPCMAKE= __missing_command_FPCMAKE
  1540. else
  1541. FPCMAKE:=$(firstword $(FPCMAKE))
  1542. endif
  1543. endif
  1544. export FPCMAKE
  1545. ifndef ZIPPROG
  1546. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1547. ifeq ($(ZIPPROG),)
  1548. ZIPPROG= __missing_command_ZIPPROG
  1549. else
  1550. ZIPPROG:=$(firstword $(ZIPPROG))
  1551. endif
  1552. endif
  1553. export ZIPPROG
  1554. ifndef TARPROG
  1555. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1556. ifeq ($(TARPROG),)
  1557. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1558. ifeq ($(TARPROG),)
  1559. TARPROG= __missing_command_TARPROG
  1560. else
  1561. TARPROG:=$(firstword $(TARPROG))
  1562. endif
  1563. else
  1564. TARPROG:=$(firstword $(TARPROG))
  1565. endif
  1566. endif
  1567. export TARPROG
  1568. ASNAME=$(BINUTILSPREFIX)as
  1569. LDNAME=$(BINUTILSPREFIX)ld
  1570. ARNAME=$(BINUTILSPREFIX)ar
  1571. RCNAME=$(BINUTILSPREFIX)rc
  1572. NASMNAME=$(BINUTILSPREFIX)nasm
  1573. ifndef ASPROG
  1574. ifdef CROSSBINDIR
  1575. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1576. else
  1577. ASPROG=$(ASNAME)
  1578. endif
  1579. endif
  1580. ifndef LDPROG
  1581. ifdef CROSSBINDIR
  1582. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1583. else
  1584. LDPROG=$(LDNAME)
  1585. endif
  1586. endif
  1587. ifndef RCPROG
  1588. ifdef CROSSBINDIR
  1589. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1590. else
  1591. RCPROG=$(RCNAME)
  1592. endif
  1593. endif
  1594. ifndef ARPROG
  1595. ifdef CROSSBINDIR
  1596. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1597. else
  1598. ARPROG=$(ARNAME)
  1599. endif
  1600. endif
  1601. ifndef NASMPROG
  1602. ifdef CROSSBINDIR
  1603. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  1604. else
  1605. NASMPROG=$(NASMNAME)
  1606. endif
  1607. endif
  1608. AS=$(ASPROG)
  1609. LD=$(LDPROG)
  1610. RC=$(RCPROG)
  1611. AR=$(ARPROG)
  1612. NASM=$(NASMPROG)
  1613. ifdef inUnix
  1614. PPAS=./ppas$(SRCBATCHEXT)
  1615. else
  1616. PPAS=ppas$(SRCBATCHEXT)
  1617. endif
  1618. ifdef inUnix
  1619. LDCONFIG=ldconfig
  1620. else
  1621. LDCONFIG=
  1622. endif
  1623. ifdef DATE
  1624. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1625. else
  1626. DATESTR=
  1627. endif
  1628. ZIPOPT=-9
  1629. ZIPEXT=.zip
  1630. ifeq ($(USETAR),bz2)
  1631. TAROPT=vj
  1632. TAREXT=.tar.bz2
  1633. else
  1634. TAROPT=vz
  1635. TAREXT=.tar.gz
  1636. endif
  1637. ifndef NOCPUDEF
  1638. override FPCOPTDEF=$(ARCH)
  1639. endif
  1640. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1641. override FPCOPT+=-T$(OS_TARGET)
  1642. endif
  1643. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1644. override FPCOPT+=-P$(ARCH)
  1645. endif
  1646. ifeq ($(OS_SOURCE),openbsd)
  1647. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1648. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  1649. override FPMAKE_BUILD_OPT+=-FD$(NEW_BINUTILS_PATH)
  1650. endif
  1651. ifndef CROSSBOOTSTRAP
  1652. ifneq ($(BINUTILSPREFIX),)
  1653. override FPCOPT+=-XP$(BINUTILSPREFIX)
  1654. ifneq ($(RLINKPATH),)
  1655. override FPCOPT+=-Xr$(RLINKPATH)
  1656. endif
  1657. endif
  1658. endif
  1659. ifndef CROSSCOMPILE
  1660. ifneq ($(BINUTILSPREFIX),)
  1661. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  1662. override FPMAKE_BUILD_OPT+=-XP$(BINUTILSPREFIX)
  1663. endif
  1664. endif
  1665. ifdef UNITDIR
  1666. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1667. endif
  1668. ifdef LIBDIR
  1669. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1670. endif
  1671. ifdef OBJDIR
  1672. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1673. endif
  1674. ifdef INCDIR
  1675. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1676. endif
  1677. ifdef LINKSMART
  1678. override FPCOPT+=-XX
  1679. endif
  1680. ifdef CREATESMART
  1681. override FPCOPT+=-CX
  1682. endif
  1683. ifdef DEBUG
  1684. override FPCOPT+=-gl
  1685. override FPCOPTDEF+=DEBUG
  1686. endif
  1687. ifdef RELEASE
  1688. FPCCPUOPT:=-O2
  1689. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1690. override FPCOPTDEF+=RELEASE
  1691. endif
  1692. ifdef STRIP
  1693. override FPCOPT+=-Xs
  1694. endif
  1695. ifdef OPTIMIZE
  1696. override FPCOPT+=-O2
  1697. endif
  1698. ifdef VERBOSE
  1699. override FPCOPT+=-vwni
  1700. endif
  1701. ifdef COMPILER_OPTIONS
  1702. override FPCOPT+=$(COMPILER_OPTIONS)
  1703. endif
  1704. ifdef COMPILER_UNITDIR
  1705. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1706. endif
  1707. ifdef COMPILER_LIBRARYDIR
  1708. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1709. endif
  1710. ifdef COMPILER_OBJECTDIR
  1711. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1712. endif
  1713. ifdef COMPILER_INCLUDEDIR
  1714. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1715. endif
  1716. ifdef CROSSBINDIR
  1717. override FPCOPT+=-FD$(CROSSBINDIR)
  1718. endif
  1719. ifdef COMPILER_TARGETDIR
  1720. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1721. ifeq ($(COMPILER_TARGETDIR),.)
  1722. override TARGETDIRPREFIX=
  1723. else
  1724. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1725. endif
  1726. endif
  1727. ifdef COMPILER_UNITTARGETDIR
  1728. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1729. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1730. override UNITTARGETDIRPREFIX=
  1731. else
  1732. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1733. endif
  1734. else
  1735. ifdef COMPILER_TARGETDIR
  1736. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1737. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1738. endif
  1739. endif
  1740. ifdef SYSROOTPATH
  1741. override FPCOPT+=-XR$(SYSROOTPATH)
  1742. else
  1743. ifeq ($(OS_TARGET),$(OS_SOURCE))
  1744. ifeq ($(OS_TARGET),darwin)
  1745. ifeq ($(CPU_TARGET),aarch64)
  1746. ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
  1747. override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
  1748. endif
  1749. endif
  1750. endif
  1751. endif
  1752. endif
  1753. ifdef CREATESHARED
  1754. override FPCOPT+=-Cg
  1755. endif
  1756. ifneq ($(filter $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  1757. ifneq ($(filter $(CPU_TARGET),x86_64 mips mipsel mips64 mips64el riscv64 powerpc64),)
  1758. override FPCOPT+=-Cg
  1759. endif
  1760. endif
  1761. ifneq ($(filter $(CPU_TARGET),z80),)
  1762. override FPCOPT+=-CX -XX
  1763. endif
  1764. ifdef LINKSHARED
  1765. endif
  1766. ifdef OPT
  1767. override FPCOPT+=$(OPT)
  1768. endif
  1769. ifdef FPMAKEBUILDOPT
  1770. override FPMAKE_BUILD_OPT+=$(FPMAKEBUILDOPT)
  1771. endif
  1772. ifdef FPCOPTDEF
  1773. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1774. endif
  1775. ifdef CFGFILE
  1776. override FPCOPT+=@$(CFGFILE)
  1777. endif
  1778. ifdef USEENV
  1779. override FPCEXTCMD:=$(FPCOPT)
  1780. override FPCOPT:=!FPCEXTCMD
  1781. export FPCEXTCMD
  1782. endif
  1783. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1784. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1785. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1786. override ACROSSCOMPILE=1
  1787. endif
  1788. ifdef ACROSSCOMPILE
  1789. override FPCOPT+=$(CROSSOPT)
  1790. endif
  1791. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  1792. ifneq (,$(filter -sh,$(COMPILER)))
  1793. UseEXECPPAS=1
  1794. endif
  1795. ifneq (,$(filter -s,$(COMPILER)))
  1796. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1797. UseEXECPPAS=1
  1798. endif
  1799. endif
  1800. ifneq ($(UseEXECPPAS),1)
  1801. EXECPPAS=
  1802. else
  1803. ifdef RUNBATCH
  1804. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  1805. else
  1806. EXECPPAS:=@$(PPAS)
  1807. endif
  1808. endif
  1809. .PHONY: fpc_units
  1810. ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
  1811. override ALLTARGET+=fpc_units
  1812. override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
  1813. override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
  1814. override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1815. override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
  1816. endif
  1817. fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
  1818. ifdef TARGET_RSTS
  1819. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1820. override CLEANRSTFILES+=$(RSTFILES)
  1821. endif
  1822. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1823. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1824. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1825. fpc_all: $(FPCMADE)
  1826. fpc_smart:
  1827. $(MAKE) all LINKSMART=1 CREATESMART=1
  1828. fpc_debug:
  1829. $(MAKE) all DEBUG=1
  1830. fpc_release:
  1831. $(MAKE) all RELEASE=1
  1832. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) $(LTOEXT) .pas .lpr .dpr .pp .rc .res
  1833. $(COMPILER_UNITTARGETDIR):
  1834. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1835. $(COMPILER_TARGETDIR):
  1836. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1837. %$(PPUEXT): %.pp
  1838. $(COMPILER) $<
  1839. $(EXECPPAS)
  1840. %$(PPUEXT): %.pas
  1841. $(COMPILER) $<
  1842. $(EXECPPAS)
  1843. %$(EXEEXT): %.pp
  1844. $(COMPILER) $<
  1845. $(EXECPPAS)
  1846. %$(EXEEXT): %.pas
  1847. $(COMPILER) $<
  1848. $(EXECPPAS)
  1849. %$(EXEEXT): %.lpr
  1850. $(COMPILER) $<
  1851. $(EXECPPAS)
  1852. %$(EXEEXT): %.dpr
  1853. $(COMPILER) $<
  1854. $(EXECPPAS)
  1855. %.res: %.rc
  1856. windres -i $< -o $@
  1857. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1858. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1859. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1860. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1861. vpath %.inc $(COMPILER_INCLUDEDIR)
  1862. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1863. vpath %$(LTOEXT) $(COMPILER_UNITTARGETDIR)
  1864. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1865. .PHONY: fpc_shared
  1866. override INSTALLTARGET+=fpc_shared_install
  1867. ifndef SHARED_LIBVERSION
  1868. SHARED_LIBVERSION=$(FPC_VERSION)
  1869. endif
  1870. ifndef SHARED_LIBNAME
  1871. SHARED_LIBNAME=$(PACKAGE_NAME)
  1872. endif
  1873. ifndef SHARED_FULLNAME
  1874. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1875. endif
  1876. ifndef SHARED_LIBUNITS
  1877. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1878. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1879. endif
  1880. fpc_shared:
  1881. ifdef HASSHAREDLIB
  1882. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1883. ifneq ($(SHARED_BUILD),n)
  1884. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -P$(BINUTILSPREFIX)
  1885. endif
  1886. else
  1887. @$(ECHO) Shared Libraries not supported
  1888. endif
  1889. fpc_shared_install:
  1890. ifneq ($(SHARED_BUILD),n)
  1891. ifneq ($(SHARED_LIBUNITS),)
  1892. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1893. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1894. endif
  1895. endif
  1896. endif
  1897. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1898. ifdef INSTALL_UNITS
  1899. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1900. endif
  1901. ifdef INSTALL_BUILDUNIT
  1902. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1903. endif
  1904. ifdef INSTALLPPUFILES
  1905. ifneq ($(IMPORTLIBPREFIX)-$(STATICLIBEXT),$(STATICLIBPREFIX)-$(STATICLIBEXT))
  1906. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1907. else
  1908. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1909. endif
  1910. ifneq ($(UNITTARGETDIRPREFIX),)
  1911. override INSTALLPPUFILENAMES:=$(notdir $(INSTALLPPUFILES))
  1912. override INSTALLPPULINKFILENAMES:=$(notdir $(INSTALLPPULINKFILES))
  1913. override INSTALLPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILENAMES))
  1914. override INSTALLPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILENAMES)))
  1915. endif
  1916. override INSTALL_CREATEPACKAGEFPC=1
  1917. endif
  1918. ifdef INSTALLEXEFILES
  1919. ifneq ($(TARGETDIRPREFIX),)
  1920. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1921. endif
  1922. endif
  1923. fpc_install: all $(INSTALLTARGET)
  1924. ifdef INSTALLEXEFILES
  1925. $(MKDIR) $(INSTALL_BINDIR)
  1926. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1927. endif
  1928. ifdef INSTALL_CREATEPACKAGEFPC
  1929. ifdef FPCMAKE
  1930. ifdef PACKAGE_VERSION
  1931. ifneq ($(wildcard Makefile.fpc),)
  1932. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1933. $(MKDIR) $(INSTALL_UNITDIR)
  1934. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1935. endif
  1936. endif
  1937. endif
  1938. endif
  1939. ifdef INSTALLPPUFILES
  1940. $(MKDIR) $(INSTALL_UNITDIR)
  1941. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1942. ifneq ($(INSTALLPPULINKFILES),)
  1943. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1944. endif
  1945. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1946. $(MKDIR) $(INSTALL_LIBDIR)
  1947. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1948. ifdef inUnix
  1949. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1950. endif
  1951. endif
  1952. endif
  1953. ifdef INSTALL_FILES
  1954. $(MKDIR) $(INSTALL_DATADIR)
  1955. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1956. endif
  1957. fpc_sourceinstall: distclean
  1958. $(MKDIR) $(INSTALL_SOURCEDIR)
  1959. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1960. fpc_exampleinstall: $(EXAMPLEINSTALLTARGET) $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1961. ifdef HASEXAMPLES
  1962. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1963. endif
  1964. ifdef EXAMPLESOURCEFILES
  1965. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1966. endif
  1967. ifdef TARGET_EXAMPLEDIRS
  1968. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1969. endif
  1970. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1971. ifdef EXEFILES
  1972. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1973. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  1974. endif
  1975. ifdef CLEAN_PROGRAMS
  1976. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  1977. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  1978. endif
  1979. ifdef CLEAN_UNITS
  1980. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1981. endif
  1982. ifdef CLEANPPUFILES
  1983. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(subst $(PPUEXT),$(LTOEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1984. ifdef DEBUGSYMEXT
  1985. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1986. endif
  1987. override CLEANPPUFILENAMES:=$(CLEANPPUFILES)
  1988. override CLEANPPUFILES=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILENAMES))
  1989. override CLEANPPULINKFILENAMES:=$(CLEANPPULINKFILES)
  1990. override CLEANPPULINKFILES=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILENAMES)))
  1991. endif
  1992. fpc_clean: $(CLEANTARGET)
  1993. ifdef CLEANEXEFILES
  1994. -$(DEL) $(CLEANEXEFILES)
  1995. endif
  1996. ifdef CLEANEXEDBGFILES
  1997. -$(DELTREE) $(CLEANEXEDBGFILES)
  1998. endif
  1999. ifdef CLEANPPUFILES
  2000. -$(DEL) $(CLEANPPUFILES)
  2001. endif
  2002. ifneq ($(CLEANPPULINKFILES),)
  2003. -$(DEL) $(CLEANPPULINKFILES)
  2004. endif
  2005. ifdef CLEANRSTFILES
  2006. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2007. endif
  2008. ifdef CLEAN_FILES
  2009. -$(DEL) $(CLEAN_FILES)
  2010. endif
  2011. ifdef LIB_NAME
  2012. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  2013. endif
  2014. -$(DEL) $(FPCMADE) *$(FULL_TARGET).fpm Package.fpc *$(ASMEXT)
  2015. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  2016. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  2017. fpc_cleanall: $(CLEANTARGET)
  2018. ifdef CLEANEXEFILES
  2019. -$(DEL) $(CLEANEXEFILES)
  2020. endif
  2021. ifdef COMPILER_UNITTARGETDIR
  2022. ifdef CLEANPPUFILES
  2023. -$(DEL) $(CLEANPPUFILES)
  2024. endif
  2025. ifneq ($(CLEANPPULINKFILES),)
  2026. -$(DEL) $(CLEANPPULINKFILES)
  2027. endif
  2028. ifdef CLEANRSTFILES
  2029. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  2030. endif
  2031. endif
  2032. ifdef CLEAN_FILES
  2033. -$(DEL) $(CLEAN_FILES)
  2034. endif
  2035. -$(DELTREE) units
  2036. -$(DELTREE) bin
  2037. -$(DEL) *$(OEXT) *$(LTOEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  2038. ifneq ($(PPUEXT),.ppu)
  2039. -$(DEL) *.o *.ppu *.a
  2040. endif
  2041. -$(DELTREE) *$(SMARTEXT)
  2042. -$(DEL) fpcmade.* Package.fpc *.fpm
  2043. -$(DEL) $(FPCEXTFILE) $(REDIRFILE) script*.res link*.res *_script.res *_link.res
  2044. -$(DEL) $(PPAS) *_ppas$(BATCHEXT) ppas$(BATCHEXT) ppaslink$(BATCHEXT)
  2045. ifdef AOUTEXT
  2046. -$(DEL) *$(AOUTEXT)
  2047. endif
  2048. ifdef DEBUGSYMEXT
  2049. -$(DEL) *$(DEBUGSYMEXT)
  2050. endif
  2051. ifdef LOCALFPMAKEBIN
  2052. -$(DEL) $(LOCALFPMAKEBIN)
  2053. -$(DEL) $(FPMAKEBINOBJ)
  2054. endif
  2055. fpc_distclean: cleanall
  2056. .PHONY: fpc_baseinfo
  2057. override INFORULES+=fpc_baseinfo
  2058. fpc_baseinfo:
  2059. @$(ECHO)
  2060. @$(ECHO) == Package info ==
  2061. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  2062. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  2063. @$(ECHO)
  2064. @$(ECHO) == Configuration info ==
  2065. @$(ECHO)
  2066. @$(ECHO) FPC.......... $(FPC)
  2067. @$(ECHO) FPC Version.. $(FPC_VERSION)
  2068. @$(ECHO) Source CPU... $(CPU_SOURCE)
  2069. @$(ECHO) Target CPU... $(CPU_TARGET)
  2070. @$(ECHO) Source OS.... $(OS_SOURCE)
  2071. @$(ECHO) Target OS.... $(OS_TARGET)
  2072. @$(ECHO) Full Source.. $(FULL_SOURCE)
  2073. @$(ECHO) Full Target.. $(FULL_TARGET)
  2074. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  2075. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  2076. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  2077. @$(ECHO)
  2078. @$(ECHO) == Directory info ==
  2079. @$(ECHO)
  2080. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  2081. @$(ECHO)
  2082. @$(ECHO) Basedir......... $(BASEDIR)
  2083. @$(ECHO) FPCDir.......... $(FPCDIR)
  2084. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  2085. @$(ECHO) UnitsDir........ $(UNITSDIR)
  2086. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  2087. @$(ECHO)
  2088. @$(ECHO) GCC library..... $(GCCLIBDIR)
  2089. @$(ECHO) Other library... $(OTHERLIBDIR)
  2090. @$(ECHO)
  2091. @$(ECHO) == Tools info ==
  2092. @$(ECHO)
  2093. @$(ECHO) As........ $(AS)
  2094. @$(ECHO) Ld........ $(LD)
  2095. @$(ECHO) Ar........ $(AR)
  2096. @$(ECHO) Rc........ $(RC)
  2097. @$(ECHO)
  2098. @$(ECHO) Mv........ $(MVPROG)
  2099. @$(ECHO) Cp........ $(CPPROG)
  2100. @$(ECHO) Rm........ $(RMPROG)
  2101. @$(ECHO) GInstall.. $(GINSTALL)
  2102. @$(ECHO) Echo...... $(ECHO)
  2103. @$(ECHO) Shell..... $(SHELL)
  2104. @$(ECHO) Date...... $(DATE)
  2105. @$(ECHO) FPCMake... $(FPCMAKE)
  2106. @$(ECHO) PPUMove... $(PPUMOVE)
  2107. @$(ECHO) Zip....... $(ZIPPROG)
  2108. @$(ECHO)
  2109. @$(ECHO) == Object info ==
  2110. @$(ECHO)
  2111. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  2112. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  2113. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  2114. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  2115. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  2116. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  2117. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  2118. @$(ECHO)
  2119. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  2120. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  2121. @$(ECHO)
  2122. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  2123. @$(ECHO) Install Files....... $(INSTALL_FILES)
  2124. @$(ECHO)
  2125. @$(ECHO) == Install info ==
  2126. @$(ECHO)
  2127. @$(ECHO) DateStr.............. $(DATESTR)
  2128. @$(ECHO) ZipName.............. $(ZIPNAME)
  2129. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  2130. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  2131. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  2132. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  2133. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  2134. @$(ECHO)
  2135. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  2136. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  2137. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  2138. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  2139. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  2140. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  2141. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  2142. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  2143. @$(ECHO)
  2144. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  2145. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  2146. @$(ECHO)
  2147. .PHONY: fpc_info
  2148. fpc_info: $(INFORULES)
  2149. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  2150. fpc_makefile_dirs
  2151. fpc_makefile:
  2152. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  2153. fpc_makefile_sub1:
  2154. ifdef TARGET_DIRS
  2155. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  2156. endif
  2157. ifdef TARGET_EXAMPLEDIRS
  2158. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  2159. endif
  2160. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  2161. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  2162. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  2163. all: fpc_all
  2164. debug: fpc_debug
  2165. smart: fpc_smart
  2166. release: fpc_release
  2167. units: fpc_units
  2168. examples:
  2169. shared: fpc_shared
  2170. install: fpc_install
  2171. sourceinstall: fpc_sourceinstall
  2172. exampleinstall: fpc_exampleinstall
  2173. distinstall:
  2174. zipinstall:
  2175. zipsourceinstall:
  2176. zipexampleinstall:
  2177. zipdistinstall:
  2178. clean: fpc_clean
  2179. distclean: fpc_distclean
  2180. cleanall: fpc_cleanall
  2181. info: fpc_info
  2182. makefiles: fpc_makefiles
  2183. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  2184. ifneq ($(wildcard fpcmake.loc),)
  2185. include fpcmake.loc
  2186. endif
  2187. ifndef OSDIR
  2188. OSDIR=.
  2189. endif
  2190. ifndef NSOSDIR
  2191. NSOSDIR=$(NSDIR)/$(OS_TARGET)
  2192. endif
  2193. ifndef PORTSDIR
  2194. PORTSDIR=$(OSDIR)
  2195. endif
  2196. ifndef DYNLIBSINCDIR
  2197. DYNLIBSINCDIR=$(OSDIR)
  2198. endif
  2199. ifndef INITCDIR
  2200. ifdef UNIXINC
  2201. INITCDIR=$(UNIXINC)
  2202. else
  2203. INITCDIR=$(OSDIR)
  2204. endif
  2205. endif
  2206. ifndef DOSDIR
  2207. DOSDIR=$(OSDIR)
  2208. NSDOSDIR=$(NSDIR)/$(DOSDIR)
  2209. endif
  2210. ifndef OS2DIR
  2211. OS2DIR=.
  2212. endif
  2213. ifndef NSOS2DIR
  2214. NSOS2DIR=$(NSDIR)/os2
  2215. endif
  2216. ifndef SYSUTILSDIR
  2217. SYSUTILSDIR=$(OSDIR)
  2218. endif
  2219. ifndef NSSYSUTILSDIR
  2220. NSSYSUTILSDIR=$(NSDIR)/$(SYSUTILSDIR)
  2221. endif
  2222. ifndef SYSTEMDIR
  2223. SYSTEMDIR=$(OSDIR)
  2224. endif
  2225. ifndef CLASSESDIR
  2226. CLASSESDIR=$(OSDIR)
  2227. endif
  2228. ifndef TTHREADINCDIR
  2229. TTHREADINCDIR=$(CLASSESDIR)
  2230. endif
  2231. ifndef NSCLASSESDIR
  2232. NSCLASSESDIR=$(NSDIR)/$(CLASSESDIR)
  2233. endif
  2234. ifndef NSBSDDIR
  2235. NSBSDDIR=$(NSDIR)/bsd
  2236. endif
  2237. ifndef TERMIODIR
  2238. TERMIODIR=$(OSDIR)
  2239. endif
  2240. ifndef PTHREADINCDIR
  2241. PTHREADINCDIR=$(OSDIR)
  2242. endif
  2243. ifndef NSWINDOWSDIR
  2244. NSWINDOWSDIR=$(NSDIR)/windows
  2245. endif
  2246. ifndef SYSTEMUNITEXT
  2247. SYSTEMUNITEXT=pp
  2248. endif
  2249. ifndef DOSUNITEXT
  2250. DOSUNITEXT=pp
  2251. endif
  2252. ifndef PORTSUNITEXT
  2253. PORTSUNITEXT=pp
  2254. endif
  2255. ifndef BASEUNIXDIR
  2256. BASEUNIXDIR=$(UNIXINC)
  2257. endif
  2258. ifndef EXTPAS_DEPS_OS
  2259. EXTPAS_DEPS_OS=$(DOSUNIT)$(PPUEXT)
  2260. endif
  2261. ifdef FPC_DOTTEDUNITS
  2262. BLOCKRTL_OPT:=$(BLOCKRTL_OPT) -dFPC_DOTTEDUNITS
  2263. FPEXTRES_OPT:=$(FPEXTRES_OPT) -dFPC_DOTTEDUNITS
  2264. OBJC_OPT:=$(OBJC_OPT) -dFPC_DOTTEDUNITS
  2265. OBJCBASE_OPT:=$(OBJCBASE_OPT) -dFPC_DOTTEDUNITS
  2266. FPCYLIX_OPT:=$(FPCYLIX_OPT) -dFPC_DOTTEDUNITS
  2267. MACPAS_OPT:=$(MACPAS_OPT) -dFPC_DOTTEDUNITS
  2268. EXTPAS_OPT:=$(EXTPAS_OPT) -dFPC_DOTTEDUNITS
  2269. LINEINFO_OPT:=$(LINEINFO_OPT) -dFPC_DOTTEDUNITS
  2270. LNFODWRF_OPT:=$(LNFODWRF_OPT) -dFPC_DOTTEDUNITS
  2271. endif
  2272. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMDIR)/$(SYSTEMUNIT).$(SYSTEMUNITEXT) $(SYSDEPS)
  2273. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $<
  2274. UUCHAR_DEPS=$(INC)/uuchar.pp \
  2275. $(SYSTEMUNIT)$(PPUEXT) \
  2276. $(UUCHAR_DEPS_OS) $(UUCHAR_DEPS_CPU)
  2277. uuchar$(PPUEXT): $(UUCHAR_DEPS)
  2278. $(COMPILER) $(UUCHAR_OPT) $<
  2279. UACHAR_DEPS=$(INC)/uachar.pp \
  2280. $(SYSTEMUNIT)$(PPUEXT) \
  2281. $(UACHAR_DEPS_OS) $(UACHAR_DEPS_CPU)
  2282. uachar$(PPUEXT): $(UACHAR_DEPS)
  2283. $(COMPILER) $(UACHAR_OPT) $<
  2284. OBJPAS_DEPS= $(OBJPASDIR)/objpas.pp $(INC)/except.inc \
  2285. $(SYSTEMUNIT)$(PPUEXT) \
  2286. $(OBJPAS_DEPS_OS) $(OBJPAS_DEPS_CPU)
  2287. objpas$(PPUEXT): $(OBJPAS_DEPS)
  2288. $(COMPILER) $(OBJPAS_OPT) -Fi$(OBJPASDIR) $<
  2289. MACPAS_DEPS=$(INC)/macpas.pp \
  2290. $(OBJPASUNIT)$(PPUEXT) $(MATHUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2291. $(MACPAS_DEPS_OS) $(MACPAS_DEPS_CPU)
  2292. macpas$(PPUEXT) : $(MACPAS_DEPS)
  2293. $(COMPILER) $(MACPAS_OPT) $<
  2294. ISO7185_DEPS= $(INC)/iso7185.pp \
  2295. $(SYSTEMUNIT)$(PPUEXT) \
  2296. $(ISO7185_DEPS_OS) $(ISO7185_DEPS_CPU)
  2297. iso7185$(PPUEXT) : $(ISO7185_DEPS)
  2298. $(COMPILER) $(ISO7185_OPT) $<
  2299. EXTPAS_DEPS=$(INC)/extpas.pp \
  2300. $(SYSTEMUNIT)$(PPUEXT) \
  2301. $(EXTPAS_DEPS_OS) $(EXTPAS_DEPS_CPU)
  2302. extpas$(PPUEXT) : $(EXTPAS_DEPS)
  2303. $(COMPILER) $(EXTPAS_OPT) $<
  2304. FPINTRES_DEPS= $(INC)/fpintres.pp $(SYSTEMUNIT)$(PPUEXT) \
  2305. $(FPINTRES_DEPS_OS) $(FPINTRES_DEPS_CPU)
  2306. fpintres$(PPUEXT) : $(FPINTRES_DEPS)
  2307. $(COMPILER) $(FPINTRES_OPT) $<
  2308. FPEXTRES_DEPS= $(INC)/fpextres.pp $(SYSTEMUNIT)$(PPUEXT) \
  2309. $(FPEXTRES_DEPS_OS) $(FPEXTRES_DEPS_CPU)
  2310. fpextres$(PPUEXT) : $(FPEXTRES_DEPS)
  2311. $(COMPILER) -Sg $(FPEXTRES_OPT) $<
  2312. HEAPTRC_DEPS=$(INC)/heaptrc.pp \
  2313. $(SYSTEMUNIT)$(PPUEXT) \
  2314. $(HEAPTRC_DEPS_OS) $(HEAPTRC_DEPS_CPU)
  2315. heaptrc$(PPUEXT) : $(HEAPTRC_DEPS)
  2316. $(COMPILER) $(HEAPTRC_OPT) $<
  2317. SOFTFPU_DEPS=$(INC)/softfpu.pp \
  2318. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) \
  2319. $(SOFTFPU_DEPS_OS) $(SOFTFPU_DEPS_CPU)
  2320. softfpu$(PPUEXT) : $(SOFTFPU_DEPS)
  2321. $(COMPILER) -Sg $(SOFTFPU_OPT) $<
  2322. System.SoftFPU$(PPUEXT) : $(NSINC)/System.SoftFPU.pp $(SOFTFPU_DEPS)
  2323. $(COMPILER) -Sg $(SOFTFPU_OPT) $<
  2324. SFPUX80_DEPS=$(INC)/sfpux80.pp $(INC)/softfpu.pp \
  2325. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) \
  2326. $(SFPUX80_DEPS_OS) $(SFPUX80_DEPS_CPU)
  2327. sfpux80$(PPUEXT) : $(SFPUX80_DEPS)
  2328. $(COMPILER) -Sg $(SFPUX80_OPT) $<
  2329. System.SoftFpuX80$(PPUEXT) : $(NSINC)/System.SoftFpuX80.pp $(SFPUX80_DEPS)
  2330. $(COMPILER) -Sg $(SFPUX80_OPT) $<
  2331. SFPU128_DEPS=$(INC)/sfpu128.pp $(INC)/softfpu.pp \
  2332. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) \
  2333. $(SFPU128_DEPS_OS) $(SFPU128_DEPS_CPU)
  2334. sfpu128$(PPUEXT) : $(SFPU128_DEPS)
  2335. $(COMPILER) -Sg $(SFPUX128_OPT) $<
  2336. System.SoftFpu128$(PPUEXT) : $(NSINC)/System.SoftFpu128.pp $(SFPU128_DEPS)
  2337. $(COMPILER) -Sg $(SFPUX128_OPT) $<
  2338. UFLOATX80_DEPS=$(INC)/ufloatx80.pp \
  2339. $(SFPUX80UNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2340. $(UFLOATX80_DEPS_OS) $(UFLOATX80_DEPS_CPU)
  2341. ufloatx80$(PPUEXT) : $(UFLOATX80_DEPS)
  2342. $(COMPILER) $(UFLOATX80_OPT) $<
  2343. System.UFloatX80$(PPUEXT) : $(NSINC)/System.UFloatX80.pp $(UFLOATX80_DEPS)
  2344. $(COMPILER) $(UFLOATX80_OPT) $<
  2345. UFLOAT128_DEPS=$(INC)/ufloat128.pp \
  2346. $(SFPU128UNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2347. $(UFLOAT128_DEPS_OS) $(UFLOAT128_DEPS_CPU)
  2348. ufloat128$(PPUEXT) : $(UFLOAT128_DEPS)
  2349. $(COMPILER) $(UFLOAT128_OPT) $<
  2350. System.UFloat128$(PPUEXT) : $(NSINC)/System.UFloat128.pp $(UFLOAT128_DEPS)
  2351. $(COMPILER) $(UFLOAT128_OPT) $<
  2352. STRINGS_DEPS=$(INC)/strings.pp $(INC)/stringsi.inc $(PROCINC)/stringss.inc $(PROCINC)/strings.inc \
  2353. $(INC)/genstr.inc $(INC)/genstrs.inc $(INC)/cgenstr.inc \
  2354. $(SYSTEMUNIT)$(PPUEXT) \
  2355. $(STRINGS_DEPS_OS)
  2356. strings$(PPUEXT) : $(STRINGS_DEPS)
  2357. $(COMPILER) $(STRINGS_OPT) $<
  2358. System.Strings$(PPUEXT) : $(NSINC)/System.Strings.pp $(STRINGS_DEPS)
  2359. $(COMPILER) $(STRINGS_OPT) $<
  2360. PORTS_DEPS=$(PORTSDIR)/ports.$(PORTSUNITEXT) \
  2361. $(SYSTEMUNIT)$(PPUEXT) \
  2362. $(PORTS_DEPS_OS) $(PORTS_DEPS_CPU)
  2363. ports$(PPUEXT) : $(PORTS_DEPS)
  2364. $(COMPILER) $(PORTS_OPT) $<
  2365. System.Ports$(PPUEXT) : $(NSINC)/System.Ports.$(PORTSUNITEXT) $(PORTS_DEPS)
  2366. $(COMPILER) $(PORTS_OPT) $<
  2367. DYNLIBS_DEPS=$(INC)/dynlibs.pas $(DYNLIBSINCDIR)/dynlibs.inc \
  2368. $(OBJPASUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) $(SYSUTILSUNIT)$(PPUEXT) \
  2369. $(DYNLIBS_DEPS_OS) $(DYNLIBS_DEPS_CPU)
  2370. ifdef DYNLIBSINCDIR
  2371. ifndef DYNLIBS_OPT
  2372. DYNLIBS_OPT=-Fi$(DYNLIBSINCDIR)
  2373. endif
  2374. endif
  2375. dynlibs$(PPUEXT) : $(DYNLIBS_DEPS)
  2376. $(COMPILER) $(DYNLIBS_OPT) $<
  2377. System.DynLibs$(PPUEXT) : $(NSINC)/System.DynLibs.pas $(DYNLIBS_DEPS)
  2378. $(COMPILER) $(DYNLIBS_OPT) $<
  2379. INITC_DEPS=$(INITCDIR)/initc.pp $(CTYPESUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2380. $(INITC_DEPS_OS) $(INITC_DEPS_CPU)
  2381. initc$(PPUEXT) : $(INITC_DEPS)
  2382. $(COMPILER) $(INITC_OPT) $<
  2383. System.InitC$(PPUEXT) : $(NSINC)/System.InitC.pp $(INITC_DEPS)
  2384. $(COMPILER) $(INITC_OPT) $<
  2385. UNIXCP_DEPS=$(UNIXINC)/unixcp.pp $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
  2386. $(UNIXCP_DEPS_OS) $(UNIXCP_DEPS_CPU)
  2387. unixcp$(PPUEXT) : $(UNIXCP_DEPS)
  2388. $(COMPILER) $(UNIXCP_OPT) $(UNIXINC)/unixcp.pp
  2389. UnixApi.CP$(PPUEXT) : $(NSINC)/UnixApi.CP.pp $(UNIXCP_DEPS)
  2390. $(COMPILER) $(UNIXCP_OPT) $<
  2391. ifeq ($(filter -dFPC_USE_LIBC,$(FPCOPT)),)
  2392. LINUX_DEPS_OS+=$(SYSCALLUNIT)$(PPUEXT)
  2393. else
  2394. ifneq ($(filter $(CPU_TARGET),i386 x86_64),)
  2395. LINUX_DEPS_OS+=$(SYSCALLUNIT)$(PPUEXT)
  2396. endif
  2397. endif
  2398. LINUX_DEPS=$(OSDIR)/linux.pp \
  2399. $(BASEUNIXUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2400. $(LINUX_DEPS_OS) $(LINUX_DEPS_CPU)
  2401. linux$(PPUEXT): $(LINUX_DEPS)
  2402. $(COMPILER) $<
  2403. LinuxApi$(PPUEXT): $(NSOSDIR)/LinuxApi.pp $(LINUX_DEPS)
  2404. $(COMPILER) $(LINUX_OPT) $<
  2405. LINUXVCS_DEPS=$(OSDIR)/linuxvcs.pp $(BASEUNIXUNIT)$(PPUEXT) $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2406. $(LINUXVCS_DEPS_OS) $(LINUXVCS_DEPS_CPU)
  2407. linuxvcs$(PPUEXT): $(LINUXVCS_DEPS)
  2408. $(COMPILER) $(LINUXVCS_OPT) $<
  2409. LinuxApi.Vcs$(PPUEXT): $(NSOSDIR)/LinuxApi.Vcs.pp $(LINUXVCS_DEPS)
  2410. $(COMPILER) $(LINUXVCS_OPT) $<
  2411. FPCYLIX_DEPS=../linux/fpcylix.pp \
  2412. $(CTHREADSUNIT)$(PPUEXT) $(CWSTRINGUNIT)$(PPUEXT) $(DYNLIBSUNIT)$(PPUEXT) \
  2413. $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2414. $(FPCYLIX_DEPS_OS) $(FPCYLIX_DEPS_CPU)
  2415. fpcylix$(PPUEXT) : $(FPCYLIX_DEPS)
  2416. $(COMPILER) $(FPCYLIX_OPT) $<
  2417. TERMIO_DEPS=$(TERMIODIR)/termio.pp $(UNIXINC)/ttyname.inc $(TERMIODIR)/termios.inc \
  2418. $(TERMIODIR)/termiosproc.inc $(BASEUNIXUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2419. $(TERMIO_DEPS_OS) $(TERMIO_DEPS_CPU)
  2420. termio$(PPUEXT) : $(TERMIO_DEPS)
  2421. $(COMPILER) $(TERMIO_OPT) $<
  2422. UnixApi.TermIO$(PPUEXT) : $(NSINC)/UnixApi.TermIO.pp $(TERMIO_DEPS)
  2423. $(COMPILER) $(TERMIO_OPT) $<
  2424. CONSOLE_DEPS= console.pp $(BASEUNIXUNIT)$(PPUEXT) $(TERMIOUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2425. $(CONSOLE_DEPS_OS) $(CONSOLE_DEPS_CPU)
  2426. console$(PPUEXT) : $(CONSOLE_DEPS)
  2427. $(COMPILER) $(CONSOLE_OPT) $<
  2428. System.Console$(PPUEXT) : $(NSOSDIR)/System.Console.pp $(CONSOLE_DEPS)
  2429. $(COMPILER) $(CONSOLE_OPT) $<
  2430. DOS_DEPS=$(DOSDIR)/dos.$(DOSUNITEXT) $(INC)/filerec.inc $(INC)/textrec.inc \
  2431. $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2432. $(DOS_DEPS_OS) $(DOS_DEPS_CPU)
  2433. dos$(PPUEXT): $(DOS_DEPS)
  2434. $(COMPILER) $(DOS_OPTS) $<
  2435. TP.DOS$(PPUEXT): $(NSINC)/TP.DOS.$(DOSUNITEXT) $(DOS_DEPS)
  2436. $(COMPILER) $(DOS_OPTS) $(DOS_NS_OPTS) $<
  2437. MSMOUSE_DEPS=msmouse.pp $(SYSTEMUNIT)$(PPUEXT)
  2438. msmouse$(PPUEXT) : $(MSMOUSE_DEPS)
  2439. $(COMPILER) $(MSMOUSE_OPTS) $<
  2440. DOSApi.MSMouse$(PPUEXT) : $(NSOSDIR)/DOSApi.MSMouse.pp $(MSMOUSE_DEPS)
  2441. $(COMPILER) $(MSMOUSE_OPTS) $<
  2442. SYSUTILS_UNIX_DEPS=$(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) \
  2443. $(BASEUNIXUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) \
  2444. $(UNIXUTILUNIT)$(PPUEXT) $(INITCUNIT)$(PPUEXT)
  2445. ifeq ($(filter -dFPC_USE_LIBC,$(FPCOPT)),)
  2446. SYSUTILS_UNIX_DEPS+= $(SYSCALLUNIT)$(PPUEXT)
  2447. endif
  2448. SYSUTILS_DEPS=$(SYSUTILSDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  2449. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(SYSCONSTUNIT)$(PPUEXT) \
  2450. $(SYSUTILS_DEPS_OS) $(SYSUTILS_DEPS_CPU)
  2451. sysutils$(PPUEXT) : $(SYSUTILS_DEPS)
  2452. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $<
  2453. System.SysUtils$(PPUEXT) : $(NSINC)/System.SysUtils.pp $(SYSUTILS_DEPS)
  2454. $(COMPILER) $(SYSUTILS_OPT) -Fi$(OBJPASDIR)/sysutils -Fi$(SYSUTILSDIR) $<
  2455. CLASSES_DEPS=$(CLASSESDIR)/classes.pp $(TTHREADINCDIR)/tthread.inc $(wildcard $(OBJPASDIR)/classes/*.inc) \
  2456. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(SORTBASEUNIT)$(PPUEXT) \
  2457. $(SYSUTILSUNIT)$(PPUEXT) $(TYPINFOUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) \
  2458. $(FGLUNIT)$(PPUEXT) $(TYPESUNIT)$(PPUEXT) \
  2459. $(CLASSES_DEPS_OS) $(CLASSES_DEPS_CPU)
  2460. classes$(PPUEXT) : $(CLASSES_DEPS)
  2461. $(COMPILER) -Fi$(OBJPASDIR)/classes $(CLASSES_OPT) $<
  2462. System.Classes$(PPUEXT) : $(NSINC)/System.Classes.pp $(CLASSES_DEPS)
  2463. $(COMPILER) -Fi$(OBJPASDIR)/classes $(CLASSES_OPT) $<
  2464. TYPINFO_DEPS=$(OBJPASDIR)/typinfo.pp \
  2465. $(OBJPASUNIT)$(PPUEXT) $(SYSUTILSUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) \
  2466. $(TYPINFO_DEPS_OS) $(TYPINFO_DEPS_CPU)
  2467. typinfo$(PPUEXT): $(TYPINFO_DEPS)
  2468. $(COMPILER) -Sg $(TYPINFO_OPT) $<
  2469. System.TypInfo$(PPUEXT): $(NSINC)/System.TypInfo.pp $(TYPINFO_DEPS)
  2470. $(COMPILER) -Fi$(OBJPASDIR) -Sg $(TYPINFO_OPT) $<
  2471. CHARACTER_DEPS=$(OBJPASDIR)/character.pas $(UNICODEDATAUNIT)$(PPUEXT) \
  2472. $(SYSUTILSUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) \
  2473. $(CHARACTER_DEPS_OS) $(CHARACTER_DEPS_CPU)
  2474. character$(PPUEXT): $(CHARACTER_DEPS)
  2475. $(COMPILER) $(CHARACTER_OPT) $<
  2476. System.Character$(PPUEXT): $(NSINC)/System.Character.pas $(CHARACTER_DEPS)
  2477. $(COMPILER) $(CHARACTER_OPT) -Fi$(OBJPASDIR) $<
  2478. MATH_DEPS= $(OBJPASDIR)/math.pp $(PROCINC)/mathu.inc \
  2479. $(OBJPASUNIT)$(PPUEXT) $(SYSUTILSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2480. $(MATH_DEPS_OS) $(MATH_DEPS_CPU)
  2481. math$(PPUEXT): $(MATH_DEPS)
  2482. $(COMPILER) $(MATH_OPT) $<
  2483. System.Math$(PPUEXT): $(NSINC)/System.Math.pp $(MATH_DEPS)
  2484. $(COMPILER) $(MATH_OPT) -Fi$(OBJPASDIR) $<
  2485. FGL_DEPS=$(OBJPASDIR)/fgl.pp \
  2486. $(OBJPASUNIT)$(PPUEXT) $(TYPESUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2487. $(SYSUTILSUNIT)$(PPUEXT) $(SORTBASEUNIT)$(PPUEXT) \
  2488. $(RTLCONSTSUNIT)$(PPUEXT) \
  2489. $(FGL_DEPS_OS) $(FGL_DEPS_CPU)
  2490. fgl$(PPUEXT) : $(FGL_DEPS)
  2491. $(COMPILER) $(FGL_OPT) $<
  2492. System.FGL$(PPUEXT) : $(NSINC)/System.FGL.pp $(FGL_DEPS)
  2493. $(COMPILER) -Fi$(OBJPASDIR) $(FGL_OPT) $<
  2494. TYPES_DEPS=$(OBJPASDIR)/types.pp \
  2495. $(OBJPASUNIT)$(PPUEXT) $(MATHUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2496. $(TYPES_DEPS_OS) $(TYPES_DEPS_CPU)
  2497. types$(PPUEXT) : $(TYPES_DEPS)
  2498. $(COMPILER) $(TYPES_OPT) $<
  2499. System.Types$(PPUEXT) : $(NSINC)/System.Types.pp $(TYPES_DEPS)
  2500. $(COMPILER) -Fi$(OBJPASDIR) $(TYPES_OPT) $<
  2501. SYSCONST_DEPS=$(OBJPASDIR)/sysconst.pp \
  2502. $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2503. $(SYSCONST_DEPS_OS) $(SYSCONST_DEPS_CPU)
  2504. sysconst$(PPUEXT) : $(SYSCONST_DEPS)
  2505. $(COMPILER) $(SYSCONST_OPT) $<
  2506. System.SysConst$(PPUEXT) : $(NSINC)/System.SysConst.pp $(SYSCONST_DEPS)
  2507. $(COMPILER) -Fi$(OBJPASDIR) $(SYSCONST_OPT) $<
  2508. ifdef FPC_DOTTEDUNITS
  2509. RTLCONSTS_DEPS=$(OBJPASDIR)/rtlconsts.pp $(OBJPASDIR)/rtlconst.inc \
  2510. $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2511. $(RTLCONSTS_DEPS_OS) $(RTLCONSTS_DEPS_CPU)
  2512. System.RtlConsts$(PPUEXT) : $(NSINC)/System.RtlConsts.pp $(RTLCONSTS_DEPS)
  2513. $(COMPILER) -Fi$(OBJPASDIR) $(RTLCONSTS_OPT) $<
  2514. else
  2515. RTLCONSTS_DEPS=$(OBJPASDIR)/$(RTLCONSTSUNIT).pp $(OBJPASDIR)/rtlconst.inc \
  2516. $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2517. $(RTLCONSTS_DEPS_OS) $(RTLCONSTS_DEPS_CPU)
  2518. $(RTLCONSTSUNIT)$(PPUEXT) : $(RTLCONSTS_DEPS)
  2519. $(COMPILER) $(RTLCONSTS_OPT) $<
  2520. endif
  2521. ifneq ($(findstring $(ARCH),x86_64 i386 i8086),)
  2522. CPU_DEPS_CPU:=$(CPU_DEPS_CPU) $(SYSUTILSUNIT)$(PPUEXT)
  2523. endif
  2524. CPU_DEPS=$(PROCINC)/cpu.pp \
  2525. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(SYSUTILSUNIT)$(PPUEXT) \
  2526. $(CPU_DEPS_OS) $(CPU_DEPS_CPU)
  2527. cpu$(PPUEXT) : $(CPU_DEPS)
  2528. $(COMPILER) $(CPU_OPT) $<
  2529. System.CPU$(PPUEXT) : $(NSINC)/System.CPU.pp $(CPU_DEPS)
  2530. $(COMPILER) $(CPU_OPT) $<
  2531. MMX_DEPS=$(PROCINC)/mmx.pp \
  2532. $(CPUUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2533. $(MMX_DEPS_OS) $(MMX_DEPS_CPU)
  2534. mmx$(PPUEXT) : $(MMX_DEPS)
  2535. $(COMPILER) $(MMX_OPT) $<
  2536. System.CPU.MMX$(PPUEXT) : $(NSINC)/System.CPU.MMX.pp $(MMX_DEPS)
  2537. $(COMPILER) $(MMX_OPT) $<
  2538. ifeq ($(filter -dFPC_USE_LIBC,$(FPCOPT)),)
  2539. X86_DEPS_OS+=$(SYSCALLUNIT)$(PPUEXT)
  2540. endif
  2541. X86_DEPS = $(UNIXINC)/x86.pp \
  2542. $(BASEUNIXUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2543. $(X86_DEPS_OS) $(X86_DEPS_CPU)
  2544. x86$(PPUEXT) : $(X86_DEPS)
  2545. $(COMPILER) $(X86_OPT) $<
  2546. System.X86$(PPUEXT) : $(NSINC)/System.X86.pp $(X86_DEPS)
  2547. $(COMPILER) $(X86_OPT) $<
  2548. GETOPTS_DEPS=$(INC)/getopts.pp \
  2549. $(SYSTEMUNIT)$(PPUEXT) \
  2550. $(GETOPTS_DEPS_OS) $(GETOPTS_DEPS_CPU)
  2551. getopts$(PPUEXT) : $(GETOPTS_DEPS)
  2552. $(COMPILER) $(GETOPTS_OPT) $<
  2553. System.GetOpts$(PPUEXT) : $(NSINC)/System.GetOpts.pp $(GETOPTS_DEPS)
  2554. $(COMPILER) $(GETOPTS_OPT) $<
  2555. LINEINFO_DEPS=$(INC)/lineinfo.pp \
  2556. $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) $(SYSUTILSUNIT)$(PPUEXT) $(EXEINFOUNIT)$(PPUEXT) \
  2557. $(LINEINFO_DEPS_OS) $(LINEINFO_DEPS_CPU)
  2558. lineinfo$(PPUEXT) : $(LINEINFO_DEPS)
  2559. $(COMPILER) $(LINEINFO_OPT) $<
  2560. System.LineInfo$(PPUEXT) : $(NSINC)/System.LineInfo.pp $(LINEINFO_DEPS)
  2561. $(COMPILER) $(LINEINFO_OPT) $<
  2562. EXEINFO_DEPS=$(INC)/exeinfo.pp \
  2563. $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2564. $(EXEINFO_DEPS_OS) $(EXEINFO_DEPS_CPU)
  2565. exeinfo$(PPUEXT) : $(EXEINFO_DEPS)
  2566. $(COMPILER) $(EXEINFO_OPT) $<
  2567. System.ExeInfo$(PPUEXT) : $(NSINC)/System.ExeInfo.pp $(EXEINFO_DEPS)
  2568. $(COMPILER) $(EXEINFO_OPT) $<
  2569. LNFODWRF_DEPS=$(INC)/lnfodwrf.pp \
  2570. $(SYSTEMUNIT)$(PPUEXT) $(STRINGSUNIT)$(PPUEXT) \
  2571. $(SYSUTILSUNIT)$(PPUEXT) $(EXEINFOUNIT)$(PPUEXT) \
  2572. $(LNFODWRF_DEPS_OS) $(LNFODWRF_DEPS_CPU)
  2573. lnfodwrf$(PPUEXT) : $(LNFODWRF_DEPS)
  2574. $(COMPILER) $(LNFODWRF_OPT) $<
  2575. System.LineInfo.Dwarf$(PPUEXT) : $(NSINC)/System.LineInfo.Dwarf.pp $(LNFODWRF_DEPS)
  2576. $(COMPILER) $(LNFODWRF_OPT) $<
  2577. LNFOGDB_DEPS=$(UNIXINC)/lnfogdb.pp \
  2578. $(SYSTEMUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT) \
  2579. $(BASEUNIXUNIT)$(PPUEXT) $(UNIXUNIT)$(PPUEXT) \
  2580. $(LNFOGDB_DEPS_OS) $(LNFOGDB_DEPS_CPU)
  2581. lnfogdb$(PPUEXT) : $(LNFOGDB_DEPS)
  2582. $(COMPILER) $(LNFOGDB_OPT) $<
  2583. System.LineInfo.Gdb$(PPUEXT) : $(NSINC)/System.LineInfo.Gdb.pp $(LNFOGDB_DEPS)
  2584. $(COMPILER) $(LNFOGDB_OPT) $<
  2585. CHARSET_DEPS=$(INC)/charset.pp \
  2586. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) \
  2587. $(CHARSET_DEPS_OS) $(CHARSET_DEPS_CPU)
  2588. charset$(PPUEXT) : $(CHARSET_DEPS)
  2589. $(COMPILER) $(CHARSET_OPT) $<
  2590. System.CharSet$(PPUEXT) : $(NSINC)/System.CharSet.pp $(CHARSET_DEPS)
  2591. $(COMPILER) $(CHARSET_OPT) $<
  2592. UNICODEDATA_DEPS = $(OBJPASDIR)/unicodedata.pas $(OBJPASDIR)/unicodedata.inc \
  2593. $(OBJPASDIR)/unicodedata_le.inc $(OBJPASDIR)/unicodedata_be.inc \
  2594. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT)
  2595. unicodedata$(PPUEXT) : $(UNICODEDATA_DEPS)
  2596. $(COMPILER) -Fi$(OBJPASDIR) $(UNICODEDATA_OPT) $<
  2597. System.CodePages.unicodedata$(PPUEXT) : $(NSINC)/System.CodePages.unicodedata.pas $(UNICODEDATA_DEPS)
  2598. $(COMPILER) -Fi$(OBJPASDIR) $(UNICODEDATA_OPT) $<
  2599. CPALL_DEPS=$(RTL)/charmaps/cpall.pas $(CP_UNITS_SRC) \
  2600. system$(PPUEXT) $(CHARSETUNIT)$(PPUEXT) \
  2601. $(CPALL_DEPS_OS) $(CPALL_DEPS_CPU)
  2602. cpall$(PPUEXT): $(CPALL_DEPS)
  2603. $(COMPILER) $(CPALL_OPT) -Fu$(INC) -Fi$(RTL)/charmaps $<
  2604. System.CodePages.All$(PPUEXT): $(NSINC)/System.CodePages.All.pas $(CPALL_DEPS)
  2605. $(COMPILER) $(CPALL_OPT) -Fu$(INC) -Fi$(RTL)/charmaps $<
  2606. ifneq ($(UNIXINC),)
  2607. FPWIDESTRING_DEPS_OS:=$(FPWIDESTRING_DEPS_OS) $(UNIXCPUNIT)$(PPUEXT)
  2608. endif
  2609. ifneq ($(AMIINC),)
  2610. RTLDEFSINCDIR=$(AMIINC)
  2611. else
  2612. ifeq ($(OS_TARGET),android)
  2613. RTLDEFSINCDIR = $(LINUXINC)
  2614. else
  2615. RTLDEFSINCDIR = $(OSDIR)
  2616. endif
  2617. endif
  2618. FPWIDESTRING_DEPS=$(OBJPASDIR)/fpwidestring.pp $(RTLDEFSINCDIR)/rtldefs.inc \
  2619. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(UNICODEDATAUNIT)$(PPUEXT) \
  2620. $(CHARACTERUNIT)$(PPUEXT) $(CPALLUNIT)$(PPUEXT) \
  2621. $(FPWIDESTRING_DEPS_OS) $(FPWIDESTRING_DEPS_CPU)
  2622. fpwidestring$(PPUEXT): $(FPWIDESTRING_DEPS)
  2623. $(COMPILER) $(FPWIDESTRING_OPT) $<
  2624. System.FPWideString$(PPUEXT): $(NSINC)/System.FPWideString.pp $(FPWIDESTRING_DEPS)
  2625. $(COMPILER) -Fi$(OBJPASDIR) $(FPWIDESTRING_OPT) $<
  2626. SORTBASE_DEPS=$(INC)/sortbase.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2627. $(SORTBASE_DEPS_OS) $(SORTBASE_DEPS_CPU)
  2628. sortbase$(PPUEXT) : $(SORTBASE_DEPS)
  2629. $(COMPILER) $(SORTBASE_OPT) $<
  2630. System.SortBase$(PPUEXT) : $(NSINC)/System.SortBase.pp $(SORTBASE_DEPS)
  2631. $(COMPILER) $(SORTBASE_OPT) $<
  2632. CALLSPEC_DEPS=$(INC)/callspec.pp \
  2633. $(SYSTEMUNIT)$(PPUEXT) \
  2634. $(CALLSPEC_DEPS_OS) $(CALLSPEC_DEPS_CPU)
  2635. callspec$(PPUEXT) : $(CALLSPEC_DEPS)
  2636. $(COMPILER) $(CALLSPEC_OPT) $<
  2637. System.CallSpec$(PPUEXT) : $(NSINC)/System.CallSpec.pp $(CALLSPEC_DEPS)
  2638. $(COMPILER) $(CALLSPEC_OPT) $<
  2639. CMEM_DEPS=$(INC)/cmem.pp \
  2640. $(SYSTEMUNIT)$(PPUEXT) \
  2641. $(CMEM_DEPS_OS) $(CMEM_DEPS_CPU)
  2642. cmem$(PPUEXT) : $(CMEM_DEPS)
  2643. $(COMPILER) $(CMEM_OPT) $<
  2644. System.CMem$(PPUEXT) : $(NSINC)/System.CMem.pp $(CMEM_DEPS)
  2645. $(COMPILER) $(CMEM_OPT) $<
  2646. BASEUNIX_DEPS=$(BASEUNIXDIR)/baseunix.pp $(UNIXINC)/ctypes.inc \
  2647. $(UNIXINC)/bunxh.inc $(UNIXINC)/gensigset.inc $(OSDIR)/ptypes.inc $(OSDIR)/errno.inc \
  2648. $(UNIXTYPEUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2649. $(BASEUNIX_DEPS_OS) $(BASEUNIX_DEPS_CPU)
  2650. baseunix$(PPUEXT): $(BASEUNIX_DEPS)
  2651. $(COMPILER) $(BASEUNIX_OPT) $<
  2652. UnixApi.Base$(PPUEXT): $(NSINC)/UnixApi.Base.pp $(BASEUNIX_DEPS)
  2653. $(COMPILER) $(BASEUNIX_OPT) $<
  2654. UNIX_DEPS=$(UNIXINC)/unix.pp \
  2655. $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
  2656. $(UNIXUTILUNIT)$(PPUEXT) \
  2657. $(INC)/textrec.inc $(INC)/filerec.inc $(UNIXINC)/timezone.inc \
  2658. $(OSDIR)/unxconst.inc $(OSDIR)/unxfunc.inc \
  2659. $(UNIX_DEPS_OS) $(UNIX_DEPS_CPU)
  2660. unix$(PPUEXT): $(UNIX_DEPS)
  2661. $(COMPILER) $(UNIX_OPT) $<
  2662. UnixApi.Unix$(PPUEXT) : $(NSINC)/UnixApi.Unix.pp $(UNIX_DEPS)
  2663. $(COMPILER) $(UNIX_OPT) $<
  2664. SYSCALL_DEPS=$(UNIXINC)/syscall.pp \
  2665. $(SYSTEMUNIT)$(PPUEXT) \
  2666. $(SYSCALL_DEPS_OS) $(SYSCALL_DEPS_CPU)
  2667. syscall$(PPUEXT) : $(SYSCALL_DEPS)
  2668. $(COMPILER) $(SYSCALL_OPT) $<
  2669. UnixApi.SysCall$(PPUEXT) : $(NSINC)/UnixApi.SysCall.pp $(SYSCALL_DEPS)
  2670. $(COMPILER) $(SYSCALL_OPT) $<
  2671. UNIXUTIL_DEPS=$(UNIXINC)/unixutil.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  2672. $(SYSTEMUNIT)$(PPUEXT) \
  2673. $(UNIXUTIL_DEPS_OS)
  2674. unixutil$(PPUEXT) : $(UNIXUTIL_DEPS)
  2675. $(COMPILER) $(UNIXUTIL_OPT) $<
  2676. UnixApi.Utils$(PPUEXT) : $(NSINC)/UnixApi.Utils.pp $(UNIXUTIL_DEPS)
  2677. $(COMPILER) $(UNIXUTIL_OPT) $<
  2678. ifndef PTYPESINCDIR
  2679. PTYPESINCDIR=$(OSDIR)
  2680. endif
  2681. UNIXTYPE_DEPS=$(UNIXINC)/unixtype.pp \
  2682. $(SYSTEMUNIT)$(PPUEXT) $(PTYPESINCDIR)/ptypes.inc $(UNIXINC)/ctypes.inc \
  2683. $(UNIXTYPE_DEPS_OS) $(UNIXTYPE_DEPS_CPU)
  2684. unixtype$(PPUEXT) : $(UNIXTYPE_DEPS)
  2685. $(COMPILER) $(UNIXTYPE_OPT) $(UNIXINC)/unixtype.pp
  2686. UnixApi.Types$(PPUEXT) : $(NSINC)/UnixApi.Types.pp $(UNIXTYPE_DEPS)
  2687. $(COMPILER) $(UNIXTYPE_OPT) $<
  2688. UNIX98PTY_DEPS=$(UNIXINC)/unix98pty.pp \
  2689. $(CTYPESUNIT)$(PPUEXT)
  2690. unix98pty$(PPUEXT) : $(UNIX98PTY_DEPS)
  2691. $(COMPILER) $(UNIX98PTY_OPT) $(UNIXINC)/unix98pty.pp
  2692. UnixApi.Unix98.PTY$(PPUEXT) : $(NSINC)/UnixApi.Unix98.PTY.pp $(UNIX98PTY_DEPS)
  2693. $(COMPILER) $(UNIX98PTY_OPT) $<
  2694. DL_DEPS=$(UNIXINC)/dl.pp \
  2695. $(SYSTEMUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT) \
  2696. $(DL_DEPS_OS) $(DL_DEPS_CPU)
  2697. dl$(PPUEXT) : $(DL_DEPS)
  2698. $(COMPILER) $(DL_OPT) $<
  2699. UnixApi.Dl$(PPUEXT) : $(NSINC)/UnixApi.Dl.pp $(DL_DEPS)
  2700. $(COMPILER) $(DL_OPT) $<
  2701. ERRORS_DEPS=$(UNIXINC)/errors.pp \
  2702. $(STRINGSUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2703. $(ERRORS_DEPS_OS) $(ERRORS_DEPS_CPU)
  2704. errors$(PPUEXT) : $(ERRORS_DEPS)
  2705. $(COMPILER) $(ERRORS_OPT) $<
  2706. UnixApi.Errors$(PPUEXT) : $(NSINC)/UnixApi.Errors.pp $(ERRORS_DEPS)
  2707. $(COMPILER) $(ERRORS_OPT) $<
  2708. CTHREADS_DEPS=$(UNIXINC)/cthreads.pp $(PTHREADINCDIR)/pthread.inc \
  2709. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(UNIXUNIT)$(PPUEXT) \
  2710. $(BASEUNIXUNIT)$(PPUEXT) $(INITCUNIT)$(PPUEXT) $(DLUNIT)$(PPUEXT) \
  2711. $(CTHREADS_DEPS_OS) $(CTHREADS_DEPS_CPU)
  2712. cthreads$(PPUEXT) : $(CTHREADS_DEPS)
  2713. $(COMPILER) $(CTHREADS_OPT) $<
  2714. UnixApi.CThreads$(PPUEXT) : $(NSINC)/UnixApi.CThreads.pp $(CTHREADS_DEPS)
  2715. $(COMPILER) $(CTHREADS_OPT) $<
  2716. NOTHREADS_DEPS=$(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT)
  2717. nothreads$(PPUEXT) : $(INC)/nothreads.pp $(NOTHREADS_DEPS)
  2718. $(COMPILER) $(NOTHREADS_OPT) $<
  2719. System.NoThreads$(PPUEXT) : $(NSINC)/System.NoThreads.pp $(NOTHREADS_DEPS)
  2720. $(COMPILER) $(NOTHREADS_OPT) $<
  2721. ifndef CWSTRINGDIR
  2722. CWSTRINGDIR=$(UNIXINC)
  2723. CWSSTRING_INC=$(RTLDEFSINCDIR)/rtldefs.inc
  2724. endif
  2725. CWSTRING_DEPS=$(CWSTRINGDIR)/cwstring.pp $(CWSTRING_INC) \
  2726. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(BASEUNIXUNIT)$(PPUEXT) \
  2727. $(UNIXUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT) \
  2728. $(DYNLIBSUNIT)$(PPUEXT) $(UNIXCPUNIT)$(PPUEXT) \
  2729. $(CWSTRING_DEPS_OS) $(CWSTRING_DEPS_CPU)
  2730. cwstring$(PPUEXT) : $(CWSTRING_DEPS)
  2731. $(COMPILER) $(CWSTRING_OPT) $<
  2732. UnixApi.CWString$(PPUEXT) : $(NSINC)/UnixApi.CWString.pp $(CWSTRING_DEPS)
  2733. $(COMPILER) $(CWSTRING_OPT) $<
  2734. ifneq ($(UNIXINC),)
  2735. ifneq ($(OS_TARGET),macosclassic)
  2736. CTYPES_DEPS_OS+=$(UNIXTYPEUNIT)$(PPUEXT)
  2737. endif
  2738. endif
  2739. CTYPES_DEPS=$(INC)/ctypes.pp \
  2740. $(SYSTEMUNIT)$(PPUEXT) \
  2741. $(CTYPES_DEPS_OS) $(CTYPES_DEPS_CPU)
  2742. ctypes$(PPUEXT) : $(CTYPES_DEPS)
  2743. $(COMPILER) $(CTYPES_OPT) $<
  2744. System.CTypes$(PPUEXT) : $(NSINC)/System.CTypes.pp $(CTYPES_DEPS)
  2745. $(COMPILER) $(CTYPES_OPT) $<
  2746. OBJC_DEPS=$(INC)/objc.pp $(INC)/objc.pp $(INC)/objc1.inc $(INC)/objcnf.inc \
  2747. $(SYSTEMUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) \
  2748. $(OBJC_DEPS_OS) $(OBJC_DEPS_CPU)
  2749. objc$(PPUEXT) : $(OBJC_DEPS)
  2750. $(COMPILER) $(OBJC_OPT) $<
  2751. OBJCBASE_DEPS=$(INC)/objcbase.pp \
  2752. $(SYSTEMUNIT)$(PPUEXT) $(OBJCUNIT)$(PPUEXT) \
  2753. $(OBJCBASE_DEPS_OS) $(OBJCBASE_DEPS_CPU)
  2754. objcbase$(PPUEXT) : $(OBJCBASE_DEPS)
  2755. $(COMPILER) $(OBJCBASE_OPT) $<
  2756. BLOCKRTL_DEPS=$(INC)/blockrtl.pp \
  2757. $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(INITCUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT) \
  2758. $(BLOCKRTL_DEPS_OS) $(BLOCKRTL_DEPS_CPU)
  2759. blockrtl$(PPUEXT) : $(BLOCKRTL_DEPS)
  2760. $(COMPILER) $(BLOCKRTL_OPT) $<
  2761. ifndef WININCDIR
  2762. WININCDIR = $(WINDIR)/wininc
  2763. endif
  2764. WINDOWS_DEPS=windows.pp $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) \
  2765. $(WINDOWS_DEPS_OS) $(WINDOWS_DEPS_CPU)
  2766. windows$(PPUEXT): $(WINDOWS_DEPS)
  2767. $(COMPILER) -Fi$(WININC) $(WINDOWS_OPT) $<
  2768. WinApi.Windows$(PPUEXT): $(NSWINDOWSDIR)/WinApi.Windows.pp $(WINDOWS_DEPS)
  2769. $(COMPILER) -Fi$(WININC) -Fi$(WINDIR) $(WINDOWS_OPT) $<
  2770. WINDIRS_DEPS=$(WINDIRSDIR)/windirs.pp $(WINDOWSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2771. $(WINDIRS_DEPS_OS) $(WINDIRS_DEPS_CPU)
  2772. windirs$(PPUEXT): $(WINDIRS_DEPS)
  2773. $(COMPILER) $(WINDIRS_OPT) $<
  2774. WinApi.WinDirs$(PPUEXT): $(NSWINDOWSDIR)/WinApi.WinDirs.pp $(WINDIRS_DEPS)
  2775. $(COMPILER) -Fi$(WININC) -Fi$(WINDIR) $(WINDIRS_OPT) $<
  2776. ifndef WINMESSAGESDIR
  2777. WINMESSAGESDIR = $(WINDIR)
  2778. endif
  2779. ifndef WINMESSAGESINCDIR
  2780. WINMESSAGESINCDIR = $(WINDIR)/wininc
  2781. endif
  2782. MESSAGES_DEPS = $(WINMESSAGESDIR)/messages.pp $(WINMESSAGESINCDIR)/messages.inc $(WINDOWSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2783. $(MESSAGES_DEPS_OS) $(MESSAGES_DEPS_CPU)
  2784. messages$(PPUEXT): $(MESSAGES_DEPS)
  2785. $(COMPILER) -Fi$(WINMESSAGESINCDIR) $<
  2786. WinApi.Messages$(PPUEXT): $(NSWINDOWSDIR)/WinApi.Messages.pp $(MESSAGES_DEPS)
  2787. $(COMPILER) -Fi$(WINMESSAGESINCDIR) -Fi$(WINMMESSAGESDIR) $<
  2788. WINTYPES_DEPS = wintypes.pp wintypes.inc $(SYSTEMUNIT)$(PPUEXT) \
  2789. $(WINTYPES_DEPS_OS) $(WINTYPES_DEPS_CPU)
  2790. wintypes$(PPUEXT) : $(WINTYPES_DEPS)
  2791. $(COMPILER) $<
  2792. WinApi.WinTypes$(PPUEXT) : $(NSWINDOWSDIR)/WinApi.WinTypes.pp $(WINTYPES_DEPS)
  2793. $(COMPILER) $<
  2794. WINPROCS_DEPS = winprocs.pp winprocsh.inc winprocs.inc $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(WINTYPESUNIT)$(PPUEXT) \
  2795. $(WINTYPES_DEPS_OS) $(WINTYPES_DEPS_CPU)
  2796. winprocs$(PPUEXT) : $(WINPROCS_DEPS)
  2797. $(COMPILER) $<
  2798. WinApi.Winprocs$(PPUEXT) : $(NSWINDOWSDIR)/WinApi.WinProcs.pp $(WINPROCS_DEPS)
  2799. $(COMPILER) $<
  2800. WIN31_DEPS = win31.pp $(SYSTEMUNIT)$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) $(WINTYPESUNIT)$(PPUEXT) \
  2801. $(WINTYPES_DEPS_OS) $(WINTYPES_DEPS_CPU)
  2802. win31$(PPUEXT) : $(WIN31_DEPS)
  2803. $(COMPILER) $<
  2804. WinApi.Win31$(PPUEXT) : $(NSWINDOWSDIR)/WinApi.Win31.pp $(WINPROCS_DEPS)
  2805. $(COMPILER) $<
  2806. ifeq ($(filter -dFPC_USE_LIBC,$(FPCOPT)),)
  2807. SYSCTL_DEPS_OS+=$(SYSCALLUNIT)$(PPUEXT)
  2808. endif
  2809. SYSCTL_DEPS=$(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) $(UNIXTYPEUNIT)$(PPUEXT) \
  2810. $(SYSCTL_DEPS_OS) $(SYSCTL_DEPS_CPU)
  2811. sysctl$(PPUEXT) : $(SYSCTL_DEPS)
  2812. $(COMPILER) $(SYSCTL_OPT) $<
  2813. BsdApi.SysCtl$(PPUEXT) : $(NSBSDDIR)/BsdApi.SysCtl.pp $(SYSCTL_DEPS)
  2814. $(COMPILER) $(SYSCTL_OPT) $<
  2815. BSD_DEPS=$(BSDINC)/bsd.pas $(INITCUNIT)$(PPUEXT) $(UNIXUNIT)$(PPUEXT) \
  2816. $(BSD_DEPS_OS) $(BSD_DEPS_CPU)
  2817. bsd$(PPUEXT): $(BSD_DEPS)
  2818. $(COMPILER) $(BSD_OPT) $<
  2819. BsdApi$(PPUEXT): $(NSBSDDIR)/BsdApi.pp $(BSD_DEPS)
  2820. $(COMPILER) $(BSD_OPT) $<
  2821. DOSCALLS_DEPS = $(OS2DIR)/doscalls.pas $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2822. $(DOSCALLS_DEPS_OS) $(DOSCALLS_DEPS_CPU)
  2823. doscalls$(PPUEXT) : $(DOSCALLS_DEPS)
  2824. $(COMPILER) $<
  2825. OS2Api.doscalls$(PPUEXT) : $(NSOS2DIR)/OS2Api.doscalls.pas $(DOSCALLS_DEPS)
  2826. $(COMPILER) -Fi$(OS2DIR) $<
  2827. VIOCALLS_DEPS = $(OS2DIR)/viocalls.pas $(SYSTEMUNIT)$(PPUEXT) \
  2828. $(VIOCALLS_DEPS_OS) $(VIOCALLS_DEPS_CPU)
  2829. viocalls$(PPUEXT) : $(VIOCALLS_DEPS)
  2830. $(COMPILER) $<
  2831. OS2Api.viocalls$(PPUEXT) : $(NSOS2DIR)/OS2Api.viocalls.pas $(VIOCALLS_DEPS)
  2832. $(COMPILER) -Fi$(OS2DIR) $<
  2833. SO32DLL_DEPS = $(OS2DIR)/so32dll.pas $(SYSTEMUNIT)$(PPUEXT) \
  2834. $(SO32DLL_DEPS_OS) $(SO32DLL_DEPS_CPU)
  2835. so32dll$(PPUEXT) : $(SO32DLL_DEPS)
  2836. $(COMPILER) $<
  2837. OS2Api.so32dll$(PPUEXT) : $(NSOS2DIR)/OS2Api.so32dll.pas $(SO32DLL_DEPS)
  2838. $(COMPILER) -Fi$(OS2DIR) $<
  2839. KBDCALLS_DEPS = $(OS2DIR)/kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT) \
  2840. $(KBDCALLS_DEPS_OS) $(KBDCALLS_DEPS_CPU)
  2841. kbdcalls$(PPUEXT) : $(KBDCALLS_DEPS)
  2842. $(COMPILER) $<
  2843. OS2Api.kbdcalls$(PPUEXT) : $(NSOS2DIR)/OS2Api.kbdcalls.pas $(KBDCALLS_DEPS)
  2844. $(COMPILER) -Fi$(OS2DIR) $<
  2845. MOUCALLS_DEPS = $(OS2DIR)/moucalls.pas $(SYSTEMUNIT)$(PPUEXT) \
  2846. $(MOUCALLS_DEPS_OS) $(MOUCALLS_DEPS_CPU)
  2847. moucalls$(PPUEXT) : $(MOUCALLS_DEPS)
  2848. $(COMPILER) $<
  2849. OS2Api.moucalls$(PPUEXT) : $(NSOS2DIR)/OS2Api.moucalls.pas $(MOUCALLS_DEPS)
  2850. $(COMPILER) -Fi$(OS2DIR) $<
  2851. MONCALLS_DEPS = $(OS2DIR)/moncalls.pas $(STRINGSUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2852. $(MONCALLS_DEPS_OS) $(MONCALLS_DEPS_CPU)
  2853. moncalls$(PPUEXT) : $(MONCALLS_DEPS)
  2854. $(COMPILER) $<
  2855. OS2Api.moncalls$(PPUEXT) : $(NSOS2DIR)/OS2Api.moncall.pas $(MONCALLS_DEPS)
  2856. $(COMPILER) -Fi$(OS2DIR) $<
  2857. OS2DEF_DEPS = $(OS2DIR)/os2def.pas $(SYSTEMUNIT)$(PPUEXT) \
  2858. $(OS2DEF_DEPS_OS) $(OS2DEF_DEPS_CPU)
  2859. os2def$(PPUEXT) : $(OS2DEF_DEPS)
  2860. $(COMPILER) $<
  2861. OS2Api.os2def$(PPUEXT) : $(NSOS2DIR)/OS2Api.os2def.pas $(OS2DEF_DEPS)
  2862. $(COMPILER) -Fi$(OS2DIR) $<
  2863. DOSCALL2_DEPS = $(OS2DIR)/doscall2.pas $(DOSCALLSUNIT)$(PPUEXT) $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2864. $(DOSCALL2_DEPS_OS) $(DOSCALL2_DEPS_CPU)
  2865. doscall2$(PPUEXT) : $(DOSCALL2_DEPS)
  2866. $(COMPILER) $<
  2867. OS2Api.doscall2$(PPUEXT) : $(NSOS2DIR)/OS2Api.doscall2.pas $(DOSCALL2_DEPS)
  2868. $(COMPILER) -Fi$(OS2DIR) $<
  2869. PMWIN_DEPS = $(OS2DIR)/pmwin.pas $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2870. $(PMWIN_DEPS_OS) $(PMWIN_DEPS_CPU)
  2871. pmwin$(PPUEXT) : $(PMWIN_DEPS)
  2872. $(COMPILER) $<
  2873. OS2Api.pmwin$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmwin.pas $(PMWIN_DEPS)
  2874. $(COMPILER) -Fi$(OS2DIR) $<
  2875. PMBITMAP_DEPS = $(OS2DIR)/pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT) \
  2876. $(PMBITMAP_DEPS_OS) $(PMBITMAP_DEPS_CPU)
  2877. pmbitmap$(PPUEXT) : $(PMBITMAP_DEPS)
  2878. $(COMPILER) $<
  2879. OS2Api.pmbitmap$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmbitmap.pas $(PMBITMAP_DEPS)
  2880. $(COMPILER) -Fi$(OS2DIR) $<
  2881. PMGPI_DEPS = $(OS2DIR)/pmgpi.pas $(PMBITMAPUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2882. $(PMGPI_DEPS_OS) $(PMGPI_DEPS_CPU)
  2883. pmgpi$(PPUEXT) : $(PMGPI_DEPS)
  2884. $(COMPILER) $<
  2885. OS2Api.pmgpi$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmgpi.pas $(PMGPI_DEPS)
  2886. $(COMPILER) -Fi$(OS2DIR) $<
  2887. PMSTDDLG_DEPS = $(OS2DIR)/pmstddlg.pas $(OS2DEFUNIT)$(PPUEXT) $(DOSCALLSUNIT)$(PPUEXT) \
  2888. $(PMWINUNIT)$(PPUEXT) $(PMGPIUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2889. $(PMSTDDLG_DEPS_OS) $(PMSTDDLG_DEPS_CPU)
  2890. pmstddlg$(PPUEXT) : $(PMSTDDLG_DEPS)
  2891. $(COMPILER) $<
  2892. OS2Api.pmstddlg$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmstddlg.pas $(PMSTDDLG_DEPS)
  2893. $(COMPILER) -Fi$(OS2DIR) $<
  2894. PMHELP_DEPS = $(OS2DIR)/pmhelp.pas $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2895. $(PMHELP_DEPS_OS) $(PMHELP_DEPS_CPU)
  2896. pmhelp$(PPUEXT) : $(PMHELP_DEPS)
  2897. $(COMPILER) $<
  2898. OS2Api.pmhelp$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmhelp.pas $(PMHELP_DEPS)
  2899. $(COMPILER) -Fi$(OS2DIR) $<
  2900. PMDEV_DEPS = $(OS2DIR)/pmdev.pas $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2901. $(PMDEV_DEPS_OS) $(PMDEV_DEPS_CPU)
  2902. pmdev$(PPUEXT) : $(PMDEV_DEPS)
  2903. $(COMPILER) $<
  2904. OS2Api.pmdev$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmdev.pas $(PMDEV_DEPS)
  2905. $(COMPILER) -Fi$(OS2DIR) $<
  2906. PMSPL_DEPS = $(OS2DIR)/pmspl.pas $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2907. $(PMSPL_DEPS_OS) $(PMSPL_DEPS_CPU)
  2908. pmspl$(PPUEXT) : $(PMSPL_DEPS)
  2909. $(COMPILER) $<
  2910. OS2Api.pmspl$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmspl.pas $(PMSPL_DEPS)
  2911. $(COMPILER) -Fi$(OS2DIR) $<
  2912. PMSHL_DEPS = $(OS2DIR)/pmshl.pas $(OS2DEFUNIT)$(PPUEXT) $(PMWINUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2913. $(PMSHL_DEPS_OS) $(PMSHL_DEPS_CPU)
  2914. pmshl$(PPUEXT) : $(PMSHL_DEPS)
  2915. $(COMPILER) $<
  2916. OS2Api.pmshl$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmshl.pas $(PMSHL_DEPS)
  2917. $(COMPILER) -Fi$(OS2DIR) $<
  2918. PMWP_DEPS = $(OS2DIR)/pmwp.pas $(OS2DEFUNIT)$(PPUEXT) $(PMWINUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2919. $(PMWP_DEPS_OS) $(PMWP_DEPS_CPU)
  2920. pmwp$(PPUEXT) : $(PMWP_DEPS)
  2921. $(COMPILER) $<
  2922. OS2Api.pmwp$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmwp.pas $(PMWP_DEPS)
  2923. $(COMPILER) -Fi$(OS2DIR) $<
  2924. PMWSOCK_DEPS = $(OS2DIR)/pmwsock.pas $(OS2DEFUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2925. $(PMWSOCK_DEPS_OS) $(PMWSOCK_DEPS_CPU)
  2926. pmwsock$(PPUEXT) : $(PMWSOCK_DEPS)
  2927. $(COMPILER) $<
  2928. OS2Api.pmwsock$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmwsock.pas $(PMWSOCK_DEPS)
  2929. $(COMPILER) -Fi$(OS2DIR) $<
  2930. PMBIDI_DEPS = $(OS2DIR)/pmbidi.pas $(OS2DEFUNIT)$(PPUEXT) $(PMWIN)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  2931. $(PMBIDI_DEPS_OS) $(PMBIDI_DEPS_CPU)
  2932. pmbidi$(PPUEXT) : $(PMBIDI_DEPS)
  2933. $(COMPILER) $<
  2934. OS2Api.pmbidi$(PPUEXT) : $(NSOS2DIR)/OS2Api.pmbidi.pas $(PMBIDI_DEPS)
  2935. $(COMPILER) -Fi$(OS2DIR) $<
  2936. EXE_DEPS = $(OS2DIR)/exe.pas $(SYSTEMUNIT)$(PPUEXT) \
  2937. $(EXE_DEPS_OS) $(EXE_DEPS_CPU)
  2938. exe$(PPUEXT) : $(EXE_DEPS)
  2939. $(COMPILER) $<
  2940. OS2Api.exe$(PPUEXT) : $(NSOS2DIR)/OS2Api.exe.pas $(EXE_DEPS)
  2941. $(COMPILER) -Fi$(OS2DIR) $<
  2942. NEWEXE_DEPS = $(OS2DIR)/newexe.pas $(SYSTEMUNIT)$(PPUEXT) \
  2943. $(NEWEXE_DEPS_OS) $(NEWEXE_DEPS_CPU)
  2944. newexe$(PPUEXT) : $(NEWEXE_DEPS)
  2945. $(COMPILER) $<
  2946. OS2Api.newexe$(PPUEXT) : $(NSOS2DIR)/OS2Api.newexe.pas $(NEWEXE_DEPS)
  2947. $(COMPILER) -Fi$(OS2DIR) $<
  2948. .NOTPARALLEL:
  2949. include $(INC)/makefile.inc
  2950. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  2951. include $(PROCINC)/makefile.cpu
  2952. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  2953. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)