Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. all: $(TARGETS)
  24. malloc: malloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  25. -@ echo "-------"
  26. -@ echo " "
  27. -@ echo "Compiling vs uClibc: "
  28. -@ echo " "
  29. $(CC) $(CFLAGS) -c $< -o $@.o
  30. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  31. $(STRIPTOOL) -x -R .note -R .comment $@
  32. -./$@
  33. -@ echo " "
  34. testmalloc_source:
  35. -@ echo "-------"
  36. -@ echo "testmalloc.c source: "
  37. -@ echo " "
  38. -@ cat testmalloc.c
  39. -@ echo " "
  40. testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  41. -@ echo "-------"
  42. -@ echo " "
  43. -@ echo "Compiling vs uClibc: "
  44. -@ echo " "
  45. $(CC) $(CFLAGS) -c $< -o $@.o
  46. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  47. $(STRIPTOOL) -x -R .note -R .comment $@
  48. -$(LDD) $@
  49. ls -l $@
  50. -./$@
  51. -@ echo " "
  52. testmalloc_glibc: testmalloc.c Makefile
  53. -@ echo "-------"
  54. -@ echo " "
  55. -@ echo "Compiling vs GNU libc: "
  56. -@ echo " "
  57. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  58. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  59. $(STRIPTOOL) -x -R .note -R .comment $@
  60. -$(LDD) $@
  61. ls -l $@
  62. -./$@
  63. -@ echo " "
  64. mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  65. -@ echo "-------"
  66. -@ echo " "
  67. -@ echo "Compiling vs uClibc: "
  68. -@ echo " "
  69. $(CC) $(CFLAGS) -c $< -o $@.o
  70. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  71. $(STRIPTOOL) -x -R .note -R .comment $@
  72. -$(LDD) $@
  73. ls -l $@
  74. -./$@
  75. -@ echo " "
  76. mallocbug_glibc: mallocbug.c Makefile
  77. -@ echo "-------"
  78. -@ echo " "
  79. -@ echo "Compiling vs GNU libc: "
  80. -@ echo " "
  81. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  82. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  83. $(STRIPTOOL) -x -R .note -R .comment $@
  84. -$(LDD) $@
  85. ls -l $@
  86. -./$@
  87. -@ echo " "
  88. clean:
  89. rm -f *.[oa] *~ core $(TARGETS)