From 48daa2dd8175fc76a4b67469f778cad9ebe85e2b Mon Sep 17 00:00:00 2001 From: "Felipe \"Zoc\" Silveira" Date: Sun, 22 May 2016 00:14:31 -0300 Subject: [PATCH] Updated Makefile to allow building TinyXML2 as a static library --- Makefile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index aab6293..20777bc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,19 @@ -all: xmltest -xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h +all: xmltest staticlib + +rebuild: clean all + +xmltest: xmltest.cpp tinyxml2.a + +clean: + $(RM) *.o xmltest tinyxml2.a + test: clean xmltest ./xmltest -clean: - rm -f *.o xmltest + +staticlib: tinyxml2.a + +tinyxml2.a: tinyxml2.o + $(AR) $(ARFLAGS)s $@ $^ + +tinyxml2.o: tinyxml2.cpp tinyxml2.h +