Makefile 98 KB

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