diff options
Diffstat (limited to 'packages/libogcfpc/examples/graphics/gx/neheGX')
10 files changed, 380 insertions, 90 deletions
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 |