# Makefile for building imath library and test program
# imath is available at https://github.com/creachadair/imath
# The code here is from https://github.com/creachadair/imath/archive/v1.35.tar.gz

CC= gcc -std=c99
CFLAGS= -pedantic -Wall -Wextra -Wno-unused-parameter $(PIC)
MYCFLAGS= $(CFLAGS) -O3 -funroll-loops -finline-functions #-DNDEBUG
L= imath.o
T= pi

all:	$L

imath.o: imath.c imath.h
	$(CC) $(MYCFLAGS) -c imath.c

test:	$T
	./$T 1598

$T:	$T.c $L
	$(CC) $(CFLAGS) -o $T $T.c $L

clean:
	-rm -f *.o *.a $T
