Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. CSRC=acoshl.c asinhl.c asinl.c atanhl.c atanl.c bdtrl.c btdtrl.c cbrtl.c \
  26. chdtrl.c coshl.c ellpel.c ellpkl.c elliel.c ellikl.c ellpjl.c \
  27. exp10l.c exp2l.c expl.c fdtrl.c gammal.c gdtrl.c igamil.c igaml.c \
  28. incbetl.c incbil.c isnanl.c j0l.c j1l.c jnl.c ldrand.c log10l.c log2l.c \
  29. logl.c nbdtrl.c ndtril.c ndtrl.c pdtrl.c powl.c powil.c sinhl.c sinl.c \
  30. sqrtl.c stdtrl.c tanhl.c tanl.c unityl.c ynl.c \
  31. floorl.c polevll.c mtherr.c #cmplxl.c clogl.c
  32. COBJS=$(patsubst %.c,%.o, $(CSRC))
  33. OBJS=$(COBJS)
  34. all: $(OBJS) $(LIBM)
  35. $(LIBM): ar-target
  36. ar-target: $(OBJS)
  37. $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
  38. $(COBJS): %.o : %.c
  39. $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@
  40. $(STRIPTOOL) -x -R .note -R .comment $*.o
  41. $(OBJ): Makefile
  42. clean:
  43. rm -f *.[oa] *~ core
  44. #-----------------------------------------
  45. #all: mtstl lparanoi lcalc fltestl nantst testvect monotl libml.a
  46. mtstl: libml.a mtstl.o $(OBJS)
  47. $(TARGET_CC) $(TARGET_CFLAGS) -o mtstl mtstl.o libml.a $(LIBS)
  48. mtstl.o: mtstl.c
  49. lparanoi: libml.a lparanoi.o setprec.o ieee.o econst.o $(OBJS)
  50. $(TARGET_CC) $(TARGET_CFLAGS) -o lparanoi lparanoi.o setprec.o ieee.o econst.o libml.a $(LIBS)
  51. lparanoi.o: lparanoi.c
  52. $(TARGET_CC) $(TARGET_CFLAGS) -Wno-implicit -c lparanoi.c
  53. econst.o: econst.c ehead.h
  54. lcalc: libml.a lcalc.o ieee.o econst.o $(OBJS)
  55. $(TARGET_CC) $(TARGET_CFLAGS) -o lcalc lcalc.o ieee.o econst.o libml.a $(LIBS)
  56. lcalc.o: lcalc.c lcalc.h ehead.h
  57. ieee.o: ieee.c ehead.h
  58. # Use $(OBJS) in ar command for libml.a if possible; else *.o
  59. libml.a: $(OBJS) mconf.h
  60. ar -rv libml.a $(OBJS)
  61. ranlib libml.a
  62. fltestl: fltestl.c libml.a
  63. $(TARGET_CC) $(TARGET_CFLAGS) -o fltestl fltestl.c libml.a
  64. fltestl.o: fltestl.c
  65. flrtstl: flrtstl.c libml.a
  66. $(TARGET_CC) $(TARGET_CFLAGS) -o flrtstl flrtstl.c libml.a
  67. flrtstl.o: flrtstl.c
  68. nantst: nantst.c libml.a
  69. $(TARGET_CC) $(TARGET_CFLAGS) -o nantst nantst.c libml.a
  70. nantst.o: nantst.c
  71. testvect: testvect.o libml.a
  72. $(TARGET_CC) $(TARGET_CFLAGS) -o testvect testvect.o libml.a
  73. testvect.o: testvect.c
  74. $(TARGET_CC) -g -c -o testvect.o testvect.c
  75. monotl: monotl.o libml.a
  76. $(TARGET_CC) $(TARGET_CFLAGS) -o monotl monotl.o libml.a
  77. monotl.o: monotl.c
  78. $(TARGET_CC) -g -c -o monotl.o monotl.c
  79. # Run test programs
  80. check: mtstl fltestl testvect monotl libml.a
  81. -mtstl
  82. -fltestl
  83. -testvect
  84. -monotl