From 1a0de593229b9b17b4d86231489a9cfa0c2901c5 Mon Sep 17 00:00:00 2001
From: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Sat, 4 Aug 2018 01:52:24 -0500
Subject: [PATCH 05/11] Make choice of archiver configurable

---
 Makefile       | 2 +-
 make/config.mk | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f95d882..74d8b75 100644
--- a/Makefile
+++ b/Makefile
@@ -468,7 +468,7 @@ build/plugin/%.o: plugin/%.cc
 # --Wl,--whole-archive -lmxnet --Wl,--no-whole-archive
 lib/libmxnet.a: $(ALLX_DEP)
 	@mkdir -p $(@D)
-	ar crv $@ $(filter %.o, $?)
+	$(AR) crv $@ $(filter %.o, $?)
 
 lib/libmxnet.so: $(ALLX_DEP)
 	@mkdir -p $(@D)
diff --git a/make/config.mk b/make/config.mk
index dd67c33..365b086 100644
--- a/make/config.mk
+++ b/make/config.mk
@@ -40,6 +40,7 @@
 export CC = gcc
 export CXX = g++
 export NVCC = nvcc
+export AR = ar
 
 # whether compile with options for MXNet developer
 DEV = 0
-- 
2.7.4

