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