Makefile 4.7 KB

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