Makefile 107 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222
  1. #
  2. # Don't edit, this file is generated by FPCMake Version 2.0.0 [2015/06/28]
  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 i386-android i386-aros 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 powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded x86_64-iphonesim x86_64-aros x86_64-dragonfly arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux mipsel-embedded mipsel-android jvm-java jvm-android i8086-msdos aarch64-linux aarch64-darwin
  6. BSDs = freebsd netbsd openbsd darwin dragonfly
  7. UNIXs = linux $(BSDs) solaris qnx haiku aix
  8. LIMIT83fs = go32v2 os2 emx watcom msdos
  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. ifndef CPU_SOURCE
  157. CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
  158. endif
  159. ifndef CPU_TARGET
  160. CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
  161. endif
  162. ifndef OS_SOURCE
  163. OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
  164. endif
  165. ifndef OS_TARGET
  166. OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
  167. endif
  168. FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  169. FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  170. ifeq ($(CPU_TARGET),armeb)
  171. ARCH=arm
  172. override FPCOPT+=-Cb
  173. else
  174. ifeq ($(CPU_TARGET),armel)
  175. ARCH=arm
  176. override FPCOPT+=-CaEABI
  177. else
  178. ARCH=$(CPU_TARGET)
  179. endif
  180. endif
  181. ifeq ($(FULL_TARGET),arm-embedded)
  182. ifeq ($(SUBARCH),)
  183. $(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
  184. endif
  185. override FPCOPT+=-Cp$(SUBARCH)
  186. endif
  187. ifeq ($(FULL_TARGET),avr-embedded)
  188. ifeq ($(SUBARCH),)
  189. $(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
  190. endif
  191. override FPCOPT+=-Cp$(SUBARCH)
  192. endif
  193. ifeq ($(FULL_TARGET),mipsel-embedded)
  194. ifeq ($(SUBARCH),)
  195. $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
  196. endif
  197. override FPCOPT+=-Cp$(SUBARCH)
  198. endif
  199. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  200. TARGETSUFFIX=$(OS_TARGET)
  201. SOURCESUFFIX=$(OS_SOURCE)
  202. else
  203. ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
  204. TARGETSUFFIX=$(OS_TARGET)
  205. else
  206. TARGETSUFFIX=$(FULL_TARGET)
  207. endif
  208. SOURCESUFFIX=$(FULL_SOURCE)
  209. endif
  210. ifneq ($(FULL_TARGET),$(FULL_SOURCE))
  211. CROSSCOMPILE=1
  212. endif
  213. ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
  214. ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
  215. $(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
  216. endif
  217. endif
  218. ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
  219. BSDhier=1
  220. endif
  221. ifeq ($(OS_TARGET),linux)
  222. linuxHier=1
  223. endif
  224. ifndef CROSSCOMPILE
  225. BUILDFULLNATIVE=1
  226. export BUILDFULLNATIVE
  227. endif
  228. ifdef BUILDFULLNATIVE
  229. BUILDNATIVE=1
  230. export BUILDNATIVE
  231. endif
  232. export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
  233. ifdef FPCDIR
  234. override FPCDIR:=$(subst \,/,$(FPCDIR))
  235. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  236. override FPCDIR=wrong
  237. endif
  238. else
  239. override FPCDIR=wrong
  240. endif
  241. ifdef DEFAULT_FPCDIR
  242. ifeq ($(FPCDIR),wrong)
  243. override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
  244. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  245. override FPCDIR=wrong
  246. endif
  247. endif
  248. endif
  249. ifeq ($(FPCDIR),wrong)
  250. ifdef inUnix
  251. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  252. ifeq ($(wildcard $(FPCDIR)/units),)
  253. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  254. endif
  255. else
  256. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  257. override FPCDIR:=$(FPCDIR)/..
  258. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  259. override FPCDIR:=$(FPCDIR)/..
  260. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  261. override FPCDIR:=$(BASEDIR)
  262. ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
  263. override FPCDIR=c:/pp
  264. endif
  265. endif
  266. endif
  267. endif
  268. endif
  269. ifndef CROSSBINDIR
  270. CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
  271. endif
  272. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  273. ifeq ($(OS_SOURCE),darwin)
  274. DARWIN2DARWIN=1
  275. endif
  276. endif
  277. ifndef BINUTILSPREFIX
  278. ifndef CROSSBINDIR
  279. ifdef CROSSCOMPILE
  280. ifneq ($(OS_TARGET),msdos)
  281. ifndef DARWIN2DARWIN
  282. ifneq ($(CPU_TARGET),jvm)
  283. BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
  284. ifeq ($(OS_TARGET),android)
  285. ifeq ($(CPU_TARGET),arm)
  286. BINUTILSPREFIX=arm-linux-androideabi-
  287. else
  288. ifeq ($(CPU_TARGET),i386)
  289. BINUTILSPREFIX=i686-linux-android-
  290. else
  291. ifeq ($(CPU_TARGET),mipsel)
  292. BINUTILSPREFIX=mipsel-linux-android-
  293. endif
  294. endif
  295. endif
  296. endif
  297. endif
  298. endif
  299. else
  300. BINUTILSPREFIX=$(OS_TARGET)-
  301. endif
  302. endif
  303. endif
  304. endif
  305. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
  306. ifeq ($(UNITSDIR),)
  307. UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
  308. endif
  309. PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
  310. ifndef FPCFPMAKE
  311. ifdef CROSSCOMPILE
  312. ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
  313. FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
  314. ifneq ($(FPCPROG),)
  315. FPCPROG:=$(firstword $(FPCPROG))
  316. FPCFPMAKE:=$(shell $(FPCPROG) -PB)
  317. ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
  318. FPCFPMAKE:=$(firstword $(FPCPROG))
  319. endif
  320. else
  321. override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
  322. endif
  323. else
  324. FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
  325. FPMAKE_SKIP_CONFIG=-n
  326. export FPCFPMAKE
  327. export FPMAKE_SKIP_CONFIG
  328. endif
  329. else
  330. FPMAKE_SKIP_CONFIG=-n
  331. FPCFPMAKE=$(FPC)
  332. endif
  333. endif
  334. override PACKAGE_NAME=compiler
  335. override PACKAGE_VERSION=3.1.1
  336. unexport FPC_VERSION FPC_COMPILERINFO
  337. CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr jvm i8086 aarch64
  338. ALLTARGETS=$(CYCLETARGETS)
  339. ifdef POWERPC
  340. PPC_TARGET=powerpc
  341. endif
  342. ifdef POWERPC64
  343. PPC_TARGET=powerpc64
  344. endif
  345. ifdef SPARC
  346. PPC_TARGET=sparc
  347. endif
  348. ifdef M68K
  349. PPC_TARGET=m68k
  350. endif
  351. ifdef I386
  352. PPC_TARGET=i386
  353. endif
  354. ifdef X86_64
  355. PPC_TARGET=x86_64
  356. endif
  357. ifdef ARM
  358. PPC_TARGET=arm
  359. endif
  360. ifdef ARMEB
  361. PPC_TARGET=armeb
  362. endif
  363. ifdef MIPS
  364. PPC_TARGET=mips
  365. endif
  366. ifdef MIPSEL
  367. PPC_TARGET=mipsel
  368. endif
  369. ifdef AVR
  370. PPC_TARGET=avr
  371. endif
  372. ifdef JVM
  373. PPC_TARGET=jvm
  374. endif
  375. ifdef I8086
  376. PPC_TARGET=i8086
  377. endif
  378. ifdef AARCH64
  379. PPC_TARGET=aarch64
  380. endif
  381. ifndef PPC_TARGET
  382. PPC_TARGET=$(CPU_TARGET)
  383. endif
  384. ifeq ($(PPC_TARGET),armeb)
  385. CPC_TARGET=arm
  386. else
  387. CPC_TARGET=$(PPC_TARGET)
  388. endif
  389. ifndef PPC_OS
  390. PPC_OS=$(OS_TARGET)
  391. endif
  392. CPU_UNITDIR=$(CPC_TARGET)
  393. UTILSDIR=../utils
  394. COMPILERSOURCEDIR=$(CPC_TARGET) systems
  395. COMPILERUTILSDIR=utils
  396. ifndef FPCLANG
  397. FPCLANG=e
  398. endif
  399. ifndef LOCALOPT
  400. LOCALOPT:=$(OPT)
  401. endif
  402. ifndef RTLOPT
  403. RTLOPT:=$(OPT)
  404. endif
  405. ifdef CYCLELEVEL
  406. ifeq ($(CYCLELEVEL),1)
  407. override LOCALOPT+=$(OPTLEVEL1)
  408. override RTLOPT+=$(OPTLEVEL1)
  409. override LOCALOPT+=$(LOCALOPTLEVEL1)
  410. override RTLOPT+=$(RTLOPTLEVEL1)
  411. endif
  412. ifeq ($(CYCLELEVEL),2)
  413. override LOCALOPT+=$(OPTLEVEL2)
  414. override RTLOPT+=$(OPTLEVEL2)
  415. override LOCALOPT+=$(LOCALOPTLEVEL2)
  416. override RTLOPT+=$(RTLOPTLEVEL2)
  417. override LOCALOPT+=$(OPTNEW)
  418. override RTLOPT+=$(OPTNEW)
  419. endif
  420. ifeq ($(CYCLELEVEL),3)
  421. override LOCALOPT+=$(OPTLEVEL3)
  422. override RTLOPT+=$(OPTLEVEL3)
  423. override LOCALOPT+=$(LOCALOPTLEVEL3)
  424. override RTLOPT+=$(RTLOPTLEVEL3)
  425. override LOCALOPT+=$(OPTNEW)
  426. override RTLOPT+=$(OPTNEW)
  427. endif
  428. ifeq ($(CYCLELEVEL),4)
  429. override LOCALOPT+=$(OPTLEVEL4)
  430. override RTLOPT+=$(OPTLEVEL4)
  431. override LOCALOPT+=$(LOCALOPTLEVEL4)
  432. override RTLOPT+=$(RTLOPTLEVEL4)
  433. override LOCALOPT+=$(OPTNEW)
  434. override RTLOPT+=$(OPTNEW)
  435. endif
  436. endif
  437. override OPT=
  438. MSGFILES=$(wildcard msg/error*.msg)
  439. ifeq ($(CPC_TARGET),i386)
  440. CPUSUF=386
  441. endif
  442. ifeq ($(CPC_TARGET),m68k)
  443. CPUSUF=68k
  444. ALLOW_WARNINGS=1
  445. endif
  446. ifeq ($(CPC_TARGET),powerpc)
  447. CPUSUF=ppc
  448. endif
  449. ifeq ($(CPC_TARGET),powerpc64)
  450. CPUSUF=ppc64
  451. endif
  452. ifeq ($(CPC_TARGET),sparc)
  453. CPUSUF=sparc
  454. endif
  455. ifeq ($(CPC_TARGET),x86_64)
  456. CPUSUF=x64
  457. endif
  458. ifeq ($(CPC_TARGET),arm)
  459. CPUSUF=arm
  460. endif
  461. ifeq ($(CPC_TARGET),mips)
  462. CPUSUF=mips
  463. endif
  464. ifeq ($(CPC_TARGET),mipsel)
  465. CPUSUF=mipsel
  466. endif
  467. ifeq ($(CPC_TARGET),avr)
  468. CPUSUF=avr
  469. ALLOW_WARNINGS=1
  470. endif
  471. ifeq ($(CPC_TARGET),jvm)
  472. CPUSUF=jvm
  473. endif
  474. ifeq ($(CPC_TARGET),i8086)
  475. CPUSUF=8086
  476. endif
  477. ifeq ($(CPC_TARGET),aarch64)
  478. CPUSUF=a64
  479. endif
  480. NOCPUDEF=1
  481. MSGFILE=msg/error$(FPCLANG).msg
  482. SVNVERSION:=$(firstword $(wildcard $(addsuffix /svnversion$(SRCEXEEXT),$(SEARCHPATH))))
  483. REVINC:=$(wildcard revision.inc)
  484. ifneq ($(REVINC),)
  485. override LOCALOPT+=-dREVINC
  486. ifeq ($(REVSTR),)
  487. ifneq ($(SVNVERSION),)
  488. REVSTR:=$(subst r,,$(subst r1:,,r$(shell $(SVNVERSION) -c .)))
  489. export REVSTR
  490. else
  491. ifeq ($(REVINC),force)
  492. REVSTR:=exported
  493. export REVSTR
  494. endif
  495. endif
  496. endif
  497. endif
  498. override LOCALOPT+=-d$(CPC_TARGET) -dGDB -dBROWSERLOG
  499. ifeq ($(PPC_TARGET),i386)
  500. override LOCALOPT+=-Fux86
  501. endif
  502. ifeq ($(PPC_TARGET),x86_64)
  503. override LOCALOPT+=-Fux86
  504. endif
  505. ifeq ($(PPC_TARGET),powerpc)
  506. override LOCALOPT+=-Fuppcgen
  507. endif
  508. ifeq ($(PPC_TARGET),powerpc64)
  509. override LOCALOPT+=-Fuppcgen
  510. endif
  511. ifeq ($(PPC_TARGET),m68k)
  512. override LOCALOPT+=
  513. endif
  514. ifeq ($(PPC_TARGET),sparc)
  515. override LOCALOPT+=
  516. endif
  517. ifeq ($(PPC_TARGET),m68k)
  518. ifeq ($(OS_TARGET),amiga)
  519. override LOCALOPT+=-Ct
  520. endif
  521. endif
  522. ifeq ($(PPC_TARGET),arm)
  523. override LOCALOPT+=
  524. endif
  525. ifeq ($(PPC_TARGET),mipsel)
  526. override LOCALOPT+=-Fumips
  527. endif
  528. ifeq ($(PPC_TARGET),jvm)
  529. override LOCALOPT+=-Fujvm -dNOOPT
  530. endif
  531. ifeq ($(PPC_TARGET),i8086)
  532. override LOCALOPT+=-Fux86
  533. endif
  534. OPTWPOCOLLECT=-OWdevirtcalls,optvmts -FW$(BASEDIR)/pp1.wpo
  535. OPTWPOPERFORM=-Owdevirtcalls,optvmts -Fw$(BASEDIR)/pp1.wpo
  536. ifneq ($(findstring $(OS_TARGET),darwin linux dragonfly freebsd solaris),)
  537. ifdef LINKSMART
  538. ifdef CREATESMART
  539. OPTWPOCOLLECT+=-OWsymbolliveness -Xs-
  540. OPTWPOPERFORM+=-Owsymbolliveness
  541. endif
  542. endif
  543. endif
  544. ifeq ($(CPU_TARGET),jvm)
  545. NoNativeBinaries=1
  546. endif
  547. ifeq ($(OS_TARGET),embedded)
  548. NoNativeBinaries=1
  549. endif
  550. ifeq ($(OS_TARGET),gba)
  551. NoNativeBinaries=1
  552. endif
  553. ifeq ($(OS_TARGET),msdos)
  554. NoNativeBinaries=1
  555. endif
  556. ifeq ($(OS_TARGET),nds)
  557. NoNativeBinaries=1
  558. endif
  559. ifeq ($(FULL_TARGET),i386-linux)
  560. override TARGET_DIRS+=utils
  561. endif
  562. ifeq ($(FULL_TARGET),i386-go32v2)
  563. override TARGET_DIRS+=utils
  564. endif
  565. ifeq ($(FULL_TARGET),i386-win32)
  566. override TARGET_DIRS+=utils
  567. endif
  568. ifeq ($(FULL_TARGET),i386-os2)
  569. override TARGET_DIRS+=utils
  570. endif
  571. ifeq ($(FULL_TARGET),i386-freebsd)
  572. override TARGET_DIRS+=utils
  573. endif
  574. ifeq ($(FULL_TARGET),i386-beos)
  575. override TARGET_DIRS+=utils
  576. endif
  577. ifeq ($(FULL_TARGET),i386-haiku)
  578. override TARGET_DIRS+=utils
  579. endif
  580. ifeq ($(FULL_TARGET),i386-netbsd)
  581. override TARGET_DIRS+=utils
  582. endif
  583. ifeq ($(FULL_TARGET),i386-solaris)
  584. override TARGET_DIRS+=utils
  585. endif
  586. ifeq ($(FULL_TARGET),i386-qnx)
  587. override TARGET_DIRS+=utils
  588. endif
  589. ifeq ($(FULL_TARGET),i386-netware)
  590. override TARGET_DIRS+=utils
  591. endif
  592. ifeq ($(FULL_TARGET),i386-openbsd)
  593. override TARGET_DIRS+=utils
  594. endif
  595. ifeq ($(FULL_TARGET),i386-wdosx)
  596. override TARGET_DIRS+=utils
  597. endif
  598. ifeq ($(FULL_TARGET),i386-darwin)
  599. override TARGET_DIRS+=utils
  600. endif
  601. ifeq ($(FULL_TARGET),i386-emx)
  602. override TARGET_DIRS+=utils
  603. endif
  604. ifeq ($(FULL_TARGET),i386-watcom)
  605. override TARGET_DIRS+=utils
  606. endif
  607. ifeq ($(FULL_TARGET),i386-netwlibc)
  608. override TARGET_DIRS+=utils
  609. endif
  610. ifeq ($(FULL_TARGET),i386-wince)
  611. override TARGET_DIRS+=utils
  612. endif
  613. ifeq ($(FULL_TARGET),i386-embedded)
  614. override TARGET_DIRS+=utils
  615. endif
  616. ifeq ($(FULL_TARGET),i386-symbian)
  617. override TARGET_DIRS+=utils
  618. endif
  619. ifeq ($(FULL_TARGET),i386-nativent)
  620. override TARGET_DIRS+=utils
  621. endif
  622. ifeq ($(FULL_TARGET),i386-iphonesim)
  623. override TARGET_DIRS+=utils
  624. endif
  625. ifeq ($(FULL_TARGET),i386-android)
  626. override TARGET_DIRS+=utils
  627. endif
  628. ifeq ($(FULL_TARGET),i386-aros)
  629. override TARGET_DIRS+=utils
  630. endif
  631. ifeq ($(FULL_TARGET),m68k-linux)
  632. override TARGET_DIRS+=utils
  633. endif
  634. ifeq ($(FULL_TARGET),m68k-freebsd)
  635. override TARGET_DIRS+=utils
  636. endif
  637. ifeq ($(FULL_TARGET),m68k-netbsd)
  638. override TARGET_DIRS+=utils
  639. endif
  640. ifeq ($(FULL_TARGET),m68k-amiga)
  641. override TARGET_DIRS+=utils
  642. endif
  643. ifeq ($(FULL_TARGET),m68k-atari)
  644. override TARGET_DIRS+=utils
  645. endif
  646. ifeq ($(FULL_TARGET),m68k-openbsd)
  647. override TARGET_DIRS+=utils
  648. endif
  649. ifeq ($(FULL_TARGET),m68k-palmos)
  650. override TARGET_DIRS+=utils
  651. endif
  652. ifeq ($(FULL_TARGET),m68k-embedded)
  653. override TARGET_DIRS+=utils
  654. endif
  655. ifeq ($(FULL_TARGET),powerpc-linux)
  656. override TARGET_DIRS+=utils
  657. endif
  658. ifeq ($(FULL_TARGET),powerpc-netbsd)
  659. override TARGET_DIRS+=utils
  660. endif
  661. ifeq ($(FULL_TARGET),powerpc-amiga)
  662. override TARGET_DIRS+=utils
  663. endif
  664. ifeq ($(FULL_TARGET),powerpc-macos)
  665. override TARGET_DIRS+=utils
  666. endif
  667. ifeq ($(FULL_TARGET),powerpc-darwin)
  668. override TARGET_DIRS+=utils
  669. endif
  670. ifeq ($(FULL_TARGET),powerpc-morphos)
  671. override TARGET_DIRS+=utils
  672. endif
  673. ifeq ($(FULL_TARGET),powerpc-embedded)
  674. override TARGET_DIRS+=utils
  675. endif
  676. ifeq ($(FULL_TARGET),powerpc-wii)
  677. override TARGET_DIRS+=utils
  678. endif
  679. ifeq ($(FULL_TARGET),powerpc-aix)
  680. override TARGET_DIRS+=utils
  681. endif
  682. ifeq ($(FULL_TARGET),sparc-linux)
  683. override TARGET_DIRS+=utils
  684. endif
  685. ifeq ($(FULL_TARGET),sparc-netbsd)
  686. override TARGET_DIRS+=utils
  687. endif
  688. ifeq ($(FULL_TARGET),sparc-solaris)
  689. override TARGET_DIRS+=utils
  690. endif
  691. ifeq ($(FULL_TARGET),sparc-embedded)
  692. override TARGET_DIRS+=utils
  693. endif
  694. ifeq ($(FULL_TARGET),x86_64-linux)
  695. override TARGET_DIRS+=utils
  696. endif
  697. ifeq ($(FULL_TARGET),x86_64-freebsd)
  698. override TARGET_DIRS+=utils
  699. endif
  700. ifeq ($(FULL_TARGET),x86_64-netbsd)
  701. override TARGET_DIRS+=utils
  702. endif
  703. ifeq ($(FULL_TARGET),x86_64-solaris)
  704. override TARGET_DIRS+=utils
  705. endif
  706. ifeq ($(FULL_TARGET),x86_64-openbsd)
  707. override TARGET_DIRS+=utils
  708. endif
  709. ifeq ($(FULL_TARGET),x86_64-darwin)
  710. override TARGET_DIRS+=utils
  711. endif
  712. ifeq ($(FULL_TARGET),x86_64-win64)
  713. override TARGET_DIRS+=utils
  714. endif
  715. ifeq ($(FULL_TARGET),x86_64-embedded)
  716. override TARGET_DIRS+=utils
  717. endif
  718. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  719. override TARGET_DIRS+=utils
  720. endif
  721. ifeq ($(FULL_TARGET),x86_64-aros)
  722. override TARGET_DIRS+=utils
  723. endif
  724. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  725. override TARGET_DIRS+=utils
  726. endif
  727. ifeq ($(FULL_TARGET),arm-linux)
  728. override TARGET_DIRS+=utils
  729. endif
  730. ifeq ($(FULL_TARGET),arm-palmos)
  731. override TARGET_DIRS+=utils
  732. endif
  733. ifeq ($(FULL_TARGET),arm-darwin)
  734. override TARGET_DIRS+=utils
  735. endif
  736. ifeq ($(FULL_TARGET),arm-wince)
  737. override TARGET_DIRS+=utils
  738. endif
  739. ifeq ($(FULL_TARGET),arm-gba)
  740. override TARGET_DIRS+=utils
  741. endif
  742. ifeq ($(FULL_TARGET),arm-nds)
  743. override TARGET_DIRS+=utils
  744. endif
  745. ifeq ($(FULL_TARGET),arm-embedded)
  746. override TARGET_DIRS+=utils
  747. endif
  748. ifeq ($(FULL_TARGET),arm-symbian)
  749. override TARGET_DIRS+=utils
  750. endif
  751. ifeq ($(FULL_TARGET),arm-android)
  752. override TARGET_DIRS+=utils
  753. endif
  754. ifeq ($(FULL_TARGET),powerpc64-linux)
  755. override TARGET_DIRS+=utils
  756. endif
  757. ifeq ($(FULL_TARGET),powerpc64-darwin)
  758. override TARGET_DIRS+=utils
  759. endif
  760. ifeq ($(FULL_TARGET),powerpc64-embedded)
  761. override TARGET_DIRS+=utils
  762. endif
  763. ifeq ($(FULL_TARGET),powerpc64-aix)
  764. override TARGET_DIRS+=utils
  765. endif
  766. ifeq ($(FULL_TARGET),avr-embedded)
  767. override TARGET_DIRS+=utils
  768. endif
  769. ifeq ($(FULL_TARGET),armeb-linux)
  770. override TARGET_DIRS+=utils
  771. endif
  772. ifeq ($(FULL_TARGET),armeb-embedded)
  773. override TARGET_DIRS+=utils
  774. endif
  775. ifeq ($(FULL_TARGET),mips-linux)
  776. override TARGET_DIRS+=utils
  777. endif
  778. ifeq ($(FULL_TARGET),mipsel-linux)
  779. override TARGET_DIRS+=utils
  780. endif
  781. ifeq ($(FULL_TARGET),mipsel-embedded)
  782. override TARGET_DIRS+=utils
  783. endif
  784. ifeq ($(FULL_TARGET),mipsel-android)
  785. override TARGET_DIRS+=utils
  786. endif
  787. ifeq ($(FULL_TARGET),jvm-java)
  788. override TARGET_DIRS+=utils
  789. endif
  790. ifeq ($(FULL_TARGET),jvm-android)
  791. override TARGET_DIRS+=utils
  792. endif
  793. ifeq ($(FULL_TARGET),i8086-msdos)
  794. override TARGET_DIRS+=utils
  795. endif
  796. ifeq ($(FULL_TARGET),aarch64-linux)
  797. override TARGET_DIRS+=utils
  798. endif
  799. ifeq ($(FULL_TARGET),aarch64-darwin)
  800. override TARGET_DIRS+=utils
  801. endif
  802. ifeq ($(FULL_TARGET),i386-linux)
  803. override TARGET_PROGRAMS+=pp
  804. endif
  805. ifeq ($(FULL_TARGET),i386-go32v2)
  806. override TARGET_PROGRAMS+=pp
  807. endif
  808. ifeq ($(FULL_TARGET),i386-win32)
  809. override TARGET_PROGRAMS+=pp
  810. endif
  811. ifeq ($(FULL_TARGET),i386-os2)
  812. override TARGET_PROGRAMS+=pp
  813. endif
  814. ifeq ($(FULL_TARGET),i386-freebsd)
  815. override TARGET_PROGRAMS+=pp
  816. endif
  817. ifeq ($(FULL_TARGET),i386-beos)
  818. override TARGET_PROGRAMS+=pp
  819. endif
  820. ifeq ($(FULL_TARGET),i386-haiku)
  821. override TARGET_PROGRAMS+=pp
  822. endif
  823. ifeq ($(FULL_TARGET),i386-netbsd)
  824. override TARGET_PROGRAMS+=pp
  825. endif
  826. ifeq ($(FULL_TARGET),i386-solaris)
  827. override TARGET_PROGRAMS+=pp
  828. endif
  829. ifeq ($(FULL_TARGET),i386-qnx)
  830. override TARGET_PROGRAMS+=pp
  831. endif
  832. ifeq ($(FULL_TARGET),i386-netware)
  833. override TARGET_PROGRAMS+=pp
  834. endif
  835. ifeq ($(FULL_TARGET),i386-openbsd)
  836. override TARGET_PROGRAMS+=pp
  837. endif
  838. ifeq ($(FULL_TARGET),i386-wdosx)
  839. override TARGET_PROGRAMS+=pp
  840. endif
  841. ifeq ($(FULL_TARGET),i386-darwin)
  842. override TARGET_PROGRAMS+=pp
  843. endif
  844. ifeq ($(FULL_TARGET),i386-emx)
  845. override TARGET_PROGRAMS+=pp
  846. endif
  847. ifeq ($(FULL_TARGET),i386-watcom)
  848. override TARGET_PROGRAMS+=pp
  849. endif
  850. ifeq ($(FULL_TARGET),i386-netwlibc)
  851. override TARGET_PROGRAMS+=pp
  852. endif
  853. ifeq ($(FULL_TARGET),i386-wince)
  854. override TARGET_PROGRAMS+=pp
  855. endif
  856. ifeq ($(FULL_TARGET),i386-embedded)
  857. override TARGET_PROGRAMS+=pp
  858. endif
  859. ifeq ($(FULL_TARGET),i386-symbian)
  860. override TARGET_PROGRAMS+=pp
  861. endif
  862. ifeq ($(FULL_TARGET),i386-nativent)
  863. override TARGET_PROGRAMS+=pp
  864. endif
  865. ifeq ($(FULL_TARGET),i386-iphonesim)
  866. override TARGET_PROGRAMS+=pp
  867. endif
  868. ifeq ($(FULL_TARGET),i386-android)
  869. override TARGET_PROGRAMS+=pp
  870. endif
  871. ifeq ($(FULL_TARGET),i386-aros)
  872. override TARGET_PROGRAMS+=pp
  873. endif
  874. ifeq ($(FULL_TARGET),m68k-linux)
  875. override TARGET_PROGRAMS+=pp
  876. endif
  877. ifeq ($(FULL_TARGET),m68k-freebsd)
  878. override TARGET_PROGRAMS+=pp
  879. endif
  880. ifeq ($(FULL_TARGET),m68k-netbsd)
  881. override TARGET_PROGRAMS+=pp
  882. endif
  883. ifeq ($(FULL_TARGET),m68k-amiga)
  884. override TARGET_PROGRAMS+=pp
  885. endif
  886. ifeq ($(FULL_TARGET),m68k-atari)
  887. override TARGET_PROGRAMS+=pp
  888. endif
  889. ifeq ($(FULL_TARGET),m68k-openbsd)
  890. override TARGET_PROGRAMS+=pp
  891. endif
  892. ifeq ($(FULL_TARGET),m68k-palmos)
  893. override TARGET_PROGRAMS+=pp
  894. endif
  895. ifeq ($(FULL_TARGET),m68k-embedded)
  896. override TARGET_PROGRAMS+=pp
  897. endif
  898. ifeq ($(FULL_TARGET),powerpc-linux)
  899. override TARGET_PROGRAMS+=pp
  900. endif
  901. ifeq ($(FULL_TARGET),powerpc-netbsd)
  902. override TARGET_PROGRAMS+=pp
  903. endif
  904. ifeq ($(FULL_TARGET),powerpc-amiga)
  905. override TARGET_PROGRAMS+=pp
  906. endif
  907. ifeq ($(FULL_TARGET),powerpc-macos)
  908. override TARGET_PROGRAMS+=pp
  909. endif
  910. ifeq ($(FULL_TARGET),powerpc-darwin)
  911. override TARGET_PROGRAMS+=pp
  912. endif
  913. ifeq ($(FULL_TARGET),powerpc-morphos)
  914. override TARGET_PROGRAMS+=pp
  915. endif
  916. ifeq ($(FULL_TARGET),powerpc-embedded)
  917. override TARGET_PROGRAMS+=pp
  918. endif
  919. ifeq ($(FULL_TARGET),powerpc-wii)
  920. override TARGET_PROGRAMS+=pp
  921. endif
  922. ifeq ($(FULL_TARGET),powerpc-aix)
  923. override TARGET_PROGRAMS+=pp
  924. endif
  925. ifeq ($(FULL_TARGET),sparc-linux)
  926. override TARGET_PROGRAMS+=pp
  927. endif
  928. ifeq ($(FULL_TARGET),sparc-netbsd)
  929. override TARGET_PROGRAMS+=pp
  930. endif
  931. ifeq ($(FULL_TARGET),sparc-solaris)
  932. override TARGET_PROGRAMS+=pp
  933. endif
  934. ifeq ($(FULL_TARGET),sparc-embedded)
  935. override TARGET_PROGRAMS+=pp
  936. endif
  937. ifeq ($(FULL_TARGET),x86_64-linux)
  938. override TARGET_PROGRAMS+=pp
  939. endif
  940. ifeq ($(FULL_TARGET),x86_64-freebsd)
  941. override TARGET_PROGRAMS+=pp
  942. endif
  943. ifeq ($(FULL_TARGET),x86_64-netbsd)
  944. override TARGET_PROGRAMS+=pp
  945. endif
  946. ifeq ($(FULL_TARGET),x86_64-solaris)
  947. override TARGET_PROGRAMS+=pp
  948. endif
  949. ifeq ($(FULL_TARGET),x86_64-openbsd)
  950. override TARGET_PROGRAMS+=pp
  951. endif
  952. ifeq ($(FULL_TARGET),x86_64-darwin)
  953. override TARGET_PROGRAMS+=pp
  954. endif
  955. ifeq ($(FULL_TARGET),x86_64-win64)
  956. override TARGET_PROGRAMS+=pp
  957. endif
  958. ifeq ($(FULL_TARGET),x86_64-embedded)
  959. override TARGET_PROGRAMS+=pp
  960. endif
  961. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  962. override TARGET_PROGRAMS+=pp
  963. endif
  964. ifeq ($(FULL_TARGET),x86_64-aros)
  965. override TARGET_PROGRAMS+=pp
  966. endif
  967. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  968. override TARGET_PROGRAMS+=pp
  969. endif
  970. ifeq ($(FULL_TARGET),arm-linux)
  971. override TARGET_PROGRAMS+=pp
  972. endif
  973. ifeq ($(FULL_TARGET),arm-palmos)
  974. override TARGET_PROGRAMS+=pp
  975. endif
  976. ifeq ($(FULL_TARGET),arm-darwin)
  977. override TARGET_PROGRAMS+=pp
  978. endif
  979. ifeq ($(FULL_TARGET),arm-wince)
  980. override TARGET_PROGRAMS+=pp
  981. endif
  982. ifeq ($(FULL_TARGET),arm-gba)
  983. override TARGET_PROGRAMS+=pp
  984. endif
  985. ifeq ($(FULL_TARGET),arm-nds)
  986. override TARGET_PROGRAMS+=pp
  987. endif
  988. ifeq ($(FULL_TARGET),arm-embedded)
  989. override TARGET_PROGRAMS+=pp
  990. endif
  991. ifeq ($(FULL_TARGET),arm-symbian)
  992. override TARGET_PROGRAMS+=pp
  993. endif
  994. ifeq ($(FULL_TARGET),arm-android)
  995. override TARGET_PROGRAMS+=pp
  996. endif
  997. ifeq ($(FULL_TARGET),powerpc64-linux)
  998. override TARGET_PROGRAMS+=pp
  999. endif
  1000. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1001. override TARGET_PROGRAMS+=pp
  1002. endif
  1003. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1004. override TARGET_PROGRAMS+=pp
  1005. endif
  1006. ifeq ($(FULL_TARGET),powerpc64-aix)
  1007. override TARGET_PROGRAMS+=pp
  1008. endif
  1009. ifeq ($(FULL_TARGET),avr-embedded)
  1010. override TARGET_PROGRAMS+=pp
  1011. endif
  1012. ifeq ($(FULL_TARGET),armeb-linux)
  1013. override TARGET_PROGRAMS+=pp
  1014. endif
  1015. ifeq ($(FULL_TARGET),armeb-embedded)
  1016. override TARGET_PROGRAMS+=pp
  1017. endif
  1018. ifeq ($(FULL_TARGET),mips-linux)
  1019. override TARGET_PROGRAMS+=pp
  1020. endif
  1021. ifeq ($(FULL_TARGET),mipsel-linux)
  1022. override TARGET_PROGRAMS+=pp
  1023. endif
  1024. ifeq ($(FULL_TARGET),mipsel-embedded)
  1025. override TARGET_PROGRAMS+=pp
  1026. endif
  1027. ifeq ($(FULL_TARGET),mipsel-android)
  1028. override TARGET_PROGRAMS+=pp
  1029. endif
  1030. ifeq ($(FULL_TARGET),jvm-java)
  1031. override TARGET_PROGRAMS+=pp
  1032. endif
  1033. ifeq ($(FULL_TARGET),jvm-android)
  1034. override TARGET_PROGRAMS+=pp
  1035. endif
  1036. ifeq ($(FULL_TARGET),i8086-msdos)
  1037. override TARGET_PROGRAMS+=pp
  1038. endif
  1039. ifeq ($(FULL_TARGET),aarch64-linux)
  1040. override TARGET_PROGRAMS+=pp
  1041. endif
  1042. ifeq ($(FULL_TARGET),aarch64-darwin)
  1043. override TARGET_PROGRAMS+=pp
  1044. endif
  1045. override INSTALL_FPCPACKAGE=y
  1046. ifeq ($(FULL_TARGET),i386-linux)
  1047. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1048. endif
  1049. ifeq ($(FULL_TARGET),i386-go32v2)
  1050. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1051. endif
  1052. ifeq ($(FULL_TARGET),i386-win32)
  1053. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1054. endif
  1055. ifeq ($(FULL_TARGET),i386-os2)
  1056. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1057. endif
  1058. ifeq ($(FULL_TARGET),i386-freebsd)
  1059. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1060. endif
  1061. ifeq ($(FULL_TARGET),i386-beos)
  1062. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1063. endif
  1064. ifeq ($(FULL_TARGET),i386-haiku)
  1065. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1066. endif
  1067. ifeq ($(FULL_TARGET),i386-netbsd)
  1068. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1069. endif
  1070. ifeq ($(FULL_TARGET),i386-solaris)
  1071. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1072. endif
  1073. ifeq ($(FULL_TARGET),i386-qnx)
  1074. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1075. endif
  1076. ifeq ($(FULL_TARGET),i386-netware)
  1077. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1078. endif
  1079. ifeq ($(FULL_TARGET),i386-openbsd)
  1080. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1081. endif
  1082. ifeq ($(FULL_TARGET),i386-wdosx)
  1083. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1084. endif
  1085. ifeq ($(FULL_TARGET),i386-darwin)
  1086. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1087. endif
  1088. ifeq ($(FULL_TARGET),i386-emx)
  1089. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1090. endif
  1091. ifeq ($(FULL_TARGET),i386-watcom)
  1092. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1093. endif
  1094. ifeq ($(FULL_TARGET),i386-netwlibc)
  1095. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1096. endif
  1097. ifeq ($(FULL_TARGET),i386-wince)
  1098. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1099. endif
  1100. ifeq ($(FULL_TARGET),i386-embedded)
  1101. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1102. endif
  1103. ifeq ($(FULL_TARGET),i386-symbian)
  1104. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1105. endif
  1106. ifeq ($(FULL_TARGET),i386-nativent)
  1107. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1108. endif
  1109. ifeq ($(FULL_TARGET),i386-iphonesim)
  1110. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1111. endif
  1112. ifeq ($(FULL_TARGET),i386-android)
  1113. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1114. endif
  1115. ifeq ($(FULL_TARGET),i386-aros)
  1116. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1117. endif
  1118. ifeq ($(FULL_TARGET),m68k-linux)
  1119. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1120. endif
  1121. ifeq ($(FULL_TARGET),m68k-freebsd)
  1122. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1123. endif
  1124. ifeq ($(FULL_TARGET),m68k-netbsd)
  1125. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1126. endif
  1127. ifeq ($(FULL_TARGET),m68k-amiga)
  1128. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1129. endif
  1130. ifeq ($(FULL_TARGET),m68k-atari)
  1131. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1132. endif
  1133. ifeq ($(FULL_TARGET),m68k-openbsd)
  1134. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1135. endif
  1136. ifeq ($(FULL_TARGET),m68k-palmos)
  1137. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1138. endif
  1139. ifeq ($(FULL_TARGET),m68k-embedded)
  1140. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1141. endif
  1142. ifeq ($(FULL_TARGET),powerpc-linux)
  1143. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1144. endif
  1145. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1146. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1147. endif
  1148. ifeq ($(FULL_TARGET),powerpc-amiga)
  1149. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1150. endif
  1151. ifeq ($(FULL_TARGET),powerpc-macos)
  1152. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1153. endif
  1154. ifeq ($(FULL_TARGET),powerpc-darwin)
  1155. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1156. endif
  1157. ifeq ($(FULL_TARGET),powerpc-morphos)
  1158. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1159. endif
  1160. ifeq ($(FULL_TARGET),powerpc-embedded)
  1161. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1162. endif
  1163. ifeq ($(FULL_TARGET),powerpc-wii)
  1164. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1165. endif
  1166. ifeq ($(FULL_TARGET),powerpc-aix)
  1167. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1168. endif
  1169. ifeq ($(FULL_TARGET),sparc-linux)
  1170. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1171. endif
  1172. ifeq ($(FULL_TARGET),sparc-netbsd)
  1173. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1174. endif
  1175. ifeq ($(FULL_TARGET),sparc-solaris)
  1176. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1177. endif
  1178. ifeq ($(FULL_TARGET),sparc-embedded)
  1179. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1180. endif
  1181. ifeq ($(FULL_TARGET),x86_64-linux)
  1182. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1183. endif
  1184. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1185. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1186. endif
  1187. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1188. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1189. endif
  1190. ifeq ($(FULL_TARGET),x86_64-solaris)
  1191. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1192. endif
  1193. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1194. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1195. endif
  1196. ifeq ($(FULL_TARGET),x86_64-darwin)
  1197. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1198. endif
  1199. ifeq ($(FULL_TARGET),x86_64-win64)
  1200. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1201. endif
  1202. ifeq ($(FULL_TARGET),x86_64-embedded)
  1203. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1204. endif
  1205. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1206. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1207. endif
  1208. ifeq ($(FULL_TARGET),x86_64-aros)
  1209. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1210. endif
  1211. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1212. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1213. endif
  1214. ifeq ($(FULL_TARGET),arm-linux)
  1215. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1216. endif
  1217. ifeq ($(FULL_TARGET),arm-palmos)
  1218. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1219. endif
  1220. ifeq ($(FULL_TARGET),arm-darwin)
  1221. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1222. endif
  1223. ifeq ($(FULL_TARGET),arm-wince)
  1224. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1225. endif
  1226. ifeq ($(FULL_TARGET),arm-gba)
  1227. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1228. endif
  1229. ifeq ($(FULL_TARGET),arm-nds)
  1230. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1231. endif
  1232. ifeq ($(FULL_TARGET),arm-embedded)
  1233. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1234. endif
  1235. ifeq ($(FULL_TARGET),arm-symbian)
  1236. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1237. endif
  1238. ifeq ($(FULL_TARGET),arm-android)
  1239. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1240. endif
  1241. ifeq ($(FULL_TARGET),powerpc64-linux)
  1242. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1243. endif
  1244. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1245. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1246. endif
  1247. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1248. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1249. endif
  1250. ifeq ($(FULL_TARGET),powerpc64-aix)
  1251. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1252. endif
  1253. ifeq ($(FULL_TARGET),avr-embedded)
  1254. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1255. endif
  1256. ifeq ($(FULL_TARGET),armeb-linux)
  1257. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1258. endif
  1259. ifeq ($(FULL_TARGET),armeb-embedded)
  1260. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1261. endif
  1262. ifeq ($(FULL_TARGET),mips-linux)
  1263. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1264. endif
  1265. ifeq ($(FULL_TARGET),mipsel-linux)
  1266. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1267. endif
  1268. ifeq ($(FULL_TARGET),mipsel-embedded)
  1269. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1270. endif
  1271. ifeq ($(FULL_TARGET),mipsel-android)
  1272. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1273. endif
  1274. ifeq ($(FULL_TARGET),jvm-java)
  1275. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1276. endif
  1277. ifeq ($(FULL_TARGET),jvm-android)
  1278. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1279. endif
  1280. ifeq ($(FULL_TARGET),i8086-msdos)
  1281. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1282. endif
  1283. ifeq ($(FULL_TARGET),aarch64-linux)
  1284. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1285. endif
  1286. ifeq ($(FULL_TARGET),aarch64-darwin)
  1287. override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
  1288. endif
  1289. ifeq ($(FULL_TARGET),i386-linux)
  1290. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1291. endif
  1292. ifeq ($(FULL_TARGET),i386-go32v2)
  1293. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1294. endif
  1295. ifeq ($(FULL_TARGET),i386-win32)
  1296. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1297. endif
  1298. ifeq ($(FULL_TARGET),i386-os2)
  1299. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1300. endif
  1301. ifeq ($(FULL_TARGET),i386-freebsd)
  1302. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1303. endif
  1304. ifeq ($(FULL_TARGET),i386-beos)
  1305. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1306. endif
  1307. ifeq ($(FULL_TARGET),i386-haiku)
  1308. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1309. endif
  1310. ifeq ($(FULL_TARGET),i386-netbsd)
  1311. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1312. endif
  1313. ifeq ($(FULL_TARGET),i386-solaris)
  1314. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1315. endif
  1316. ifeq ($(FULL_TARGET),i386-qnx)
  1317. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1318. endif
  1319. ifeq ($(FULL_TARGET),i386-netware)
  1320. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1321. endif
  1322. ifeq ($(FULL_TARGET),i386-openbsd)
  1323. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1324. endif
  1325. ifeq ($(FULL_TARGET),i386-wdosx)
  1326. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1327. endif
  1328. ifeq ($(FULL_TARGET),i386-darwin)
  1329. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1330. endif
  1331. ifeq ($(FULL_TARGET),i386-emx)
  1332. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1333. endif
  1334. ifeq ($(FULL_TARGET),i386-watcom)
  1335. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1336. endif
  1337. ifeq ($(FULL_TARGET),i386-netwlibc)
  1338. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1339. endif
  1340. ifeq ($(FULL_TARGET),i386-wince)
  1341. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1342. endif
  1343. ifeq ($(FULL_TARGET),i386-embedded)
  1344. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1345. endif
  1346. ifeq ($(FULL_TARGET),i386-symbian)
  1347. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1348. endif
  1349. ifeq ($(FULL_TARGET),i386-nativent)
  1350. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1351. endif
  1352. ifeq ($(FULL_TARGET),i386-iphonesim)
  1353. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1354. endif
  1355. ifeq ($(FULL_TARGET),i386-android)
  1356. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1357. endif
  1358. ifeq ($(FULL_TARGET),i386-aros)
  1359. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1360. endif
  1361. ifeq ($(FULL_TARGET),m68k-linux)
  1362. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1363. endif
  1364. ifeq ($(FULL_TARGET),m68k-freebsd)
  1365. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1366. endif
  1367. ifeq ($(FULL_TARGET),m68k-netbsd)
  1368. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1369. endif
  1370. ifeq ($(FULL_TARGET),m68k-amiga)
  1371. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1372. endif
  1373. ifeq ($(FULL_TARGET),m68k-atari)
  1374. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1375. endif
  1376. ifeq ($(FULL_TARGET),m68k-openbsd)
  1377. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1378. endif
  1379. ifeq ($(FULL_TARGET),m68k-palmos)
  1380. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1381. endif
  1382. ifeq ($(FULL_TARGET),m68k-embedded)
  1383. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1384. endif
  1385. ifeq ($(FULL_TARGET),powerpc-linux)
  1386. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1387. endif
  1388. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1389. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1390. endif
  1391. ifeq ($(FULL_TARGET),powerpc-amiga)
  1392. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1393. endif
  1394. ifeq ($(FULL_TARGET),powerpc-macos)
  1395. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1396. endif
  1397. ifeq ($(FULL_TARGET),powerpc-darwin)
  1398. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1399. endif
  1400. ifeq ($(FULL_TARGET),powerpc-morphos)
  1401. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1402. endif
  1403. ifeq ($(FULL_TARGET),powerpc-embedded)
  1404. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1405. endif
  1406. ifeq ($(FULL_TARGET),powerpc-wii)
  1407. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1408. endif
  1409. ifeq ($(FULL_TARGET),powerpc-aix)
  1410. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1411. endif
  1412. ifeq ($(FULL_TARGET),sparc-linux)
  1413. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1414. endif
  1415. ifeq ($(FULL_TARGET),sparc-netbsd)
  1416. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1417. endif
  1418. ifeq ($(FULL_TARGET),sparc-solaris)
  1419. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1420. endif
  1421. ifeq ($(FULL_TARGET),sparc-embedded)
  1422. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1423. endif
  1424. ifeq ($(FULL_TARGET),x86_64-linux)
  1425. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1426. endif
  1427. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1428. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1429. endif
  1430. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1431. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1432. endif
  1433. ifeq ($(FULL_TARGET),x86_64-solaris)
  1434. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1435. endif
  1436. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1437. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1438. endif
  1439. ifeq ($(FULL_TARGET),x86_64-darwin)
  1440. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1441. endif
  1442. ifeq ($(FULL_TARGET),x86_64-win64)
  1443. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1444. endif
  1445. ifeq ($(FULL_TARGET),x86_64-embedded)
  1446. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1447. endif
  1448. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1449. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1450. endif
  1451. ifeq ($(FULL_TARGET),x86_64-aros)
  1452. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1453. endif
  1454. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1455. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1456. endif
  1457. ifeq ($(FULL_TARGET),arm-linux)
  1458. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1459. endif
  1460. ifeq ($(FULL_TARGET),arm-palmos)
  1461. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1462. endif
  1463. ifeq ($(FULL_TARGET),arm-darwin)
  1464. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1465. endif
  1466. ifeq ($(FULL_TARGET),arm-wince)
  1467. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1468. endif
  1469. ifeq ($(FULL_TARGET),arm-gba)
  1470. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1471. endif
  1472. ifeq ($(FULL_TARGET),arm-nds)
  1473. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1474. endif
  1475. ifeq ($(FULL_TARGET),arm-embedded)
  1476. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1477. endif
  1478. ifeq ($(FULL_TARGET),arm-symbian)
  1479. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1480. endif
  1481. ifeq ($(FULL_TARGET),arm-android)
  1482. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1483. endif
  1484. ifeq ($(FULL_TARGET),powerpc64-linux)
  1485. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1486. endif
  1487. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1488. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1489. endif
  1490. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1491. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1492. endif
  1493. ifeq ($(FULL_TARGET),powerpc64-aix)
  1494. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1495. endif
  1496. ifeq ($(FULL_TARGET),avr-embedded)
  1497. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1498. endif
  1499. ifeq ($(FULL_TARGET),armeb-linux)
  1500. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1501. endif
  1502. ifeq ($(FULL_TARGET),armeb-embedded)
  1503. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1504. endif
  1505. ifeq ($(FULL_TARGET),mips-linux)
  1506. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1507. endif
  1508. ifeq ($(FULL_TARGET),mipsel-linux)
  1509. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1510. endif
  1511. ifeq ($(FULL_TARGET),mipsel-embedded)
  1512. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1513. endif
  1514. ifeq ($(FULL_TARGET),mipsel-android)
  1515. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1516. endif
  1517. ifeq ($(FULL_TARGET),jvm-java)
  1518. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1519. endif
  1520. ifeq ($(FULL_TARGET),jvm-android)
  1521. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1522. endif
  1523. ifeq ($(FULL_TARGET),i8086-msdos)
  1524. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1525. endif
  1526. ifeq ($(FULL_TARGET),aarch64-linux)
  1527. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1528. endif
  1529. ifeq ($(FULL_TARGET),aarch64-darwin)
  1530. override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
  1531. endif
  1532. ifeq ($(FULL_TARGET),i386-linux)
  1533. override COMPILER_TARGETDIR+=.
  1534. endif
  1535. ifeq ($(FULL_TARGET),i386-go32v2)
  1536. override COMPILER_TARGETDIR+=.
  1537. endif
  1538. ifeq ($(FULL_TARGET),i386-win32)
  1539. override COMPILER_TARGETDIR+=.
  1540. endif
  1541. ifeq ($(FULL_TARGET),i386-os2)
  1542. override COMPILER_TARGETDIR+=.
  1543. endif
  1544. ifeq ($(FULL_TARGET),i386-freebsd)
  1545. override COMPILER_TARGETDIR+=.
  1546. endif
  1547. ifeq ($(FULL_TARGET),i386-beos)
  1548. override COMPILER_TARGETDIR+=.
  1549. endif
  1550. ifeq ($(FULL_TARGET),i386-haiku)
  1551. override COMPILER_TARGETDIR+=.
  1552. endif
  1553. ifeq ($(FULL_TARGET),i386-netbsd)
  1554. override COMPILER_TARGETDIR+=.
  1555. endif
  1556. ifeq ($(FULL_TARGET),i386-solaris)
  1557. override COMPILER_TARGETDIR+=.
  1558. endif
  1559. ifeq ($(FULL_TARGET),i386-qnx)
  1560. override COMPILER_TARGETDIR+=.
  1561. endif
  1562. ifeq ($(FULL_TARGET),i386-netware)
  1563. override COMPILER_TARGETDIR+=.
  1564. endif
  1565. ifeq ($(FULL_TARGET),i386-openbsd)
  1566. override COMPILER_TARGETDIR+=.
  1567. endif
  1568. ifeq ($(FULL_TARGET),i386-wdosx)
  1569. override COMPILER_TARGETDIR+=.
  1570. endif
  1571. ifeq ($(FULL_TARGET),i386-darwin)
  1572. override COMPILER_TARGETDIR+=.
  1573. endif
  1574. ifeq ($(FULL_TARGET),i386-emx)
  1575. override COMPILER_TARGETDIR+=.
  1576. endif
  1577. ifeq ($(FULL_TARGET),i386-watcom)
  1578. override COMPILER_TARGETDIR+=.
  1579. endif
  1580. ifeq ($(FULL_TARGET),i386-netwlibc)
  1581. override COMPILER_TARGETDIR+=.
  1582. endif
  1583. ifeq ($(FULL_TARGET),i386-wince)
  1584. override COMPILER_TARGETDIR+=.
  1585. endif
  1586. ifeq ($(FULL_TARGET),i386-embedded)
  1587. override COMPILER_TARGETDIR+=.
  1588. endif
  1589. ifeq ($(FULL_TARGET),i386-symbian)
  1590. override COMPILER_TARGETDIR+=.
  1591. endif
  1592. ifeq ($(FULL_TARGET),i386-nativent)
  1593. override COMPILER_TARGETDIR+=.
  1594. endif
  1595. ifeq ($(FULL_TARGET),i386-iphonesim)
  1596. override COMPILER_TARGETDIR+=.
  1597. endif
  1598. ifeq ($(FULL_TARGET),i386-android)
  1599. override COMPILER_TARGETDIR+=.
  1600. endif
  1601. ifeq ($(FULL_TARGET),i386-aros)
  1602. override COMPILER_TARGETDIR+=.
  1603. endif
  1604. ifeq ($(FULL_TARGET),m68k-linux)
  1605. override COMPILER_TARGETDIR+=.
  1606. endif
  1607. ifeq ($(FULL_TARGET),m68k-freebsd)
  1608. override COMPILER_TARGETDIR+=.
  1609. endif
  1610. ifeq ($(FULL_TARGET),m68k-netbsd)
  1611. override COMPILER_TARGETDIR+=.
  1612. endif
  1613. ifeq ($(FULL_TARGET),m68k-amiga)
  1614. override COMPILER_TARGETDIR+=.
  1615. endif
  1616. ifeq ($(FULL_TARGET),m68k-atari)
  1617. override COMPILER_TARGETDIR+=.
  1618. endif
  1619. ifeq ($(FULL_TARGET),m68k-openbsd)
  1620. override COMPILER_TARGETDIR+=.
  1621. endif
  1622. ifeq ($(FULL_TARGET),m68k-palmos)
  1623. override COMPILER_TARGETDIR+=.
  1624. endif
  1625. ifeq ($(FULL_TARGET),m68k-embedded)
  1626. override COMPILER_TARGETDIR+=.
  1627. endif
  1628. ifeq ($(FULL_TARGET),powerpc-linux)
  1629. override COMPILER_TARGETDIR+=.
  1630. endif
  1631. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1632. override COMPILER_TARGETDIR+=.
  1633. endif
  1634. ifeq ($(FULL_TARGET),powerpc-amiga)
  1635. override COMPILER_TARGETDIR+=.
  1636. endif
  1637. ifeq ($(FULL_TARGET),powerpc-macos)
  1638. override COMPILER_TARGETDIR+=.
  1639. endif
  1640. ifeq ($(FULL_TARGET),powerpc-darwin)
  1641. override COMPILER_TARGETDIR+=.
  1642. endif
  1643. ifeq ($(FULL_TARGET),powerpc-morphos)
  1644. override COMPILER_TARGETDIR+=.
  1645. endif
  1646. ifeq ($(FULL_TARGET),powerpc-embedded)
  1647. override COMPILER_TARGETDIR+=.
  1648. endif
  1649. ifeq ($(FULL_TARGET),powerpc-wii)
  1650. override COMPILER_TARGETDIR+=.
  1651. endif
  1652. ifeq ($(FULL_TARGET),powerpc-aix)
  1653. override COMPILER_TARGETDIR+=.
  1654. endif
  1655. ifeq ($(FULL_TARGET),sparc-linux)
  1656. override COMPILER_TARGETDIR+=.
  1657. endif
  1658. ifeq ($(FULL_TARGET),sparc-netbsd)
  1659. override COMPILER_TARGETDIR+=.
  1660. endif
  1661. ifeq ($(FULL_TARGET),sparc-solaris)
  1662. override COMPILER_TARGETDIR+=.
  1663. endif
  1664. ifeq ($(FULL_TARGET),sparc-embedded)
  1665. override COMPILER_TARGETDIR+=.
  1666. endif
  1667. ifeq ($(FULL_TARGET),x86_64-linux)
  1668. override COMPILER_TARGETDIR+=.
  1669. endif
  1670. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1671. override COMPILER_TARGETDIR+=.
  1672. endif
  1673. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1674. override COMPILER_TARGETDIR+=.
  1675. endif
  1676. ifeq ($(FULL_TARGET),x86_64-solaris)
  1677. override COMPILER_TARGETDIR+=.
  1678. endif
  1679. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1680. override COMPILER_TARGETDIR+=.
  1681. endif
  1682. ifeq ($(FULL_TARGET),x86_64-darwin)
  1683. override COMPILER_TARGETDIR+=.
  1684. endif
  1685. ifeq ($(FULL_TARGET),x86_64-win64)
  1686. override COMPILER_TARGETDIR+=.
  1687. endif
  1688. ifeq ($(FULL_TARGET),x86_64-embedded)
  1689. override COMPILER_TARGETDIR+=.
  1690. endif
  1691. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1692. override COMPILER_TARGETDIR+=.
  1693. endif
  1694. ifeq ($(FULL_TARGET),x86_64-aros)
  1695. override COMPILER_TARGETDIR+=.
  1696. endif
  1697. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1698. override COMPILER_TARGETDIR+=.
  1699. endif
  1700. ifeq ($(FULL_TARGET),arm-linux)
  1701. override COMPILER_TARGETDIR+=.
  1702. endif
  1703. ifeq ($(FULL_TARGET),arm-palmos)
  1704. override COMPILER_TARGETDIR+=.
  1705. endif
  1706. ifeq ($(FULL_TARGET),arm-darwin)
  1707. override COMPILER_TARGETDIR+=.
  1708. endif
  1709. ifeq ($(FULL_TARGET),arm-wince)
  1710. override COMPILER_TARGETDIR+=.
  1711. endif
  1712. ifeq ($(FULL_TARGET),arm-gba)
  1713. override COMPILER_TARGETDIR+=.
  1714. endif
  1715. ifeq ($(FULL_TARGET),arm-nds)
  1716. override COMPILER_TARGETDIR+=.
  1717. endif
  1718. ifeq ($(FULL_TARGET),arm-embedded)
  1719. override COMPILER_TARGETDIR+=.
  1720. endif
  1721. ifeq ($(FULL_TARGET),arm-symbian)
  1722. override COMPILER_TARGETDIR+=.
  1723. endif
  1724. ifeq ($(FULL_TARGET),arm-android)
  1725. override COMPILER_TARGETDIR+=.
  1726. endif
  1727. ifeq ($(FULL_TARGET),powerpc64-linux)
  1728. override COMPILER_TARGETDIR+=.
  1729. endif
  1730. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1731. override COMPILER_TARGETDIR+=.
  1732. endif
  1733. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1734. override COMPILER_TARGETDIR+=.
  1735. endif
  1736. ifeq ($(FULL_TARGET),powerpc64-aix)
  1737. override COMPILER_TARGETDIR+=.
  1738. endif
  1739. ifeq ($(FULL_TARGET),avr-embedded)
  1740. override COMPILER_TARGETDIR+=.
  1741. endif
  1742. ifeq ($(FULL_TARGET),armeb-linux)
  1743. override COMPILER_TARGETDIR+=.
  1744. endif
  1745. ifeq ($(FULL_TARGET),armeb-embedded)
  1746. override COMPILER_TARGETDIR+=.
  1747. endif
  1748. ifeq ($(FULL_TARGET),mips-linux)
  1749. override COMPILER_TARGETDIR+=.
  1750. endif
  1751. ifeq ($(FULL_TARGET),mipsel-linux)
  1752. override COMPILER_TARGETDIR+=.
  1753. endif
  1754. ifeq ($(FULL_TARGET),mipsel-embedded)
  1755. override COMPILER_TARGETDIR+=.
  1756. endif
  1757. ifeq ($(FULL_TARGET),mipsel-android)
  1758. override COMPILER_TARGETDIR+=.
  1759. endif
  1760. ifeq ($(FULL_TARGET),jvm-java)
  1761. override COMPILER_TARGETDIR+=.
  1762. endif
  1763. ifeq ($(FULL_TARGET),jvm-android)
  1764. override COMPILER_TARGETDIR+=.
  1765. endif
  1766. ifeq ($(FULL_TARGET),i8086-msdos)
  1767. override COMPILER_TARGETDIR+=.
  1768. endif
  1769. ifeq ($(FULL_TARGET),aarch64-linux)
  1770. override COMPILER_TARGETDIR+=.
  1771. endif
  1772. ifeq ($(FULL_TARGET),aarch64-darwin)
  1773. override COMPILER_TARGETDIR+=.
  1774. endif
  1775. ifeq ($(FULL_TARGET),i386-linux)
  1776. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1777. endif
  1778. ifeq ($(FULL_TARGET),i386-go32v2)
  1779. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1780. endif
  1781. ifeq ($(FULL_TARGET),i386-win32)
  1782. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1783. endif
  1784. ifeq ($(FULL_TARGET),i386-os2)
  1785. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1786. endif
  1787. ifeq ($(FULL_TARGET),i386-freebsd)
  1788. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1789. endif
  1790. ifeq ($(FULL_TARGET),i386-beos)
  1791. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1792. endif
  1793. ifeq ($(FULL_TARGET),i386-haiku)
  1794. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1795. endif
  1796. ifeq ($(FULL_TARGET),i386-netbsd)
  1797. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1798. endif
  1799. ifeq ($(FULL_TARGET),i386-solaris)
  1800. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1801. endif
  1802. ifeq ($(FULL_TARGET),i386-qnx)
  1803. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1804. endif
  1805. ifeq ($(FULL_TARGET),i386-netware)
  1806. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1807. endif
  1808. ifeq ($(FULL_TARGET),i386-openbsd)
  1809. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1810. endif
  1811. ifeq ($(FULL_TARGET),i386-wdosx)
  1812. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1813. endif
  1814. ifeq ($(FULL_TARGET),i386-darwin)
  1815. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1816. endif
  1817. ifeq ($(FULL_TARGET),i386-emx)
  1818. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1819. endif
  1820. ifeq ($(FULL_TARGET),i386-watcom)
  1821. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1822. endif
  1823. ifeq ($(FULL_TARGET),i386-netwlibc)
  1824. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1825. endif
  1826. ifeq ($(FULL_TARGET),i386-wince)
  1827. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1828. endif
  1829. ifeq ($(FULL_TARGET),i386-embedded)
  1830. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1831. endif
  1832. ifeq ($(FULL_TARGET),i386-symbian)
  1833. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1834. endif
  1835. ifeq ($(FULL_TARGET),i386-nativent)
  1836. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1837. endif
  1838. ifeq ($(FULL_TARGET),i386-iphonesim)
  1839. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1840. endif
  1841. ifeq ($(FULL_TARGET),i386-android)
  1842. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1843. endif
  1844. ifeq ($(FULL_TARGET),i386-aros)
  1845. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1846. endif
  1847. ifeq ($(FULL_TARGET),m68k-linux)
  1848. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1849. endif
  1850. ifeq ($(FULL_TARGET),m68k-freebsd)
  1851. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1852. endif
  1853. ifeq ($(FULL_TARGET),m68k-netbsd)
  1854. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1855. endif
  1856. ifeq ($(FULL_TARGET),m68k-amiga)
  1857. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1858. endif
  1859. ifeq ($(FULL_TARGET),m68k-atari)
  1860. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1861. endif
  1862. ifeq ($(FULL_TARGET),m68k-openbsd)
  1863. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1864. endif
  1865. ifeq ($(FULL_TARGET),m68k-palmos)
  1866. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1867. endif
  1868. ifeq ($(FULL_TARGET),m68k-embedded)
  1869. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1870. endif
  1871. ifeq ($(FULL_TARGET),powerpc-linux)
  1872. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1873. endif
  1874. ifeq ($(FULL_TARGET),powerpc-netbsd)
  1875. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1876. endif
  1877. ifeq ($(FULL_TARGET),powerpc-amiga)
  1878. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1879. endif
  1880. ifeq ($(FULL_TARGET),powerpc-macos)
  1881. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1882. endif
  1883. ifeq ($(FULL_TARGET),powerpc-darwin)
  1884. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1885. endif
  1886. ifeq ($(FULL_TARGET),powerpc-morphos)
  1887. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1888. endif
  1889. ifeq ($(FULL_TARGET),powerpc-embedded)
  1890. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1891. endif
  1892. ifeq ($(FULL_TARGET),powerpc-wii)
  1893. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1894. endif
  1895. ifeq ($(FULL_TARGET),powerpc-aix)
  1896. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1897. endif
  1898. ifeq ($(FULL_TARGET),sparc-linux)
  1899. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1900. endif
  1901. ifeq ($(FULL_TARGET),sparc-netbsd)
  1902. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1903. endif
  1904. ifeq ($(FULL_TARGET),sparc-solaris)
  1905. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1906. endif
  1907. ifeq ($(FULL_TARGET),sparc-embedded)
  1908. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1909. endif
  1910. ifeq ($(FULL_TARGET),x86_64-linux)
  1911. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1912. endif
  1913. ifeq ($(FULL_TARGET),x86_64-freebsd)
  1914. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1915. endif
  1916. ifeq ($(FULL_TARGET),x86_64-netbsd)
  1917. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1918. endif
  1919. ifeq ($(FULL_TARGET),x86_64-solaris)
  1920. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1921. endif
  1922. ifeq ($(FULL_TARGET),x86_64-openbsd)
  1923. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1924. endif
  1925. ifeq ($(FULL_TARGET),x86_64-darwin)
  1926. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1927. endif
  1928. ifeq ($(FULL_TARGET),x86_64-win64)
  1929. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1930. endif
  1931. ifeq ($(FULL_TARGET),x86_64-embedded)
  1932. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1933. endif
  1934. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  1935. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1936. endif
  1937. ifeq ($(FULL_TARGET),x86_64-aros)
  1938. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1939. endif
  1940. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  1941. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1942. endif
  1943. ifeq ($(FULL_TARGET),arm-linux)
  1944. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1945. endif
  1946. ifeq ($(FULL_TARGET),arm-palmos)
  1947. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1948. endif
  1949. ifeq ($(FULL_TARGET),arm-darwin)
  1950. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1951. endif
  1952. ifeq ($(FULL_TARGET),arm-wince)
  1953. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1954. endif
  1955. ifeq ($(FULL_TARGET),arm-gba)
  1956. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1957. endif
  1958. ifeq ($(FULL_TARGET),arm-nds)
  1959. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1960. endif
  1961. ifeq ($(FULL_TARGET),arm-embedded)
  1962. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1963. endif
  1964. ifeq ($(FULL_TARGET),arm-symbian)
  1965. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1966. endif
  1967. ifeq ($(FULL_TARGET),arm-android)
  1968. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1969. endif
  1970. ifeq ($(FULL_TARGET),powerpc64-linux)
  1971. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1972. endif
  1973. ifeq ($(FULL_TARGET),powerpc64-darwin)
  1974. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1975. endif
  1976. ifeq ($(FULL_TARGET),powerpc64-embedded)
  1977. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1978. endif
  1979. ifeq ($(FULL_TARGET),powerpc64-aix)
  1980. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1981. endif
  1982. ifeq ($(FULL_TARGET),avr-embedded)
  1983. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1984. endif
  1985. ifeq ($(FULL_TARGET),armeb-linux)
  1986. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1987. endif
  1988. ifeq ($(FULL_TARGET),armeb-embedded)
  1989. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1990. endif
  1991. ifeq ($(FULL_TARGET),mips-linux)
  1992. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1993. endif
  1994. ifeq ($(FULL_TARGET),mipsel-linux)
  1995. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1996. endif
  1997. ifeq ($(FULL_TARGET),mipsel-embedded)
  1998. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  1999. endif
  2000. ifeq ($(FULL_TARGET),mipsel-android)
  2001. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2002. endif
  2003. ifeq ($(FULL_TARGET),jvm-java)
  2004. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2005. endif
  2006. ifeq ($(FULL_TARGET),jvm-android)
  2007. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2008. endif
  2009. ifeq ($(FULL_TARGET),i8086-msdos)
  2010. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2011. endif
  2012. ifeq ($(FULL_TARGET),aarch64-linux)
  2013. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2014. endif
  2015. ifeq ($(FULL_TARGET),aarch64-darwin)
  2016. override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
  2017. endif
  2018. ifdef REQUIRE_UNITSDIR
  2019. override UNITSDIR+=$(REQUIRE_UNITSDIR)
  2020. endif
  2021. ifdef REQUIRE_PACKAGESDIR
  2022. override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
  2023. endif
  2024. ifdef ZIPINSTALL
  2025. ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
  2026. UNIXHier=1
  2027. endif
  2028. else
  2029. ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
  2030. UNIXHier=1
  2031. endif
  2032. endif
  2033. ifndef INSTALL_PREFIX
  2034. ifdef PREFIX
  2035. INSTALL_PREFIX=$(PREFIX)
  2036. endif
  2037. endif
  2038. ifndef INSTALL_PREFIX
  2039. ifdef UNIXHier
  2040. INSTALL_PREFIX=/usr/local
  2041. else
  2042. ifdef INSTALL_FPCPACKAGE
  2043. INSTALL_BASEDIR:=/pp
  2044. else
  2045. INSTALL_BASEDIR:=/$(PACKAGE_NAME)
  2046. endif
  2047. endif
  2048. endif
  2049. export INSTALL_PREFIX
  2050. ifdef INSTALL_FPCSUBDIR
  2051. export INSTALL_FPCSUBDIR
  2052. endif
  2053. ifndef DIST_DESTDIR
  2054. DIST_DESTDIR:=$(BASEDIR)
  2055. endif
  2056. export DIST_DESTDIR
  2057. ifndef COMPILER_UNITTARGETDIR
  2058. ifdef PACKAGEDIR_MAIN
  2059. COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
  2060. else
  2061. COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
  2062. endif
  2063. endif
  2064. ifndef COMPILER_TARGETDIR
  2065. COMPILER_TARGETDIR=.
  2066. endif
  2067. ifndef INSTALL_BASEDIR
  2068. ifdef UNIXHier
  2069. ifdef INSTALL_FPCPACKAGE
  2070. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
  2071. else
  2072. INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
  2073. endif
  2074. else
  2075. INSTALL_BASEDIR:=$(INSTALL_PREFIX)
  2076. endif
  2077. endif
  2078. ifndef INSTALL_BINDIR
  2079. ifdef UNIXHier
  2080. INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
  2081. else
  2082. INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
  2083. ifdef INSTALL_FPCPACKAGE
  2084. ifdef CROSSCOMPILE
  2085. ifdef CROSSINSTALL
  2086. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
  2087. else
  2088. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  2089. endif
  2090. else
  2091. INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
  2092. endif
  2093. endif
  2094. endif
  2095. endif
  2096. ifndef INSTALL_UNITDIR
  2097. INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
  2098. ifdef INSTALL_FPCPACKAGE
  2099. ifdef PACKAGE_NAME
  2100. INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
  2101. endif
  2102. endif
  2103. endif
  2104. ifndef INSTALL_LIBDIR
  2105. ifdef UNIXHier
  2106. INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
  2107. else
  2108. INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
  2109. endif
  2110. endif
  2111. ifndef INSTALL_SOURCEDIR
  2112. ifdef UNIXHier
  2113. ifdef BSDhier
  2114. SRCPREFIXDIR=share/src
  2115. else
  2116. ifdef linuxHier
  2117. SRCPREFIXDIR=share/src
  2118. else
  2119. SRCPREFIXDIR=src
  2120. endif
  2121. endif
  2122. ifdef INSTALL_FPCPACKAGE
  2123. ifdef INSTALL_FPCSUBDIR
  2124. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  2125. else
  2126. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2127. endif
  2128. else
  2129. INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2130. endif
  2131. else
  2132. ifdef INSTALL_FPCPACKAGE
  2133. ifdef INSTALL_FPCSUBDIR
  2134. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
  2135. else
  2136. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
  2137. endif
  2138. else
  2139. INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
  2140. endif
  2141. endif
  2142. endif
  2143. ifndef INSTALL_DOCDIR
  2144. ifdef UNIXHier
  2145. ifdef BSDhier
  2146. DOCPREFIXDIR=share/doc
  2147. else
  2148. ifdef linuxHier
  2149. DOCPREFIXDIR=share/doc
  2150. else
  2151. DOCPREFIXDIR=doc
  2152. endif
  2153. endif
  2154. ifdef INSTALL_FPCPACKAGE
  2155. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2156. else
  2157. INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2158. endif
  2159. else
  2160. ifdef INSTALL_FPCPACKAGE
  2161. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
  2162. else
  2163. INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
  2164. endif
  2165. endif
  2166. endif
  2167. ifndef INSTALL_EXAMPLEDIR
  2168. ifdef UNIXHier
  2169. ifdef INSTALL_FPCPACKAGE
  2170. ifdef BSDhier
  2171. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
  2172. else
  2173. ifdef linuxHier
  2174. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
  2175. else
  2176. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
  2177. endif
  2178. endif
  2179. else
  2180. ifdef BSDhier
  2181. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2182. else
  2183. ifdef linuxHier
  2184. INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2185. else
  2186. INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
  2187. endif
  2188. endif
  2189. endif
  2190. else
  2191. ifdef INSTALL_FPCPACKAGE
  2192. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
  2193. else
  2194. INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
  2195. endif
  2196. endif
  2197. endif
  2198. ifndef INSTALL_DATADIR
  2199. INSTALL_DATADIR=$(INSTALL_BASEDIR)
  2200. endif
  2201. ifndef INSTALL_SHAREDDIR
  2202. INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
  2203. endif
  2204. ifdef CROSSCOMPILE
  2205. ifndef CROSSBINDIR
  2206. CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
  2207. ifeq ($(CROSSBINDIR),)
  2208. CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
  2209. endif
  2210. endif
  2211. else
  2212. CROSSBINDIR=
  2213. endif
  2214. BATCHEXT=.bat
  2215. LOADEREXT=.as
  2216. EXEEXT=.exe
  2217. PPLEXT=.ppl
  2218. PPUEXT=.ppu
  2219. OEXT=.o
  2220. ASMEXT=.s
  2221. SMARTEXT=.sl
  2222. STATICLIBEXT=.a
  2223. SHAREDLIBEXT=.so
  2224. SHAREDLIBPREFIX=libfp
  2225. STATICLIBPREFIX=libp
  2226. IMPORTLIBPREFIX=libimp
  2227. RSTEXT=.rst
  2228. EXEDBGEXT=.dbg
  2229. ifeq ($(OS_TARGET),go32v1)
  2230. STATICLIBPREFIX=
  2231. SHORTSUFFIX=v1
  2232. endif
  2233. ifeq ($(OS_TARGET),go32v2)
  2234. STATICLIBPREFIX=
  2235. SHORTSUFFIX=dos
  2236. IMPORTLIBPREFIX=
  2237. endif
  2238. ifeq ($(OS_TARGET),watcom)
  2239. STATICLIBPREFIX=
  2240. OEXT=.obj
  2241. ASMEXT=.asm
  2242. SHAREDLIBEXT=.dll
  2243. SHORTSUFFIX=wat
  2244. IMPORTLIBPREFIX=
  2245. endif
  2246. ifneq ($(CPU_TARGET),jvm)
  2247. ifeq ($(OS_TARGET),android)
  2248. BATCHEXT=.sh
  2249. EXEEXT=
  2250. HASSHAREDLIB=1
  2251. SHORTSUFFIX=lnx
  2252. endif
  2253. endif
  2254. ifeq ($(OS_TARGET),linux)
  2255. BATCHEXT=.sh
  2256. EXEEXT=
  2257. HASSHAREDLIB=1
  2258. SHORTSUFFIX=lnx
  2259. endif
  2260. ifeq ($(OS_TARGET),dragonfly)
  2261. BATCHEXT=.sh
  2262. EXEEXT=
  2263. HASSHAREDLIB=1
  2264. SHORTSUFFIX=df
  2265. endif
  2266. ifeq ($(OS_TARGET),freebsd)
  2267. BATCHEXT=.sh
  2268. EXEEXT=
  2269. HASSHAREDLIB=1
  2270. SHORTSUFFIX=fbs
  2271. endif
  2272. ifeq ($(OS_TARGET),netbsd)
  2273. BATCHEXT=.sh
  2274. EXEEXT=
  2275. HASSHAREDLIB=1
  2276. SHORTSUFFIX=nbs
  2277. endif
  2278. ifeq ($(OS_TARGET),openbsd)
  2279. BATCHEXT=.sh
  2280. EXEEXT=
  2281. HASSHAREDLIB=1
  2282. SHORTSUFFIX=obs
  2283. endif
  2284. ifeq ($(OS_TARGET),win32)
  2285. SHAREDLIBEXT=.dll
  2286. SHORTSUFFIX=w32
  2287. endif
  2288. ifeq ($(OS_TARGET),os2)
  2289. BATCHEXT=.cmd
  2290. AOUTEXT=.out
  2291. STATICLIBPREFIX=
  2292. SHAREDLIBEXT=.dll
  2293. SHORTSUFFIX=os2
  2294. ECHO=echo
  2295. IMPORTLIBPREFIX=
  2296. endif
  2297. ifeq ($(OS_TARGET),emx)
  2298. BATCHEXT=.cmd
  2299. AOUTEXT=.out
  2300. STATICLIBPREFIX=
  2301. SHAREDLIBEXT=.dll
  2302. SHORTSUFFIX=emx
  2303. ECHO=echo
  2304. IMPORTLIBPREFIX=
  2305. endif
  2306. ifeq ($(OS_TARGET),amiga)
  2307. EXEEXT=
  2308. SHAREDLIBEXT=.library
  2309. SHORTSUFFIX=amg
  2310. endif
  2311. ifeq ($(OS_TARGET),aros)
  2312. EXEEXT=
  2313. SHAREDLIBEXT=.library
  2314. SHORTSUFFIX=aros
  2315. endif
  2316. ifeq ($(OS_TARGET),morphos)
  2317. EXEEXT=
  2318. SHAREDLIBEXT=.library
  2319. SHORTSUFFIX=mos
  2320. endif
  2321. ifeq ($(OS_TARGET),atari)
  2322. EXEEXT=.ttp
  2323. SHORTSUFFIX=ata
  2324. endif
  2325. ifeq ($(OS_TARGET),beos)
  2326. BATCHEXT=.sh
  2327. EXEEXT=
  2328. SHORTSUFFIX=be
  2329. endif
  2330. ifeq ($(OS_TARGET),haiku)
  2331. BATCHEXT=.sh
  2332. EXEEXT=
  2333. SHORTSUFFIX=hai
  2334. endif
  2335. ifeq ($(OS_TARGET),solaris)
  2336. BATCHEXT=.sh
  2337. EXEEXT=
  2338. SHORTSUFFIX=sun
  2339. endif
  2340. ifeq ($(OS_TARGET),qnx)
  2341. BATCHEXT=.sh
  2342. EXEEXT=
  2343. SHORTSUFFIX=qnx
  2344. endif
  2345. ifeq ($(OS_TARGET),netware)
  2346. EXEEXT=.nlm
  2347. STATICLIBPREFIX=
  2348. SHORTSUFFIX=nw
  2349. IMPORTLIBPREFIX=imp
  2350. endif
  2351. ifeq ($(OS_TARGET),netwlibc)
  2352. EXEEXT=.nlm
  2353. STATICLIBPREFIX=
  2354. SHORTSUFFIX=nwl
  2355. IMPORTLIBPREFIX=imp
  2356. endif
  2357. ifeq ($(OS_TARGET),macos)
  2358. BATCHEXT=
  2359. EXEEXT=
  2360. DEBUGSYMEXT=.xcoff
  2361. SHORTSUFFIX=mac
  2362. IMPORTLIBPREFIX=imp
  2363. endif
  2364. ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
  2365. BATCHEXT=.sh
  2366. EXEEXT=
  2367. HASSHAREDLIB=1
  2368. SHORTSUFFIX=dwn
  2369. EXEDBGEXT=.dSYM
  2370. endif
  2371. ifeq ($(OS_TARGET),gba)
  2372. EXEEXT=.gba
  2373. SHAREDLIBEXT=.so
  2374. SHORTSUFFIX=gba
  2375. endif
  2376. ifeq ($(OS_TARGET),symbian)
  2377. SHAREDLIBEXT=.dll
  2378. SHORTSUFFIX=symbian
  2379. endif
  2380. ifeq ($(OS_TARGET),NativeNT)
  2381. SHAREDLIBEXT=.dll
  2382. SHORTSUFFIX=nativent
  2383. endif
  2384. ifeq ($(OS_TARGET),wii)
  2385. EXEEXT=.dol
  2386. SHAREDLIBEXT=.so
  2387. SHORTSUFFIX=wii
  2388. endif
  2389. ifeq ($(OS_TARGET),aix)
  2390. BATCHEXT=.sh
  2391. EXEEXT=
  2392. SHORTSUFFIX=aix
  2393. endif
  2394. ifeq ($(OS_TARGET),java)
  2395. OEXT=.class
  2396. ASMEXT=.j
  2397. SHAREDLIBEXT=.jar
  2398. SHORTSUFFIX=java
  2399. endif
  2400. ifeq ($(CPU_TARGET),jvm)
  2401. ifeq ($(OS_TARGET),android)
  2402. OEXT=.class
  2403. ASMEXT=.j
  2404. SHAREDLIBEXT=.jar
  2405. SHORTSUFFIX=android
  2406. endif
  2407. endif
  2408. ifeq ($(OS_TARGET),msdos)
  2409. STATICLIBPREFIX=
  2410. STATICLIBEXT=.a
  2411. SHORTSUFFIX=d16
  2412. endif
  2413. ifeq ($(OS_TARGET),embedded)
  2414. EXEEXT=.bin
  2415. SHORTSUFFIX=emb
  2416. endif
  2417. ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
  2418. FPCMADE=fpcmade.$(SHORTSUFFIX)
  2419. ZIPSUFFIX=$(SHORTSUFFIX)
  2420. ZIPCROSSPREFIX=
  2421. ZIPSOURCESUFFIX=src
  2422. ZIPEXAMPLESUFFIX=exm
  2423. else
  2424. FPCMADE=fpcmade.$(TARGETSUFFIX)
  2425. ZIPSOURCESUFFIX=.source
  2426. ZIPEXAMPLESUFFIX=.examples
  2427. ifdef CROSSCOMPILE
  2428. ZIPSUFFIX=.$(SOURCESUFFIX)
  2429. ZIPCROSSPREFIX=$(TARGETSUFFIX)-
  2430. else
  2431. ZIPSUFFIX=.$(TARGETSUFFIX)
  2432. ZIPCROSSPREFIX=
  2433. endif
  2434. endif
  2435. ifndef ECHO
  2436. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
  2437. ifeq ($(ECHO),)
  2438. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  2439. ifeq ($(ECHO),)
  2440. ECHO= __missing_command_ECHO
  2441. else
  2442. ECHO:=$(firstword $(ECHO))
  2443. endif
  2444. else
  2445. ECHO:=$(firstword $(ECHO))
  2446. endif
  2447. endif
  2448. export ECHO
  2449. ifndef DATE
  2450. DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
  2451. ifeq ($(DATE),)
  2452. DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
  2453. ifeq ($(DATE),)
  2454. DATE= __missing_command_DATE
  2455. else
  2456. DATE:=$(firstword $(DATE))
  2457. endif
  2458. else
  2459. DATE:=$(firstword $(DATE))
  2460. endif
  2461. endif
  2462. export DATE
  2463. ifndef GINSTALL
  2464. GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
  2465. ifeq ($(GINSTALL),)
  2466. GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
  2467. ifeq ($(GINSTALL),)
  2468. GINSTALL= __missing_command_GINSTALL
  2469. else
  2470. GINSTALL:=$(firstword $(GINSTALL))
  2471. endif
  2472. else
  2473. GINSTALL:=$(firstword $(GINSTALL))
  2474. endif
  2475. endif
  2476. export GINSTALL
  2477. ifndef CPPROG
  2478. CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
  2479. ifeq ($(CPPROG),)
  2480. CPPROG= __missing_command_CPPROG
  2481. else
  2482. CPPROG:=$(firstword $(CPPROG))
  2483. endif
  2484. endif
  2485. export CPPROG
  2486. ifndef RMPROG
  2487. RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
  2488. ifeq ($(RMPROG),)
  2489. RMPROG= __missing_command_RMPROG
  2490. else
  2491. RMPROG:=$(firstword $(RMPROG))
  2492. endif
  2493. endif
  2494. export RMPROG
  2495. ifndef MVPROG
  2496. MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
  2497. ifeq ($(MVPROG),)
  2498. MVPROG= __missing_command_MVPROG
  2499. else
  2500. MVPROG:=$(firstword $(MVPROG))
  2501. endif
  2502. endif
  2503. export MVPROG
  2504. ifndef MKDIRPROG
  2505. MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2506. ifeq ($(MKDIRPROG),)
  2507. MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
  2508. ifeq ($(MKDIRPROG),)
  2509. MKDIRPROG= __missing_command_MKDIRPROG
  2510. else
  2511. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2512. endif
  2513. else
  2514. MKDIRPROG:=$(firstword $(MKDIRPROG))
  2515. endif
  2516. endif
  2517. export MKDIRPROG
  2518. ifndef ECHOREDIR
  2519. ifndef inUnix
  2520. ECHOREDIR=echo
  2521. else
  2522. ECHOREDIR=$(ECHO)
  2523. endif
  2524. endif
  2525. ifndef COPY
  2526. COPY:=$(CPPROG) -fp
  2527. endif
  2528. ifndef COPYTREE
  2529. COPYTREE:=$(CPPROG) -Rfp
  2530. endif
  2531. ifndef MKDIRTREE
  2532. MKDIRTREE:=$(MKDIRPROG) -p
  2533. endif
  2534. ifndef MOVE
  2535. MOVE:=$(MVPROG) -f
  2536. endif
  2537. ifndef DEL
  2538. DEL:=$(RMPROG) -f
  2539. endif
  2540. ifndef DELTREE
  2541. DELTREE:=$(RMPROG) -rf
  2542. endif
  2543. ifndef INSTALL
  2544. ifdef inUnix
  2545. INSTALL:=$(GINSTALL) -c -m 644
  2546. else
  2547. INSTALL:=$(COPY)
  2548. endif
  2549. endif
  2550. ifndef INSTALLEXE
  2551. ifdef inUnix
  2552. INSTALLEXE:=$(GINSTALL) -c -m 755
  2553. else
  2554. INSTALLEXE:=$(COPY)
  2555. endif
  2556. endif
  2557. ifndef MKDIR
  2558. MKDIR:=$(GINSTALL) -m 755 -d
  2559. endif
  2560. export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  2561. ifndef PPUMOVE
  2562. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
  2563. ifeq ($(PPUMOVE),)
  2564. PPUMOVE= __missing_command_PPUMOVE
  2565. else
  2566. PPUMOVE:=$(firstword $(PPUMOVE))
  2567. endif
  2568. endif
  2569. export PPUMOVE
  2570. ifndef FPCMAKE
  2571. FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
  2572. ifeq ($(FPCMAKE),)
  2573. FPCMAKE= __missing_command_FPCMAKE
  2574. else
  2575. FPCMAKE:=$(firstword $(FPCMAKE))
  2576. endif
  2577. endif
  2578. export FPCMAKE
  2579. ifndef ZIPPROG
  2580. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  2581. ifeq ($(ZIPPROG),)
  2582. ZIPPROG= __missing_command_ZIPPROG
  2583. else
  2584. ZIPPROG:=$(firstword $(ZIPPROG))
  2585. endif
  2586. endif
  2587. export ZIPPROG
  2588. ifndef TARPROG
  2589. TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
  2590. ifeq ($(TARPROG),)
  2591. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  2592. ifeq ($(TARPROG),)
  2593. TARPROG= __missing_command_TARPROG
  2594. else
  2595. TARPROG:=$(firstword $(TARPROG))
  2596. endif
  2597. else
  2598. TARPROG:=$(firstword $(TARPROG))
  2599. endif
  2600. endif
  2601. export TARPROG
  2602. ASNAME=$(BINUTILSPREFIX)as
  2603. LDNAME=$(BINUTILSPREFIX)ld
  2604. ARNAME=$(BINUTILSPREFIX)ar
  2605. RCNAME=$(BINUTILSPREFIX)rc
  2606. NASMNAME=$(BINUTILSPREFIX)nasm
  2607. ifndef ASPROG
  2608. ifdef CROSSBINDIR
  2609. ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
  2610. else
  2611. ASPROG=$(ASNAME)
  2612. endif
  2613. endif
  2614. ifndef LDPROG
  2615. ifdef CROSSBINDIR
  2616. LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
  2617. else
  2618. LDPROG=$(LDNAME)
  2619. endif
  2620. endif
  2621. ifndef RCPROG
  2622. ifdef CROSSBINDIR
  2623. RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
  2624. else
  2625. RCPROG=$(RCNAME)
  2626. endif
  2627. endif
  2628. ifndef ARPROG
  2629. ifdef CROSSBINDIR
  2630. ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
  2631. else
  2632. ARPROG=$(ARNAME)
  2633. endif
  2634. endif
  2635. ifndef NASMPROG
  2636. ifdef CROSSBINDIR
  2637. NASMPROG=$(CROSSBINDIR)/$(NASMNAME)$(SRCEXEEXT)
  2638. else
  2639. NASMPROG=$(NASMNAME)
  2640. endif
  2641. endif
  2642. AS=$(ASPROG)
  2643. LD=$(LDPROG)
  2644. RC=$(RCPROG)
  2645. AR=$(ARPROG)
  2646. NASM=$(NASMPROG)
  2647. ifdef inUnix
  2648. PPAS=./ppas$(SRCBATCHEXT)
  2649. else
  2650. PPAS=ppas$(SRCBATCHEXT)
  2651. endif
  2652. ifdef inUnix
  2653. LDCONFIG=ldconfig
  2654. else
  2655. LDCONFIG=
  2656. endif
  2657. ifdef DATE
  2658. DATESTR:=$(shell $(DATE) +%Y%m%d)
  2659. else
  2660. DATESTR=
  2661. endif
  2662. ZIPOPT=-9
  2663. ZIPEXT=.zip
  2664. ifeq ($(USETAR),bz2)
  2665. TAROPT=vj
  2666. TAREXT=.tar.bz2
  2667. else
  2668. TAROPT=vz
  2669. TAREXT=.tar.gz
  2670. endif
  2671. override REQUIRE_PACKAGES=rtl rtl
  2672. ifeq ($(FULL_TARGET),i386-linux)
  2673. REQUIRE_PACKAGES_RTL=1
  2674. endif
  2675. ifeq ($(FULL_TARGET),i386-go32v2)
  2676. REQUIRE_PACKAGES_RTL=1
  2677. endif
  2678. ifeq ($(FULL_TARGET),i386-win32)
  2679. REQUIRE_PACKAGES_RTL=1
  2680. endif
  2681. ifeq ($(FULL_TARGET),i386-os2)
  2682. REQUIRE_PACKAGES_RTL=1
  2683. endif
  2684. ifeq ($(FULL_TARGET),i386-freebsd)
  2685. REQUIRE_PACKAGES_RTL=1
  2686. endif
  2687. ifeq ($(FULL_TARGET),i386-beos)
  2688. REQUIRE_PACKAGES_RTL=1
  2689. endif
  2690. ifeq ($(FULL_TARGET),i386-haiku)
  2691. REQUIRE_PACKAGES_RTL=1
  2692. endif
  2693. ifeq ($(FULL_TARGET),i386-netbsd)
  2694. REQUIRE_PACKAGES_RTL=1
  2695. endif
  2696. ifeq ($(FULL_TARGET),i386-solaris)
  2697. REQUIRE_PACKAGES_RTL=1
  2698. endif
  2699. ifeq ($(FULL_TARGET),i386-qnx)
  2700. REQUIRE_PACKAGES_RTL=1
  2701. endif
  2702. ifeq ($(FULL_TARGET),i386-netware)
  2703. REQUIRE_PACKAGES_RTL=1
  2704. endif
  2705. ifeq ($(FULL_TARGET),i386-openbsd)
  2706. REQUIRE_PACKAGES_RTL=1
  2707. endif
  2708. ifeq ($(FULL_TARGET),i386-wdosx)
  2709. REQUIRE_PACKAGES_RTL=1
  2710. endif
  2711. ifeq ($(FULL_TARGET),i386-darwin)
  2712. REQUIRE_PACKAGES_RTL=1
  2713. endif
  2714. ifeq ($(FULL_TARGET),i386-emx)
  2715. REQUIRE_PACKAGES_RTL=1
  2716. endif
  2717. ifeq ($(FULL_TARGET),i386-watcom)
  2718. REQUIRE_PACKAGES_RTL=1
  2719. endif
  2720. ifeq ($(FULL_TARGET),i386-netwlibc)
  2721. REQUIRE_PACKAGES_RTL=1
  2722. endif
  2723. ifeq ($(FULL_TARGET),i386-wince)
  2724. REQUIRE_PACKAGES_RTL=1
  2725. endif
  2726. ifeq ($(FULL_TARGET),i386-embedded)
  2727. REQUIRE_PACKAGES_RTL=1
  2728. endif
  2729. ifeq ($(FULL_TARGET),i386-symbian)
  2730. REQUIRE_PACKAGES_RTL=1
  2731. endif
  2732. ifeq ($(FULL_TARGET),i386-nativent)
  2733. REQUIRE_PACKAGES_RTL=1
  2734. endif
  2735. ifeq ($(FULL_TARGET),i386-iphonesim)
  2736. REQUIRE_PACKAGES_RTL=1
  2737. endif
  2738. ifeq ($(FULL_TARGET),i386-android)
  2739. REQUIRE_PACKAGES_RTL=1
  2740. endif
  2741. ifeq ($(FULL_TARGET),i386-aros)
  2742. REQUIRE_PACKAGES_RTL=1
  2743. endif
  2744. ifeq ($(FULL_TARGET),m68k-linux)
  2745. REQUIRE_PACKAGES_RTL=1
  2746. endif
  2747. ifeq ($(FULL_TARGET),m68k-freebsd)
  2748. REQUIRE_PACKAGES_RTL=1
  2749. endif
  2750. ifeq ($(FULL_TARGET),m68k-netbsd)
  2751. REQUIRE_PACKAGES_RTL=1
  2752. endif
  2753. ifeq ($(FULL_TARGET),m68k-amiga)
  2754. REQUIRE_PACKAGES_RTL=1
  2755. endif
  2756. ifeq ($(FULL_TARGET),m68k-atari)
  2757. REQUIRE_PACKAGES_RTL=1
  2758. endif
  2759. ifeq ($(FULL_TARGET),m68k-openbsd)
  2760. REQUIRE_PACKAGES_RTL=1
  2761. endif
  2762. ifeq ($(FULL_TARGET),m68k-palmos)
  2763. REQUIRE_PACKAGES_RTL=1
  2764. endif
  2765. ifeq ($(FULL_TARGET),m68k-embedded)
  2766. REQUIRE_PACKAGES_RTL=1
  2767. endif
  2768. ifeq ($(FULL_TARGET),powerpc-linux)
  2769. REQUIRE_PACKAGES_RTL=1
  2770. endif
  2771. ifeq ($(FULL_TARGET),powerpc-netbsd)
  2772. REQUIRE_PACKAGES_RTL=1
  2773. endif
  2774. ifeq ($(FULL_TARGET),powerpc-amiga)
  2775. REQUIRE_PACKAGES_RTL=1
  2776. endif
  2777. ifeq ($(FULL_TARGET),powerpc-macos)
  2778. REQUIRE_PACKAGES_RTL=1
  2779. endif
  2780. ifeq ($(FULL_TARGET),powerpc-darwin)
  2781. REQUIRE_PACKAGES_RTL=1
  2782. endif
  2783. ifeq ($(FULL_TARGET),powerpc-morphos)
  2784. REQUIRE_PACKAGES_RTL=1
  2785. endif
  2786. ifeq ($(FULL_TARGET),powerpc-embedded)
  2787. REQUIRE_PACKAGES_RTL=1
  2788. endif
  2789. ifeq ($(FULL_TARGET),powerpc-wii)
  2790. REQUIRE_PACKAGES_RTL=1
  2791. endif
  2792. ifeq ($(FULL_TARGET),powerpc-aix)
  2793. REQUIRE_PACKAGES_RTL=1
  2794. endif
  2795. ifeq ($(FULL_TARGET),sparc-linux)
  2796. REQUIRE_PACKAGES_RTL=1
  2797. endif
  2798. ifeq ($(FULL_TARGET),sparc-netbsd)
  2799. REQUIRE_PACKAGES_RTL=1
  2800. endif
  2801. ifeq ($(FULL_TARGET),sparc-solaris)
  2802. REQUIRE_PACKAGES_RTL=1
  2803. endif
  2804. ifeq ($(FULL_TARGET),sparc-embedded)
  2805. REQUIRE_PACKAGES_RTL=1
  2806. endif
  2807. ifeq ($(FULL_TARGET),x86_64-linux)
  2808. REQUIRE_PACKAGES_RTL=1
  2809. endif
  2810. ifeq ($(FULL_TARGET),x86_64-freebsd)
  2811. REQUIRE_PACKAGES_RTL=1
  2812. endif
  2813. ifeq ($(FULL_TARGET),x86_64-netbsd)
  2814. REQUIRE_PACKAGES_RTL=1
  2815. endif
  2816. ifeq ($(FULL_TARGET),x86_64-solaris)
  2817. REQUIRE_PACKAGES_RTL=1
  2818. endif
  2819. ifeq ($(FULL_TARGET),x86_64-openbsd)
  2820. REQUIRE_PACKAGES_RTL=1
  2821. endif
  2822. ifeq ($(FULL_TARGET),x86_64-darwin)
  2823. REQUIRE_PACKAGES_RTL=1
  2824. endif
  2825. ifeq ($(FULL_TARGET),x86_64-win64)
  2826. REQUIRE_PACKAGES_RTL=1
  2827. endif
  2828. ifeq ($(FULL_TARGET),x86_64-embedded)
  2829. REQUIRE_PACKAGES_RTL=1
  2830. endif
  2831. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  2832. REQUIRE_PACKAGES_RTL=1
  2833. endif
  2834. ifeq ($(FULL_TARGET),x86_64-aros)
  2835. REQUIRE_PACKAGES_RTL=1
  2836. endif
  2837. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  2838. REQUIRE_PACKAGES_RTL=1
  2839. endif
  2840. ifeq ($(FULL_TARGET),arm-linux)
  2841. REQUIRE_PACKAGES_RTL=1
  2842. endif
  2843. ifeq ($(FULL_TARGET),arm-palmos)
  2844. REQUIRE_PACKAGES_RTL=1
  2845. endif
  2846. ifeq ($(FULL_TARGET),arm-darwin)
  2847. REQUIRE_PACKAGES_RTL=1
  2848. endif
  2849. ifeq ($(FULL_TARGET),arm-wince)
  2850. REQUIRE_PACKAGES_RTL=1
  2851. endif
  2852. ifeq ($(FULL_TARGET),arm-gba)
  2853. REQUIRE_PACKAGES_RTL=1
  2854. endif
  2855. ifeq ($(FULL_TARGET),arm-nds)
  2856. REQUIRE_PACKAGES_RTL=1
  2857. endif
  2858. ifeq ($(FULL_TARGET),arm-embedded)
  2859. REQUIRE_PACKAGES_RTL=1
  2860. endif
  2861. ifeq ($(FULL_TARGET),arm-symbian)
  2862. REQUIRE_PACKAGES_RTL=1
  2863. endif
  2864. ifeq ($(FULL_TARGET),arm-android)
  2865. REQUIRE_PACKAGES_RTL=1
  2866. endif
  2867. ifeq ($(FULL_TARGET),powerpc64-linux)
  2868. REQUIRE_PACKAGES_RTL=1
  2869. endif
  2870. ifeq ($(FULL_TARGET),powerpc64-darwin)
  2871. REQUIRE_PACKAGES_RTL=1
  2872. endif
  2873. ifeq ($(FULL_TARGET),powerpc64-embedded)
  2874. REQUIRE_PACKAGES_RTL=1
  2875. endif
  2876. ifeq ($(FULL_TARGET),powerpc64-aix)
  2877. REQUIRE_PACKAGES_RTL=1
  2878. endif
  2879. ifeq ($(FULL_TARGET),avr-embedded)
  2880. REQUIRE_PACKAGES_RTL=1
  2881. endif
  2882. ifeq ($(FULL_TARGET),armeb-linux)
  2883. REQUIRE_PACKAGES_RTL=1
  2884. endif
  2885. ifeq ($(FULL_TARGET),armeb-embedded)
  2886. REQUIRE_PACKAGES_RTL=1
  2887. endif
  2888. ifeq ($(FULL_TARGET),mips-linux)
  2889. REQUIRE_PACKAGES_RTL=1
  2890. endif
  2891. ifeq ($(FULL_TARGET),mipsel-linux)
  2892. REQUIRE_PACKAGES_RTL=1
  2893. endif
  2894. ifeq ($(FULL_TARGET),mipsel-embedded)
  2895. REQUIRE_PACKAGES_RTL=1
  2896. endif
  2897. ifeq ($(FULL_TARGET),mipsel-android)
  2898. REQUIRE_PACKAGES_RTL=1
  2899. endif
  2900. ifeq ($(FULL_TARGET),jvm-java)
  2901. REQUIRE_PACKAGES_RTL=1
  2902. endif
  2903. ifeq ($(FULL_TARGET),jvm-android)
  2904. REQUIRE_PACKAGES_RTL=1
  2905. endif
  2906. ifeq ($(FULL_TARGET),i8086-msdos)
  2907. REQUIRE_PACKAGES_RTL=1
  2908. endif
  2909. ifeq ($(FULL_TARGET),aarch64-linux)
  2910. REQUIRE_PACKAGES_RTL=1
  2911. endif
  2912. ifeq ($(FULL_TARGET),aarch64-darwin)
  2913. REQUIRE_PACKAGES_RTL=1
  2914. endif
  2915. ifdef REQUIRE_PACKAGES_RTL
  2916. PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
  2917. ifneq ($(PACKAGEDIR_RTL),)
  2918. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
  2919. UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
  2920. else
  2921. UNITDIR_RTL=$(PACKAGEDIR_RTL)
  2922. endif
  2923. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
  2924. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
  2925. else
  2926. ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
  2927. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
  2928. else
  2929. UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
  2930. endif
  2931. endif
  2932. ifdef CHECKDEPEND
  2933. $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
  2934. $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
  2935. override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
  2936. endif
  2937. else
  2938. PACKAGEDIR_RTL=
  2939. UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
  2940. ifneq ($(UNITDIR_RTL),)
  2941. UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
  2942. else
  2943. UNITDIR_RTL=
  2944. endif
  2945. endif
  2946. ifdef UNITDIR_RTL
  2947. override COMPILER_UNITDIR+=$(UNITDIR_RTL)
  2948. endif
  2949. ifdef UNITDIR_FPMAKE_RTL
  2950. override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
  2951. endif
  2952. endif
  2953. ifndef NOCPUDEF
  2954. override FPCOPTDEF=$(ARCH)
  2955. endif
  2956. ifneq ($(OS_TARGET),$(OS_SOURCE))
  2957. override FPCOPT+=-T$(OS_TARGET)
  2958. endif
  2959. ifneq ($(CPU_TARGET),$(CPU_SOURCE))
  2960. override FPCOPT+=-P$(ARCH)
  2961. endif
  2962. ifeq ($(OS_SOURCE),openbsd)
  2963. override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
  2964. override FPCMAKEOPT+=-FD$(NEW_BINUTILS_PATH)
  2965. endif
  2966. ifndef CROSSBOOTSTRAP
  2967. ifneq ($(BINUTILSPREFIX),)
  2968. override FPCOPT+=-XP$(BINUTILSPREFIX)
  2969. endif
  2970. ifneq ($(BINUTILSPREFIX),)
  2971. override FPCOPT+=-Xr$(RLINKPATH)
  2972. endif
  2973. endif
  2974. ifndef CROSSCOMPILE
  2975. ifneq ($(BINUTILSPREFIX),)
  2976. override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
  2977. endif
  2978. endif
  2979. ifdef UNITDIR
  2980. override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
  2981. endif
  2982. ifdef LIBDIR
  2983. override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
  2984. endif
  2985. ifdef OBJDIR
  2986. override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
  2987. endif
  2988. ifdef INCDIR
  2989. override FPCOPT+=$(addprefix -Fi,$(INCDIR))
  2990. endif
  2991. ifdef LINKSMART
  2992. override FPCOPT+=-XX
  2993. endif
  2994. ifdef CREATESMART
  2995. override FPCOPT+=-CX
  2996. endif
  2997. ifdef DEBUG
  2998. override FPCOPT+=-gl
  2999. override FPCOPTDEF+=DEBUG
  3000. endif
  3001. ifdef RELEASE
  3002. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  3003. ifeq ($(CPU_TARGET),i386)
  3004. FPCCPUOPT:=-OG2p3
  3005. endif
  3006. ifeq ($(CPU_TARGET),powerpc)
  3007. FPCCPUOPT:=-O1r
  3008. endif
  3009. else
  3010. FPCCPUOPT:=-O2
  3011. endif
  3012. override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
  3013. override FPCOPTDEF+=RELEASE
  3014. endif
  3015. ifdef STRIP
  3016. override FPCOPT+=-Xs
  3017. endif
  3018. ifdef OPTIMIZE
  3019. override FPCOPT+=-O2
  3020. endif
  3021. ifdef VERBOSE
  3022. override FPCOPT+=-vwni
  3023. endif
  3024. ifdef COMPILER_OPTIONS
  3025. override FPCOPT+=$(COMPILER_OPTIONS)
  3026. endif
  3027. ifdef COMPILER_UNITDIR
  3028. override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
  3029. endif
  3030. ifdef COMPILER_LIBRARYDIR
  3031. override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
  3032. endif
  3033. ifdef COMPILER_OBJECTDIR
  3034. override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
  3035. endif
  3036. ifdef COMPILER_INCLUDEDIR
  3037. override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
  3038. endif
  3039. ifdef CROSSBINDIR
  3040. override FPCOPT+=-FD$(CROSSBINDIR)
  3041. endif
  3042. ifdef COMPILER_TARGETDIR
  3043. override FPCOPT+=-FE$(COMPILER_TARGETDIR)
  3044. ifeq ($(COMPILER_TARGETDIR),.)
  3045. override TARGETDIRPREFIX=
  3046. else
  3047. override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
  3048. endif
  3049. endif
  3050. ifdef COMPILER_UNITTARGETDIR
  3051. override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
  3052. ifeq ($(COMPILER_UNITTARGETDIR),.)
  3053. override UNITTARGETDIRPREFIX=
  3054. else
  3055. override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
  3056. endif
  3057. else
  3058. ifdef COMPILER_TARGETDIR
  3059. override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
  3060. override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
  3061. endif
  3062. endif
  3063. ifdef CREATESHARED
  3064. override FPCOPT+=-Cg
  3065. endif
  3066. ifneq ($(findstring $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
  3067. ifneq ($(findstring $(CPU_TARGET),x86_64 mips mipsel),)
  3068. override FPCOPT+=-Cg
  3069. endif
  3070. endif
  3071. ifdef LINKSHARED
  3072. endif
  3073. ifdef OPT
  3074. override FPCOPT+=$(OPT)
  3075. endif
  3076. ifdef FPCOPTDEF
  3077. override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
  3078. endif
  3079. ifdef CFGFILE
  3080. override FPCOPT+=@$(CFGFILE)
  3081. endif
  3082. ifdef USEENV
  3083. override FPCEXTCMD:=$(FPCOPT)
  3084. override FPCOPT:=!FPCEXTCMD
  3085. export FPCEXTCMD
  3086. endif
  3087. override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
  3088. override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
  3089. ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
  3090. override ACROSSCOMPILE=1
  3091. endif
  3092. ifdef ACROSSCOMPILE
  3093. override FPCOPT+=$(CROSSOPT)
  3094. endif
  3095. override COMPILER:=$(strip $(FPC) $(FPCOPT))
  3096. ifneq (,$(findstring -sh ,$(COMPILER)))
  3097. UseEXECPPAS=1
  3098. endif
  3099. ifneq (,$(findstring -s ,$(COMPILER)))
  3100. ifeq ($(FULL_SOURCE),$(FULL_TARGET))
  3101. UseEXECPPAS=1
  3102. endif
  3103. endif
  3104. ifneq ($(UseEXECPPAS),1)
  3105. EXECPPAS=
  3106. else
  3107. ifdef RUNBATCH
  3108. EXECPPAS:=@$(RUNBATCH) $(PPAS)
  3109. else
  3110. EXECPPAS:=@$(PPAS)
  3111. endif
  3112. endif
  3113. .PHONY: fpc_exes
  3114. ifndef CROSSINSTALL
  3115. ifneq ($(TARGET_PROGRAMS),)
  3116. override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
  3117. override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
  3118. override EXEDBGFILES:=$(addsuffix $(EXEDBGEXT),$(TARGET_PROGRAMS))
  3119. override ALLTARGET+=fpc_exes
  3120. override INSTALLEXEFILES+=$(EXEFILES)
  3121. override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
  3122. override CLEANEXEDBGFILES+=$(EXEDBGFILES)
  3123. ifeq ($(OS_TARGET),os2)
  3124. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  3125. endif
  3126. ifeq ($(OS_TARGET),emx)
  3127. override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
  3128. endif
  3129. endif
  3130. endif
  3131. fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
  3132. ifdef TARGET_RSTS
  3133. override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
  3134. override CLEANRSTFILES+=$(RSTFILES)
  3135. endif
  3136. .PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
  3137. $(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
  3138. @$(ECHOREDIR) Compiled > $(FPCMADE)
  3139. fpc_all: $(FPCMADE)
  3140. fpc_smart:
  3141. $(MAKE) all LINKSMART=1 CREATESMART=1
  3142. fpc_debug:
  3143. $(MAKE) all DEBUG=1
  3144. fpc_release:
  3145. $(MAKE) all RELEASE=1
  3146. .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
  3147. $(COMPILER_UNITTARGETDIR):
  3148. $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
  3149. $(COMPILER_TARGETDIR):
  3150. $(MKDIRTREE) $(COMPILER_TARGETDIR)
  3151. %$(PPUEXT): %.pp
  3152. $(COMPILER) $<
  3153. $(EXECPPAS)
  3154. %$(PPUEXT): %.pas
  3155. $(COMPILER) $<
  3156. $(EXECPPAS)
  3157. %$(EXEEXT): %.pp
  3158. $(COMPILER) $<
  3159. $(EXECPPAS)
  3160. %$(EXEEXT): %.pas
  3161. $(COMPILER) $<
  3162. $(EXECPPAS)
  3163. %$(EXEEXT): %.lpr
  3164. $(COMPILER) $<
  3165. $(EXECPPAS)
  3166. %$(EXEEXT): %.dpr
  3167. $(COMPILER) $<
  3168. $(EXECPPAS)
  3169. %.res: %.rc
  3170. windres -i $< -o $@
  3171. vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3172. vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3173. vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3174. vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
  3175. vpath %.inc $(COMPILER_INCLUDEDIR)
  3176. vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
  3177. vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
  3178. .PHONY: fpc_shared
  3179. override INSTALLTARGET+=fpc_shared_install
  3180. ifndef SHARED_LIBVERSION
  3181. SHARED_LIBVERSION=$(FPC_VERSION)
  3182. endif
  3183. ifndef SHARED_LIBNAME
  3184. SHARED_LIBNAME=$(PACKAGE_NAME)
  3185. endif
  3186. ifndef SHARED_FULLNAME
  3187. SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
  3188. endif
  3189. ifndef SHARED_LIBUNITS
  3190. SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
  3191. override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
  3192. endif
  3193. fpc_shared:
  3194. ifdef HASSHAREDLIB
  3195. $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
  3196. ifneq ($(SHARED_BUILD),n)
  3197. $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
  3198. endif
  3199. else
  3200. @$(ECHO) Shared Libraries not supported
  3201. endif
  3202. fpc_shared_install:
  3203. ifneq ($(SHARED_BUILD),n)
  3204. ifneq ($(SHARED_LIBUNITS),)
  3205. ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
  3206. $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
  3207. endif
  3208. endif
  3209. endif
  3210. .PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
  3211. ifdef INSTALL_UNITS
  3212. override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
  3213. endif
  3214. ifdef INSTALL_BUILDUNIT
  3215. override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
  3216. endif
  3217. ifdef INSTALLPPUFILES
  3218. override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
  3219. ifneq ($(UNITTARGETDIRPREFIX),)
  3220. override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
  3221. override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
  3222. endif
  3223. override INSTALL_CREATEPACKAGEFPC=1
  3224. endif
  3225. ifdef INSTALLEXEFILES
  3226. ifneq ($(TARGETDIRPREFIX),)
  3227. override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
  3228. endif
  3229. endif
  3230. fpc_install: all $(INSTALLTARGET)
  3231. ifdef INSTALLEXEFILES
  3232. $(MKDIR) $(INSTALL_BINDIR)
  3233. $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
  3234. endif
  3235. ifdef INSTALL_CREATEPACKAGEFPC
  3236. ifdef FPCMAKE
  3237. ifdef PACKAGE_VERSION
  3238. ifneq ($(wildcard Makefile.fpc),)
  3239. $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
  3240. $(MKDIR) $(INSTALL_UNITDIR)
  3241. $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
  3242. endif
  3243. endif
  3244. endif
  3245. endif
  3246. ifdef INSTALLPPUFILES
  3247. $(MKDIR) $(INSTALL_UNITDIR)
  3248. $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
  3249. ifneq ($(INSTALLPPULINKFILES),)
  3250. $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
  3251. endif
  3252. ifneq ($(wildcard $(LIB_FULLNAME)),)
  3253. $(MKDIR) $(INSTALL_LIBDIR)
  3254. $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
  3255. ifdef inUnix
  3256. ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
  3257. endif
  3258. endif
  3259. endif
  3260. ifdef INSTALL_FILES
  3261. $(MKDIR) $(INSTALL_DATADIR)
  3262. $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
  3263. endif
  3264. fpc_sourceinstall: distclean
  3265. $(MKDIR) $(INSTALL_SOURCEDIR)
  3266. $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
  3267. fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
  3268. ifdef HASEXAMPLES
  3269. $(MKDIR) $(INSTALL_EXAMPLEDIR)
  3270. endif
  3271. ifdef EXAMPLESOURCEFILES
  3272. $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
  3273. endif
  3274. ifdef TARGET_EXAMPLEDIRS
  3275. $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
  3276. endif
  3277. .PHONY: fpc_distinstall
  3278. fpc_distinstall: install exampleinstall
  3279. .PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
  3280. ifndef PACKDIR
  3281. ifndef inUnix
  3282. PACKDIR=$(BASEDIR)/../fpc-pack
  3283. else
  3284. PACKDIR=/tmp/fpc-pack
  3285. endif
  3286. endif
  3287. ifndef ZIPNAME
  3288. ifdef DIST_ZIPNAME
  3289. ZIPNAME=$(DIST_ZIPNAME)
  3290. else
  3291. ZIPNAME=$(PACKAGE_NAME)
  3292. endif
  3293. endif
  3294. ifndef FULLZIPNAME
  3295. FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
  3296. endif
  3297. ifndef ZIPTARGET
  3298. ifdef DIST_ZIPTARGET
  3299. ZIPTARGET=DIST_ZIPTARGET
  3300. else
  3301. ZIPTARGET=install
  3302. endif
  3303. endif
  3304. ifndef USEZIP
  3305. ifdef inUnix
  3306. USETAR=1
  3307. endif
  3308. endif
  3309. ifndef inUnix
  3310. USEZIPWRAPPER=1
  3311. endif
  3312. ifdef USEZIPWRAPPER
  3313. ZIPPATHSEP=$(PATHSEP)
  3314. ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
  3315. else
  3316. ZIPPATHSEP=/
  3317. endif
  3318. ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
  3319. ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
  3320. ifdef USETAR
  3321. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
  3322. ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
  3323. else
  3324. ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
  3325. ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
  3326. endif
  3327. fpc_zipinstall:
  3328. $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
  3329. $(MKDIR) $(DIST_DESTDIR)
  3330. $(DEL) $(ZIPDESTFILE)
  3331. ifdef USEZIPWRAPPER
  3332. ifneq ($(ECHOREDIR),echo)
  3333. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
  3334. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
  3335. $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
  3336. else
  3337. echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
  3338. echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
  3339. echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
  3340. endif
  3341. ifdef inUnix
  3342. /bin/sh $(ZIPWRAPPER)
  3343. else
  3344. ifdef RUNBATCH
  3345. $(RUNBATCH) $(ZIPWRAPPER)
  3346. else
  3347. $(ZIPWRAPPER)
  3348. endif
  3349. endif
  3350. $(DEL) $(ZIPWRAPPER)
  3351. else
  3352. $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
  3353. endif
  3354. $(DELTREE) $(PACKDIR)
  3355. fpc_zipsourceinstall:
  3356. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
  3357. fpc_zipexampleinstall:
  3358. ifdef HASEXAMPLES
  3359. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
  3360. endif
  3361. fpc_zipdistinstall:
  3362. $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
  3363. .PHONY: fpc_clean fpc_cleanall fpc_distclean
  3364. ifdef EXEFILES
  3365. override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
  3366. override CLEANEXEDBGFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEDBGFILES))
  3367. endif
  3368. ifdef CLEAN_PROGRAMS
  3369. override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
  3370. override CLEANEXEDBGFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEDBGEXT), $(CLEAN_PROGRAMS)))
  3371. endif
  3372. ifdef CLEAN_UNITS
  3373. override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
  3374. endif
  3375. ifdef CLEANPPUFILES
  3376. override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
  3377. ifdef DEBUGSYMEXT
  3378. override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
  3379. endif
  3380. override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
  3381. override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
  3382. endif
  3383. fpc_clean: $(CLEANTARGET)
  3384. ifdef CLEANEXEFILES
  3385. -$(DEL) $(CLEANEXEFILES)
  3386. endif
  3387. ifdef CLEANEXEDBGFILES
  3388. -$(DELTREE) $(CLEANEXEDBGFILES)
  3389. endif
  3390. ifdef CLEANPPUFILES
  3391. -$(DEL) $(CLEANPPUFILES)
  3392. endif
  3393. ifneq ($(CLEANPPULINKFILES),)
  3394. -$(DEL) $(CLEANPPULINKFILES)
  3395. endif
  3396. ifdef CLEANRSTFILES
  3397. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  3398. endif
  3399. ifdef CLEAN_FILES
  3400. -$(DEL) $(CLEAN_FILES)
  3401. endif
  3402. ifdef LIB_NAME
  3403. -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
  3404. endif
  3405. -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  3406. -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
  3407. fpc_cleanall: $(CLEANTARGET)
  3408. ifdef CLEANEXEFILES
  3409. -$(DEL) $(CLEANEXEFILES)
  3410. endif
  3411. ifdef COMPILER_UNITTARGETDIR
  3412. ifdef CLEANPPUFILES
  3413. -$(DEL) $(CLEANPPUFILES)
  3414. endif
  3415. ifneq ($(CLEANPPULINKFILES),)
  3416. -$(DEL) $(CLEANPPULINKFILES)
  3417. endif
  3418. ifdef CLEANRSTFILES
  3419. -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
  3420. endif
  3421. endif
  3422. ifdef CLEAN_FILES
  3423. -$(DEL) $(CLEAN_FILES)
  3424. endif
  3425. -$(DELTREE) units
  3426. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  3427. ifneq ($(PPUEXT),.ppu)
  3428. -$(DEL) *.o *.ppu *.a
  3429. endif
  3430. -$(DELTREE) *$(SMARTEXT)
  3431. -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
  3432. -$(DEL) *_ppas$(BATCHEXT)
  3433. ifdef AOUTEXT
  3434. -$(DEL) *$(AOUTEXT)
  3435. endif
  3436. ifdef DEBUGSYMEXT
  3437. -$(DEL) *$(DEBUGSYMEXT)
  3438. endif
  3439. fpc_distclean: cleanall
  3440. .PHONY: fpc_baseinfo
  3441. override INFORULES+=fpc_baseinfo
  3442. fpc_baseinfo:
  3443. @$(ECHO)
  3444. @$(ECHO) == Package info ==
  3445. @$(ECHO) Package Name..... $(PACKAGE_NAME)
  3446. @$(ECHO) Package Version.. $(PACKAGE_VERSION)
  3447. @$(ECHO)
  3448. @$(ECHO) == Configuration info ==
  3449. @$(ECHO)
  3450. @$(ECHO) FPC.......... $(FPC)
  3451. @$(ECHO) FPC Version.. $(FPC_VERSION)
  3452. @$(ECHO) Source CPU... $(CPU_SOURCE)
  3453. @$(ECHO) Target CPU... $(CPU_TARGET)
  3454. @$(ECHO) Source OS.... $(OS_SOURCE)
  3455. @$(ECHO) Target OS.... $(OS_TARGET)
  3456. @$(ECHO) Full Source.. $(FULL_SOURCE)
  3457. @$(ECHO) Full Target.. $(FULL_TARGET)
  3458. @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
  3459. @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
  3460. @$(ECHO) FPC fpmake... $(FPCFPMAKE)
  3461. @$(ECHO)
  3462. @$(ECHO) == Directory info ==
  3463. @$(ECHO)
  3464. @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
  3465. @$(ECHO)
  3466. @$(ECHO) Basedir......... $(BASEDIR)
  3467. @$(ECHO) FPCDir.......... $(FPCDIR)
  3468. @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
  3469. @$(ECHO) UnitsDir........ $(UNITSDIR)
  3470. @$(ECHO) PackagesDir..... $(PACKAGESDIR)
  3471. @$(ECHO)
  3472. @$(ECHO) GCC library..... $(GCCLIBDIR)
  3473. @$(ECHO) Other library... $(OTHERLIBDIR)
  3474. @$(ECHO)
  3475. @$(ECHO) == Tools info ==
  3476. @$(ECHO)
  3477. @$(ECHO) As........ $(AS)
  3478. @$(ECHO) Ld........ $(LD)
  3479. @$(ECHO) Ar........ $(AR)
  3480. @$(ECHO) Rc........ $(RC)
  3481. @$(ECHO)
  3482. @$(ECHO) Mv........ $(MVPROG)
  3483. @$(ECHO) Cp........ $(CPPROG)
  3484. @$(ECHO) Rm........ $(RMPROG)
  3485. @$(ECHO) GInstall.. $(GINSTALL)
  3486. @$(ECHO) Echo...... $(ECHO)
  3487. @$(ECHO) Shell..... $(SHELL)
  3488. @$(ECHO) Date...... $(DATE)
  3489. @$(ECHO) FPCMake... $(FPCMAKE)
  3490. @$(ECHO) PPUMove... $(PPUMOVE)
  3491. @$(ECHO) Zip....... $(ZIPPROG)
  3492. @$(ECHO)
  3493. @$(ECHO) == Object info ==
  3494. @$(ECHO)
  3495. @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
  3496. @$(ECHO) Target Units.......... $(TARGET_UNITS)
  3497. @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
  3498. @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
  3499. @$(ECHO) Target Dirs........... $(TARGET_DIRS)
  3500. @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
  3501. @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
  3502. @$(ECHO)
  3503. @$(ECHO) Clean Units......... $(CLEAN_UNITS)
  3504. @$(ECHO) Clean Files......... $(CLEAN_FILES)
  3505. @$(ECHO)
  3506. @$(ECHO) Install Units....... $(INSTALL_UNITS)
  3507. @$(ECHO) Install Files....... $(INSTALL_FILES)
  3508. @$(ECHO)
  3509. @$(ECHO) == Install info ==
  3510. @$(ECHO)
  3511. @$(ECHO) DateStr.............. $(DATESTR)
  3512. @$(ECHO) ZipName.............. $(ZIPNAME)
  3513. @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
  3514. @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
  3515. @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
  3516. @$(ECHO) FullZipName.......... $(FULLZIPNAME)
  3517. @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
  3518. @$(ECHO)
  3519. @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
  3520. @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
  3521. @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
  3522. @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
  3523. @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
  3524. @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
  3525. @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
  3526. @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
  3527. @$(ECHO)
  3528. @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
  3529. @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
  3530. @$(ECHO)
  3531. .PHONY: fpc_info
  3532. fpc_info: $(INFORULES)
  3533. .PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
  3534. fpc_makefile_dirs
  3535. fpc_makefile:
  3536. $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
  3537. fpc_makefile_sub1:
  3538. ifdef TARGET_DIRS
  3539. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
  3540. endif
  3541. ifdef TARGET_EXAMPLEDIRS
  3542. $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
  3543. endif
  3544. fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
  3545. fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
  3546. fpc_makefiles: fpc_makefile fpc_makefile_dirs
  3547. ifeq ($(FULL_TARGET),i386-linux)
  3548. TARGET_DIRS_UTILS=1
  3549. endif
  3550. ifeq ($(FULL_TARGET),i386-go32v2)
  3551. TARGET_DIRS_UTILS=1
  3552. endif
  3553. ifeq ($(FULL_TARGET),i386-win32)
  3554. TARGET_DIRS_UTILS=1
  3555. endif
  3556. ifeq ($(FULL_TARGET),i386-os2)
  3557. TARGET_DIRS_UTILS=1
  3558. endif
  3559. ifeq ($(FULL_TARGET),i386-freebsd)
  3560. TARGET_DIRS_UTILS=1
  3561. endif
  3562. ifeq ($(FULL_TARGET),i386-beos)
  3563. TARGET_DIRS_UTILS=1
  3564. endif
  3565. ifeq ($(FULL_TARGET),i386-haiku)
  3566. TARGET_DIRS_UTILS=1
  3567. endif
  3568. ifeq ($(FULL_TARGET),i386-netbsd)
  3569. TARGET_DIRS_UTILS=1
  3570. endif
  3571. ifeq ($(FULL_TARGET),i386-solaris)
  3572. TARGET_DIRS_UTILS=1
  3573. endif
  3574. ifeq ($(FULL_TARGET),i386-qnx)
  3575. TARGET_DIRS_UTILS=1
  3576. endif
  3577. ifeq ($(FULL_TARGET),i386-netware)
  3578. TARGET_DIRS_UTILS=1
  3579. endif
  3580. ifeq ($(FULL_TARGET),i386-openbsd)
  3581. TARGET_DIRS_UTILS=1
  3582. endif
  3583. ifeq ($(FULL_TARGET),i386-wdosx)
  3584. TARGET_DIRS_UTILS=1
  3585. endif
  3586. ifeq ($(FULL_TARGET),i386-darwin)
  3587. TARGET_DIRS_UTILS=1
  3588. endif
  3589. ifeq ($(FULL_TARGET),i386-emx)
  3590. TARGET_DIRS_UTILS=1
  3591. endif
  3592. ifeq ($(FULL_TARGET),i386-watcom)
  3593. TARGET_DIRS_UTILS=1
  3594. endif
  3595. ifeq ($(FULL_TARGET),i386-netwlibc)
  3596. TARGET_DIRS_UTILS=1
  3597. endif
  3598. ifeq ($(FULL_TARGET),i386-wince)
  3599. TARGET_DIRS_UTILS=1
  3600. endif
  3601. ifeq ($(FULL_TARGET),i386-embedded)
  3602. TARGET_DIRS_UTILS=1
  3603. endif
  3604. ifeq ($(FULL_TARGET),i386-symbian)
  3605. TARGET_DIRS_UTILS=1
  3606. endif
  3607. ifeq ($(FULL_TARGET),i386-nativent)
  3608. TARGET_DIRS_UTILS=1
  3609. endif
  3610. ifeq ($(FULL_TARGET),i386-iphonesim)
  3611. TARGET_DIRS_UTILS=1
  3612. endif
  3613. ifeq ($(FULL_TARGET),i386-android)
  3614. TARGET_DIRS_UTILS=1
  3615. endif
  3616. ifeq ($(FULL_TARGET),i386-aros)
  3617. TARGET_DIRS_UTILS=1
  3618. endif
  3619. ifeq ($(FULL_TARGET),m68k-linux)
  3620. TARGET_DIRS_UTILS=1
  3621. endif
  3622. ifeq ($(FULL_TARGET),m68k-freebsd)
  3623. TARGET_DIRS_UTILS=1
  3624. endif
  3625. ifeq ($(FULL_TARGET),m68k-netbsd)
  3626. TARGET_DIRS_UTILS=1
  3627. endif
  3628. ifeq ($(FULL_TARGET),m68k-amiga)
  3629. TARGET_DIRS_UTILS=1
  3630. endif
  3631. ifeq ($(FULL_TARGET),m68k-atari)
  3632. TARGET_DIRS_UTILS=1
  3633. endif
  3634. ifeq ($(FULL_TARGET),m68k-openbsd)
  3635. TARGET_DIRS_UTILS=1
  3636. endif
  3637. ifeq ($(FULL_TARGET),m68k-palmos)
  3638. TARGET_DIRS_UTILS=1
  3639. endif
  3640. ifeq ($(FULL_TARGET),m68k-embedded)
  3641. TARGET_DIRS_UTILS=1
  3642. endif
  3643. ifeq ($(FULL_TARGET),powerpc-linux)
  3644. TARGET_DIRS_UTILS=1
  3645. endif
  3646. ifeq ($(FULL_TARGET),powerpc-netbsd)
  3647. TARGET_DIRS_UTILS=1
  3648. endif
  3649. ifeq ($(FULL_TARGET),powerpc-amiga)
  3650. TARGET_DIRS_UTILS=1
  3651. endif
  3652. ifeq ($(FULL_TARGET),powerpc-macos)
  3653. TARGET_DIRS_UTILS=1
  3654. endif
  3655. ifeq ($(FULL_TARGET),powerpc-darwin)
  3656. TARGET_DIRS_UTILS=1
  3657. endif
  3658. ifeq ($(FULL_TARGET),powerpc-morphos)
  3659. TARGET_DIRS_UTILS=1
  3660. endif
  3661. ifeq ($(FULL_TARGET),powerpc-embedded)
  3662. TARGET_DIRS_UTILS=1
  3663. endif
  3664. ifeq ($(FULL_TARGET),powerpc-wii)
  3665. TARGET_DIRS_UTILS=1
  3666. endif
  3667. ifeq ($(FULL_TARGET),powerpc-aix)
  3668. TARGET_DIRS_UTILS=1
  3669. endif
  3670. ifeq ($(FULL_TARGET),sparc-linux)
  3671. TARGET_DIRS_UTILS=1
  3672. endif
  3673. ifeq ($(FULL_TARGET),sparc-netbsd)
  3674. TARGET_DIRS_UTILS=1
  3675. endif
  3676. ifeq ($(FULL_TARGET),sparc-solaris)
  3677. TARGET_DIRS_UTILS=1
  3678. endif
  3679. ifeq ($(FULL_TARGET),sparc-embedded)
  3680. TARGET_DIRS_UTILS=1
  3681. endif
  3682. ifeq ($(FULL_TARGET),x86_64-linux)
  3683. TARGET_DIRS_UTILS=1
  3684. endif
  3685. ifeq ($(FULL_TARGET),x86_64-freebsd)
  3686. TARGET_DIRS_UTILS=1
  3687. endif
  3688. ifeq ($(FULL_TARGET),x86_64-netbsd)
  3689. TARGET_DIRS_UTILS=1
  3690. endif
  3691. ifeq ($(FULL_TARGET),x86_64-solaris)
  3692. TARGET_DIRS_UTILS=1
  3693. endif
  3694. ifeq ($(FULL_TARGET),x86_64-openbsd)
  3695. TARGET_DIRS_UTILS=1
  3696. endif
  3697. ifeq ($(FULL_TARGET),x86_64-darwin)
  3698. TARGET_DIRS_UTILS=1
  3699. endif
  3700. ifeq ($(FULL_TARGET),x86_64-win64)
  3701. TARGET_DIRS_UTILS=1
  3702. endif
  3703. ifeq ($(FULL_TARGET),x86_64-embedded)
  3704. TARGET_DIRS_UTILS=1
  3705. endif
  3706. ifeq ($(FULL_TARGET),x86_64-iphonesim)
  3707. TARGET_DIRS_UTILS=1
  3708. endif
  3709. ifeq ($(FULL_TARGET),x86_64-aros)
  3710. TARGET_DIRS_UTILS=1
  3711. endif
  3712. ifeq ($(FULL_TARGET),x86_64-dragonfly)
  3713. TARGET_DIRS_UTILS=1
  3714. endif
  3715. ifeq ($(FULL_TARGET),arm-linux)
  3716. TARGET_DIRS_UTILS=1
  3717. endif
  3718. ifeq ($(FULL_TARGET),arm-palmos)
  3719. TARGET_DIRS_UTILS=1
  3720. endif
  3721. ifeq ($(FULL_TARGET),arm-darwin)
  3722. TARGET_DIRS_UTILS=1
  3723. endif
  3724. ifeq ($(FULL_TARGET),arm-wince)
  3725. TARGET_DIRS_UTILS=1
  3726. endif
  3727. ifeq ($(FULL_TARGET),arm-gba)
  3728. TARGET_DIRS_UTILS=1
  3729. endif
  3730. ifeq ($(FULL_TARGET),arm-nds)
  3731. TARGET_DIRS_UTILS=1
  3732. endif
  3733. ifeq ($(FULL_TARGET),arm-embedded)
  3734. TARGET_DIRS_UTILS=1
  3735. endif
  3736. ifeq ($(FULL_TARGET),arm-symbian)
  3737. TARGET_DIRS_UTILS=1
  3738. endif
  3739. ifeq ($(FULL_TARGET),arm-android)
  3740. TARGET_DIRS_UTILS=1
  3741. endif
  3742. ifeq ($(FULL_TARGET),powerpc64-linux)
  3743. TARGET_DIRS_UTILS=1
  3744. endif
  3745. ifeq ($(FULL_TARGET),powerpc64-darwin)
  3746. TARGET_DIRS_UTILS=1
  3747. endif
  3748. ifeq ($(FULL_TARGET),powerpc64-embedded)
  3749. TARGET_DIRS_UTILS=1
  3750. endif
  3751. ifeq ($(FULL_TARGET),powerpc64-aix)
  3752. TARGET_DIRS_UTILS=1
  3753. endif
  3754. ifeq ($(FULL_TARGET),avr-embedded)
  3755. TARGET_DIRS_UTILS=1
  3756. endif
  3757. ifeq ($(FULL_TARGET),armeb-linux)
  3758. TARGET_DIRS_UTILS=1
  3759. endif
  3760. ifeq ($(FULL_TARGET),armeb-embedded)
  3761. TARGET_DIRS_UTILS=1
  3762. endif
  3763. ifeq ($(FULL_TARGET),mips-linux)
  3764. TARGET_DIRS_UTILS=1
  3765. endif
  3766. ifeq ($(FULL_TARGET),mipsel-linux)
  3767. TARGET_DIRS_UTILS=1
  3768. endif
  3769. ifeq ($(FULL_TARGET),mipsel-embedded)
  3770. TARGET_DIRS_UTILS=1
  3771. endif
  3772. ifeq ($(FULL_TARGET),mipsel-android)
  3773. TARGET_DIRS_UTILS=1
  3774. endif
  3775. ifeq ($(FULL_TARGET),jvm-java)
  3776. TARGET_DIRS_UTILS=1
  3777. endif
  3778. ifeq ($(FULL_TARGET),jvm-android)
  3779. TARGET_DIRS_UTILS=1
  3780. endif
  3781. ifeq ($(FULL_TARGET),i8086-msdos)
  3782. TARGET_DIRS_UTILS=1
  3783. endif
  3784. ifeq ($(FULL_TARGET),aarch64-linux)
  3785. TARGET_DIRS_UTILS=1
  3786. endif
  3787. ifeq ($(FULL_TARGET),aarch64-darwin)
  3788. TARGET_DIRS_UTILS=1
  3789. endif
  3790. ifdef TARGET_DIRS_UTILS
  3791. utils_all:
  3792. $(MAKE) -C utils all
  3793. utils_debug:
  3794. $(MAKE) -C utils debug
  3795. utils_smart:
  3796. $(MAKE) -C utils smart
  3797. utils_release:
  3798. $(MAKE) -C utils release
  3799. utils_units:
  3800. $(MAKE) -C utils units
  3801. utils_examples:
  3802. $(MAKE) -C utils examples
  3803. utils_shared:
  3804. $(MAKE) -C utils shared
  3805. utils_install:
  3806. $(MAKE) -C utils install
  3807. utils_sourceinstall:
  3808. $(MAKE) -C utils sourceinstall
  3809. utils_exampleinstall:
  3810. $(MAKE) -C utils exampleinstall
  3811. utils_distinstall:
  3812. $(MAKE) -C utils distinstall
  3813. utils_zipinstall:
  3814. $(MAKE) -C utils zipinstall
  3815. utils_zipsourceinstall:
  3816. $(MAKE) -C utils zipsourceinstall
  3817. utils_zipexampleinstall:
  3818. $(MAKE) -C utils zipexampleinstall
  3819. utils_zipdistinstall:
  3820. $(MAKE) -C utils zipdistinstall
  3821. utils_clean:
  3822. $(MAKE) -C utils clean
  3823. utils_distclean:
  3824. $(MAKE) -C utils distclean
  3825. utils_cleanall:
  3826. $(MAKE) -C utils cleanall
  3827. utils_info:
  3828. $(MAKE) -C utils info
  3829. utils_makefiles:
  3830. $(MAKE) -C utils makefiles
  3831. utils:
  3832. $(MAKE) -C utils all
  3833. .PHONY: utils_all utils_debug utils_smart utils_release utils_units utils_examples utils_shared utils_install utils_sourceinstall utils_exampleinstall utils_distinstall utils_zipinstall utils_zipsourceinstall utils_zipexampleinstall utils_zipdistinstall utils_clean utils_distclean utils_cleanall utils_info utils_makefiles utils
  3834. endif
  3835. ifndef DIFF
  3836. DIFF:=$(strip $(wildcard $(addsuffix /diff$(SRCEXEEXT),$(SEARCHPATH))))
  3837. ifeq ($(DIFF),)
  3838. DIFF= __missing_command_DIFF
  3839. else
  3840. DIFF:=$(firstword $(DIFF))
  3841. endif
  3842. endif
  3843. export DIFF
  3844. ifndef CMP
  3845. CMP:=$(strip $(wildcard $(addsuffix /cmp$(SRCEXEEXT),$(SEARCHPATH))))
  3846. ifeq ($(CMP),)
  3847. CMP= __missing_command_CMP
  3848. else
  3849. CMP:=$(firstword $(CMP))
  3850. endif
  3851. endif
  3852. export CMP
  3853. debug: fpc_debug
  3854. smart: fpc_smart
  3855. release: fpc_release
  3856. units: fpc_units $(addsuffix _units,$(TARGET_DIRS))
  3857. examples: $(addsuffix _examples,$(TARGET_DIRS))
  3858. shared: fpc_shared
  3859. sourceinstall: fpc_sourceinstall
  3860. exampleinstall: fpc_exampleinstall $(addsuffix _exampleinstall,$(TARGET_DIRS))
  3861. distinstall: fpc_distinstall
  3862. zipinstall: fpc_zipinstall
  3863. zipsourceinstall: fpc_zipsourceinstall
  3864. zipexampleinstall: fpc_zipexampleinstall $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
  3865. zipdistinstall: fpc_zipdistinstall
  3866. cleanall: fpc_cleanall $(addsuffix _cleanall,$(TARGET_DIRS))
  3867. info: fpc_info
  3868. makefiles: fpc_makefiles
  3869. .PHONY: debug smart release units examples shared sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall cleanall info makefiles
  3870. ifneq ($(wildcard fpcmake.loc),)
  3871. include fpcmake.loc
  3872. endif
  3873. ifneq ($(findstring $(OS_TARGET),win32 win64 aix),)
  3874. USE_CMP_FOR_DIFF=1
  3875. endif
  3876. ifdef USE_CMP_FOR_DIFF
  3877. ifdef CMP
  3878. override DIFF:=$(CMP) -i218
  3879. endif
  3880. endif
  3881. ifeq ($(findstring 2.4.,$(FPC_VERSION)),)
  3882. ifndef ALLOW_WARNINGS
  3883. override LOCALOPT+=-Sew
  3884. endif
  3885. endif
  3886. override COMPILER+=$(LOCALOPT)
  3887. PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc.exe,$(SEARCHPATH))))
  3888. ifeq ($(PASDOC),)
  3889. PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc,$(SEARCHPATH))))
  3890. endif
  3891. ifeq ($(PASDOC),)
  3892. PASDOC:=../projects/pasdoc/bin/pasdoc
  3893. else
  3894. PASDOC:=$(firstword $(PASDOC))
  3895. endif
  3896. ifndef EXENAME
  3897. EXENAME=ppc$(CPUSUF)$(EXEEXT)
  3898. endif
  3899. PPEXENAME=pp$(EXEEXT)
  3900. TEMPNAME=ppc$(SRCEXEEXT)
  3901. ifneq ($(CPUSUF),jvm)
  3902. PPCROSSNAME=ppcross$(CPUSUF)$(SRCEXEEXT)
  3903. else
  3904. PPCROSSNAME=ppc$(CPUSUF)$(SRCEXEEXT)
  3905. endif
  3906. TEMPNAME1=ppc1$(EXEEXT)
  3907. TEMPNAME2=ppc2$(EXEEXT)
  3908. TEMPNAME3=ppc3$(EXEEXT)
  3909. TEMPWPONAME1=ppcwpo1$(EXEEXT)
  3910. TEMPWPONAME2=ppcwpo2$(EXEEXT)
  3911. MAKEDEP=ppdep$(EXEEXT)
  3912. MSG2INC=./msg2inc$(EXEEXT)
  3913. ifdef CROSSINSTALL
  3914. INSTALLEXEFILE=$(PPCROSSNAME)
  3915. else
  3916. INSTALLEXEFILE=$(EXENAME)
  3917. endif
  3918. PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 mips mipsel avr jvm i8086 aarch64
  3919. INSTALL_TARGETS=$(addsuffix _exe_install,$(sort $(CYCLETARGETS) $(PPC_TARGETS)))
  3920. .PHONY: $(PPC_TARGETS) $(INSTALL_TARGETS)
  3921. $(PPC_TARGETS):
  3922. $(MAKE) PPC_TARGET=$@ CPU_UNITDIR=$@ all
  3923. $(INSTALL_TARGETS):
  3924. $(MAKE) all exeinstall PPC_TARGET=$(subst _exe_install,,$@) CPU_UNITDIR=$(subst _exe_install,,$@)
  3925. alltargets: $(ALLTARGETS)
  3926. .NOTPARALLEL:
  3927. .PHONY: all compiler echotime ppuclean execlean clean distclean
  3928. all: compiler $(addsuffix _all,$(TARGET_DIRS))
  3929. compiler: $(COMPILER_UNITTARGETDIR) $(COMPILER_TARGETDIR) $(EXENAME)
  3930. ifeq ($(MAKELEVEL),0)
  3931. ifndef STARTTIME
  3932. ifdef DATE
  3933. STARTTIME:=$(shell $(DATE) +%T)
  3934. else
  3935. STARTTIME:=unknown
  3936. endif
  3937. endif
  3938. endif
  3939. export STARTTIME
  3940. ifdef DATE
  3941. ENDTIME=$(shell $(DATE) +%T)
  3942. else
  3943. ENDTIME:=unknown
  3944. endif
  3945. echotime:
  3946. @echo Start $(STARTTIME) now $(ENDTIME)
  3947. ppuclean:
  3948. -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
  3949. -$(DEL) $(addsuffix /*$(PPUEXT),$(COMPILERSOURCEDIR))
  3950. tempclean:
  3951. -$(DEL) $(PPCROSSNAME) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC) pp1.wpo pp2.wpo
  3952. execlean :
  3953. -$(DEL) ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) ppcppc64$(EXEEXT)
  3954. -$(DEL) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT) ppc8086$(EXEEXT) ppca64$(EXEEXT)
  3955. -$(DEL) $(EXENAME) $(TEMPWPONAME1) $(TEMPWPONAME2)
  3956. $(addsuffix _clean,$(ALLTARGETS)):
  3957. -$(DELTREE) $(addprefix $(subst _clean,,$@),/units)
  3958. -$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
  3959. -$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT))
  3960. -$(DEL) $(addprefix $(subst _clean,,$@)/,ppcppc64$(EXEEXT) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT) ppc8086$(EXEEXT) ppca64$(EXEEXT) $(EXENAME))
  3961. cycleclean: cleanall $(addsuffix _clean,$(CPC_TARGET))
  3962. -$(DEL) $(EXENAME)
  3963. clean: tempclean execlean cleanall $(addsuffix _clean,$(CPC_TARGET)) $(addsuffix _clean,$(TARGET_DIRS))
  3964. distclean: tempclean execlean cleanall $(addsuffix _clean,$(ALLTARGETS)) $(addsuffix _distclean,$(TARGET_DIRS))
  3965. $(MSG2INC): $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(COMPILERUTILSDIR)/msg2inc.pp
  3966. $(COMPILER) -FE. $(COMPILERUTILSDIR)/msg2inc.pp
  3967. msgtxt.inc: $(MSGFILE)
  3968. $(MAKE) $(MSG2INC)
  3969. $(MSG2INC) $(MSGFILE) msg msg
  3970. msg: msgtxt.inc
  3971. insdatx86 : $(COMPILER_UNITTARGETDIR) x86/x86ins.dat
  3972. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkx86ins.pp
  3973. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86ins$(SRCEXEEXT) i8086 && mv -f *.inc ../i8086
  3974. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86ins$(SRCEXEEXT) && mv -f *.inc ../i386
  3975. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86ins$(SRCEXEEXT) x86_64 && mv -f *.inc ../x86_64
  3976. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkx86reg.pp
  3977. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86reg$(SRCEXEEXT) i8086
  3978. mv -f x86/r8086*.inc i8086
  3979. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86reg$(SRCEXEEXT)
  3980. mv -f x86/r386*.inc i386
  3981. cd x86 && ..$(PATHSEP)utils$(PATHSEP)mkx86reg$(SRCEXEEXT) x86_64
  3982. mv -f x86/r8664*.inc x86_64
  3983. insdatarm : arm/armins.dat
  3984. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkarmins.pp
  3985. cd arm && ..$(PATHSEP)utils$(PATHSEP)mkarmins$(SRCEXEEXT)
  3986. insdataarch64 : aarch64/a64ins.dat
  3987. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mka64ins.pp
  3988. cd aarch64 && ..$(PATHSEP)utils$(PATHSEP)mka64ins$(SRCEXEEXT)
  3989. insdat: insdatx86 insdatarm insdataarch64
  3990. regdatarm : arm/armreg.dat
  3991. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkarmreg.pp
  3992. cd arm && ..$(PATHSEP)utils$(PATHSEP)mkarmreg$(SRCEXEEXT)
  3993. regdatsp : sparc/spreg.dat
  3994. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkspreg.pp
  3995. cd sparc && ..$(PATHSEP)utils$(PATHSEP)mkspreg$(SRCEXEEXT)
  3996. regdatavr : avr/avrreg.dat
  3997. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mkavrreg.pp
  3998. cd avr && ..$(PATHSEP)utils$(PATHSEP)mkavrreg$(SRCEXEEXT)
  3999. regdataarch64 : aarch64/a64reg.dat
  4000. $(COMPILER) -FE$(COMPILERUTILSDIR) $(COMPILERUTILSDIR)/mka64reg.pp
  4001. cd aarch64 && ..$(PATHSEP)utils$(PATHSEP)mka64reg$(SRCEXEEXT)
  4002. revision.inc :
  4003. ifneq ($(REVSTR),)
  4004. ifdef USEZIPWRAPPER
  4005. ifneq ($(ECHOREDIR),echo)
  4006. $(ECHOREDIR) "'$(REVSTR)'" > revision.inc
  4007. else
  4008. $(ECHOREDIR) '$(REVSTR)' > revision.inc
  4009. endif
  4010. else
  4011. $(ECHOREDIR) "'$(REVSTR)'" > revision.inc
  4012. endif
  4013. else
  4014. $(MAKE) revision.inc REVINC=force
  4015. endif
  4016. .PHONY : revision
  4017. revision :
  4018. $(DEL) revision.inc
  4019. $(MAKE) revision.inc
  4020. $(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg \
  4021. $(wildcard systems/*.pas) $(wilcard systems/*.inc) \
  4022. $(wildcard $(CPC_TARGET)/*.pas) $(wildcard $(CPC_TARGET)/*.inc) \
  4023. $(COMPILER_UNITTARGETDIR) $(COMPILER_TARGETDIR)
  4024. ifneq ($(REVSTR),)
  4025. ifdef USEZIPWRAPPER
  4026. ifneq ($(ECHOREDIR),echo)
  4027. $(ECHOREDIR) "'$(REVSTR)'" > revision.inc
  4028. else
  4029. $(ECHOREDIR) '$(REVSTR)' > revision.inc
  4030. endif
  4031. else
  4032. $(ECHOREDIR) "'$(REVSTR)'" > revision.inc
  4033. endif
  4034. $(COMPILER) version.pas
  4035. endif
  4036. $(COMPILER) pp.pas
  4037. $(EXECPPAS)
  4038. $(MOVE) $(COMPILER_TARGETDIR)/$(PPEXENAME) $(EXENAME)
  4039. ifeq ($(CPU_SOURCE),$(PPC_TARGET))
  4040. ifeq ($(OS_SOURCE),$(OS_TARGET))
  4041. ifndef NOWPOCYCLE
  4042. ifdef RELEASE
  4043. DOWPOCYCLE=1
  4044. wpocycle:
  4045. $(RM) $(EXENAME)
  4046. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(strip $(LOCALOPT) $(OPTWPOCOLLECT) $(OPTNEW))' compiler
  4047. $(RM) $(EXENAME)
  4048. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(strip $(RTLOPT) $(OPTWPOPERFORM) $(OPTNEW))' rtlclean rtl
  4049. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OPT=$(strip $(LOCALOPT) $(OPTNEW) $(OPTWPOPERFORM) $(subst pp1.wpo,pp2.wpo,$(OPTWPOCOLLECT)))' $(addsuffix _clean,$(ALLTARGETS)) compiler
  4050. $(MOVE) $(EXENAME) $(TEMPWPONAME1)
  4051. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(strip $(RTLOPT) $(OPTNEW) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM)))' rtlclean rtl
  4052. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPWPONAME1)' 'OPT=$(strip $(LOCALOPT) $(OPTNEW) $(subst pp1.wpo,pp2.wpo,$(OPTWPOPERFORM)))' $(addsuffix _clean,$(ALLTARGETS)) compiler
  4053. $(COPY) $(EXENAME) $(TEMPWPONAME2)
  4054. endif
  4055. endif
  4056. ifndef DOWPOCYCLE
  4057. wpocycle:
  4058. endif
  4059. ifdef DIFF
  4060. ifdef OLDFPC
  4061. ifneq ($(OS_TARGET),darwin)
  4062. DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
  4063. else
  4064. DIFFRESULT:=$(shell cp $(OLDFPC) $(OLDFPC).tmp; cp $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; rm $(OLDFPC).tmp $(FPC).tmp)
  4065. endif
  4066. else
  4067. DIFFRESULT=Not equal
  4068. endif
  4069. else
  4070. DIFFRESULT=No diff program
  4071. endif
  4072. ifndef DIFFRESULT
  4073. next :
  4074. @echo $(OLDFPC) and $(FPC) are equal
  4075. $(COPY) $(FPC) $(EXENAME)
  4076. else
  4077. next :
  4078. $(MAKE) rtlclean rtl
  4079. $(MAKE) cycleclean compiler
  4080. $(MAKE) echotime
  4081. endif
  4082. $(TEMPNAME1) :
  4083. $(MAKE) 'OLDFPC=' next CYCLELEVEL=1
  4084. -$(DEL) $(TEMPNAME1)
  4085. $(MOVE) $(EXENAME) $(TEMPNAME1)
  4086. $(TEMPNAME2) : $(TEMPNAME1)
  4087. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME1)' 'OLDFPC=' next CYCLELEVEL=2
  4088. -$(DEL) $(TEMPNAME2)
  4089. $(MOVE) $(EXENAME) $(TEMPNAME2)
  4090. $(TEMPNAME3) : $(TEMPNAME2)
  4091. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME2)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME1)' next CYCLELEVEL=3
  4092. -$(DEL) $(TEMPNAME3)
  4093. $(MOVE) $(EXENAME) $(TEMPNAME3)
  4094. cycle:
  4095. $(MAKE) tempclean $(TEMPNAME3)
  4096. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next CYCLELEVEL=4
  4097. $(DIFF) $(TEMPNAME3) $(EXENAME)
  4098. $(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAME)'
  4099. $(MAKE) wpocycle
  4100. $(MAKE) echotime
  4101. else
  4102. cycle:
  4103. $(MAKE) OS_TARGET=$(OS_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=1
  4104. $(MAKE) OS_TARGET=$(OS_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler CYCLELEVEL=1
  4105. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=2
  4106. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) EXENAME=$(PPCROSSNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler CYCLELEVEL=2
  4107. ifndef CROSSINSTALL
  4108. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' rtlclean rtl CYCLELEVEL=3
  4109. ifndef NoNativeBinaries
  4110. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' cycleclean compiler CYCLELEVEL=3
  4111. endif
  4112. endif
  4113. endif
  4114. else
  4115. cycle: override FPC=
  4116. cycle:
  4117. $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=1
  4118. $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler CYCLELEVEL=1
  4119. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=2
  4120. $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) PPC_TARGET=$(CPU_TARGET) EXENAME=$(PPCROSSNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler CYCLELEVEL=2
  4121. ifndef CROSSINSTALL
  4122. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' 'OPT=$(RTLOPT) $(CROSSOPT)' rtlclean rtl CYCLELEVEL=3
  4123. ifndef NoNativeBinaries
  4124. $(MAKE) 'FPC=$(BASEDIR)/$(PPCROSSNAME)' 'OPT=$(strip $(LOCALOPT) $(CROSSOPT))' cycleclean compiler CYCLELEVEL=3
  4125. endif
  4126. endif
  4127. endif
  4128. cycledep:
  4129. $(MAKE) cycle USEDEPEND=1
  4130. extcycle:
  4131. $(MAKE) cycle OPT="$(OPT) -n -OG2p3 -glttt -CRriot -dEXTDEBUG" ALLOW_WARNINGS=1
  4132. cvstest:
  4133. $(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPT=-n -Se'
  4134. full: fullcycle
  4135. fullcycle:
  4136. $(MAKE) cycle
  4137. $(MAKE) ppuclean
  4138. ifneq ($(OS_SOURCE),win64)
  4139. $(MAKE) $(filter-out $(PPC_TARGET),$(CYCLETARGETS)) 'FPC=$(BASEDIR)/$(EXENAME)'
  4140. else
  4141. $(MAKE) $(filter-out i8086,$(filter-out i386,$(filter-out $(PPC_TARGET),$(CYCLETARGETS)))) 'FPC=$(BASEDIR)/$(EXENAME)'
  4142. endif
  4143. htmldocs:
  4144. $(PASDOC) -p -h -o html$(PATHSEP)$(PPC_TARGET) -d fpc -d gdb -d $(PPC_TARGET) -u $(PPC_TARGET) $(PPC_TARGET)$(PATHSEP)*.pas systems$(PATHSEP)*.pas *.pas
  4145. .PHONY: quickinstall exeinstall install installsym
  4146. MSGINSTALLDIR=$(INSTALL_BASEDIR)/msg
  4147. override PPEXEFILE:=$(wildcard $(EXENAME))
  4148. ifdef UNIXHier
  4149. PPCCPULOCATION=$(INSTALL_BASEDIR)
  4150. else
  4151. PPCCPULOCATION=$(INSTALL_BINDIR)
  4152. endif
  4153. ifndef NoNativeBinaries
  4154. quickinstall: quickinstall_withutils
  4155. else
  4156. quickinstall: exeinstall
  4157. endif
  4158. quickinstall_withutils: $(addsuffix _install,$(TARGET_DIRS)) exeinstall
  4159. exeinstall:
  4160. ifneq ($(INSTALLEXEFILE),)
  4161. ifdef UPXPROG
  4162. -$(UPXPROG) $(INSTALLEXEFILE)
  4163. endif
  4164. $(MKDIR) $(PPCCPULOCATION)
  4165. $(INSTALLEXE) $(INSTALLEXEFILE) $(PPCCPULOCATION)/$(INSTALLEXEFILE)
  4166. endif
  4167. fullinstall:
  4168. ifneq ($(OS_SOURCE),win64)
  4169. $(MAKE) $(addsuffix _exe_install,$(filter-out $(PPC_TARGET),$(CYCLETARGETS)))
  4170. else
  4171. $(MAKE) $(addsuffix _exe_install,$(filter-out i8086,$(filter-out i386,$(filter-out $(PPC_TARGET),$(CYCLETARGETS)))))
  4172. endif
  4173. install: quickinstall
  4174. ifndef CROSSINSTALL
  4175. ifdef UNIXHier
  4176. $(MKDIR) $(INSTALL_BASEDIR)
  4177. $(INSTALLEXE) $(COMPILERUTILSDIR)/samplecfg $(INSTALL_BASEDIR)/samplecfg
  4178. endif
  4179. $(MKDIR) $(MSGINSTALLDIR)
  4180. $(INSTALL) $(MSGFILES) $(MSGINSTALLDIR)
  4181. endif
  4182. installsymlink: install
  4183. ifneq ($(PPCCPULOCATION),$(INSTALL_BINDIR))
  4184. $(MKDIR) $(INSTALL_BINDIR)
  4185. ln -sf $(INSTALL_BASEDIR)/$(EXENAME) $(INSTALL_BINDIR)/$(EXENAME)
  4186. endif
  4187. .PHONY: rtl rtlclean rtlinstall
  4188. rtl:
  4189. $(MAKE) -C $(PACKAGEDIR_RTL) 'OPT=$(RTLOPT)' all
  4190. rtlclean:
  4191. $(MAKE) -C $(PACKAGEDIR_RTL) clean
  4192. rtlinstall:
  4193. $(MAKE) -C $(PACKAGEDIR_RTL) install
  4194. PPUDIR=$(COMPILER_UNITTARGETDIR)
  4195. ALLPPUDIR=$(CPU_TARGET)/units/*
  4196. PPULIST=$(wildcard $(PPUDIR)/*.ppu)
  4197. PPULOGLIST=$(subst .ppu,.log-ppu,$(PPULIST))
  4198. RTLPPUDIR=../rtl/units/$(FULL_TARGET)
  4199. RTLPPULIST=$(wildcard $(RTLPPUDIR)/*.ppu)
  4200. RTLPPULOGLIST=$(subst .ppu,.log-ppu,$(RTLPPULIST))
  4201. .PHONY : ppulogs cleanppulogs rtlppulogs cleanrtlppulogs testppudump
  4202. ppulogs : $(PPULOGLIST)
  4203. rtlppulogs : $(RTLPPULOGLIST)
  4204. vpath %.ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR)
  4205. vpath %.log-ppu $(PPUDIR) $(RTLPPUDIR) $(ALLPPUDIR)
  4206. %.log-ppu : %.ppu ./utils/ppudump$(EXEEXT)
  4207. .$(PATHSEP)utils$(PATHSEP)ppudump -VA -M $< > $@
  4208. ./utils/ppudump$(EXEEXT):
  4209. $(MAKE) -C $(COMPILERUTILSDIR) ppudump$(EXEEXT)
  4210. ppuinfo :
  4211. echo PPU list is "$(PPULIST)"
  4212. echo PPULOG list is "$(PPULOGLIST)"
  4213. cleanppulogs :
  4214. -$(RMPROG) $(PPULOGLIST)
  4215. cleanrtlppulogs :
  4216. -$(RMPROG) $(RTLPPULOGLIST)
  4217. testppudump :
  4218. $(MAKE) cleanrtlppulogs cleanppulogs ppulogs rtlppulogs
  4219. localmake:=$(strip $(wildcard makefile.loc))
  4220. ifdef localmake
  4221. include ./$(localmake)
  4222. endif