summaryrefslogtreecommitdiff
path: root/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile')
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile b/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
index 277c4e6eac..e3ad1ba107 100644
--- a/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif