|
@@ -58,7 +58,7 @@ SRCBATCHEXT=.bat
|
|
|
endif
|
|
|
endif
|
|
|
ifdef COMSPEC
|
|
|
-ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
|
|
|
+ifneq ($(filter $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
|
|
|
ifndef RUNBATCH
|
|
|
RUNBATCH=$(COMSPEC) /C
|
|
|
endif
|
|
@@ -214,11 +214,11 @@ $(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m
|
|
|
endif
|
|
|
override FPCOPT+=-Cp$(SUBARCH)
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
|
|
|
+ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
|
|
|
TARGETSUFFIX=$(OS_TARGET)
|
|
|
SOURCESUFFIX=$(OS_SOURCE)
|
|
|
else
|
|
|
-ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
|
|
|
+ifneq ($(filter $(OS_TARGET),$(LIMIT83fs)),)
|
|
|
TARGETSUFFIX=$(OS_TARGET)
|
|
|
else
|
|
|
TARGETSUFFIX=$(FULL_TARGET)
|
|
@@ -229,11 +229,11 @@ ifneq ($(FULL_TARGET),$(FULL_SOURCE))
|
|
|
CROSSCOMPILE=1
|
|
|
endif
|
|
|
ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
|
|
|
-ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
|
|
|
+ifeq ($(filter $(FULL_TARGET),$(MAKEFILETARGETS)),)
|
|
|
$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
|
|
|
endif
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
|
|
|
+ifneq ($(filter $(OS_TARGET),$(BSDs)),)
|
|
|
BSDhier=1
|
|
|
endif
|
|
|
ifeq ($(OS_TARGET),linux)
|
|
@@ -287,8 +287,8 @@ endif
|
|
|
ifndef CROSSBINDIR
|
|
|
CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_TARGET),darwin iphonesim ios),)
|
|
|
-ifneq ($(findstring $(OS_SOURCE),darwin ios),)
|
|
|
+ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
|
|
|
+ifneq ($(filter $(OS_SOURCE),darwin ios),)
|
|
|
DARWIN2DARWIN=1
|
|
|
endif
|
|
|
endif
|
|
@@ -2585,11 +2585,11 @@ ifdef REQUIRE_PACKAGESDIR
|
|
|
override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
|
|
|
endif
|
|
|
ifdef ZIPINSTALL
|
|
|
-ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
|
|
|
+ifneq ($(filter $(OS_TARGET),$(UNIXs)),)
|
|
|
UNIXHier=1
|
|
|
endif
|
|
|
else
|
|
|
-ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
|
|
|
+ifneq ($(filter $(OS_SOURCE),$(UNIXs)),)
|
|
|
UNIXHier=1
|
|
|
endif
|
|
|
endif
|
|
@@ -2777,7 +2777,7 @@ endif
|
|
|
ifeq ($(OS_SOURCE),linux)
|
|
|
ifndef GCCLIBDIR
|
|
|
ifeq ($(CPU_TARGET),i386)
|
|
|
-ifneq ($(findstring x86_64,$(shell uname -a)),)
|
|
|
+ifneq ($(filter x86_64,$(shell uname -a)),)
|
|
|
ifeq ($(BINUTILSPREFIX),)
|
|
|
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
|
|
|
else
|
|
@@ -2800,11 +2800,11 @@ CROSSGCCOPT=-m64
|
|
|
endif
|
|
|
endif
|
|
|
ifeq ($(CPU_TARGET),sparc)
|
|
|
-ifneq ($(findstring sparc64,$(shell uname -a)),)
|
|
|
+ifneq ($(filter sparc64,$(shell uname -a)),)
|
|
|
ifeq ($(BINUTILSPREFIX),)
|
|
|
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),)
|
|
|
+ifneq ($(filter $(FPCFPMAKE_CPU_OPT),mips mipsel),)
|
|
|
CROSSGCCOPT=-mabi=32
|
|
|
else
|
|
|
CROSSGCCOPT=-m32
|
|
@@ -2818,19 +2818,19 @@ FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
|
|
|
ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
|
|
|
FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),)
|
|
|
+ifneq ($(filter $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),)
|
|
|
FPCMAKE_CROSSGCCOPT=-m64
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips64 mips64el),)
|
|
|
+ifneq ($(filter $(FPCFPMAKE_CPU_OPT),mips64 mips64el),)
|
|
|
FPCMAKE_CROSSGCCOPT=-mabi=64
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),)
|
|
|
+ifneq ($(filter $(FPCFPMAKE_CPU_OPT),mips mipsel),)
|
|
|
FPCMAKE_CROSSGCCOPT=-mabi=32
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),riscv64),)
|
|
|
+ifeq ($(FPCFPMAKE_CPU_OPT),riscv64)
|
|
|
FPCMAKE_CROSSGCCOPT=-mabi=lp64
|
|
|
else
|
|
|
-ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),riscv32),)
|
|
|
+ifeq ($(FPCFPMAKE_CPU_OPT),riscv32)
|
|
|
FPCMAKE_CROSSGCCOPT=-mabi=ilp32
|
|
|
else
|
|
|
FPCMAKE_CROSSGCCOPT=-m32
|
|
@@ -3009,7 +3009,7 @@ DEBUGSYMEXT=.xcoff
|
|
|
SHORTSUFFIX=mac
|
|
|
IMPORTLIBPREFIX=imp
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_TARGET),darwin iphonesim ios),)
|
|
|
+ifneq ($(filter $(OS_TARGET),darwin iphonesim ios),)
|
|
|
BATCHEXT=.sh
|
|
|
EXEEXT=
|
|
|
HASSHAREDLIB=1
|
|
@@ -3088,7 +3088,7 @@ endif
|
|
|
ifeq ($(OS_TARGET),wasi)
|
|
|
EXEEXT=.wasm
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
|
|
|
+ifneq ($(filter $(OS_SOURCE),$(LIMIT83fs)),)
|
|
|
FPCMADE=fpcmade.$(SHORTSUFFIX)
|
|
|
ZIPSUFFIX=$(SHORTSUFFIX)
|
|
|
ZIPCROSSPREFIX=
|
|
@@ -3806,8 +3806,8 @@ ifdef SYSROOTPATH
|
|
|
override FPCOPT+=-XR$(SYSROOTPATH)
|
|
|
else
|
|
|
ifeq ($(OS_TARGET),$(OS_SOURCE))
|
|
|
-ifneq ($(findstring $(OS_TARGET),darwin),)
|
|
|
-ifneq ($(findstring $(CPU_TARGET),aarch64),)
|
|
|
+ifeq ($(OS_TARGET),darwin)
|
|
|
+ifeq ($(CPU_TARGET),aarch64)
|
|
|
ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
|
|
|
override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
|
|
endif
|
|
@@ -3818,8 +3818,8 @@ endif
|
|
|
ifdef CREATESHARED
|
|
|
override FPCOPT+=-Cg
|
|
|
endif
|
|
|
-ifneq ($(findstring $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
|
|
|
-ifneq ($(findstring $(CPU_TARGET),x86_64 mips mipsel riscv64 powerpc64),)
|
|
|
+ifneq ($(filter $(OS_TARGET),dragonfly freebsd openbsd netbsd linux solaris),)
|
|
|
+ifneq ($(filter $(CPU_TARGET),x86_64 mips mipsel riscv64 powerpc64),)
|
|
|
override FPCOPT+=-Cg
|
|
|
endif
|
|
|
endif
|
|
@@ -3862,10 +3862,10 @@ ifdef ACROSSCOMPILE
|
|
|
override FPCOPT+=$(CROSSOPT)
|
|
|
endif
|
|
|
override COMPILER:=$(strip $(FPC) $(FPCOPT))
|
|
|
-ifneq (,$(findstring -sh ,$(COMPILER)))
|
|
|
+ifneq (,$(filter -sh,$(COMPILER)))
|
|
|
UseEXECPPAS=1
|
|
|
endif
|
|
|
-ifneq (,$(findstring -s ,$(COMPILER)))
|
|
|
+ifneq (,$(filter -s,$(COMPILER)))
|
|
|
ifeq ($(FULL_SOURCE),$(FULL_TARGET))
|
|
|
UseEXECPPAS=1
|
|
|
endif
|