Index: Makefile --- Makefile.orig +++ Makefile @@ -81,7 +81,7 @@ CXXFLAGS := ${CXXFLAGS} ${DEFS} # Targets of the build #**************************************************************************** -OUTPUT := xmltest +OUTPUT := libtinyxml.so.${LIBtinyxml_VERSION} all: ${OUTPUT} @@ -90,7 +90,7 @@ all: ${OUTPUT} # Source files #**************************************************************************** -SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp tinystr.cpp +SRCS := tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp # Add on the sources for libraries SRCS := ${SRCS} @@ -102,7 +102,14 @@ OBJS := $(addsuffix .o,$(basename ${SRCS})) #**************************************************************************** ${OUTPUT}: ${OBJS} - ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} + ${LD} -shared -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} + +# Tests +test: xmltest + LD_LIBRARY_PATH=. ./xmltest + +xmltest: ${OBJS} xmltest.o + ${LD} -o $@ ${LDFLAGS} xmltest.o -L. -ltinyxml ${LIBS} ${EXTRA_LIBS} #**************************************************************************** # common rules