Makefile.tinyxml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #****************************************************************************
  2. #
  3. # Makefil for TinyXml test.
  4. # Lee Thomason
  5. # www.grinninglizard.com
  6. #
  7. # This is a GNU make (gmake) makefile
  8. #****************************************************************************
  9. # DEBUG can be set to YES to include debugging info, or NO otherwise
  10. DEBUG := YES
  11. # PROFILE can be set to YES to include profiling info, or NO otherwise
  12. PROFILE := NO
  13. #****************************************************************************
  14. CC := gcc
  15. CXX := g++
  16. LD := g++
  17. AR := ar rc
  18. RANLIB := ranlib
  19. DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG
  20. RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O2
  21. LIBS :=
  22. DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
  23. RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
  24. DEBUG_LDFLAGS := -g
  25. RELEASE_LDFLAGS :=
  26. ifeq (YES, ${DEBUG})
  27. CFLAGS := ${DEBUG_CFLAGS}
  28. CXXFLAGS := ${DEBUG_CXXFLAGS}
  29. LDFLAGS := ${DEBUG_LDFLAGS}
  30. else
  31. CFLAGS := ${RELEASE_CFLAGS}
  32. CXXFLAGS := ${RELEASE_CXXFLAGS}
  33. LDFLAGS := ${RELEASE_LDFLAGS}
  34. endif
  35. ifeq (YES, ${PROFILE})
  36. CFLAGS := ${CFLAGS} -pg
  37. CXXFLAGS := ${CXXFLAGS} -pg
  38. LDFLAGS := ${LDFLAGS} -pg
  39. endif
  40. #****************************************************************************
  41. # Preprocessor directives
  42. #****************************************************************************
  43. ifeq (YES, ${PROFILE})
  44. DEFS :=
  45. else
  46. DEFS :=
  47. endif
  48. #****************************************************************************
  49. # Include paths
  50. #****************************************************************************
  51. #INCS := -I/usr/include/g++-2 -I/usr/local/include
  52. INCS :=
  53. #****************************************************************************
  54. # Makefile code common to all platforms
  55. #****************************************************************************
  56. CFLAGS := ${CFLAGS} ${DEFS}
  57. CXXFLAGS := ${CXXFLAGS} ${DEFS}
  58. #****************************************************************************
  59. # Targets of the build
  60. #****************************************************************************
  61. OUTPUT := xmltest
  62. all: ${OUTPUT}
  63. #****************************************************************************
  64. # Source files
  65. #****************************************************************************
  66. SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp
  67. # Add on the sources for libraries
  68. SRCS := ${SRCS}
  69. OBJS := $(addsuffix .o,$(basename ${SRCS}))
  70. #****************************************************************************
  71. # Output
  72. #****************************************************************************
  73. ${OUTPUT}: ${OBJS}
  74. ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
  75. #****************************************************************************
  76. # common rules
  77. #****************************************************************************
  78. # Rules for compiling source files to object files
  79. %.o : %.cpp
  80. ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
  81. %.o : %.c
  82. ${CC} -c ${CFLAGS} ${INCS} $< -o $@
  83. clean:
  84. -rm -f core ${OBJS} ${OUTPUT}
  85. depend:
  86. makedepend ${INCS} ${SRCS}
  87. # DO NOT DELETE
  88. tinyxml.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  89. tinyxml.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  90. tinyxml.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  91. tinyxml.o: /usr/include/bits/sched.h /usr/include/libio.h
  92. tinyxml.o: /usr/include/_G_config.h /usr/include/wchar.h
  93. tinyxml.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  94. tinyxml.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  95. tinyxmlparser.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  96. tinyxmlparser.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  97. tinyxmlparser.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  98. tinyxmlparser.o: /usr/include/bits/sched.h /usr/include/libio.h
  99. tinyxmlparser.o: /usr/include/_G_config.h /usr/include/wchar.h
  100. tinyxmlparser.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  101. tinyxmlparser.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  102. tinyxmlparser.o: /usr/include/ctype.h /usr/include/endian.h
  103. tinyxmlparser.o: /usr/include/bits/endian.h
  104. xmltest.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  105. xmltest.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  106. xmltest.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  107. xmltest.o: /usr/include/bits/sched.h /usr/include/libio.h
  108. xmltest.o: /usr/include/_G_config.h /usr/include/wchar.h
  109. xmltest.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  110. xmltest.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  111. tinyxmlerror.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  112. tinyxmlerror.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  113. tinyxmlerror.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  114. tinyxmlerror.o: /usr/include/bits/sched.h /usr/include/libio.h
  115. tinyxmlerror.o: /usr/include/_G_config.h /usr/include/wchar.h
  116. tinyxmlerror.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  117. tinyxmlerror.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h