Makefile 71 KB

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