Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. TESTDIR=../
  2. include $(TESTDIR)/Rules.mak
  3. LDFLAGS +=
  4. #EXTRA_LIBS += -lc -lgcc -lpthread
  5. EXTRA_LIBS += -lpthread
  6. TARGETS=ex1 ex2 ex3 ex4 ex5 ex6 ex7
  7. all: $(TARGETS)
  8. ex1: ex1.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  9. -@ echo "-------"
  10. -@ echo " "
  11. -@ echo "Compiling vs uClibc: "
  12. -@ echo " "
  13. $(CC) $(CFLAGS) -c $< -o $@.o
  14. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  15. $(STRIPTOOL) -x -R .note -R .comment $@
  16. -./$@
  17. -@ echo " "
  18. ex2: ex2.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  19. -@ echo "-------"
  20. -@ echo " "
  21. -@ echo "Compiling vs uClibc: "
  22. -@ echo " "
  23. $(CC) $(CFLAGS) -c $< -o $@.o
  24. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  25. $(STRIPTOOL) -x -R .note -R .comment $@
  26. -./$@
  27. -@ echo " "
  28. ex3: ex3.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  29. -@ echo "-------"
  30. -@ echo " "
  31. -@ echo "Compiling vs uClibc: "
  32. -@ echo " "
  33. $(CC) $(CFLAGS) -c $< -o $@.o
  34. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  35. $(STRIPTOOL) -x -R .note -R .comment $@
  36. -./$@
  37. -@ echo " "
  38. ex4: ex4.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  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. -./$@
  47. -@ echo " "
  48. ex5: ex5.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  49. -@ echo "-------"
  50. -@ echo " "
  51. -@ echo "Compiling vs uClibc: "
  52. -@ echo " "
  53. $(CC) $(CFLAGS) -c $< -o $@.o
  54. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  55. $(STRIPTOOL) -x -R .note -R .comment $@
  56. -./$@
  57. -@ echo " "
  58. ex6: ex6.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  59. -@ echo "-------"
  60. -@ echo " "
  61. -@ echo "Compiling vs uClibc: "
  62. -@ echo " "
  63. $(CC) $(CFLAGS) -c $< -o $@.o
  64. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  65. $(STRIPTOOL) -x -R .note -R .comment $@
  66. -./$@
  67. -@ echo " "
  68. ex7: ex7.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
  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. -./$@
  77. -@ echo " "
  78. clean:
  79. rm -f *.[oa] *~ core $(TARGETS)