summaryrefslogtreecommitdiffstats
path: root/rules/canutils.make
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-08-11 13:45:42 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-08-11 13:54:46 +0200
commit2f24903142111fa85b37f8178ec2d55d6a4712a3 (patch)
tree5af66799eaf9847bfd0d8c913d537558c6dde3b0 /rules/canutils.make
parent19915a7ce3a8d8affffcee65764cf6cbcecdc549 (diff)
downloadptxdist-2f24903142111fa85b37f8178ec2d55d6a4712a3.tar.gz
ptxdist-2f24903142111fa85b37f8178ec2d55d6a4712a3.tar.xz
[canutils] add option to select between toolchain's and BSP's kernel headers
The canutils need the linux/can.h header from the kernel. Normally this header is provided by the toolchain. If the user is using a toolchain based on a kernel < 2.6.25 the header is missing. In the past PTXdist uses the BSP's kernel headers instead, but with kernel > 2.6.30 this may breaks with the following error message: "error: asm/bitsperlong.h: No such file or directory" So we give the user (or rather the BSP integrator) the choice to select between these two..... Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'rules/canutils.make')
-rw-r--r--rules/canutils.make13
1 files changed, 13 insertions, 0 deletions
diff --git a/rules/canutils.make b/rules/canutils.make
index c68ec74c8..0d481cc48 100644
--- a/rules/canutils.make
+++ b/rules/canutils.make
@@ -41,11 +41,24 @@ $(CANUTILS_SOURCE):
CANUTILS_PATH := PATH=$(CROSS_PATH)
CANUTILS_ENV := $(CROSS_ENV)
+ifdef PTXCONF_CANUTILS_BSP_KERNEL
+# don't use := here
+CANUTILS_CPPFLAGS = CPPFLAGS="-I${KERNEL_DIR}/include $${CPPFLAGS}"
+endif
+
#
# autoconf
#
CANUTILS_AUTOCONF := $(CROSS_AUTOCONF_ROOT)
+$(STATEDIR)/canutils.prepare:
+ @$(call targetinfo)
+ @$(call clean, $(CANUTILS_DIR)/config.cache)
+ cd $(CANUTILS_DIR) && \
+ $(CANUTILS_PATH) $(CANUTILS_ENV) $(CANUTILS_CPPFLAGS) \
+ ./configure $(CANUTILS_AUTOCONF)
+ @$(call touch)
+
# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------