Makefile 58 KB

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