Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Makefile for uClibc
  2. # Copyright (C) 2001,2002 Erik Andersen <andersen@uclibc.org>
  3. #
  4. # This program is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU Library General Public License as published by the Free
  6. # Software Foundation; either version 2 of the License, or (at your option) any
  7. # later version.
  8. #
  9. # This program is distributed in the hope that it will be useful, but WITHOUT
  10. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  12. # details.
  13. #
  14. # You should have received a copy of the GNU Library General Public License
  15. # along with this program; if not, write to the Free Software Foundation, Inc.,
  16. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. #
  18. # Derived in part from the Linux-8086 C library, the GNU C Library, and several
  19. # other sundry sources. Files within this library are copyright by their
  20. # respective copyright holders.
  21. TOPDIR=../../../
  22. include $(TOPDIR)Rules.mak
  23. ifeq ($(strip $(UCLIBC_HAS_LFS)),y)
  24. CSRC = fstatfs64.c statfs64.c statvfs.c statvfs64.c fstatvfs.c fstatvfs64.c
  25. else
  26. CSRC = statvfs.c fstatvfs.c
  27. endif
  28. COBJS=$(patsubst %.c,%.o, $(CSRC))
  29. OBJS=$(COBJS)
  30. all: $(OBJS) $(LIBC)
  31. $(LIBC): ar-target
  32. ar-target: $(OBJS)
  33. $(AR) $(ARFLAGS) $(LIBC) $(OBJS)
  34. $(COBJS): %.o : %.c
  35. $(CC) $(CFLAGS) -c $< -o $@
  36. $(STRIPTOOL) -x -R .note -R .comment $*.o
  37. clean:
  38. rm -f *.[oa] *~ core