Newer
Older
monitord / lame-3.97 / ACM / tinyxml / Makefile.tinyxml
  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.  
  10. # DEBUG can be set to YES to include debugging info, or NO otherwise
  11. DEBUG := YES
  12.  
  13. # PROFILE can be set to YES to include profiling info, or NO otherwise
  14. PROFILE := NO
  15.  
  16. #****************************************************************************
  17.  
  18. CC := gcc
  19. CXX := g++
  20. LD := g++
  21. AR := ar rc
  22. RANLIB := ranlib
  23.  
  24. DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -g -DDEBUG
  25. RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O2
  26.  
  27. LIBS :=
  28.  
  29. DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
  30. RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
  31.  
  32. DEBUG_LDFLAGS := -g
  33. RELEASE_LDFLAGS :=
  34.  
  35. ifeq (YES, ${DEBUG})
  36. CFLAGS := ${DEBUG_CFLAGS}
  37. CXXFLAGS := ${DEBUG_CXXFLAGS}
  38. LDFLAGS := ${DEBUG_LDFLAGS}
  39. else
  40. CFLAGS := ${RELEASE_CFLAGS}
  41. CXXFLAGS := ${RELEASE_CXXFLAGS}
  42. LDFLAGS := ${RELEASE_LDFLAGS}
  43. endif
  44.  
  45. ifeq (YES, ${PROFILE})
  46. CFLAGS := ${CFLAGS} -pg
  47. CXXFLAGS := ${CXXFLAGS} -pg
  48. LDFLAGS := ${LDFLAGS} -pg
  49. endif
  50.  
  51. #****************************************************************************
  52. # Preprocessor directives
  53. #****************************************************************************
  54.  
  55. ifeq (YES, ${PROFILE})
  56. DEFS :=
  57. else
  58. DEFS :=
  59. endif
  60.  
  61. #****************************************************************************
  62. # Include paths
  63. #****************************************************************************
  64.  
  65. #INCS := -I/usr/include/g++-2 -I/usr/local/include
  66. INCS :=
  67.  
  68.  
  69. #****************************************************************************
  70. # Makefile code common to all platforms
  71. #****************************************************************************
  72.  
  73. CFLAGS := ${CFLAGS} ${DEFS}
  74. CXXFLAGS := ${CXXFLAGS} ${DEFS}
  75.  
  76. #****************************************************************************
  77. # Targets of the build
  78. #****************************************************************************
  79.  
  80. OUTPUT := xmltest
  81.  
  82. all: ${OUTPUT}
  83.  
  84.  
  85. #****************************************************************************
  86. # Source files
  87. #****************************************************************************
  88.  
  89. SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp
  90.  
  91. # Add on the sources for libraries
  92. SRCS := ${SRCS}
  93.  
  94. OBJS := $(addsuffix .o,$(basename ${SRCS}))
  95.  
  96. #****************************************************************************
  97. # Output
  98. #****************************************************************************
  99.  
  100. ${OUTPUT}: ${OBJS}
  101. ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
  102.  
  103. #****************************************************************************
  104. # common rules
  105. #****************************************************************************
  106.  
  107. # Rules for compiling source files to object files
  108. %.o : %.cpp
  109. ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
  110.  
  111. %.o : %.c
  112. ${CC} -c ${CFLAGS} ${INCS} $< -o $@
  113.  
  114. clean:
  115. -rm -f core ${OBJS} ${OUTPUT}
  116.  
  117. depend:
  118. makedepend ${INCS} ${SRCS}
  119. # DO NOT DELETE
  120.  
  121. tinyxml.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  122. tinyxml.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  123. tinyxml.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  124. tinyxml.o: /usr/include/bits/sched.h /usr/include/libio.h
  125. tinyxml.o: /usr/include/_G_config.h /usr/include/wchar.h
  126. tinyxml.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  127. tinyxml.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  128. tinyxmlparser.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  129. tinyxmlparser.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  130. tinyxmlparser.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  131. tinyxmlparser.o: /usr/include/bits/sched.h /usr/include/libio.h
  132. tinyxmlparser.o: /usr/include/_G_config.h /usr/include/wchar.h
  133. tinyxmlparser.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  134. tinyxmlparser.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  135. tinyxmlparser.o: /usr/include/ctype.h /usr/include/endian.h
  136. tinyxmlparser.o: /usr/include/bits/endian.h
  137. xmltest.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  138. xmltest.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  139. xmltest.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  140. xmltest.o: /usr/include/bits/sched.h /usr/include/libio.h
  141. xmltest.o: /usr/include/_G_config.h /usr/include/wchar.h
  142. xmltest.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  143. xmltest.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h
  144. tinyxmlerror.o: tinyxml.h /usr/include/stdio.h /usr/include/features.h
  145. tinyxmlerror.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
  146. tinyxmlerror.o: /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h
  147. tinyxmlerror.o: /usr/include/bits/sched.h /usr/include/libio.h
  148. tinyxmlerror.o: /usr/include/_G_config.h /usr/include/wchar.h
  149. tinyxmlerror.o: /usr/include/bits/wchar.h /usr/include/gconv.h
  150. tinyxmlerror.o: /usr/include/bits/stdio_lim.h /usr/include/assert.h