patch-Makefile.orig 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --- tinyxml.orig/Makefile 2013-07-30 15:47:27.000000000 +0200
  2. +++ tinyxml/Makefile 2013-07-30 15:47:25.000000000 +0200
  3. @@ -15,13 +15,13 @@ PROFILE := NO
  4. # TINYXML_USE_STL can be used to turn on STL support. NO, then STL
  5. # will not be used. YES will include the STL files.
  6. -TINYXML_USE_STL := NO
  7. +TINYXML_USE_STL := YES
  8. #****************************************************************************
  9. -CC := gcc
  10. -CXX := g++
  11. -LD := g++
  12. +CC ?= gcc
  13. +CXX ?= g++
  14. +LD := $(CXX)
  15. AR := ar rc
  16. RANLIB := ranlib
  17. @@ -41,9 +41,9 @@ ifeq (YES, ${DEBUG})
  18. CXXFLAGS := ${DEBUG_CXXFLAGS}
  19. LDFLAGS := ${DEBUG_LDFLAGS}
  20. else
  21. - CFLAGS := ${RELEASE_CFLAGS}
  22. - CXXFLAGS := ${RELEASE_CXXFLAGS}
  23. - LDFLAGS := ${RELEASE_LDFLAGS}
  24. + CFLAGS ?= ${RELEASE_CFLAGS}
  25. + CXXFLAGS ?= ${RELEASE_CXXFLAGS}
  26. + LDFLAGS ?= ${RELEASE_LDFLAGS}
  27. endif
  28. ifeq (YES, ${PROFILE})
  29. @@ -81,7 +81,7 @@ CXXFLAGS := ${CXXFLAGS} ${DEFS}
  30. # Targets of the build
  31. #****************************************************************************
  32. -OUTPUT := xmltest
  33. +OUTPUT := libtinyxml.so.2.6.2
  34. all: ${OUTPUT}
  35. @@ -90,7 +90,7 @@ all: ${OUTPUT}
  36. # Source files
  37. #****************************************************************************
  38. -SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp tinystr.cpp
  39. +SRCS := tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
  40. # Add on the sources for libraries
  41. SRCS := ${SRCS}
  42. @@ -103,6 +103,8 @@ OBJS := $(addsuffix .o,$(basename ${SRCS
  43. ${OUTPUT}: ${OBJS}
  44. ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
  45. + ${CXX} -shared -Wl,-soname,libtinyxml.so.2.6.2 -o $@ ${OBJS} ${LDFLAGS} ${LIBS} ${EXTRA_LIBS}
  46. + ln -sf libtinyxml.so.2.6.2 libtinyxml.so
  47. #****************************************************************************
  48. # common rules