diff mbox

tools: spi: enable CROSS_COMPILE in Makefile

Message ID 1473258496-14565-1-git-send-email-jorge.ramirez-ortiz@linaro.org
State New
Headers show

Commit Message

Jorge Ramirez-Ortiz Sept. 7, 2016, 2:28 p.m. UTC
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

---
 tools/spi/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Daniel Thompson Sept. 7, 2016, 3:06 p.m. UTC | #1
On 07/09/16 15:28, Jorge Ramirez-Ortiz wrote:
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

> ---

>  tools/spi/Makefile | 4 ++++

>  1 file changed, 4 insertions(+)

>

> diff --git a/tools/spi/Makefile b/tools/spi/Makefile

> index cd0db62..d1845b0 100644

> --- a/tools/spi/Makefile

> +++ b/tools/spi/Makefile

> @@ -1,4 +1,8 @@

> +CC = $(CROSS_COMPILE)gcc

> +

>  all: spidev_test spidev_fdx

>

> +%: %.c

> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<


What is this extra rule for?

The built in rules should already honour both these variables (and more 
besides).


Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/spi/Makefile b/tools/spi/Makefile
index cd0db62..d1845b0 100644
--- a/tools/spi/Makefile
+++ b/tools/spi/Makefile
@@ -1,4 +1,8 @@ 
+CC = $(CROSS_COMPILE)gcc
+
 all: spidev_test spidev_fdx
 
+%: %.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
 clean:
 	$(RM) spidev_test spidev_fdx