summaryrefslogtreecommitdiff
path: root/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
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/libndsfpc/examples/graphics/Printing/custom_font/Makefile
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/libndsfpc/examples/graphics/Printing/custom_font/Makefile')
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile47
1 files changed, 38 insertions, 9 deletions
diff --git a/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile b/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
index 9304a0a95b..26cda89d78 100644
--- a/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
@@ -2248,6 +2248,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
@@ -3891,16 +3922,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
@@ -3962,6 +3984,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