mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Include AMOS in OpenLibm.
This commit is contained in:
parent
820c38cbd2
commit
e8bf368573
4 changed files with 46 additions and 25 deletions
20
LICENSE.md
20
LICENSE.md
|
@ -23,7 +23,7 @@ OpenLIBM is licensed under the MIT LICENSE.
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
## Derived from FREEBSD MSUN
|
## FREEBSD MSUN
|
||||||
|
|
||||||
Copyright 1992-2011 The FreeBSD Project. All rights reserved.
|
Copyright 1992-2011 The FreeBSD Project. All rights reserved.
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ OpenLIBM is licensed under the MIT LICENSE.
|
||||||
official policies, either expressed or implied, of the FreeBSD
|
official policies, either expressed or implied, of the FreeBSD
|
||||||
Project.
|
Project.
|
||||||
|
|
||||||
## Derived from FDLIBM
|
## FDLIBM
|
||||||
|
|
||||||
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||||
|
|
||||||
|
@ -62,3 +62,19 @@ OpenLIBM is licensed under the MIT LICENSE.
|
||||||
Permission to use, copy, modify, and distribute this
|
Permission to use, copy, modify, and distribute this
|
||||||
software is freely granted, provided that this notice
|
software is freely granted, provided that this notice
|
||||||
is preserved.
|
is preserved.
|
||||||
|
|
||||||
|
## AMOS
|
||||||
|
|
||||||
|
The AMOS library is part of SLATEC and covered by the same license. The following
|
||||||
|
is reproduced from Section 4 of the SLATEC guide (http://www.netlib.org/slatec/guide).
|
||||||
|
|
||||||
|
The Library is in the public domain and distributed by the Energy Science
|
||||||
|
and Technology Software Center.
|
||||||
|
|
||||||
|
Energy Science and Technology Software Center
|
||||||
|
P.O. Box 1020
|
||||||
|
Oak Ridge, TN 37831
|
||||||
|
|
||||||
|
Telephone 615-576-2606
|
||||||
|
E-mail estsc%a1.adonis.mrouter@zeus.osti.gov
|
||||||
|
|
||||||
|
|
29
Make.inc
29
Make.inc
|
@ -1,6 +1,11 @@
|
||||||
|
# -*- mode: makefile-gmake -*-
|
||||||
|
|
||||||
OS = $(shell uname)
|
OS = $(shell uname)
|
||||||
ARCH = $(shell uname -m)
|
ARCH = $(shell uname -m)
|
||||||
|
|
||||||
|
FC = gfortran
|
||||||
|
FFLAGS = -O3
|
||||||
|
|
||||||
USEGCC = 1
|
USEGCC = 1
|
||||||
USECLANG = 0
|
USECLANG = 0
|
||||||
|
|
||||||
|
@ -18,10 +23,13 @@ endif
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
%.c.o: %.c
|
%.c.o: %.c
|
||||||
$(QUIET_CC)$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
%.f.o: %.f
|
||||||
|
$(FC) $(FFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.S.o: %.S
|
%.S.o: %.S
|
||||||
$(QUIET_ASM)$(CC) $(filter -f% -m% -B% -I% -D%,$(CFLAGS)) -c $< -o $@
|
$(CC) $(filter -f% -m% -B% -I% -D%,$(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr *.o *.c.o *.S.o *~ test-double test-float test-double-system test-float-system *.dSYM
|
rm -fr *.o *.c.o *.S.o *~ test-double test-float test-double-system test-float-system *.dSYM
|
||||||
|
@ -42,36 +50,27 @@ endif
|
||||||
ifeq ($(OS), MINGW32_NT-6.1)
|
ifeq ($(OS), MINGW32_NT-6.1)
|
||||||
OS=WINNT
|
OS=WINNT
|
||||||
CFLAGS+=-nodefaultlibs
|
CFLAGS+=-nodefaultlibs
|
||||||
|
FFLAGS+=-nodefaultlibs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Linux)
|
ifeq ($(OS), Linux)
|
||||||
SHLIB_EXT = so
|
SHLIB_EXT = so
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
FFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), FreeBSD)
|
ifeq ($(OS), FreeBSD)
|
||||||
SHLIB_EXT = so
|
SHLIB_EXT = so
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
FFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Darwin)
|
ifeq ($(OS), Darwin)
|
||||||
SHLIB_EXT = dylib
|
SHLIB_EXT = dylib
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
FFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), WINNT)
|
ifeq ($(OS), WINNT)
|
||||||
SHLIB_EXT = dll
|
SHLIB_EXT = dll
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Colors for make
|
|
||||||
|
|
||||||
CCCOLOR="\033[34m"
|
|
||||||
LINKCOLOR="\033[34;1m"
|
|
||||||
SRCCOLOR="\033[33m"
|
|
||||||
BINCOLOR="\033[37;1m"
|
|
||||||
MAKECOLOR="\033[32;1m"
|
|
||||||
ENDCOLOR="\033[0m"
|
|
||||||
|
|
||||||
QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR);
|
|
||||||
QUIET_ASM = @printf ' %b %b\n' $(CCCOLOR)ASM$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR);
|
|
||||||
QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR);
|
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -1,7 +1,7 @@
|
||||||
OPENLIBM_HOME=$(abspath .)
|
OPENLIBM_HOME=$(abspath .)
|
||||||
include ./Make.inc
|
include ./Make.inc
|
||||||
|
|
||||||
SUBDIRS = src ld80 $(ARCH) bsdsrc
|
SUBDIRS = src ld80 $(ARCH) bsdsrc amos
|
||||||
|
|
||||||
define INC_template
|
define INC_template
|
||||||
TEST=test
|
TEST=test
|
||||||
|
@ -17,15 +17,16 @@ $(foreach dir,$(SUBDIRS),$(eval $(call INC_template,$(dir))))
|
||||||
DUPLICATE_NAMES = $(filter $(patsubst %.S,%,$($(ARCH)_SRCS)),$(patsubst %.c,%,$(src_SRCS)))
|
DUPLICATE_NAMES = $(filter $(patsubst %.S,%,$($(ARCH)_SRCS)),$(patsubst %.c,%,$(src_SRCS)))
|
||||||
DUPLICATE_SRCS = $(addsuffix .c,$(DUPLICATE_NAMES))
|
DUPLICATE_SRCS = $(addsuffix .c,$(DUPLICATE_NAMES))
|
||||||
|
|
||||||
OBJS = $(patsubst %.S,%.S.o,\
|
OBJS = $(patsubst %.f,%.f.o,\
|
||||||
$(patsubst %.c,%.c.o,$(filter-out $(addprefix src/,$(DUPLICATE_SRCS)),$(SRCS))))
|
$(patsubst %.S,%.S.o,\
|
||||||
|
$(patsubst %.c,%.c.o,$(filter-out $(addprefix src/,$(DUPLICATE_SRCS)),$(SRCS)))))
|
||||||
|
|
||||||
all: libopenlibm.a libopenlibm.$(SHLIB_EXT)
|
all: libopenlibm.a libopenlibm.$(SHLIB_EXT)
|
||||||
$(MAKE) -C test
|
$(MAKE) -C test
|
||||||
libopenlibm.a: $(OBJS)
|
libopenlibm.a: $(OBJS)
|
||||||
$(QUIET_LINK)ar -rcs libopenlibm.a $(OBJS)
|
ar -rcs libopenlibm.a $(OBJS)
|
||||||
libopenlibm.$(SHLIB_EXT): $(OBJS)
|
libopenlibm.$(SHLIB_EXT): $(OBJS)
|
||||||
$(QUIET_LINK)$(CC) -shared $(OBJS) -o libopenlibm.$(SHLIB_EXT)
|
$(FC) -shared $(OBJS) -o libopenlibm.$(SHLIB_EXT)
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
||||||
|
|
11
README.md
11
README.md
|
@ -1,10 +1,15 @@
|
||||||
## OpenLIBM v0.2
|
## OpenLibm
|
||||||
|
|
||||||
OpenLIBM is an effort to have a high quality standalone LIBM
|
OpenLibm is an effort to have a high quality standalone LIBM
|
||||||
library. It is meant to be used standalone in applications and
|
library. It is meant to be used standalone in applications and
|
||||||
programming language implementations.
|
programming language implementations.
|
||||||
|
|
||||||
OpenLIBM builds on Linux, Mac OS X, and Windows, and with little effort,
|
OpenLibm also includes the AMOS library from Netlib, which is
|
||||||
|
a portable package for Bessel Functions of a Complex Argument
|
||||||
|
and Nonnegative Order. AMOS contains subroutines for computing Bessel
|
||||||
|
functions and Airy functions.
|
||||||
|
|
||||||
|
OpenLibm builds on Linux, Mac OS X, and Windows, and with little effort,
|
||||||
should build on FreeBSD as well. It builds with both, GCC and clang.
|
should build on FreeBSD as well. It builds with both, GCC and clang.
|
||||||
|
|
||||||
The OpenLIBM code derives from the FreeBSD msun implementation, which
|
The OpenLIBM code derives from the FreeBSD msun implementation, which
|
||||||
|
|
Loading…
Reference in a new issue