Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. TARGETS=testmalloc testmalloc_glibc
  4. TARGETS+=mallocbug mallocbug_glibc
  5. TARGETS+=teststrtol teststrtol_glibc teststrtol_diff
  6. TARGETS+=qsort qsort_glibc qsort_diff
  7. all: $(TARGETS)
  8. testmalloc_source:
  9. -@ echo "-------"
  10. -@ echo "testmalloc.c source: "
  11. -@ echo " "
  12. -@ cat testmalloc.c
  13. -@ echo " "
  14. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  15. -@ echo "-------"
  16. -@ echo " "
  17. -@ echo "Compiling vs uClibc: "
  18. -@ echo " "
  19. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  20. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  21. $(STRIPTOOL) -x -R .note -R .comment $@
  22. -ldd $@
  23. ls $(LSFLAGS) $@
  24. -./$@
  25. -@ echo " "
  26. testmalloc_glibc: testmalloc.c Makefile
  27. -@ echo "-------"
  28. -@ echo " "
  29. -@ echo "Compiling vs GNU libc: "
  30. -@ echo " "
  31. $(CC) $(CFLAGS) -c $< -o $@.o
  32. $(CC) $(LDFLAGS) $@.o -o $@
  33. $(STRIPTOOL) -x -R .note -R .comment $@
  34. -ldd $@
  35. ls $(LSFLAGS) $@
  36. -./$@
  37. -@ echo " "
  38. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  39. -@ echo "-------"
  40. -@ echo " "
  41. -@ echo "Compiling vs uC-Libc: "
  42. -@ echo " "
  43. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  44. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  45. $(STRIPTOOL) -x -R .note -R .comment $@
  46. -ldd $@
  47. ls $(LSFLAGS) $@
  48. -./$@
  49. -@ echo " "
  50. mallocbug_glibc: mallocbug.c Makefile
  51. -@ echo "-------"
  52. -@ echo " "
  53. -@ echo "Compiling vs GNU libc: "
  54. -@ echo " "
  55. $(CC) $(CFLAGS) -c $< -o $@.o
  56. $(CC) $(LDFLAGS) $@.o -o $@
  57. $(STRIPTOOL) -x -R .note -R .comment $@
  58. -ldd $@
  59. ls $(LSFLAGS) $@
  60. -./$@
  61. -@ echo " "
  62. teststrtol_source:
  63. -@ echo "-------"
  64. -@ echo "teststrtol.c source: "
  65. -@ echo " "
  66. -@ cat teststrtol.c
  67. -@ echo " "
  68. teststrtol: teststrtol.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  69. -@ echo "-------"
  70. -@ echo " "
  71. -@ echo "Compiling vs uC-Libc: "
  72. -@ echo " "
  73. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  74. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  75. $(STRIPTOOL) -x -R .note -R .comment $@
  76. -ldd $@
  77. ls -sh $@
  78. -./$@ > $@.out
  79. -@ echo " "
  80. teststrtol_glibc: teststrtol.c Makefile
  81. -@ echo "-------"
  82. -@ echo " "
  83. -@ echo "Compiling vs GNU libc: "
  84. -@ echo " "
  85. $(CC) $(CFLAGS) -c $< -o $@.o
  86. $(CC) $(LDFLAGS) $@.o -o $@
  87. $(STRIPTOOL) -x -R .note -R .comment $@
  88. -ldd $@
  89. ls -sh $@
  90. -./$@ > $@.out
  91. -@ echo " "
  92. teststrtol_diff: teststrtol_glibc teststrtol
  93. -@ echo "-------"
  94. -@ echo " "
  95. -@ echo "Diffing output: "
  96. -@ echo " "
  97. -diff -u teststrtol_glibc.out teststrtol.out
  98. -@ echo " "
  99. qsort: qsort.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  100. -@ echo "-------"
  101. -@ echo " "
  102. -@ echo "Compiling vs uClibc: "
  103. -@ echo " "
  104. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  105. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  106. $(STRIPTOOL) -x -R .note -R .comment $@
  107. -ldd $@
  108. ls $(LSFLAGS) $@
  109. -./$@ > $@.out
  110. -@ echo " "
  111. qsort_glibc: qsort.c Makefile
  112. -@ echo "-------"
  113. -@ echo " "
  114. -@ echo "Compiling vs GNU libc: "
  115. -@ echo " "
  116. $(CC) $(CFLAGS) -c $< -o $@.o
  117. $(CC) $(LDFLAGS) $@.o -o $@
  118. $(STRIPTOOL) -x -R .note -R .comment $@
  119. -ldd $@
  120. ls -sh $@
  121. -./$@ > $@.out
  122. -@ echo " "
  123. qsort_diff: qsort_glibc qsort
  124. -@ echo "-------"
  125. -@ echo " "
  126. -@ echo "Diffing output: "
  127. -@ echo " "
  128. -diff -u qsort_glibc.out qsort.out
  129. -@ echo " "
  130. clean:
  131. rm -f *.[oa] *~ core $(TARGETS) teststrtol_glibc.out teststrtol.out