Makefile 57 KB

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