Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2003 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. # Pull in the user's uClibc configuration, but do not
  19. # pull in Rules.mak.....
  20. TOPDIR=../
  21. include $(TOPDIR)Rules.mak
  22. TARGETS = ldd ldconfig readelf
  23. XXFLAGS=
  24. ifeq ($(strip $(LDSO_LDD_SUPPORT)),y)
  25. XXFLAGS= -D__LDSO_LDD_SUPPORT
  26. else
  27. XXFLAGS=
  28. endif
  29. ifeq ($(strip $(HAVE_SHARED)),y)
  30. all: $(TARGETS)
  31. else
  32. all:
  33. endif
  34. headers:
  35. $(LN) -fs $(TOPDIR)include/elf.h
  36. readelf: readelf.c
  37. $(CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT)
  38. $(STRIPTOOL) -x -R .note -R .comment $@
  39. ldconfig: ldconfig.c readsoname.c
  40. $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \
  41. -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
  42. -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
  43. $^ -o $@ $(LDADD_LIBFLOAT)
  44. $(STRIPTOOL) -x -R .note -R .comment $@
  45. ldd: ldd.c
  46. $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \
  47. -DUCLIBC_RUNTIME_PREFIX=$(R_PREFIX) \
  48. -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
  49. $^ -o $@ $(LDADD_LIBFLOAT)
  50. $(STRIPTOOL) -x -R .note -R .comment $@
  51. clean:
  52. $(RM) $(TARGETS) *.o *~ core *.target elf.h
  53. readelf.c readsoname.c ldconfig.c ldd.c: headers
  54. install: all
  55. ifeq ($(strip $(HAVE_SHARED)),y)
  56. $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)sbin
  57. $(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)usr/bin
  58. $(INSTALL) -m 755 ldd $(PREFIX)$(RUNTIME_PREFIX)usr/bin/ldd
  59. $(INSTALL) -m 755 ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig;
  60. # For now, don't bother with readelf since surely the host
  61. # system has binutils, or we couldn't have gotten this far...
  62. #$(INSTALL) -m 755 readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf
  63. endif