Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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=test_pwd test_pwd_glibc
  20. TARGETS+=test_grp test_grp_glibc
  21. TARGETS+=pwcat pwcat_glibc
  22. TARGETS+=grcat grcat_glibc
  23. TARGETS+=getgroups getgroups_glibc
  24. TARGETS+=test_pwd_diff test_grp_diff pwcat_diff grcat_diff getgroups_diff
  25. all: $(TARGETS)
  26. test_pwd: test_pwd.c Makefile $(TESTDIR)/Rules.mak
  27. -@ echo "-------"
  28. -@ echo " "
  29. -@ echo "Compiling $@ vs uClibc: "
  30. -@ echo " "
  31. $(CC) $(CFLAGS) -c $< -o $@.o
  32. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  33. $(STRIPTOOL) -x -R .note -R .comment $@
  34. ./$@ 2>&1 >test_pwd.out
  35. -@ echo " "
  36. test_pwd_glibc: test_pwd.c Makefile
  37. -@ echo "-------"
  38. -@ echo " "
  39. -@ echo "Compiling $@ vs glibc: "
  40. -@ echo " "
  41. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  42. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  43. $(STRIPTOOL) -x -R .note -R .comment $@
  44. ./$@ 2>&1 >test_pwd_glibc.out
  45. -@ echo " "
  46. test_grp: test_grp.c Makefile $(TESTDIR)/Rules.mak
  47. -@ echo "-------"
  48. -@ echo " "
  49. -@ echo "Compiling $@ vs uClibc: "
  50. -@ echo " "
  51. $(CC) $(CFLAGS) -c $< -o $@.o
  52. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  53. $(STRIPTOOL) -x -R .note -R .comment $@
  54. ./$@ 2>&1 >test_grp.out
  55. -@ echo " "
  56. test_grp_glibc: test_grp.c Makefile
  57. -@ echo "-------"
  58. -@ echo " "
  59. -@ echo "Compiling $@ vs glibc: "
  60. -@ echo " "
  61. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  62. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  63. $(STRIPTOOL) -x -R .note -R .comment $@
  64. ./$@ 2>&1 >test_grp_glibc.out
  65. -@ echo " "
  66. pwcat: pwcat.c Makefile $(TESTDIR)/Rules.mak
  67. -@ echo "-------"
  68. -@ echo " "
  69. -@ echo "Compiling $@ vs uClibc: "
  70. -@ echo " "
  71. $(CC) $(CFLAGS) -c $< -o $@.o
  72. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  73. $(STRIPTOOL) -x -R .note -R .comment $@
  74. ./$@ 2>&1 >pwcat.out
  75. -@ echo " "
  76. pwcat_glibc: pwcat.c Makefile
  77. -@ echo "-------"
  78. -@ echo " "
  79. -@ echo "Compiling $@ vs glibc: "
  80. -@ echo " "
  81. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  82. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  83. $(STRIPTOOL) -x -R .note -R .comment $@
  84. ./$@ 2>&1 >pwcat_glibc.out
  85. -@ echo " "
  86. grcat: grcat.c Makefile $(TESTDIR)/Rules.mak
  87. -@ echo "-------"
  88. -@ echo " "
  89. -@ echo "Compiling $@ vs uClibc: "
  90. -@ echo " "
  91. $(CC) $(CFLAGS) -c $< -o $@.o
  92. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  93. $(STRIPTOOL) -x -R .note -R .comment $@
  94. ./$@ 2>&1 >grcat.out
  95. -@ echo " "
  96. grcat_glibc: grcat.c Makefile
  97. -@ echo "-------"
  98. -@ echo " "
  99. -@ echo "Compiling $@ vs glibc: "
  100. -@ echo " "
  101. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  102. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  103. $(STRIPTOOL) -x -R .note -R .comment $@
  104. ./$@ 2>&1 >grcat_glibc.out
  105. -@ echo " "
  106. getgroups: getgroups.c Makefile $(TESTDIR)/Rules.mak
  107. -@ echo "-------"
  108. -@ echo " "
  109. -@ echo "Compiling $@ vs uClibc: "
  110. -@ echo " "
  111. $(CC) $(CFLAGS) -c $< -o $@.o
  112. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  113. $(STRIPTOOL) -x -R .note -R .comment $@
  114. ./$@ 2>&1 >getgroups.out
  115. -@ echo " "
  116. getgroups_glibc: getgroups.c Makefile
  117. -@ echo "-------"
  118. -@ echo " "
  119. -@ echo "Compiling $@ vs glibc: "
  120. -@ echo " "
  121. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  122. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  123. $(STRIPTOOL) -x -R .note -R .comment $@
  124. ./$@ 2>&1 >getgroups_glibc.out
  125. -@ echo " "
  126. test_pwd_diff: test_pwd_glibc test_pwd
  127. -@ echo "-------"
  128. -@ echo " "
  129. -@ echo "Diffing output: "
  130. -@ echo " "
  131. -diff -u test_pwd_glibc.out test_pwd.out
  132. -@ echo " "
  133. test_grp_diff: test_grp_glibc test_grp
  134. -@ echo "-------"
  135. -@ echo " "
  136. -@ echo "Diffing output: "
  137. -@ echo " "
  138. -diff -u test_grp_glibc.out test_grp.out
  139. -@ echo " "
  140. pwcat_diff: pwcat_glibc pwcat
  141. -@ echo "-------"
  142. -@ echo " "
  143. -@ echo "Diffing output: "
  144. -@ echo " "
  145. -diff -u pwcat_glibc.out pwcat.out
  146. -@ echo " "
  147. grcat_diff: grcat_glibc grcat
  148. -@ echo "-------"
  149. -@ echo " "
  150. -@ echo "Diffing output: "
  151. -@ echo " "
  152. -diff -u grcat_glibc.out grcat.out
  153. -@ echo " "
  154. getgroups_diff: getgroups_glibc getgroups
  155. -@ echo "-------"
  156. -@ echo " "
  157. -@ echo "Diffing output: "
  158. -@ echo " "
  159. -diff -u getgroups_glibc.out getgroups.out
  160. -@ echo " "
  161. clean:
  162. $(RM) *.[oa] *~ core $(TARGETS) *.out