Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. TARGETS=string string_glibc
  4. TARGETS+=testcopy testcopy_glibc
  5. TARGETS+=strerror strsignal
  6. all: $(TARGETS)
  7. string: string.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  8. -@ echo "-------"
  9. -@ echo " "
  10. -@ echo "Compiling vs uClibc: "
  11. -@ echo " "
  12. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  13. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  14. $(STRIPTOOL) -x -R .note -R .comment $@
  15. -./$@
  16. -@ echo " "
  17. string_glibc: string.c Makefile
  18. -@ echo "-------"
  19. -@ echo " "
  20. -@ echo "Compiling vs GNU libc: "
  21. -@ echo " "
  22. $(CC) $(CFLAGS) -c $< -o $@.o
  23. $(CC) $(LDFLAGS) $@.o -o $@
  24. $(STRIPTOOL) -x -R .note -R .comment $@
  25. -./$@
  26. -@ echo " "
  27. testcopy: testcopy.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  28. -@ echo "-------"
  29. -@ echo " "
  30. -@ echo "Compiling vs uClibc: "
  31. -@ echo " "
  32. $(TESTCC) $(CFLAGS) -c $< -o $@.o
  33. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  34. $(STRIPTOOL) -x -R .note -R .comment $@
  35. -./$@ > testcopy.out
  36. -@ echo " "
  37. testcopy_glibc: testcopy.c Makefile
  38. -@ echo "-------"
  39. -@ echo " "
  40. -@ echo "Compiling vs GNU libc: "
  41. -@ echo " "
  42. $(CC) $(CFLAGS) -c $< -o $@.o
  43. $(CC) $(LDFLAGS) $@.o -o $@
  44. $(STRIPTOOL) -x -R .note -R .comment $@
  45. -./$@ > testcopy.gnu.out
  46. -@ echo " "
  47. testcopy_diff: testcopy testcopy_glibc
  48. -@ echo "-------"
  49. -@ echo " "
  50. -@ echo "Diffing output: "
  51. -@ echo " "
  52. -diff -u testcopy.gnu.out testcopy.out
  53. -@ echo " "
  54. strerror: ../../string/strerror.c $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  55. -@ echo "-------"
  56. -@ echo " "
  57. -@ echo "Compiling vs uClibc: "
  58. -@ echo " "
  59. $(TESTCC) $(CFLAGS) -DCHECK_BUF -c $< -o $@.o
  60. $(TESTCC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  61. $(STRIPTOOL) -x -R .note -R .comment $@
  62. -./$@
  63. -@ echo " "
  64. strsignal: ../../string/strsignal.c
  65. -@ echo "-------"
  66. -@ echo " "
  67. -@ echo "Compiling vs uClibc: "
  68. -@ echo " "
  69. $(CC) $(CFLAGS) -DCHECK_BUF -c $< -o $@.o
  70. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  71. $(STRIPTOOL) -x -R .note -R .comment $@
  72. -./$@
  73. -@ echo " "
  74. clean:
  75. rm -f *.[oa] *~ core $(TARGETS) testcopy.gnu.out testcopy.out