Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. CFLAGS64=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  20. TARGETS=sem fdopen dirent_diff dirent64_diff #outb
  21. all: $(TARGETS)
  22. outb: outb.c ../testsuite.h Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  23. -@ echo "-------"
  24. -@ echo " "
  25. -@ echo "Compiling vs uClibc: "
  26. -@ echo " "
  27. $(CC) $(CFLAGS) -c $< -o $@.o
  28. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  29. $(STRIPTOOL) -x -R .note -R .comment $@
  30. ./$@
  31. -@ echo " "
  32. sem: sem.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  33. -@ echo "-------"
  34. -@ echo " "
  35. -@ echo "Compiling vs uClibc: "
  36. -@ echo " "
  37. $(CC) $(CFLAGS) -c $< -o $@.o
  38. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  39. $(STRIPTOOL) -x -R .note -R .comment $@
  40. -./$@
  41. -@ echo " "
  42. fdopen: fdopen.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  43. -@ echo "-------"
  44. -@ echo " "
  45. -@ echo "Compiling vs uClibc: "
  46. -@ echo " "
  47. $(CC) $(CFLAGS) -c $< -o $@.o
  48. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  49. $(STRIPTOOL) -x -R .note -R .comment $@
  50. -./$@
  51. -@ echo " "
  52. dirent_source:
  53. -@ $(RM) $(TARGETS)
  54. -@ echo "-------"
  55. -@ echo "dirent.c source: "
  56. -@ echo " "
  57. -@ cat dirent.c
  58. -@ echo " "
  59. dirent: dirent.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  60. -@ echo "-------"
  61. -@ echo " "
  62. -@ echo "Compiling vs uClibc: "
  63. -@ echo " "
  64. $(CC) $(CFLAGS) -c $< -o $@.o
  65. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  66. $(STRIPTOOL) -x -R .note -R .comment $@
  67. -./$@ dirent.c > $@.out
  68. -@ echo " "
  69. dirent_glibc: dirent.c Makefile
  70. -@ echo "-------"
  71. -@ echo " "
  72. -@ echo "Compiling vs GNU libc: "
  73. -@ echo " "
  74. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  75. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  76. $(STRIPTOOL) -x -R .note -R .comment $@
  77. -./$@ dirent.c > $@.out
  78. -@ echo " "
  79. dirent_diff: dirent dirent_glibc
  80. -@ echo "-------"
  81. -@ echo " "
  82. -@ echo "Diffing dirent output: "
  83. -@ echo " "
  84. -diff -u dirent_glibc.out dirent.out
  85. -@ echo " "
  86. dirent64: dirent.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  87. -@ echo "-------"
  88. -@ echo " "
  89. -@ echo "Compiling vs uClibc: "
  90. -@ echo " "
  91. $(CC) $(CFLAGS) $(CFLAGS64) -c $< -o $@.o
  92. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  93. $(STRIPTOOL) -x -R .note -R .comment $@
  94. -./$@ dirent.c > $@.out
  95. -@ echo " "
  96. dirent64_glibc: dirent.c Makefile
  97. -@ echo "-------"
  98. -@ echo " "
  99. -@ echo "Compiling vs GNU libc: "
  100. -@ echo " "
  101. $(HOSTCC) $(GLIBC_CFLAGS) $(CFLAGS64) -c $< -o $@.o
  102. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  103. $(STRIPTOOL) -x -R .note -R .comment $@
  104. -./$@ dirent.c > $@.out
  105. -@ echo " "
  106. dirent64_diff: dirent64 dirent64_glibc
  107. -@ echo "-------"
  108. -@ echo " "
  109. -@ echo "Diffing dirent64 output: "
  110. -@ echo " "
  111. -diff -u dirent64_glibc.out dirent64.out
  112. -@ echo " "
  113. clean:
  114. $(RM) *.[oa] *~ core dirent dirent_glibc dirent_glibc.out dirent.out \
  115. dirent64 dirent64_glibc dirent64_glibc.out dirent64.out \
  116. outb sem fdopen