1all: xmltest staticlib 2 3rebuild: clean all 4 5xmltest: xmltest.cpp libtinyxml2.a 6 7effc: 8 gcc -Werror -Wall -Wextra -Wshadow -Wpedantic -Wformat-nonliteral \ 9 -Wformat-security -Wswitch-default -Wuninitialized -Wundef \ 10 -Wpointer-arith -Woverloaded-virtual -Wctor-dtor-privacy \ 11 -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo \ 12 -Wno-unused-parameter -Weffc++ xmltest.cpp tinyxml2.cpp -o xmltest 13 14clean: 15 $(RM) *.o xmltest libtinyxml2.a 16 17test: clean xmltest 18 ./xmltest 19 20staticlib: libtinyxml2.a 21 22libtinyxml2.a: tinyxml2.o 23 $(AR) $(ARFLAGS)s $@ $^ 24 25tinyxml2.o: tinyxml2.cpp tinyxml2.h 26 27