Makefile 85 KB

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