# Makefile for 128-bit long double precision calculator
# and test program.
# GNU gcc C compiler version 2.5 will do this.
# Get ieee.c, econst.c, ehead.h from netlib/cephes/ieee.shar.Z.
CC= gcc -msoft-quad-float
CFLAGS= -O -Wall
INCS= mconf.h
OBJS= ieee.o econst.o cbrtll.o expll.o logll.o tanhll.o powll.o \
powill.o sqrtll.o sinhll.o asinhll.o coshll.o acoshll.o \
sinll.o tanll.o atanll.o asinll.o atanhll.o log10ll.o exp10ll.o \
log2ll.o exp2ll.o floorll.o polevll.o constll.o mtherr.o

all: lcalc mtstl

lcalc: lcalc.o $(OBJS) $(INCS)
	$(CC) -o lcalc lcalc.o $(OBJS)

mtstl: mtstl.o drand.o $(OBJS) $(INCS)
	$(CC) -o mtstl mtstl.o drand.o $(OBJS)

# for SPARC processor, else use sqrtll.c.
# Use -mhard-quad-float switch with gcc.
#sqrtll.o: sqrtll.spa
#	as -o sqrtll.o sqrtll.spa

# For SPARC using Sun software _Q_ arithmetic library.
# Use -msoft-quad-float switch with gcc 2.6.
sqrtll.o: sqrtll.qll
	as -o sqrtll.o sqrtll.qll

