From abdb4e0db8b27f719434f5a0d6ec0b1a6b086ded Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 4 Oct 2022 22:27:43 +0200 Subject: [PATCH] Use implicit $AR variable in Makefile According to the documentation[1] this variable defaults to "ar" already. This allows for the variable to be overriden from outside, which is used in cross-compilation. [1]: https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html#Implicit-Variables --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 92ba67a..ffb287a 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ all: $(LIB) $(LIB_SHARED) $(EXEC) *.o: $(HFILES) libtomlcpp.a: $(OBJ) - ar -rcs $@ $^ + $(AR) -rcs $@ $^ libtomlcpp.so: $(OBJ) $(CXX) $(CXXFLAGS) -shared -o $@ $^