Makefile 50 KB

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