summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-04-10 23:17:25 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-04-11 21:10:33 +0200
commit60281cbfe4f4f5087d0f77e5b3b7b1a46edc741d (patch)
tree51d3799c860b1b13e0702ec41409fd65bb351c2b /Makefile
parentbc59823bd553c7422170d0d20c83d394c9581aea (diff)
Guess build system and remove BR2_GNU_BUILD_SUFFIX
Instead of having a configuration option BR2_GNU_BUILD_SUFFIX, let's use config.guess to guess the build system type. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 03ed4c505..7fdf69741 100644
--- a/Makefile
+++ b/Makefile
@@ -153,29 +153,31 @@ cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev
unexport CROSS_COMPILE
unexport ARCH
+GNU_HOST_NAME=$(shell package/gnuconfig/config.guess)
+
#############################################################
#
# Setup the proper filename extensions for the host
#
##############################################################
-ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring linux,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=
HOST_LIBEXT:=.a
HOST_SHREXT:=.so
endif
-ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring apple,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=
HOST_LIBEXT:=.a
HOST_SHREXT:=.dylib
endif
-ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring cygwin,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=.exe
HOST_LIBEXT:=.lib
HOST_SHREXT:=.dll
HOST_LOADLIBES="-lcurses -lintl"
export HOST_LOADLIBES
endif
-ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring mingw,$(GNU_HOST_NAME)),)
HOST_EXEEXT:=.exe
HOST_LIBEXT:=.lib
HOST_SHREXT:=.dll