Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. include ../Rules.mak
  19. TARGETS=fork fork_glibc vfork vfork_glibc getcwd getopt getopt_long preadwrite
  20. all: $(TARGETS)
  21. getcwd: getcwd.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  22. -@ echo "-------"
  23. -@ echo " "
  24. -@ echo "Compiling vs uClibc: "
  25. -@ echo " "
  26. $(CC) $(CFLAGS) -c $< -o $@.o
  27. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  28. $(STRIPTOOL) -x -R .note -R .comment $@
  29. ./$@
  30. -@ echo " "
  31. fork: fork.c ../testsuite.h Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  32. -@ echo "-------"
  33. -@ echo " "
  34. -@ echo "Compiling vs uClibc: "
  35. -@ echo " "
  36. $(CC) $(CFLAGS) -c $< -o $@.o
  37. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  38. $(STRIPTOOL) -x -R .note -R .comment $@
  39. ./$@
  40. -@ echo " "
  41. fork_glibc: fork.c ../testsuite.h Makefile
  42. -@ echo "-------"
  43. -@ echo " "
  44. -@ echo "Compiling vs GNU libc: "
  45. -@ echo " "
  46. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  47. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  48. $(STRIPTOOL) -x -R .note -R .comment $@
  49. -./$@
  50. -@ echo " "
  51. vfork: vfork.c ../testsuite.h Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  52. -@ echo "-------"
  53. -@ echo " "
  54. -@ echo "Compiling vs uClibc: "
  55. -@ echo " "
  56. $(CC) $(CFLAGS) -c $< -o $@.o
  57. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  58. $(STRIPTOOL) -x -R .note -R .comment $@
  59. ./$@
  60. -@ echo " "
  61. vfork_glibc: vfork.c ../testsuite.h Makefile
  62. -@ echo "-------"
  63. -@ echo " "
  64. -@ echo "Compiling vs GNU libc: "
  65. -@ echo " "
  66. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  67. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  68. $(STRIPTOOL) -x -R .note -R .comment $@
  69. -./$@
  70. -@ echo " "
  71. getopt: getopt.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  72. $(CC) $(CFLAGS) -c $< -o $@.o
  73. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  74. $(STRIPTOOL) -x -R .note -R .comment $@
  75. ./$@ -abcXXX -9
  76. -@ echo " "
  77. getopt_long: getopt_long.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  78. $(CC) $(CFLAGS) -c $< -o $@.o
  79. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  80. $(STRIPTOOL) -x -R .note -R .comment $@
  81. ./$@ --add XXX --delete YYY --verbose
  82. -@ echo " "
  83. preadwrite: preadwrite.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  84. $(CC) $(CFLAGS) -c $< -o $@.o
  85. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  86. $(STRIPTOOL) -x -R .note -R .comment $@
  87. ./$@
  88. -@ echo " "
  89. clean:
  90. $(RM) *.[oa] *~ core $(TARGETS)