Makefile 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/01/22]
  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 i386-nativent 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-solaris 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 mipsel-linux
  6. BSDs = freebsd netbsd openbsd darwin
  7. UNIXs = linux $(BSDs) solaris qnx haiku
  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+=dotest fptime fail testfail digest $(DBDIGEST)
  269. endif
  270. ifeq ($(FULL_TARGET),i386-go32v2)
  271. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST) prepup
  272. endif
  273. ifeq ($(FULL_TARGET),i386-win32)
  274. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST) prepup
  275. endif
  276. ifeq ($(FULL_TARGET),i386-os2)
  277. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  278. endif
  279. ifeq ($(FULL_TARGET),i386-freebsd)
  280. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  281. endif
  282. ifeq ($(FULL_TARGET),i386-beos)
  283. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  284. endif
  285. ifeq ($(FULL_TARGET),i386-haiku)
  286. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  287. endif
  288. ifeq ($(FULL_TARGET),i386-netbsd)
  289. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  290. endif
  291. ifeq ($(FULL_TARGET),i386-solaris)
  292. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  293. endif
  294. ifeq ($(FULL_TARGET),i386-qnx)
  295. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  296. endif
  297. ifeq ($(FULL_TARGET),i386-netware)
  298. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  299. endif
  300. ifeq ($(FULL_TARGET),i386-openbsd)
  301. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  302. endif
  303. ifeq ($(FULL_TARGET),i386-wdosx)
  304. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  305. endif
  306. ifeq ($(FULL_TARGET),i386-darwin)
  307. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  308. endif
  309. ifeq ($(FULL_TARGET),i386-emx)
  310. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  311. endif
  312. ifeq ($(FULL_TARGET),i386-watcom)
  313. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  314. endif
  315. ifeq ($(FULL_TARGET),i386-netwlibc)
  316. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  317. endif
  318. ifeq ($(FULL_TARGET),i386-wince)
  319. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  320. endif
  321. ifeq ($(FULL_TARGET),i386-embedded)
  322. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  323. endif
  324. ifeq ($(FULL_TARGET),i386-symbian)
  325. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  326. endif
  327. ifeq ($(FULL_TARGET),i386-nativent)
  328. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  329. endif
  330. ifeq ($(FULL_TARGET),m68k-linux)
  331. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  332. endif
  333. ifeq ($(FULL_TARGET),m68k-freebsd)
  334. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  335. endif
  336. ifeq ($(FULL_TARGET),m68k-netbsd)
  337. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  338. endif
  339. ifeq ($(FULL_TARGET),m68k-amiga)
  340. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  341. endif
  342. ifeq ($(FULL_TARGET),m68k-atari)
  343. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  344. endif
  345. ifeq ($(FULL_TARGET),m68k-openbsd)
  346. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  347. endif
  348. ifeq ($(FULL_TARGET),m68k-palmos)
  349. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  350. endif
  351. ifeq ($(FULL_TARGET),m68k-embedded)
  352. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  353. endif
  354. ifeq ($(FULL_TARGET),powerpc-linux)
  355. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  356. endif
  357. ifeq ($(FULL_TARGET),powerpc-netbsd)
  358. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  359. endif
  360. ifeq ($(FULL_TARGET),powerpc-amiga)
  361. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  362. endif
  363. ifeq ($(FULL_TARGET),powerpc-macos)
  364. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  365. endif
  366. ifeq ($(FULL_TARGET),powerpc-darwin)
  367. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  368. endif
  369. ifeq ($(FULL_TARGET),powerpc-morphos)
  370. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  371. endif
  372. ifeq ($(FULL_TARGET),powerpc-embedded)
  373. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  374. endif
  375. ifeq ($(FULL_TARGET),sparc-linux)
  376. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  377. endif
  378. ifeq ($(FULL_TARGET),sparc-netbsd)
  379. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  380. endif
  381. ifeq ($(FULL_TARGET),sparc-solaris)
  382. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  383. endif
  384. ifeq ($(FULL_TARGET),sparc-embedded)
  385. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  386. endif
  387. ifeq ($(FULL_TARGET),x86_64-linux)
  388. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  389. endif
  390. ifeq ($(FULL_TARGET),x86_64-freebsd)
  391. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  392. endif
  393. ifeq ($(FULL_TARGET),x86_64-solaris)
  394. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  395. endif
  396. ifeq ($(FULL_TARGET),x86_64-darwin)
  397. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  398. endif
  399. ifeq ($(FULL_TARGET),x86_64-win64)
  400. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST) prepup
  401. endif
  402. ifeq ($(FULL_TARGET),x86_64-embedded)
  403. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  404. endif
  405. ifeq ($(FULL_TARGET),arm-linux)
  406. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  407. endif
  408. ifeq ($(FULL_TARGET),arm-palmos)
  409. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  410. endif
  411. ifeq ($(FULL_TARGET),arm-darwin)
  412. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  413. endif
  414. ifeq ($(FULL_TARGET),arm-wince)
  415. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  416. endif
  417. ifeq ($(FULL_TARGET),arm-gba)
  418. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  419. endif
  420. ifeq ($(FULL_TARGET),arm-nds)
  421. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  422. endif
  423. ifeq ($(FULL_TARGET),arm-embedded)
  424. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  425. endif
  426. ifeq ($(FULL_TARGET),arm-symbian)
  427. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  428. endif
  429. ifeq ($(FULL_TARGET),powerpc64-linux)
  430. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  431. endif
  432. ifeq ($(FULL_TARGET),powerpc64-darwin)
  433. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  434. endif
  435. ifeq ($(FULL_TARGET),powerpc64-embedded)
  436. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  437. endif
  438. ifeq ($(FULL_TARGET),avr-embedded)
  439. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  440. endif
  441. ifeq ($(FULL_TARGET),armeb-linux)
  442. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  443. endif
  444. ifeq ($(FULL_TARGET),armeb-embedded)
  445. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  446. endif
  447. ifeq ($(FULL_TARGET),mipsel-linux)
  448. override TARGET_PROGRAMS+=dotest fptime fail testfail digest $(DBDIGEST)
  449. endif
  450. ifeq ($(FULL_TARGET),i386-linux)
  451. override CLEAN_PROGRAMS+=dbdigest
  452. endif
  453. ifeq ($(FULL_TARGET),i386-go32v2)
  454. override CLEAN_PROGRAMS+=dbdigest
  455. endif
  456. ifeq ($(FULL_TARGET),i386-win32)
  457. override CLEAN_PROGRAMS+=dbdigest
  458. endif
  459. ifeq ($(FULL_TARGET),i386-os2)
  460. override CLEAN_PROGRAMS+=dbdigest
  461. endif
  462. ifeq ($(FULL_TARGET),i386-freebsd)
  463. override CLEAN_PROGRAMS+=dbdigest
  464. endif
  465. ifeq ($(FULL_TARGET),i386-beos)
  466. override CLEAN_PROGRAMS+=dbdigest
  467. endif
  468. ifeq ($(FULL_TARGET),i386-haiku)
  469. override CLEAN_PROGRAMS+=dbdigest
  470. endif
  471. ifeq ($(FULL_TARGET),i386-netbsd)
  472. override CLEAN_PROGRAMS+=dbdigest
  473. endif
  474. ifeq ($(FULL_TARGET),i386-solaris)
  475. override CLEAN_PROGRAMS+=dbdigest
  476. endif
  477. ifeq ($(FULL_TARGET),i386-qnx)
  478. override CLEAN_PROGRAMS+=dbdigest
  479. endif
  480. ifeq ($(FULL_TARGET),i386-netware)
  481. override CLEAN_PROGRAMS+=dbdigest
  482. endif
  483. ifeq ($(FULL_TARGET),i386-openbsd)
  484. override CLEAN_PROGRAMS+=dbdigest
  485. endif
  486. ifeq ($(FULL_TARGET),i386-wdosx)
  487. override CLEAN_PROGRAMS+=dbdigest
  488. endif
  489. ifeq ($(FULL_TARGET),i386-darwin)
  490. override CLEAN_PROGRAMS+=dbdigest
  491. endif
  492. ifeq ($(FULL_TARGET),i386-emx)
  493. override CLEAN_PROGRAMS+=dbdigest
  494. endif
  495. ifeq ($(FULL_TARGET),i386-watcom)
  496. override CLEAN_PROGRAMS+=dbdigest
  497. endif
  498. ifeq ($(FULL_TARGET),i386-netwlibc)
  499. override CLEAN_PROGRAMS+=dbdigest
  500. endif
  501. ifeq ($(FULL_TARGET),i386-wince)
  502. override CLEAN_PROGRAMS+=dbdigest
  503. endif
  504. ifeq ($(FULL_TARGET),i386-embedded)
  505. override CLEAN_PROGRAMS+=dbdigest
  506. endif
  507. ifeq ($(FULL_TARGET),i386-symbian)
  508. override CLEAN_PROGRAMS+=dbdigest
  509. endif
  510. ifeq ($(FULL_TARGET),i386-nativent)
  511. override CLEAN_PROGRAMS+=dbdigest
  512. endif
  513. ifeq ($(FULL_TARGET),m68k-linux)
  514. override CLEAN_PROGRAMS+=dbdigest
  515. endif
  516. ifeq ($(FULL_TARGET),m68k-freebsd)
  517. override CLEAN_PROGRAMS+=dbdigest
  518. endif
  519. ifeq ($(FULL_TARGET),m68k-netbsd)
  520. override CLEAN_PROGRAMS+=dbdigest
  521. endif
  522. ifeq ($(FULL_TARGET),m68k-amiga)
  523. override CLEAN_PROGRAMS+=dbdigest
  524. endif
  525. ifeq ($(FULL_TARGET),m68k-atari)
  526. override CLEAN_PROGRAMS+=dbdigest
  527. endif
  528. ifeq ($(FULL_TARGET),m68k-openbsd)
  529. override CLEAN_PROGRAMS+=dbdigest
  530. endif
  531. ifeq ($(FULL_TARGET),m68k-palmos)
  532. override CLEAN_PROGRAMS+=dbdigest
  533. endif
  534. ifeq ($(FULL_TARGET),m68k-embedded)
  535. override CLEAN_PROGRAMS+=dbdigest
  536. endif
  537. ifeq ($(FULL_TARGET),powerpc-linux)
  538. override CLEAN_PROGRAMS+=dbdigest
  539. endif
  540. ifeq ($(FULL_TARGET),powerpc-netbsd)
  541. override CLEAN_PROGRAMS+=dbdigest
  542. endif
  543. ifeq ($(FULL_TARGET),powerpc-amiga)
  544. override CLEAN_PROGRAMS+=dbdigest
  545. endif
  546. ifeq ($(FULL_TARGET),powerpc-macos)
  547. override CLEAN_PROGRAMS+=dbdigest
  548. endif
  549. ifeq ($(FULL_TARGET),powerpc-darwin)
  550. override CLEAN_PROGRAMS+=dbdigest
  551. endif
  552. ifeq ($(FULL_TARGET),powerpc-morphos)
  553. override CLEAN_PROGRAMS+=dbdigest
  554. endif
  555. ifeq ($(FULL_TARGET),powerpc-embedded)
  556. override CLEAN_PROGRAMS+=dbdigest
  557. endif
  558. ifeq ($(FULL_TARGET),sparc-linux)
  559. override CLEAN_PROGRAMS+=dbdigest
  560. endif
  561. ifeq ($(FULL_TARGET),sparc-netbsd)
  562. override CLEAN_PROGRAMS+=dbdigest
  563. endif
  564. ifeq ($(FULL_TARGET),sparc-solaris)
  565. override CLEAN_PROGRAMS+=dbdigest
  566. endif
  567. ifeq ($(FULL_TARGET),sparc-embedded)
  568. override CLEAN_PROGRAMS+=dbdigest
  569. endif
  570. ifeq ($(FULL_TARGET),x86_64-linux)
  571. override CLEAN_PROGRAMS+=dbdigest
  572. endif
  573. ifeq ($(FULL_TARGET),x86_64-freebsd)
  574. override CLEAN_PROGRAMS+=dbdigest
  575. endif
  576. ifeq ($(FULL_TARGET),x86_64-solaris)
  577. override CLEAN_PROGRAMS+=dbdigest
  578. endif
  579. ifeq ($(FULL_TARGET),x86_64-darwin)
  580. override CLEAN_PROGRAMS+=dbdigest
  581. endif
  582. ifeq ($(FULL_TARGET),x86_64-win64)
  583. override CLEAN_PROGRAMS+=dbdigest
  584. endif
  585. ifeq ($(FULL_TARGET),x86_64-embedded)
  586. override CLEAN_PROGRAMS+=dbdigest
  587. endif
  588. ifeq ($(FULL_TARGET),arm-linux)
  589. override CLEAN_PROGRAMS+=dbdigest
  590. endif
  591. ifeq ($(FULL_TARGET),arm-palmos)
  592. override CLEAN_PROGRAMS+=dbdigest
  593. endif
  594. ifeq ($(FULL_TARGET),arm-darwin)
  595. override CLEAN_PROGRAMS+=dbdigest
  596. endif
  597. ifeq ($(FULL_TARGET),arm-wince)
  598. override CLEAN_PROGRAMS+=dbdigest
  599. endif
  600. ifeq ($(FULL_TARGET),arm-gba)
  601. override CLEAN_PROGRAMS+=dbdigest
  602. endif
  603. ifeq ($(FULL_TARGET),arm-nds)
  604. override CLEAN_PROGRAMS+=dbdigest
  605. endif
  606. ifeq ($(FULL_TARGET),arm-embedded)
  607. override CLEAN_PROGRAMS+=dbdigest
  608. endif
  609. ifeq ($(FULL_TARGET),arm-symbian)
  610. override CLEAN_PROGRAMS+=dbdigest
  611. endif
  612. ifeq ($(FULL_TARGET),powerpc64-linux)
  613. override CLEAN_PROGRAMS+=dbdigest
  614. endif
  615. ifeq ($(FULL_TARGET),powerpc64-darwin)
  616. override CLEAN_PROGRAMS+=dbdigest
  617. endif
  618. ifeq ($(FULL_TARGET),powerpc64-embedded)
  619. override CLEAN_PROGRAMS+=dbdigest
  620. endif
  621. ifeq ($(FULL_TARGET),avr-embedded)
  622. override CLEAN_PROGRAMS+=dbdigest
  623. endif
  624. ifeq ($(FULL_TARGET),armeb-linux)
  625. override CLEAN_PROGRAMS+=dbdigest
  626. endif
  627. ifeq ($(FULL_TARGET),armeb-embedded)
  628. override CLEAN_PROGRAMS+=dbdigest
  629. endif
  630. ifeq ($(FULL_TARGET),mipsel-linux)
  631. override CLEAN_PROGRAMS+=dbdigest
  632. endif
  633. override INSTALL_FPCPACKAGE=y
  634. ifdef REQUIRE_UNITSDIR
  635. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  636. endif
  637. ifdef REQUIRE_PACKAGESDIR
  638. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  639. endif
  640. ifdef ZIPINSTALL
  641. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  642. UNIXHier=1
  643. endif
  644. else
  645. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  646. UNIXHier=1
  647. endif
  648. endif
  649. ifndef INSTALL_PREFIX
  650. ifdef PREFIX
  651. INSTALL_PREFIX=$(PREFIX)
  652. endif
  653. endif
  654. ifndef INSTALL_PREFIX
  655. ifdef UNIXHier
  656. INSTALL_PREFIX=/usr/local
  657. else
  658. ifdef INSTALL_FPCPACKAGE
  659. INSTALL_BASEDIR:=/pp
  660. else
  661. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  662. endif
  663. endif
  664. endif
  665. export INSTALL_PREFIX
  666. ifdef INSTALL_FPCSUBDIR
  667. export INSTALL_FPCSUBDIR
  668. endif
  669. ifndef DIST_DESTDIR
  670. DIST_DESTDIR:=$(BASEDIR)
  671. endif
  672. export DIST_DESTDIR
  673. ifndef COMPILER_UNITTARGETDIR
  674. ifdef PACKAGEDIR_MAIN
  675. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  676. else
  677. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  678. endif
  679. endif
  680. ifndef COMPILER_TARGETDIR
  681. COMPILER_TARGETDIR=.
  682. endif
  683. ifndef INSTALL_BASEDIR
  684. ifdef UNIXHier
  685. ifdef INSTALL_FPCPACKAGE
  686. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  687. else
  688. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  689. endif
  690. else
  691. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  692. endif
  693. endif
  694. ifndef INSTALL_BINDIR
  695. ifdef UNIXHier
  696. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  697. else
  698. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  699. ifdef INSTALL_FPCPACKAGE
  700. ifdef CROSSCOMPILE
  701. ifdef CROSSINSTALL
  702. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  703. else
  704. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  705. endif
  706. else
  707. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  708. endif
  709. endif
  710. endif
  711. endif
  712. ifndef INSTALL_UNITDIR
  713. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  714. ifdef INSTALL_FPCPACKAGE
  715. ifdef PACKAGE_NAME
  716. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  717. endif
  718. endif
  719. endif
  720. ifndef INSTALL_LIBDIR
  721. ifdef UNIXHier
  722. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  723. else
  724. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  725. endif
  726. endif
  727. ifndef INSTALL_SOURCEDIR
  728. ifdef UNIXHier
  729. ifdef BSDhier
  730. SRCPREFIXDIR=share/src
  731. else
  732. ifdef linuxHier
  733. SRCPREFIXDIR=share/src
  734. else
  735. SRCPREFIXDIR=src
  736. endif
  737. endif
  738. ifdef INSTALL_FPCPACKAGE
  739. ifdef INSTALL_FPCSUBDIR
  740. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  741. else
  742. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  743. endif
  744. else
  745. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  746. endif
  747. else
  748. ifdef INSTALL_FPCPACKAGE
  749. ifdef INSTALL_FPCSUBDIR
  750. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  751. else
  752. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  753. endif
  754. else
  755. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  756. endif
  757. endif
  758. endif
  759. ifndef INSTALL_DOCDIR
  760. ifdef UNIXHier
  761. ifdef BSDhier
  762. DOCPREFIXDIR=share/doc
  763. else
  764. ifdef linuxHier
  765. DOCPREFIXDIR=share/doc
  766. else
  767. DOCPREFIXDIR=doc
  768. endif
  769. endif
  770. ifdef INSTALL_FPCPACKAGE
  771. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  772. else
  773. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  774. endif
  775. else
  776. ifdef INSTALL_FPCPACKAGE
  777. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  778. else
  779. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  780. endif
  781. endif
  782. endif
  783. ifndef INSTALL_EXAMPLEDIR
  784. ifdef UNIXHier
  785. ifdef INSTALL_FPCPACKAGE
  786. ifdef BSDhier
  787. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  788. else
  789. ifdef linuxHier
  790. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  791. else
  792. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  793. endif
  794. endif
  795. else
  796. ifdef BSDhier
  797. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  798. else
  799. ifdef linuxHier
  800. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  801. else
  802. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  803. endif
  804. endif
  805. endif
  806. else
  807. ifdef INSTALL_FPCPACKAGE
  808. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  809. else
  810. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  811. endif
  812. endif
  813. endif
  814. ifndef INSTALL_DATADIR
  815. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  816. endif
  817. ifndef INSTALL_SHAREDDIR
  818. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  819. endif
  820. ifdef CROSSCOMPILE
  821. ifndef CROSSBINDIR
  822. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  823. ifeq ($(CROSSBINDIR),)
  824. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  825. endif
  826. endif
  827. else
  828. CROSSBINDIR=
  829. endif
  830. BATCHEXT=.bat
  831. LOADEREXT=.as
  832. EXEEXT=.exe
  833. PPLEXT=.ppl
  834. PPUEXT=.ppu
  835. OEXT=.o
  836. ASMEXT=.s
  837. SMARTEXT=.sl
  838. STATICLIBEXT=.a
  839. SHAREDLIBEXT=.so
  840. SHAREDLIBPREFIX=libfp
  841. STATICLIBPREFIX=libp
  842. IMPORTLIBPREFIX=libimp
  843. RSTEXT=.rst
  844. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  845. ifeq ($(OS_TARGET),go32v1)
  846. STATICLIBPREFIX=
  847. SHORTSUFFIX=v1
  848. endif
  849. ifeq ($(OS_TARGET),go32v2)
  850. STATICLIBPREFIX=
  851. SHORTSUFFIX=dos
  852. IMPORTLIBPREFIX=
  853. endif
  854. ifeq ($(OS_TARGET),watcom)
  855. STATICLIBPREFIX=
  856. OEXT=.obj
  857. ASMEXT=.asm
  858. SHAREDLIBEXT=.dll
  859. SHORTSUFFIX=wat
  860. IMPORTLIBPREFIX=
  861. endif
  862. ifeq ($(OS_TARGET),linux)
  863. BATCHEXT=.sh
  864. EXEEXT=
  865. HASSHAREDLIB=1
  866. SHORTSUFFIX=lnx
  867. endif
  868. ifeq ($(OS_TARGET),freebsd)
  869. BATCHEXT=.sh
  870. EXEEXT=
  871. HASSHAREDLIB=1
  872. SHORTSUFFIX=fbs
  873. endif
  874. ifeq ($(OS_TARGET),netbsd)
  875. BATCHEXT=.sh
  876. EXEEXT=
  877. HASSHAREDLIB=1
  878. SHORTSUFFIX=nbs
  879. endif
  880. ifeq ($(OS_TARGET),openbsd)
  881. BATCHEXT=.sh
  882. EXEEXT=
  883. HASSHAREDLIB=1
  884. SHORTSUFFIX=obs
  885. endif
  886. ifeq ($(OS_TARGET),win32)
  887. SHAREDLIBEXT=.dll
  888. SHORTSUFFIX=w32
  889. endif
  890. ifeq ($(OS_TARGET),os2)
  891. BATCHEXT=.cmd
  892. AOUTEXT=.out
  893. STATICLIBPREFIX=
  894. SHAREDLIBEXT=.dll
  895. SHORTSUFFIX=os2
  896. ECHO=echo
  897. IMPORTLIBPREFIX=
  898. endif
  899. ifeq ($(OS_TARGET),emx)
  900. BATCHEXT=.cmd
  901. AOUTEXT=.out
  902. STATICLIBPREFIX=
  903. SHAREDLIBEXT=.dll
  904. SHORTSUFFIX=emx
  905. ECHO=echo
  906. IMPORTLIBPREFIX=
  907. endif
  908. ifeq ($(OS_TARGET),amiga)
  909. EXEEXT=
  910. SHAREDLIBEXT=.library
  911. SHORTSUFFIX=amg
  912. endif
  913. ifeq ($(OS_TARGET),morphos)
  914. EXEEXT=
  915. SHAREDLIBEXT=.library
  916. SHORTSUFFIX=mos
  917. endif
  918. ifeq ($(OS_TARGET),atari)
  919. EXEEXT=.ttp
  920. SHORTSUFFIX=ata
  921. endif
  922. ifeq ($(OS_TARGET),beos)
  923. BATCHEXT=.sh
  924. EXEEXT=
  925. SHORTSUFFIX=be
  926. endif
  927. ifeq ($(OS_TARGET),haiku)
  928. BATCHEXT=.sh
  929. EXEEXT=
  930. SHORTSUFFIX=hai
  931. endif
  932. ifeq ($(OS_TARGET),solaris)
  933. BATCHEXT=.sh
  934. EXEEXT=
  935. SHORTSUFFIX=sun
  936. endif
  937. ifeq ($(OS_TARGET),qnx)
  938. BATCHEXT=.sh
  939. EXEEXT=
  940. SHORTSUFFIX=qnx
  941. endif
  942. ifeq ($(OS_TARGET),netware)
  943. EXEEXT=.nlm
  944. STATICLIBPREFIX=
  945. SHORTSUFFIX=nw
  946. IMPORTLIBPREFIX=imp
  947. endif
  948. ifeq ($(OS_TARGET),netwlibc)
  949. EXEEXT=.nlm
  950. STATICLIBPREFIX=
  951. SHORTSUFFIX=nwl
  952. IMPORTLIBPREFIX=imp
  953. endif
  954. ifeq ($(OS_TARGET),macos)
  955. BATCHEXT=
  956. EXEEXT=
  957. DEBUGSYMEXT=.xcoff
  958. SHORTSUFFIX=mac
  959. IMPORTLIBPREFIX=imp
  960. endif
  961. ifeq ($(OS_TARGET),darwin)
  962. BATCHEXT=.sh
  963. EXEEXT=
  964. HASSHAREDLIB=1
  965. SHORTSUFFIX=dwn
  966. endif
  967. ifeq ($(OS_TARGET),gba)
  968. EXEEXT=.gba
  969. SHAREDLIBEXT=.so
  970. SHORTSUFFIX=gba
  971. endif
  972. ifeq ($(OS_TARGET),symbian)
  973. SHAREDLIBEXT=.dll
  974. SHORTSUFFIX=symbian
  975. endif
  976. ifeq ($(OS_TARGET),NativeNT)
  977. SHAREDLIBEXT=.dll
  978. SHORTSUFFIX=nativent
  979. endif
  980. else
  981. ifeq ($(OS_TARGET),go32v1)
  982. PPUEXT=.pp1
  983. OEXT=.o1
  984. ASMEXT=.s1
  985. SMARTEXT=.sl1
  986. STATICLIBEXT=.a1
  987. SHAREDLIBEXT=.so1
  988. STATICLIBPREFIX=
  989. SHORTSUFFIX=v1
  990. IMPORTLIBPREFIX=
  991. endif
  992. ifeq ($(OS_TARGET),go32v2)
  993. STATICLIBPREFIX=
  994. SHORTSUFFIX=dos
  995. IMPORTLIBPREFIX=
  996. endif
  997. ifeq ($(OS_TARGET),watcom)
  998. STATICLIBPREFIX=
  999. SHORTSUFFIX=wat
  1000. IMPORTLIBPREFIX=
  1001. endif
  1002. ifeq ($(OS_TARGET),linux)
  1003. BATCHEXT=.sh
  1004. EXEEXT=
  1005. HASSHAREDLIB=1
  1006. SHORTSUFFIX=lnx
  1007. endif
  1008. ifeq ($(OS_TARGET),freebsd)
  1009. BATCHEXT=.sh
  1010. EXEEXT=
  1011. HASSHAREDLIB=1
  1012. SHORTSUFFIX=fbs
  1013. endif
  1014. ifeq ($(OS_TARGET),netbsd)
  1015. BATCHEXT=.sh
  1016. EXEEXT=
  1017. HASSHAREDLIB=1
  1018. SHORTSUFFIX=nbs
  1019. endif
  1020. ifeq ($(OS_TARGET),openbsd)
  1021. BATCHEXT=.sh
  1022. EXEEXT=
  1023. HASSHAREDLIB=1
  1024. SHORTSUFFIX=obs
  1025. endif
  1026. ifeq ($(OS_TARGET),win32)
  1027. PPUEXT=.ppw
  1028. OEXT=.ow
  1029. ASMEXT=.sw
  1030. SMARTEXT=.slw
  1031. STATICLIBEXT=.aw
  1032. SHAREDLIBEXT=.dll
  1033. SHORTSUFFIX=w32
  1034. endif
  1035. ifeq ($(OS_TARGET),os2)
  1036. BATCHEXT=.cmd
  1037. PPUEXT=.ppo
  1038. ASMEXT=.so2
  1039. OEXT=.oo2
  1040. AOUTEXT=.out
  1041. SMARTEXT=.sl2
  1042. STATICLIBPREFIX=
  1043. STATICLIBEXT=.ao2
  1044. SHAREDLIBEXT=.dll
  1045. SHORTSUFFIX=os2
  1046. ECHO=echo
  1047. IMPORTLIBPREFIX=
  1048. endif
  1049. ifeq ($(OS_TARGET),amiga)
  1050. EXEEXT=
  1051. PPUEXT=.ppu
  1052. ASMEXT=.s
  1053. OEXT=.o
  1054. SMARTEXT=.sl
  1055. STATICLIBEXT=.a
  1056. SHAREDLIBEXT=.library
  1057. SHORTSUFFIX=amg
  1058. endif
  1059. ifeq ($(OS_TARGET),atari)
  1060. PPUEXT=.ppu
  1061. ASMEXT=.s
  1062. OEXT=.o
  1063. SMARTEXT=.sl
  1064. STATICLIBEXT=.a
  1065. EXEEXT=.ttp
  1066. SHORTSUFFIX=ata
  1067. endif
  1068. ifeq ($(OS_TARGET),beos)
  1069. BATCHEXT=.sh
  1070. PPUEXT=.ppu
  1071. ASMEXT=.s
  1072. OEXT=.o
  1073. SMARTEXT=.sl
  1074. STATICLIBEXT=.a
  1075. EXEEXT=
  1076. SHORTSUFFIX=be
  1077. endif
  1078. ifeq ($(OS_TARGET),solaris)
  1079. BATCHEXT=.sh
  1080. PPUEXT=.ppu
  1081. ASMEXT=.s
  1082. OEXT=.o
  1083. SMARTEXT=.sl
  1084. STATICLIBEXT=.a
  1085. EXEEXT=
  1086. SHORTSUFFIX=sun
  1087. endif
  1088. ifeq ($(OS_TARGET),qnx)
  1089. BATCHEXT=.sh
  1090. PPUEXT=.ppu
  1091. ASMEXT=.s
  1092. OEXT=.o
  1093. SMARTEXT=.sl
  1094. STATICLIBEXT=.a
  1095. EXEEXT=
  1096. SHORTSUFFIX=qnx
  1097. endif
  1098. ifeq ($(OS_TARGET),netware)
  1099. STATICLIBPREFIX=
  1100. PPUEXT=.ppu
  1101. OEXT=.o
  1102. ASMEXT=.s
  1103. SMARTEXT=.sl
  1104. STATICLIBEXT=.a
  1105. SHAREDLIBEXT=.nlm
  1106. EXEEXT=.nlm
  1107. SHORTSUFFIX=nw
  1108. IMPORTLIBPREFIX=imp
  1109. endif
  1110. ifeq ($(OS_TARGET),netwlibc)
  1111. STATICLIBPREFIX=
  1112. PPUEXT=.ppu
  1113. OEXT=.o
  1114. ASMEXT=.s
  1115. SMARTEXT=.sl
  1116. STATICLIBEXT=.a
  1117. SHAREDLIBEXT=.nlm
  1118. EXEEXT=.nlm
  1119. SHORTSUFFIX=nwl
  1120. IMPORTLIBPREFIX=imp
  1121. endif
  1122. ifeq ($(OS_TARGET),macos)
  1123. BATCHEXT=
  1124. PPUEXT=.ppu
  1125. ASMEXT=.s
  1126. OEXT=.o
  1127. SMARTEXT=.sl
  1128. STATICLIBEXT=.a
  1129. EXEEXT=
  1130. DEBUGSYMEXT=.xcoff
  1131. SHORTSUFFIX=mac
  1132. IMPORTLIBPREFIX=imp
  1133. endif
  1134. endif
  1135. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  1136. FPCMADE=fpcmade.$(SHORTSUFFIX)
  1137. ZIPSUFFIX=$(SHORTSUFFIX)
  1138. ZIPCROSSPREFIX=
  1139. ZIPSOURCESUFFIX=src
  1140. ZIPEXAMPLESUFFIX=exm
  1141. else
  1142. FPCMADE=fpcmade.$(TARGETSUFFIX)
  1143. ZIPSOURCESUFFIX=.source
  1144. ZIPEXAMPLESUFFIX=.examples
  1145. ifdef CROSSCOMPILE
  1146. ZIPSUFFIX=.$(SOURCESUFFIX)
  1147. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  1148. else
  1149. ZIPSUFFIX=.$(TARGETSUFFIX)
  1150. ZIPCROSSPREFIX=
  1151. endif
  1152. endif
  1153. ifndef ECHO
  1154. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  1155. ifeq ($(ECHO),)
  1156. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  1157. ifeq ($(ECHO),)
  1158. ECHO= __missing_command_ECHO
  1159. else
  1160. ECHO:=$(firstword $(ECHO))
  1161. endif
  1162. else
  1163. ECHO:=$(firstword $(ECHO))
  1164. endif
  1165. endif
  1166. export ECHO
  1167. ifndef DATE
  1168. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  1169. ifeq ($(DATE),)
  1170. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  1171. ifeq ($(DATE),)
  1172. DATE= __missing_command_DATE
  1173. else
  1174. DATE:=$(firstword $(DATE))
  1175. endif
  1176. else
  1177. DATE:=$(firstword $(DATE))
  1178. endif
  1179. endif
  1180. export DATE
  1181. ifndef GINSTALL
  1182. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  1183. ifeq ($(GINSTALL),)
  1184. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  1185. ifeq ($(GINSTALL),)
  1186. GINSTALL= __missing_command_GINSTALL
  1187. else
  1188. GINSTALL:=$(firstword $(GINSTALL))
  1189. endif
  1190. else
  1191. GINSTALL:=$(firstword $(GINSTALL))
  1192. endif
  1193. endif
  1194. export GINSTALL
  1195. ifndef CPPROG
  1196. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  1197. ifeq ($(CPPROG),)
  1198. CPPROG= __missing_command_CPPROG
  1199. else
  1200. CPPROG:=$(firstword $(CPPROG))
  1201. endif
  1202. endif
  1203. export CPPROG
  1204. ifndef RMPROG
  1205. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  1206. ifeq ($(RMPROG),)
  1207. RMPROG= __missing_command_RMPROG
  1208. else
  1209. RMPROG:=$(firstword $(RMPROG))
  1210. endif
  1211. endif
  1212. export RMPROG
  1213. ifndef MVPROG
  1214. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  1215. ifeq ($(MVPROG),)
  1216. MVPROG= __missing_command_MVPROG
  1217. else
  1218. MVPROG:=$(firstword $(MVPROG))
  1219. endif
  1220. endif
  1221. export MVPROG
  1222. ifndef MKDIRPROG
  1223. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1224. ifeq ($(MKDIRPROG),)
  1225. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  1226. ifeq ($(MKDIRPROG),)
  1227. MKDIRPROG= __missing_command_MKDIRPROG
  1228. else
  1229. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1230. endif
  1231. else
  1232. MKDIRPROG:=$(firstword $(MKDIRPROG))
  1233. endif
  1234. endif
  1235. export MKDIRPROG
  1236. ifndef ECHOREDIR
  1237. ifndef inUnix
  1238. ECHOREDIR=echo
  1239. else
  1240. ECHOREDIR=$(ECHO)
  1241. endif
  1242. endif
  1243. ifndef COPY
  1244. COPY:=$(CPPROG) -fp
  1245. endif
  1246. ifndef COPYTREE
  1247. COPYTREE:=$(CPPROG) -Rfp
  1248. endif
  1249. ifndef MKDIRTREE
  1250. MKDIRTREE:=$(MKDIRPROG) -p
  1251. endif
  1252. ifndef MOVE
  1253. MOVE:=$(MVPROG) -f
  1254. endif
  1255. ifndef DEL
  1256. DEL:=$(RMPROG) -f
  1257. endif
  1258. ifndef DELTREE
  1259. DELTREE:=$(RMPROG) -rf
  1260. endif
  1261. ifndef INSTALL
  1262. ifdef inUnix
  1263. INSTALL:=$(GINSTALL) -c -m 644
  1264. else
  1265. INSTALL:=$(COPY)
  1266. endif
  1267. endif
  1268. ifndef INSTALLEXE
  1269. ifdef inUnix
  1270. INSTALLEXE:=$(GINSTALL) -c -m 755
  1271. else
  1272. INSTALLEXE:=$(COPY)
  1273. endif
  1274. endif
  1275. ifndef MKDIR
  1276. MKDIR:=$(GINSTALL) -m 755 -d
  1277. endif
  1278. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  1279. ifndef PPUMOVE
  1280. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  1281. ifeq ($(PPUMOVE),)
  1282. PPUMOVE= __missing_command_PPUMOVE
  1283. else
  1284. PPUMOVE:=$(firstword $(PPUMOVE))
  1285. endif
  1286. endif
  1287. export PPUMOVE
  1288. ifndef FPCMAKE
  1289. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  1290. ifeq ($(FPCMAKE),)
  1291. FPCMAKE= __missing_command_FPCMAKE
  1292. else
  1293. FPCMAKE:=$(firstword $(FPCMAKE))
  1294. endif
  1295. endif
  1296. export FPCMAKE
  1297. ifndef ZIPPROG
  1298. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  1299. ifeq ($(ZIPPROG),)
  1300. ZIPPROG= __missing_command_ZIPPROG
  1301. else
  1302. ZIPPROG:=$(firstword $(ZIPPROG))
  1303. endif
  1304. endif
  1305. export ZIPPROG
  1306. ifndef TARPROG
  1307. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  1308. ifeq ($(TARPROG),)
  1309. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  1310. ifeq ($(TARPROG),)
  1311. TARPROG= __missing_command_TARPROG
  1312. else
  1313. TARPROG:=$(firstword $(TARPROG))
  1314. endif
  1315. else
  1316. TARPROG:=$(firstword $(TARPROG))
  1317. endif
  1318. endif
  1319. export TARPROG
  1320. ASNAME=$(BINUTILSPREFIX)as
  1321. LDNAME=$(BINUTILSPREFIX)ld
  1322. ARNAME=$(BINUTILSPREFIX)ar
  1323. RCNAME=$(BINUTILSPREFIX)rc
  1324. ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
  1325. ifeq ($(OS_TARGET),win32)
  1326. ifeq ($(CROSSBINDIR),)
  1327. ASNAME=asw
  1328. LDNAME=ldw
  1329. ARNAME=arw
  1330. endif
  1331. endif
  1332. endif
  1333. ifndef ASPROG
  1334. ifdef CROSSBINDIR
  1335. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  1336. else
  1337. ASPROG=$(ASNAME)
  1338. endif
  1339. endif
  1340. ifndef LDPROG
  1341. ifdef CROSSBINDIR
  1342. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  1343. else
  1344. LDPROG=$(LDNAME)
  1345. endif
  1346. endif
  1347. ifndef RCPROG
  1348. ifdef CROSSBINDIR
  1349. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  1350. else
  1351. RCPROG=$(RCNAME)
  1352. endif
  1353. endif
  1354. ifndef ARPROG
  1355. ifdef CROSSBINDIR
  1356. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  1357. else
  1358. ARPROG=$(ARNAME)
  1359. endif
  1360. endif
  1361. AS=$(ASPROG)
  1362. LD=$(LDPROG)
  1363. RC=$(RCPROG)
  1364. AR=$(ARPROG)
  1365. PPAS=ppas$(SRCBATCHEXT)
  1366. ifdef inUnix
  1367. LDCONFIG=ldconfig
  1368. else
  1369. LDCONFIG=
  1370. endif
  1371. ifdef DATE
  1372. DATESTR:=$(shell $(DATE) +%Y%m%d)
  1373. else
  1374. DATESTR=
  1375. endif
  1376. ifndef UPXPROG
  1377. ifeq ($(OS_TARGET),go32v2)
  1378. UPXPROG:=1
  1379. endif
  1380. ifeq ($(OS_TARGET),win32)
  1381. UPXPROG:=1
  1382. endif
  1383. ifdef UPXPROG
  1384. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
  1385. ifeq ($(UPXPROG),)
  1386. UPXPROG=
  1387. else
  1388. UPXPROG:=$(firstword $(UPXPROG))
  1389. endif
  1390. else
  1391. UPXPROG=
  1392. endif
  1393. endif
  1394. export UPXPROG
  1395. ZIPOPT=-9
  1396. ZIPEXT=.zip
  1397. ifeq ($(USETAR),bz2)
  1398. TAROPT=vj
  1399. TAREXT=.tar.bz2
  1400. else
  1401. TAROPT=vz
  1402. TAREXT=.tar.gz
  1403. endif
  1404. ifndef NOCPUDEF
  1405. override FPCOPTDEF=$(ARCH)
  1406. endif
  1407. ifneq ($(OS_TARGET),$(OS_SOURCE))
  1408. override FPCOPT+=-T$(OS_TARGET)
  1409. endif
  1410. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  1411. override FPCOPT+=-P$(ARCH)
  1412. endif
  1413. ifeq ($(OS_SOURCE),openbsd)
  1414. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  1415. endif
  1416. ifndef CROSSBOOTSTRAP
  1417. ifneq ($(BINUTILSPREFIX),)
  1418. override FPCOPT+=-XP$(BINUTILSPREFIX)
  1419. endif
  1420. ifneq ($(BINUTILSPREFIX),)
  1421. override FPCOPT+=-Xr$(RLINKPATH)
  1422. endif
  1423. endif
  1424. ifdef UNITDIR
  1425. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  1426. endif
  1427. ifdef LIBDIR
  1428. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  1429. endif
  1430. ifdef OBJDIR
  1431. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  1432. endif
  1433. ifdef INCDIR
  1434. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  1435. endif
  1436. ifdef LINKSMART
  1437. override FPCOPT+=-XX
  1438. endif
  1439. ifdef CREATESMART
  1440. override FPCOPT+=-CX
  1441. endif
  1442. ifdef DEBUG
  1443. override FPCOPT+=-gl
  1444. override FPCOPTDEF+=DEBUG
  1445. endif
  1446. ifdef RELEASE
  1447. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  1448. ifeq ($(CPU_TARGET),i386)
  1449. FPCCPUOPT:=-OG2p3
  1450. endif
  1451. ifeq ($(CPU_TARGET),powerpc)
  1452. FPCCPUOPT:=-O1r
  1453. endif
  1454. else
  1455. FPCCPUOPT:=-O2
  1456. endif
  1457. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  1458. override FPCOPTDEF+=RELEASE
  1459. endif
  1460. ifdef STRIP
  1461. override FPCOPT+=-Xs
  1462. endif
  1463. ifdef OPTIMIZE
  1464. override FPCOPT+=-O2
  1465. endif
  1466. ifdef VERBOSE
  1467. override FPCOPT+=-vwni
  1468. endif
  1469. ifdef COMPILER_OPTIONS
  1470. override FPCOPT+=$(COMPILER_OPTIONS)
  1471. endif
  1472. ifdef COMPILER_UNITDIR
  1473. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  1474. endif
  1475. ifdef COMPILER_LIBRARYDIR
  1476. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  1477. endif
  1478. ifdef COMPILER_OBJECTDIR
  1479. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  1480. endif
  1481. ifdef COMPILER_INCLUDEDIR
  1482. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  1483. endif
  1484. ifdef CROSSBINDIR
  1485. override FPCOPT+=-FD$(CROSSBINDIR)
  1486. endif
  1487. ifdef COMPILER_TARGETDIR
  1488. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  1489. ifeq ($(COMPILER_TARGETDIR),.)
  1490. override TARGETDIRPREFIX=
  1491. else
  1492. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  1493. endif
  1494. endif
  1495. ifdef COMPILER_UNITTARGETDIR
  1496. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  1497. ifeq ($(COMPILER_UNITTARGETDIR),.)
  1498. override UNITTARGETDIRPREFIX=
  1499. else
  1500. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  1501. endif
  1502. else
  1503. ifdef COMPILER_TARGETDIR
  1504. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  1505. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  1506. endif
  1507. endif
  1508. ifdef CREATESHARED
  1509. override FPCOPT+=-Cg
  1510. ifeq ($(CPU_TARGET),i386)
  1511. override FPCOPT+=-Aas
  1512. endif
  1513. endif
  1514. ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
  1515. ifeq ($(OS_TARGET),linux)
  1516. ifeq ($(CPU_TARGET),x86_64)
  1517. override FPCOPT+=-Cg
  1518. endif
  1519. endif
  1520. endif
  1521. ifdef LINKSHARED
  1522. endif
  1523. ifdef OPT
  1524. override FPCOPT+=$(OPT)
  1525. endif
  1526. ifdef FPCOPTDEF
  1527. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  1528. endif
  1529. ifdef CFGFILE
  1530. override FPCOPT+=@$(CFGFILE)
  1531. endif
  1532. ifdef USEENV
  1533. override FPCEXTCMD:=$(FPCOPT)
  1534. override FPCOPT:=!FPCEXTCMD
  1535. export FPCEXTCMD
  1536. endif
  1537. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  1538. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  1539. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  1540. override ACROSSCOMPILE=1
  1541. endif
  1542. ifdef ACROSSCOMPILE
  1543. override FPCOPT+=$(CROSSOPT)
  1544. endif
  1545. override COMPILER:=$(FPC) $(FPCOPT)
  1546. ifeq (,$(findstring -s ,$(COMPILER)))
  1547. EXECPPAS=
  1548. else
  1549. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  1550. ifdef RUNBATCH
  1551. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  1552. else
  1553. EXECPPAS:=@$(PPAS)
  1554. endif
  1555. endif
  1556. endif
  1557. .PHONY: fpc_exes
  1558. ifndef CROSSINSTALL
  1559. ifneq ($(TARGET_PROGRAMS),)
  1560. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  1561. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  1562. override ALLTARGET+=fpc_exes
  1563. override INSTALLEXEFILES+=$(EXEFILES)
  1564. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  1565. ifeq ($(OS_TARGET),os2)
  1566. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1567. endif
  1568. ifeq ($(OS_TARGET),emx)
  1569. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  1570. endif
  1571. endif
  1572. endif
  1573. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  1574. ifdef TARGET_RSTS
  1575. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  1576. override CLEANRSTFILES+=$(RSTFILES)
  1577. endif
  1578. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  1579. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  1580. @$(ECHOREDIR) Compiled > $(FPCMADE)
  1581. fpc_all: $(FPCMADE)
  1582. fpc_smart:
  1583. $(MAKE) all LINKSMART=1 CREATESMART=1
  1584. fpc_debug:
  1585. $(MAKE) all DEBUG=1
  1586. fpc_release:
  1587. $(MAKE) all RELEASE=1
  1588. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  1589. $(COMPILER_UNITTARGETDIR):
  1590. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  1591. $(COMPILER_TARGETDIR):
  1592. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  1593. %$(PPUEXT): %.pp
  1594. $(COMPILER) $<
  1595. $(EXECPPAS)
  1596. %$(PPUEXT): %.pas
  1597. $(COMPILER) $<
  1598. $(EXECPPAS)
  1599. %$(EXEEXT): %.pp
  1600. $(COMPILER) $<
  1601. $(EXECPPAS)
  1602. %$(EXEEXT): %.pas
  1603. $(COMPILER) $<
  1604. $(EXECPPAS)
  1605. %$(EXEEXT): %.lpr
  1606. $(COMPILER) $<
  1607. $(EXECPPAS)
  1608. %$(EXEEXT): %.dpr
  1609. $(COMPILER) $<
  1610. $(EXECPPAS)
  1611. %.res: %.rc
  1612. windres -i $< -o $@
  1613. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1614. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1615. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1616. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  1617. vpath %.inc $(COMPILER_INCLUDEDIR)
  1618. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  1619. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  1620. .PHONY: fpc_shared
  1621. override INSTALLTARGET+=fpc_shared_install
  1622. ifndef SHARED_LIBVERSION
  1623. SHARED_LIBVERSION=$(FPC_VERSION)
  1624. endif
  1625. ifndef SHARED_LIBNAME
  1626. SHARED_LIBNAME=$(PACKAGE_NAME)
  1627. endif
  1628. ifndef SHARED_FULLNAME
  1629. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  1630. endif
  1631. ifndef SHARED_LIBUNITS
  1632. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  1633. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  1634. endif
  1635. fpc_shared:
  1636. ifdef HASSHAREDLIB
  1637. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  1638. ifneq ($(SHARED_BUILD),n)
  1639. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  1640. endif
  1641. else
  1642. @$(ECHO) Shared Libraries not supported
  1643. endif
  1644. fpc_shared_install:
  1645. ifneq ($(SHARED_BUILD),n)
  1646. ifneq ($(SHARED_LIBUNITS),)
  1647. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  1648. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  1649. endif
  1650. endif
  1651. endif
  1652. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  1653. ifdef INSTALL_UNITS
  1654. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  1655. endif
  1656. ifdef INSTALL_BUILDUNIT
  1657. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  1658. endif
  1659. ifdef INSTALLPPUFILES
  1660. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  1661. ifneq ($(UNITTARGETDIRPREFIX),)
  1662. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  1663. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  1664. endif
  1665. override INSTALL_CREATEPACKAGEFPC=1
  1666. endif
  1667. ifdef INSTALLEXEFILES
  1668. ifneq ($(TARGETDIRPREFIX),)
  1669. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  1670. endif
  1671. endif
  1672. fpc_install: all $(INSTALLTARGET)
  1673. ifdef INSTALLEXEFILES
  1674. $(MKDIR) $(INSTALL_BINDIR)
  1675. ifdef UPXPROG
  1676. -$(UPXPROG) $(INSTALLEXEFILES)
  1677. endif
  1678. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  1679. endif
  1680. ifdef INSTALL_CREATEPACKAGEFPC
  1681. ifdef FPCMAKE
  1682. ifdef PACKAGE_VERSION
  1683. ifneq ($(wildcard Makefile.fpc),)
  1684. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  1685. $(MKDIR) $(INSTALL_UNITDIR)
  1686. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  1687. endif
  1688. endif
  1689. endif
  1690. endif
  1691. ifdef INSTALLPPUFILES
  1692. $(MKDIR) $(INSTALL_UNITDIR)
  1693. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  1694. ifneq ($(INSTALLPPULINKFILES),)
  1695. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  1696. endif
  1697. ifneq ($(wildcard $(LIB_FULLNAME)),)
  1698. $(MKDIR) $(INSTALL_LIBDIR)
  1699. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  1700. ifdef inUnix
  1701. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  1702. endif
  1703. endif
  1704. endif
  1705. ifdef INSTALL_FILES
  1706. $(MKDIR) $(INSTALL_DATADIR)
  1707. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  1708. endif
  1709. fpc_sourceinstall: distclean
  1710. $(MKDIR) $(INSTALL_SOURCEDIR)
  1711. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  1712. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  1713. ifdef HASEXAMPLES
  1714. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  1715. endif
  1716. ifdef EXAMPLESOURCEFILES
  1717. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  1718. endif
  1719. ifdef TARGET_EXAMPLEDIRS
  1720. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  1721. endif
  1722. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  1723. ifdef EXEFILES
  1724. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  1725. endif
  1726. ifdef CLEAN_PROGRAMS
  1727. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  1728. endif
  1729. ifdef CLEAN_UNITS
  1730. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  1731. endif
  1732. ifdef CLEANPPUFILES
  1733. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  1734. ifdef DEBUGSYMEXT
  1735. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  1736. endif
  1737. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  1738. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  1739. endif
  1740. fpc_clean: $(CLEANTARGET)
  1741. ifdef CLEANEXEFILES
  1742. -$(DEL) $(CLEANEXEFILES)
  1743. endif
  1744. ifdef CLEANPPUFILES
  1745. -$(DEL) $(CLEANPPUFILES)
  1746. endif
  1747. ifneq ($(CLEANPPULINKFILES),)
  1748. -$(DEL) $(CLEANPPULINKFILES)
  1749. endif
  1750. ifdef CLEANRSTFILES
  1751. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1752. endif
  1753. ifdef CLEAN_FILES
  1754. -$(DEL) $(CLEAN_FILES)
  1755. endif
  1756. ifdef LIB_NAME
  1757. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  1758. endif
  1759. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1760. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  1761. fpc_cleanall: $(CLEANTARGET)
  1762. ifdef CLEANEXEFILES
  1763. -$(DEL) $(CLEANEXEFILES)
  1764. endif
  1765. ifdef COMPILER_UNITTARGETDIR
  1766. ifdef CLEANPPUFILES
  1767. -$(DEL) $(CLEANPPUFILES)
  1768. endif
  1769. ifneq ($(CLEANPPULINKFILES),)
  1770. -$(DEL) $(CLEANPPULINKFILES)
  1771. endif
  1772. ifdef CLEANRSTFILES
  1773. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  1774. endif
  1775. endif
  1776. -$(DELTREE) units
  1777. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  1778. ifneq ($(PPUEXT),.ppu)
  1779. -$(DEL) *.o *.ppu *.a
  1780. endif
  1781. -$(DELTREE) *$(SMARTEXT)
  1782. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  1783. -$(DEL) *_ppas$(BATCHEXT)
  1784. ifdef AOUTEXT
  1785. -$(DEL) *$(AOUTEXT)
  1786. endif
  1787. ifdef DEBUGSYMEXT
  1788. -$(DEL) *$(DEBUGSYMEXT)
  1789. endif
  1790. fpc_distclean: cleanall
  1791. .PHONY: fpc_baseinfo
  1792. override INFORULES+=fpc_baseinfo
  1793. fpc_baseinfo:
  1794. @$(ECHO)
  1795. @$(ECHO) == Package info ==
  1796. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  1797. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  1798. @$(ECHO)
  1799. @$(ECHO) == Configuration info ==
  1800. @$(ECHO)
  1801. @$(ECHO) FPC.......... $(FPC)
  1802. @$(ECHO) FPC Version.. $(FPC_VERSION)
  1803. @$(ECHO) Source CPU... $(CPU_SOURCE)
  1804. @$(ECHO) Target CPU... $(CPU_TARGET)
  1805. @$(ECHO) Source OS.... $(OS_SOURCE)
  1806. @$(ECHO) Target OS.... $(OS_TARGET)
  1807. @$(ECHO) Full Source.. $(FULL_SOURCE)
  1808. @$(ECHO) Full Target.. $(FULL_TARGET)
  1809. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  1810. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  1811. @$(ECHO)
  1812. @$(ECHO) == Directory info ==
  1813. @$(ECHO)
  1814. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  1815. @$(ECHO)
  1816. @$(ECHO) Basedir......... $(BASEDIR)
  1817. @$(ECHO) FPCDir.......... $(FPCDIR)
  1818. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  1819. @$(ECHO) UnitsDir........ $(UNITSDIR)
  1820. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  1821. @$(ECHO)
  1822. @$(ECHO) GCC library..... $(GCCLIBDIR)
  1823. @$(ECHO) Other library... $(OTHERLIBDIR)
  1824. @$(ECHO)
  1825. @$(ECHO) == Tools info ==
  1826. @$(ECHO)
  1827. @$(ECHO) As........ $(AS)
  1828. @$(ECHO) Ld........ $(LD)
  1829. @$(ECHO) Ar........ $(AR)
  1830. @$(ECHO) Rc........ $(RC)
  1831. @$(ECHO)
  1832. @$(ECHO) Mv........ $(MVPROG)
  1833. @$(ECHO) Cp........ $(CPPROG)
  1834. @$(ECHO) Rm........ $(RMPROG)
  1835. @$(ECHO) GInstall.. $(GINSTALL)
  1836. @$(ECHO) Echo...... $(ECHO)
  1837. @$(ECHO) Shell..... $(SHELL)
  1838. @$(ECHO) Date...... $(DATE)
  1839. @$(ECHO) FPCMake... $(FPCMAKE)
  1840. @$(ECHO) PPUMove... $(PPUMOVE)
  1841. @$(ECHO) Upx....... $(UPXPROG)
  1842. @$(ECHO) Zip....... $(ZIPPROG)
  1843. @$(ECHO)
  1844. @$(ECHO) == Object info ==
  1845. @$(ECHO)
  1846. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  1847. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  1848. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  1849. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  1850. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  1851. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  1852. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  1853. @$(ECHO)
  1854. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  1855. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  1856. @$(ECHO)
  1857. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  1858. @$(ECHO) Install Files....... $(INSTALL_FILES)
  1859. @$(ECHO)
  1860. @$(ECHO) == Install info ==
  1861. @$(ECHO)
  1862. @$(ECHO) DateStr.............. $(DATESTR)
  1863. @$(ECHO) ZipName.............. $(ZIPNAME)
  1864. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  1865. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  1866. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  1867. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  1868. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  1869. @$(ECHO)
  1870. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  1871. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  1872. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  1873. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  1874. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  1875. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  1876. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  1877. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  1878. @$(ECHO)
  1879. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  1880. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  1881. @$(ECHO)
  1882. .PHONY: fpc_info
  1883. fpc_info: $(INFORULES)
  1884. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  1885. fpc_makefile_dirs
  1886. fpc_makefile:
  1887. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  1888. fpc_makefile_sub1:
  1889. ifdef TARGET_DIRS
  1890. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  1891. endif
  1892. ifdef TARGET_EXAMPLEDIRS
  1893. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  1894. endif
  1895. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  1896. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  1897. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  1898. all: fpc_all
  1899. debug: fpc_debug
  1900. smart: fpc_smart
  1901. release: fpc_release
  1902. units: fpc_units
  1903. examples:
  1904. shared: fpc_shared
  1905. install: fpc_install
  1906. sourceinstall: fpc_sourceinstall
  1907. exampleinstall: fpc_exampleinstall
  1908. distinstall:
  1909. zipinstall:
  1910. zipsourceinstall:
  1911. zipexampleinstall:
  1912. zipdistinstall:
  1913. clean: fpc_clean
  1914. distclean: fpc_distclean
  1915. cleanall: fpc_cleanall
  1916. info: fpc_info
  1917. makefiles: fpc_makefiles
  1918. .PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
  1919. ifneq ($(wildcard fpcmake.loc),)
  1920. include fpcmake.loc
  1921. endif
  1922. utils: all
  1923. utilsdb:
  1924. $(MAKE) utils DBDIGEST=dbdigest