Makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. all: $(TARGETS)
  25. testmalloc_source:
  26. -@ echo "-------"
  27. -@ echo "testmalloc.c source: "
  28. -@ echo " "
  29. -@ cat testmalloc.c
  30. -@ echo " "
  31. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  32. -@ echo "-------"
  33. -@ echo " "
  34. -@ echo "Compiling vs uClibc: "
  35. -@ echo " "
  36. $(CC) $(CFLAGS) -c $< -o $@.o
  37. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  38. $(STRIPTOOL) -x -R .note -R .comment $@
  39. -$(LDD) $@
  40. ls -l $@
  41. -./$@
  42. -@ echo " "
  43. testmalloc_glibc: testmalloc.c Makefile
  44. -@ echo "-------"
  45. -@ echo " "
  46. -@ echo "Compiling vs GNU libc: "
  47. -@ echo " "
  48. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  49. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  50. $(STRIPTOOL) -x -R .note -R .comment $@
  51. -$(LDD) $@
  52. ls -l $@
  53. -./$@
  54. -@ echo " "
  55. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  56. -@ echo "-------"
  57. -@ echo " "
  58. -@ echo "Compiling vs uClibc: "
  59. -@ echo " "
  60. $(CC) $(CFLAGS) -c $< -o $@.o
  61. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  62. $(STRIPTOOL) -x -R .note -R .comment $@
  63. -$(LDD) $@
  64. ls -l $@
  65. -./$@
  66. -@ echo " "
  67. mallocbug_glibc: mallocbug.c Makefile
  68. -@ echo "-------"
  69. -@ echo " "
  70. -@ echo "Compiling vs GNU libc: "
  71. -@ echo " "
  72. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  73. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  74. $(STRIPTOOL) -x -R .note -R .comment $@
  75. -$(LDD) $@
  76. ls -l $@
  77. -./$@
  78. -@ echo " "
  79. teststrtol_source:
  80. -@ echo "-------"
  81. -@ echo "teststrtol.c source: "
  82. -@ echo " "
  83. -@ cat teststrtol.c
  84. -@ echo " "
  85. teststrtol: teststrtol.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  86. -@ echo "-------"
  87. -@ echo " "
  88. -@ echo "Compiling vs uClibc: "
  89. -@ echo " "
  90. $(CC) $(CFLAGS) -c $< -o $@.o
  91. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  92. $(STRIPTOOL) -x -R .note -R .comment $@
  93. -$(LDD) $@
  94. ls -l $@
  95. -./$@ > $@.out
  96. -@ echo " "
  97. teststrtol_glibc: teststrtol.c Makefile
  98. -@ echo "-------"
  99. -@ echo " "
  100. -@ echo "Compiling vs GNU libc: "
  101. -@ echo " "
  102. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  103. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  104. $(STRIPTOOL) -x -R .note -R .comment $@
  105. -$(LDD) $@
  106. ls -l $@
  107. -./$@ > $@.out
  108. -@ echo " "
  109. teststrtol_diff: teststrtol_glibc teststrtol
  110. -@ echo "-------"
  111. -@ echo " "
  112. -@ echo "Diffing output: "
  113. -@ echo " "
  114. -diff -u teststrtol_glibc.out teststrtol.out
  115. -@ echo " "
  116. qsort: qsort.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  117. -@ echo "-------"
  118. -@ echo " "
  119. -@ echo "Compiling vs uClibc: "
  120. -@ echo " "
  121. $(CC) $(CFLAGS) -c $< -o $@.o
  122. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  123. $(STRIPTOOL) -x -R .note -R .comment $@
  124. -$(LDD) $@
  125. ls -l $@
  126. -./$@ > $@.out
  127. -@ echo " "
  128. qsort_glibc: qsort.c Makefile
  129. -@ echo "-------"
  130. -@ echo " "
  131. -@ echo "Compiling vs GNU libc: "
  132. -@ echo " "
  133. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  134. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  135. $(STRIPTOOL) -x -R .note -R .comment $@
  136. -$(LDD) $@
  137. ls -l $@
  138. -./$@ > $@.out
  139. -@ echo " "
  140. qsort_diff: qsort_glibc qsort
  141. -@ echo "-------"
  142. -@ echo " "
  143. -@ echo "Diffing output: "
  144. -@ echo " "
  145. -diff -u qsort_glibc.out qsort.out
  146. -@ echo " "
  147. clean:
  148. rm -f *.[oa] *~ core $(TARGETS) teststrtol_glibc.out teststrtol.out