Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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=hello_source hello hello_glibc tiny
  20. all: $(TARGETS)
  21. hello_source:
  22. -@ $(RM) $(TARGETS)
  23. -@ echo "-------"
  24. -@ echo "hello.c source: "
  25. -@ echo " "
  26. -@ cat hello.c
  27. -@ echo " "
  28. hello: hello.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  29. -@ echo "-------"
  30. -@ echo " "
  31. -@ echo "Compiling vs uClibc: "
  32. -@ echo " "
  33. $(CC) $(CFLAGS) -c $< -o $@.o
  34. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  35. $(STRIPTOOL) -x -R .note -R .comment $@
  36. -$(LDD) $@
  37. ls -l $@
  38. -./$@
  39. -@ echo " "
  40. hello_glibc: hello.c Makefile
  41. -@ echo "-------"
  42. -@ echo " "
  43. -@ echo "Compiling vs GNU libc: "
  44. -@ echo " "
  45. $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
  46. $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
  47. $(STRIPTOOL) -x -R .note -R .comment $@
  48. -$(LDD) $@
  49. ls -l $@
  50. -./$@
  51. -@ echo " "
  52. tiny: tiny.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak
  53. -@ echo "-------"
  54. -@ echo " "
  55. -@ echo "Compiling vs uClibc: "
  56. -@ echo " "
  57. $(CC) $(CFLAGS) -c $< -o $@.o
  58. $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
  59. $(STRIPTOOL) -x -R .note -R .comment $@
  60. -$(LDD) $@
  61. ls -l $@
  62. -./$@
  63. -@ echo " "
  64. clean:
  65. $(RM) *.[oa] *~ core $(TARGETS)