blob: 9ee4a51f9920324c3f7947fcdf080771c91e40c0 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 6b822b36739222d0c864249992b5d28e3ff4d948 Mon Sep 17 00:00:00 2001
2From: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
3Date: Mon, 3 Sep 2018 17:58:27 +0200
4Subject: [PATCH] Use toolchain from environment variables
5
6Upstream-Status: Submitted [https://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT/pull/42]
7Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
8Signed-off-by: Ankit Navik <ankit.tarot@gmail.com>
9---
10 Makefile.inc | 7 ++++---
11 WTGService/Makefile | 2 +-
12 console_src/Makefile | 2 +-
13 lib/Makefile | 6 +++---
14 4 files changed, 9 insertions(+), 8 deletions(-)
15
16diff --git a/Makefile.inc b/Makefile.inc
17index b0edf5a..0094bdf 100644
18--- a/Makefile.inc
19+++ b/Makefile.inc
20@@ -13,14 +13,15 @@
21 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
22 # USE OR PERFORMANCE OF THIS SOFTWARE.
23 #
24-CC = gcc
25+CC ?= gcc
26+AR ?= ar
27 LIB=lib
28 DUT=dut
29 CA=ca
30 UCC=ucc
31 CON=console_src
32 WTG=WTGService
33-MAKE=make
34+MAKE?=make
35
36 # This is for WMM-PS
37 #for Ext TG
38@@ -46,7 +47,7 @@ CFLAGS = -g -O2 -D_REENTRANT -Wall -I../inc
39
40 DUTLIBS = ../lib/libwfa_dut.a -lpthread
41 CALIBS = ../lib/libwfa_ca.a -lpthread
42-RANLIB = ranlib
43+RANLIB ?= ranlib
44
45 LIBWFA_NAME_DUT = libwfa_dut.a
46 LIBWFA_NAME_CA = libwfa_ca.a
47diff --git a/WTGService/Makefile b/WTGService/Makefile
48index 5312eb6..4855771 100644
49--- a/WTGService/Makefile
50+++ b/WTGService/Makefile
51@@ -13,7 +13,7 @@
52 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
53 # USE OR PERFORMANCE OF THIS SOFTWARE.
54 #
55-CC=gcc
56+CC?=gcc
57 CFLAGS= -Wall
58 LIB=-lpthread
59
60diff --git a/console_src/Makefile b/console_src/Makefile
61index 8282283..d1098eb 100644
62--- a/console_src/Makefile
63+++ b/console_src/Makefile
64@@ -14,7 +14,7 @@
65 # USE OR PERFORMANCE OF THIS SOFTWARE.
66 #
67
68-CC = gcc
69+CC ?= gcc
70 CFLAGS = -g -DWFA_DEBUG -pthread
71
72 TARGETS = wfa_con
73diff --git a/lib/Makefile b/lib/Makefile
74index ffcef94..299b8d6 100644
75--- a/lib/Makefile
76+++ b/lib/Makefile
77@@ -17,9 +17,9 @@
78 include ../Makefile.inc
79
80 all: ${LIB_OBJS}
81- ar crv ${LIBWFA_NAME} $?
82- ar crv ${LIBWFA_NAME_DUT} ${LIB_OBJS_DUT}
83- ar crv ${LIBWFA_NAME_CA} ${LIB_OBJS_CA}
84+ $(AR) crv ${LIBWFA_NAME} $?
85+ $(AR) crv ${LIBWFA_NAME_DUT} ${LIB_OBJS_DUT}
86+ $(AR) crv ${LIBWFA_NAME_CA} ${LIB_OBJS_CA}
87 ${RANLIB} ${LIBWFA_NAME} ${LIBWFA_NAME_DUT} ${LIBWFA_NAME_CA}
88
89 wfa_tg.o: wfa_tg.c ../inc/wfa_agt.h ../inc/wfa_types.h ../inc/wfa_rsp.h ../inc/wfa_tlv.h ../inc/wfa_tg.h
90--
912.7.4
92