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