1 all: xmltest staticlib 2 3 rebuild: clean all 4 5 xmltest: xmltest.cpp libtinyxml2.a 6 7 effc: 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 14 clean: 15 $(RM) *.o xmltest libtinyxml2.a 16 17 test: clean xmltest 18 ./xmltest 19 20 staticlib: libtinyxml2.a 21 22 libtinyxml2.a: tinyxml2.o 23 $(AR) $(ARFLAGS)s $@ $^ 24 25 tinyxml2.o: tinyxml2.cpp tinyxml2.h 26 27