summaryrefslogtreecommitdiff
path: root/packages/libogcfpc/examples/graphics/gx
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-18 16:08:25 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-18 16:08:25 +0000
commit8668d1d4b544aedbc76fe2adca2484ee56ea869f (patch)
treeb544c36505a4ca95f4b2acccb030f09b021250c9 /packages/libogcfpc/examples/graphics/gx
parent0bc3a971baf972f2fd4d96e1c0dfbf90b896b9fc (diff)
downloadfpc-8668d1d4b544aedbc76fe2adca2484ee56ea869f.tar.gz
* regenerated makefiles
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44793 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/libogcfpc/examples/graphics/gx')
-rw-r--r--packages/libogcfpc/examples/graphics/gx/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile47
-rw-r--r--packages/libogcfpc/examples/graphics/gx/triangle/Makefile47
13 files changed, 494 insertions, 117 deletions
diff --git a/packages/libogcfpc/examples/graphics/gx/Makefile b/packages/libogcfpc/examples/graphics/gx/Makefile
index 4186f7d10d..3c3e815776 100644
--- a/packages/libogcfpc/examples/graphics/gx/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/Makefile
@@ -811,6 +811,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -2454,16 +2485,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -2525,6 +2547,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
index 151f4ab6d2..52a9d42bae 100644
--- a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
index dad2a27acb..8344cd742e 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
@@ -811,6 +811,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -2454,16 +2485,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -2525,6 +2547,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
index 0f35a46937..45368e7bb0 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
index 335262ba4b..72bf752f21 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
index f384063ae9..ddd9451236 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
index f3adeab18a..d814da8580 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
index 7ae69d7d7f..da8e351c9e 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
index 63b74b34d6..adb7e520f3 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
index 86f4a3ab4f..c5b8e351ce 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
index 0f74c2827f..1d5c1dbc77 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
index 3ce8505f42..348f96e99d 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/triangle/Makefile b/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
index 5084629537..6981109547 100644
--- a/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
@@ -1674,6 +1674,37 @@ endif
else
CROSSBINDIR=
endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -3317,16 +3348,7 @@ override FPCOPT+=-gl
override FPCOPTDEF+=DEBUG
endif
ifdef RELEASE
-ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(CPU_TARGET),i386)
-FPCCPUOPT:=-OG2p3
-endif
-ifeq ($(CPU_TARGET),powerpc)
-FPCCPUOPT:=-O1r
-endif
-else
FPCCPUOPT:=-O2
-endif
override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
override FPCOPTDEF+=RELEASE
endif
@@ -3388,6 +3410,13 @@ endif
endif
ifdef LINKSHARED
endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
ifdef OPT
override FPCOPT+=$(OPT)
endif