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 $(CC)
  15. -@ echo "-------"
  16. -@ echo " "
  17. -@ echo "Compiling vs uClibc: "
  18. -@ echo " "
  19. $(CC) $(CFLAGS) -c $< -o $@.o
  20. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  21. $(STRIPTOOL) -x -R .note -R .comment $@
  22. -$(LDD) $@
  23. ls -l $@
  24. -./$@
  25. -@ echo " "
  26. testmalloc_glibc: testmalloc.c Makefile
  27. -@ echo "-------"
  28. -@ echo " "
  29. -@ echo "Compiling vs GNU libc: "
  30. -@ echo " "
  31. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  32. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  33. $(STRIPTOOL) -x -R .note -R .comment $@
  34. -$(LDD) $@
  35. ls -l $@
  36. -./$@
  37. -@ echo " "
  38. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  39. -@ echo "-------"
  40. -@ echo " "
  41. -@ echo "Compiling vs uClibc: "
  42. -@ echo " "
  43. $(CC) $(CFLAGS) -c $< -o $@.o
  44. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  45. $(STRIPTOOL) -x -R .note -R .comment $@
  46. -$(LDD) $@
  47. ls -l $@
  48. -./$@
  49. -@ echo " "
  50. mallocbug_glibc: mallocbug.c Makefile
  51. -@ echo "-------"
  52. -@ echo " "
  53. -@ echo "Compiling vs GNU libc: "
  54. -@ echo " "
  55. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  56. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  57. $(STRIPTOOL) -x -R .note -R .comment $@
  58. -$(LDD) $@
  59. ls -l $@
  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 $(CC)
  69. -@ echo "-------"
  70. -@ echo " "
  71. -@ echo "Compiling vs uClibc: "
  72. -@ echo " "
  73. $(CC) $(CFLAGS) -c $< -o $@.o
  74. $(CC) $(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. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  86. $(HOST_CC) $(GLIBC_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 $(CC)
  100. -@ echo "-------"
  101. -@ echo " "
  102. -@ echo "Compiling vs uClibc: "
  103. -@ echo " "
  104. $(CC) $(CFLAGS) -c $< -o $@.o
  105. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  106. $(STRIPTOOL) -x -R .note -R .comment $@
  107. -$(LDD) $@
  108. ls -l $@
  109. -./$@ > $@.out
  110. -@ echo " "
  111. qsort_glibc: qsort.c Makefile
  112. -@ echo "-------"
  113. -@ echo " "
  114. -@ echo "Compiling vs GNU libc: "
  115. -@ echo " "
  116. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  117. $(HOST_CC) $(GLIBC_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