Makefile 59 KB

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