Makefile 4.4 KB

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