Makefile 67 KB

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