Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Makefile for uClibc's math library
  2. # Copyright (C) 2001 by Lineo, inc.
  3. #
  4. # This math library is derived primarily from the Cephes Math Library,
  5. # copyright by Stephen L. Moshier <moshier@world.std.com>
  6. #
  7. # This program is free software; you can redistribute it and/or modify it under
  8. # the terms of the GNU Library General Public License as published by the Free
  9. # Software Foundation; either version 2 of the License, or (at your option) any
  10. # later version.
  11. #
  12. # This program is distributed in the hope that it will be useful, but WITHOUT
  13. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  14. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  15. # details.
  16. #
  17. # You should have received a copy of the GNU Library General Public License
  18. # along with this program; if not, write to the Free Software Foundation, Inc.,
  19. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. #
  21. TOPDIR=../../
  22. include $(TOPDIR)Rules.mak
  23. LIBM=../libm.a
  24. TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
  25. TARGET_CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
  26. ifeq ($(strip $(DO_C99_MATH)),true)
  27. CSRC = s_ceil.c s_floor.c s_ldexp.c s_frexp.c s_logb.c s_modf.c w_scalb.c s_copysign.c s_rint.c
  28. else
  29. CSRC =
  30. endif
  31. COBJS=$(patsubst %.c,%.o, $(CSRC))
  32. OBJS=$(COBJS)
  33. ifneq ($(strip $(HAS_FLOATING_POINT)),true)
  34. all: clean
  35. else
  36. all: $(OBJS) $(LIBM)
  37. endif
  38. $(LIBM): ar-target
  39. ar-target: $(OBJS)
  40. $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
  41. $(COBJS): %.o : %.c
  42. $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@
  43. $(STRIPTOOL) -x -R .note -R .comment $*.o
  44. $(OBJ): Makefile
  45. tags:
  46. ctags -R
  47. clean:
  48. rm -f *.[oa] *~ core