Makefile 57 KB

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