Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Makefile for uClibc's math library
  2. #
  3. # Copyright (C) 2001 by Lineo, inc.
  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. #
  19. # Derived in part from the Linux-8086 C library, the GNU C Library, and several
  20. # other sundry sources. Files within this library are copyright by their
  21. # respective copyright holders.
  22. TOPDIR=../../
  23. include $(TOPDIR)Rules.mak
  24. LIBM=../libm.a
  25. TARGET_CC= $(TOPDIR)/extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
  26. CSRC=acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c \
  27. btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c \
  28. cosh.c dawsn.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c \
  29. exp.c exp10.c exp2.c expn.c fabs.c fac.c fdtr.c \
  30. fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c \
  31. incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c \
  32. log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c \
  33. polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c \
  34. shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c \
  35. tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c \
  36. sqrt.c floor.c setprec.c mtherr.c
  37. COBJS=$(patsubst %.c,%.o, $(CSRC))
  38. OBJS=$(COBJS)
  39. all: $(OBJS) $(LIBM)
  40. $(LIBM): ar-target
  41. ar-target: $(OBJS)
  42. $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
  43. $(COBJS): %.o : %.c
  44. $(TARGET_CC) $(CFLAGS) -c $< -o $@
  45. $(STRIPTOOL) -x -R .note -R .comment $*.o
  46. $(OBJ): Makefile
  47. clean:
  48. rm -f *.[oa] *~ core
  49. #-----------------------------------------
  50. #all: libmd.a mtst dtestvec monot dcalc paranoia
  51. time-it: time-it.o
  52. $(CC) -o time-it time-it.o
  53. time-it.o: time-it.c
  54. $(CC) -O2 -c time-it.c
  55. dcalc: dcalc.o libmd.a
  56. $(CC) -o dcalc dcalc.o libmd.a
  57. mtst: mtst.o libmd.a
  58. $(CC) -v -o mtst mtst.o libmd.a
  59. mtst.o: mtst.c
  60. $(CC) -O2 -Wall -c mtst.c
  61. dtestvec: dtestvec.o libmd.a
  62. $(CC) -o dtestvec dtestvec.o libmd.a
  63. dtestvec.o: dtestvec.c
  64. $(CC) -g -c dtestvec.c
  65. monot: monot.o libmd.a
  66. $(CC) -o monot monot.o libmd.a
  67. monot.o: monot.c
  68. $(CC) -g -c monot.c
  69. paranoia: paranoia.o setprec.o libmd.a
  70. $(CC) -o paranoia paranoia.o setprec.o libmd.a
  71. paranoia.o: paranoia.c
  72. $(CC) $(CFLAGS) -Wno-implicit -c paranoia.c
  73. libmd.a: $(OBJS) $(INCS)
  74. $(AR) rv libmd.a $(OBJS)
  75. #clean:
  76. # rm -f *.o
  77. # rm -f mtst
  78. # rm -f paranoia
  79. # rm -f dcalc
  80. # rm -f dtestvec
  81. # rm -f monot
  82. # rm -f libmd.a
  83. # rm -f time-it
  84. # rm -f dtestvec