Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. all: $(TARGETS)
  7. testmalloc_source:
  8. -@ echo "-------"
  9. -@ echo "testmalloc.c source: "
  10. -@ echo " "
  11. -@ cat testmalloc.c
  12. -@ echo " "
  13. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  14. -@ echo "-------"
  15. -@ echo " "
  16. -@ echo "Compiling vs uClibc: "
  17. -@ echo " "
  18. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  19. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  20. $(STRIPTOOL) -x -R .note -R .comment $@
  21. -ldd $@
  22. ls $(LSFLAGS) $@
  23. -./$@
  24. -@ echo " "
  25. testmalloc_glibc: testmalloc.c Makefile
  26. -@ echo "-------"
  27. -@ echo " "
  28. -@ echo "Compiling vs GNU libc: "
  29. -@ echo " "
  30. $(CC) $(CFLAGS) -c $< -o $@.o
  31. $(CC) $(LDFLAGS) $@.o -o $@
  32. $(STRIPTOOL) -x -R .note -R .comment $@
  33. -ldd $@
  34. ls $(LSFLAGS) $@
  35. -./$@
  36. -@ echo " "
  37. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  38. -@ echo "-------"
  39. -@ echo " "
  40. -@ echo "Compiling vs uC-Libc: "
  41. -@ echo " "
  42. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  43. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  44. $(STRIPTOOL) -x -R .note -R .comment $@
  45. -ldd $@
  46. ls $(LSFLAGS) $@
  47. -./$@
  48. -@ echo " "
  49. mallocbug_glibc: mallocbug.c Makefile
  50. -@ echo "-------"
  51. -@ echo " "
  52. -@ echo "Compiling vs GNU libc: "
  53. -@ echo " "
  54. $(CC) $(CFLAGS) -c $< -o $@.o
  55. $(CC) $(LDFLAGS) $@.o -o $@
  56. $(STRIPTOOL) -x -R .note -R .comment $@
  57. -ldd $@
  58. ls $(LSFLAGS) $@
  59. -./$@
  60. -@ echo " "
  61. teststrtol_source:
  62. -@ echo "-------"
  63. -@ echo "teststrtol.c source: "
  64. -@ echo " "
  65. -@ cat teststrtol.c
  66. -@ echo " "
  67. teststrtol: teststrtol.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  68. -@ echo "-------"
  69. -@ echo " "
  70. -@ echo "Compiling vs uC-Libc: "
  71. -@ echo " "
  72. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  73. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  74. $(STRIPTOOL) -x -R .note -R .comment $@
  75. -ldd $@
  76. ls -sh $@
  77. -./$@ > $@.out
  78. -@ echo " "
  79. teststrtol_glibc: teststrtol.c Makefile
  80. -@ echo "-------"
  81. -@ echo " "
  82. -@ echo "Compiling vs GNU libc: "
  83. -@ echo " "
  84. $(CC) $(CFLAGS) -c $< -o $@.o
  85. $(CC) $(LDFLAGS) $@.o -o $@
  86. $(STRIPTOOL) -x -R .note -R .comment $@
  87. -ldd $@
  88. ls -sh $@
  89. -./$@ > $@.out
  90. -@ echo " "
  91. teststrtol_diff: teststrtol_glibc teststrtol
  92. -@ echo "-------"
  93. -@ echo " "
  94. -@ echo "Diffing output: "
  95. -@ echo " "
  96. -diff -u teststrtol_glibc.out teststrtol.out
  97. -@ echo " "
  98. clean:
  99. rm -f *.[oa] *~ core $(TARGETS) teststrtol_glibc.out teststrtol.out