Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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+=teststrtol teststrtol_glibc teststrtol_diff
  21. TARGETS+=qsort qsort_glibc qsort_diff
  22. TARGETS+=teston_exit teston_exit_glibc teston_exit_diff
  23. TARGETS+=testatexit testatexit_glibc testatexit_diff
  24. TARGETS+=ptytest
  25. all: $(TARGETS)
  26. teststrtol_source:
  27. -@ echo "-------"
  28. -@ echo "teststrtol.c source: "
  29. -@ echo " "
  30. -@ cat teststrtol.c
  31. -@ echo " "
  32. teststrtol: teststrtol.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  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. -$(LDD) $@
  41. ls -l $@
  42. -./$@ > $@.out
  43. -@ echo " "
  44. teststrtol_glibc: teststrtol.c Makefile
  45. -@ echo "-------"
  46. -@ echo " "
  47. -@ echo "Compiling vs GNU libc: "
  48. -@ echo " "
  49. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  50. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  51. $(STRIPTOOL) -x -R .note -R .comment $@
  52. -$(LDD) $@
  53. ls -l $@
  54. -./$@ > $@.out
  55. -@ echo " "
  56. teststrtol_diff: teststrtol_glibc teststrtol
  57. -@ echo "-------"
  58. -@ echo " "
  59. -@ echo "Diffing output: "
  60. -@ echo " "
  61. -diff -u teststrtol_glibc.out teststrtol.out
  62. -@ echo " "
  63. qsort: qsort.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  64. -@ echo "-------"
  65. -@ echo " "
  66. -@ echo "Compiling vs uClibc: "
  67. -@ echo " "
  68. $(CC) $(CFLAGS) -c $< -o $@.o
  69. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  70. $(STRIPTOOL) -x -R .note -R .comment $@
  71. -$(LDD) $@
  72. ls -l $@
  73. -./$@ > $@.out
  74. -@ echo " "
  75. qsort_glibc: qsort.c Makefile
  76. -@ echo "-------"
  77. -@ echo " "
  78. -@ echo "Compiling vs GNU libc: "
  79. -@ echo " "
  80. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  81. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  82. $(STRIPTOOL) -x -R .note -R .comment $@
  83. -$(LDD) $@
  84. ls -l $@
  85. -./$@ > $@.out
  86. -@ echo " "
  87. qsort_diff: qsort_glibc qsort
  88. -@ echo "-------"
  89. -@ echo " "
  90. -@ echo "Diffing output: "
  91. -@ echo " "
  92. -diff -u qsort_glibc.out qsort.out
  93. -@ echo " "
  94. teston_exit: teston_exit.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  95. -@ echo "-------"
  96. -@ echo " "
  97. -@ echo "Compiling vs uClibc: "
  98. -@ echo " "
  99. $(CC) $(CFLAGS) -c $< -o $@.o
  100. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  101. $(STRIPTOOL) -x -R .note -R .comment $@
  102. -$(LDD) $@
  103. ls -l $@
  104. -./$@ > $@.out
  105. -@ echo " "
  106. teston_exit_glibc: teston_exit.c Makefile
  107. -@ echo "-------"
  108. -@ echo " "
  109. -@ echo "Compiling vs GNU libc: "
  110. -@ echo " "
  111. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  112. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  113. $(STRIPTOOL) -x -R .note -R .comment $@
  114. -$(LDD) $@
  115. ls -l $@
  116. -./$@ > $@.out
  117. -@ echo " "
  118. teston_exit_diff: teston_exit_glibc teston_exit
  119. -@ echo "-------"
  120. -@ echo " "
  121. -@ echo "Diffing output: "
  122. -@ echo " "
  123. -diff -u teston_exit_glibc.out teston_exit.out
  124. -@ echo " "
  125. testatexit: testatexit.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  126. -@ echo "-------"
  127. -@ echo " "
  128. -@ echo "Compiling vs uClibc: "
  129. -@ echo " "
  130. $(CC) $(CFLAGS) -c $< -o $@.o
  131. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  132. $(STRIPTOOL) -x -R .note -R .comment $@
  133. -$(LDD) $@
  134. ls -l $@
  135. -./$@ > $@.out
  136. -@ echo " "
  137. testatexit_glibc: testatexit.c Makefile
  138. -@ echo "-------"
  139. -@ echo " "
  140. -@ echo "Compiling vs GNU libc: "
  141. -@ echo " "
  142. $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
  143. $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
  144. $(STRIPTOOL) -x -R .note -R .comment $@
  145. -$(LDD) $@
  146. ls -l $@
  147. -./$@ > $@.out
  148. -@ echo " "
  149. testatexit_diff: testatexit_glibc testatexit
  150. -@ echo "-------"
  151. -@ echo " "
  152. -@ echo "Diffing output: "
  153. -@ echo " "
  154. -diff -u testatexit_glibc.out testatexit.out
  155. -@ echo " "
  156. ptytest: ptytest.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
  157. -@ echo "-------"
  158. -@ echo " "
  159. -@ echo "Compiling vs uClibc: "
  160. -@ echo " "
  161. $(CC) $(CFLAGS) -c $< -o $@.o
  162. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  163. $(STRIPTOOL) -x -R .note -R .comment $@
  164. -$(LDD) $@
  165. ls -l $@
  166. -./$@
  167. -@ echo " "
  168. clean:
  169. rm -f *.[oa] *~ core $(TARGETS) *.out