Makefile 66 KB

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