Makefile 56 KB

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