Makefile 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU Library General Public License as published by the Free
  7. # Software Foundation; either version 2 of the License, or (at your option) any
  8. # later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Library General Public License
  16. # along with this program; if not, write to the Free Software Foundation, Inc.,
  17. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. TESTDIR=../
  19. include $(TESTDIR)/Rules.mak
  20. TARGETS=testmalloc testmalloc_glibc
  21. TARGETS+=mallocbug mallocbug_glibc
  22. TARGETS+=teststrtol teststrtol_glibc teststrtol_diff
  23. TARGETS+=qsort qsort_glibc qsort_diff
  24. TARGETS+=teston_exit teston_exit_glibc teston_exit_diff
  25. TARGETS+=testatexit testatexit_glibc testatexit_diff
  26. all: $(TARGETS)
  27. testmalloc_source:
  28. -@ echo "-------"
  29. -@ echo "testmalloc.c source: "
  30. -@ echo " "
  31. -@ cat testmalloc.c
  32. -@ echo " "
  33. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  34. -@ echo "-------"
  35. -@ echo " "
  36. -@ echo "Compiling vs uClibc: "
  37. -@ echo " "
  38. $(CC) $(CFLAGS) -c $< -o $@.o
  39. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  40. $(STRIPTOOL) -x -R .note -R .comment $@
  41. -$(LDD) $@
  42. ls -l $@
  43. -./$@
  44. -@ echo " "
  45. testmalloc_glibc: testmalloc.c Makefile
  46. -@ echo "-------"
  47. -@ echo " "
  48. -@ echo "Compiling vs GNU libc: "
  49. -@ echo " "
  50. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  51. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  52. $(STRIPTOOL) -x -R .note -R .comment $@
  53. -$(LDD) $@
  54. ls -l $@
  55. -./$@
  56. -@ echo " "
  57. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  58. -@ echo "-------"
  59. -@ echo " "
  60. -@ echo "Compiling vs uClibc: "
  61. -@ echo " "
  62. $(CC) $(CFLAGS) -c $< -o $@.o
  63. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  64. $(STRIPTOOL) -x -R .note -R .comment $@
  65. -$(LDD) $@
  66. ls -l $@
  67. -./$@
  68. -@ echo " "
  69. mallocbug_glibc: mallocbug.c Makefile
  70. -@ echo "-------"
  71. -@ echo " "
  72. -@ echo "Compiling vs GNU libc: "
  73. -@ echo " "
  74. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  75. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  76. $(STRIPTOOL) -x -R .note -R .comment $@
  77. -$(LDD) $@
  78. ls -l $@
  79. -./$@
  80. -@ echo " "
  81. teststrtol_source:
  82. -@ echo "-------"
  83. -@ echo "teststrtol.c source: "
  84. -@ echo " "
  85. -@ cat teststrtol.c
  86. -@ echo " "
  87. teststrtol: teststrtol.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  88. -@ echo "-------"
  89. -@ echo " "
  90. -@ echo "Compiling vs uClibc: "
  91. -@ echo " "
  92. $(CC) $(CFLAGS) -c $< -o $@.o
  93. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  94. $(STRIPTOOL) -x -R .note -R .comment $@
  95. -$(LDD) $@
  96. ls -l $@
  97. -./$@ > $@.out
  98. -@ echo " "
  99. teststrtol_glibc: teststrtol.c Makefile
  100. -@ echo "-------"
  101. -@ echo " "
  102. -@ echo "Compiling vs GNU libc: "
  103. -@ echo " "
  104. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  105. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  106. $(STRIPTOOL) -x -R .note -R .comment $@
  107. -$(LDD) $@
  108. ls -l $@
  109. -./$@ > $@.out
  110. -@ echo " "
  111. teststrtol_diff: teststrtol_glibc teststrtol
  112. -@ echo "-------"
  113. -@ echo " "
  114. -@ echo "Diffing output: "
  115. -@ echo " "
  116. -diff -u teststrtol_glibc.out teststrtol.out
  117. -@ echo " "
  118. qsort: qsort.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  119. -@ echo "-------"
  120. -@ echo " "
  121. -@ echo "Compiling vs uClibc: "
  122. -@ echo " "
  123. $(CC) $(CFLAGS) -c $< -o $@.o
  124. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  125. $(STRIPTOOL) -x -R .note -R .comment $@
  126. -$(LDD) $@
  127. ls -l $@
  128. -./$@ > $@.out
  129. -@ echo " "
  130. qsort_glibc: qsort.c Makefile
  131. -@ echo "-------"
  132. -@ echo " "
  133. -@ echo "Compiling vs GNU libc: "
  134. -@ echo " "
  135. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  136. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  137. $(STRIPTOOL) -x -R .note -R .comment $@
  138. -$(LDD) $@
  139. ls -l $@
  140. -./$@ > $@.out
  141. -@ echo " "
  142. qsort_diff: qsort_glibc qsort
  143. -@ echo "-------"
  144. -@ echo " "
  145. -@ echo "Diffing output: "
  146. -@ echo " "
  147. -diff -u qsort_glibc.out qsort.out
  148. -@ echo " "
  149. teston_exit: teston_exit.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  150. -@ echo "-------"
  151. -@ echo " "
  152. -@ echo "Compiling vs uClibc: "
  153. -@ echo " "
  154. $(CC) $(CFLAGS) -c $< -o $@.o
  155. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  156. $(STRIPTOOL) -x -R .note -R .comment $@
  157. -$(LDD) $@
  158. ls -l $@
  159. -./$@ > $@.out
  160. -@ echo " "
  161. teston_exit_glibc: teston_exit.c Makefile
  162. -@ echo "-------"
  163. -@ echo " "
  164. -@ echo "Compiling vs GNU libc: "
  165. -@ echo " "
  166. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  167. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  168. $(STRIPTOOL) -x -R .note -R .comment $@
  169. -$(LDD) $@
  170. ls -l $@
  171. -./$@ > $@.out
  172. -@ echo " "
  173. teston_exit_diff: teston_exit_glibc teston_exit
  174. -@ echo "-------"
  175. -@ echo " "
  176. -@ echo "Diffing output: "
  177. -@ echo " "
  178. -diff -u teston_exit_glibc.out teston_exit.out
  179. -@ echo " "
  180. testatexit: testatexit.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  181. -@ echo "-------"
  182. -@ echo " "
  183. -@ echo "Compiling vs uClibc: "
  184. -@ echo " "
  185. $(CC) $(CFLAGS) -c $< -o $@.o
  186. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  187. $(STRIPTOOL) -x -R .note -R .comment $@
  188. -$(LDD) $@
  189. ls -l $@
  190. -./$@ > $@.out
  191. -@ echo " "
  192. testatexit_glibc: testatexit.c Makefile
  193. -@ echo "-------"
  194. -@ echo " "
  195. -@ echo "Compiling vs GNU libc: "
  196. -@ echo " "
  197. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  198. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  199. $(STRIPTOOL) -x -R .note -R .comment $@
  200. -$(LDD) $@
  201. ls -l $@
  202. -./$@ > $@.out
  203. -@ echo " "
  204. testatexit_diff: testatexit_glibc testatexit
  205. -@ echo "-------"
  206. -@ echo " "
  207. -@ echo "Diffing output: "
  208. -@ echo " "
  209. -diff -u testatexit_glibc.out testatexit.out
  210. -@ echo " "
  211. clean:
  212. rm -f *.[oa] *~ core $(TARGETS) *.out