From 9ab9c1517c1e66e2dc7c3a0c9bb7834b47db6d93 Mon Sep 17 00:00:00 2001 From: mazen Date: Sat, 11 Oct 2008 14:42:37 +0000 Subject: [PATCH] * If no custom libgdb.a file is found, then we try to look for a system default libgdb.a before deciding to build IDE without debugger support. Some distributions like Debian provide package libgdb-dev with libgdb.a on which official IDE in Debian package should link. git-svn-id: trunk@11880 - --- ide/Makefile | 10 +++++++++- ide/Makefile.fpc | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ide/Makefile b/ide/Makefile index a563b044db..4b9bc3599a 100644 --- a/ide/Makefile +++ b/ide/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/08/19] # default: all MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded @@ -277,6 +277,14 @@ endif override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))) endif ifeq ($(LIBGDBFILE),) +SYSLIBDIR=/lib /usr/lib /usr/local/lib +override LIBGDBFILE=$(firstword $(wildcard $(addsuffix /libgdb.a,$(SYSLIBDIR)))) +ifneq (${LIBGDBFILE},) +$(warning Using system sefault libgdb file located in ${LIBGDBFILE}) +GDBLIBDIR=$(dir ${LIBGDBFILE}) +endif +endif +ifeq ($(LIBGDBFILE),) GDB= else GDB=1 diff --git a/ide/Makefile.fpc b/ide/Makefile.fpc index ab5e6a61b3..4954f51e49 100644 --- a/ide/Makefile.fpc +++ b/ide/Makefile.fpc @@ -62,6 +62,17 @@ endif override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))) endif +# No custom libgdb.a found, try using system default library if available +ifeq ($(LIBGDBFILE),) +SYSLIBDIR=/lib /usr/lib /usr/local/lib +# Detect if libgdb.a is available +override LIBGDBFILE=$(firstword $(wildcard $(addsuffix /libgdb.a,$(SYSLIBDIR)))) +ifneq (${LIBGDBFILE},) +$(warning Using system sefault libgdb file located in ${LIBGDBFILE}) +GDBLIBDIR=$(dir ${LIBGDBFILE}) +endif +endif + # Disable GDB when no libgdb.a found ifeq ($(LIBGDBFILE),) GDB=