Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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=malloc
  21. TARGETS+=testmalloc testmalloc_glibc
  22. TARGETS+=mallocbug mallocbug_glibc
  23. TARGETS+=realloc0 realloc0_glibc
  24. all: $(TARGETS)
  25. malloc: malloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  26. -@ echo "-------"
  27. -@ echo " "
  28. -@ echo "Compiling vs uClibc: "
  29. -@ echo " "
  30. $(CC) $(CFLAGS) -c $< -o $@.o
  31. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  32. $(STRIPTOOL) -x -R .note -R .comment $@
  33. -./$@
  34. -@ echo " "
  35. testmalloc_source:
  36. -@ echo "-------"
  37. -@ echo "testmalloc.c source: "
  38. -@ echo " "
  39. -@ cat testmalloc.c
  40. -@ echo " "
  41. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  42. -@ echo "-------"
  43. -@ echo " "
  44. -@ echo "Compiling vs uClibc: "
  45. -@ echo " "
  46. $(CC) $(CFLAGS) -c $< -o $@.o
  47. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  48. $(STRIPTOOL) -x -R .note -R .comment $@
  49. -$(LDD) $@
  50. ls -l $@
  51. -./$@
  52. -@ echo " "
  53. testmalloc_glibc: testmalloc.c Makefile
  54. -@ echo "-------"
  55. -@ echo " "
  56. -@ echo "Compiling vs GNU libc: "
  57. -@ echo " "
  58. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  59. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  60. $(STRIPTOOL) -x -R .note -R .comment $@
  61. -$(LDD) $@
  62. ls -l $@
  63. -./$@
  64. -@ echo " "
  65. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  66. -@ echo "-------"
  67. -@ echo " "
  68. -@ echo "Compiling vs uClibc: "
  69. -@ echo " "
  70. $(CC) $(CFLAGS) -c $< -o $@.o
  71. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  72. $(STRIPTOOL) -x -R .note -R .comment $@
  73. -$(LDD) $@
  74. ls -l $@
  75. -./$@
  76. -@ echo " "
  77. mallocbug_glibc: mallocbug.c Makefile
  78. -@ echo "-------"
  79. -@ echo " "
  80. -@ echo "Compiling vs GNU libc: "
  81. -@ echo " "
  82. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  83. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  84. $(STRIPTOOL) -x -R .note -R .comment $@
  85. -$(LDD) $@
  86. ls -l $@
  87. -./$@
  88. -@ echo " "
  89. realloc0: realloc0.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  90. -@ echo "-------"
  91. -@ echo " "
  92. -@ echo "Compiling vs uClibc: "
  93. -@ echo " "
  94. $(CC) $(CFLAGS) -c $< -o $@.o
  95. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  96. $(STRIPTOOL) -x -R .note -R .comment $@
  97. -$(LDD) $@
  98. ls -l $@
  99. -./$@
  100. -@ echo " "
  101. realloc0_glibc: realloc0.c Makefile
  102. -@ echo "-------"
  103. -@ echo " "
  104. -@ echo "Compiling vs GNU libc: "
  105. -@ echo " "
  106. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  107. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  108. $(STRIPTOOL) -x -R .note -R .comment $@
  109. -$(LDD) $@
  110. ls -l $@
  111. -./$@
  112. -@ echo " "
  113. clean:
  114. rm -f *.[oa] *~ core $(TARGETS)