# This duplicates more of sw/thirdparty/libtfm/Makefile than I# would like, but it does the job. Prettier makefiles can wait for another day.# vpath %.c ${LIBTFM_SRC}# vpath %.h ${LIBTFM_SRC}BITS:=8192HDR:=${LIBTFM_SRC}/tomsfastmath/src/headers/tfm.h
LIB:=tomsfastmath/libtfm.a
#CFLAGS += -DTFM_X86#CFLAGS += -DTFM_NO_ASMCFLAGS+=-fPIC-Wall-W-Wshadow-I${LIBTFM_SRC}/tomsfastmath/src/headers-g3-DFP_MAX_SIZE="(${BITS}*2+(8*DIGIT_BIT))"TARGETS:=$(notdir${HDR}${LIB})all:${TARGETS}
clean:rm-rf${TARGETS}$(notdir${HDR}.tmp)${LIB}tomsfastmath/src
distclean:cleanrm-fTAGS
$(notdir ${HDR}):${HDR}
echo>$@.tmp'/* Configure size of largest bignum we want to handle -- see notes in tfm.pdf */'echo>>$@.tmp'#define FP_MAX_SIZE (${BITS}*2+(8*DIGIT_BIT))'echo>>$@.tmp''cat>>$@.tmp$^
mv-f$@.tmp$@$(notdir ${LIB}):${LIB}
ln-f$^$@${LIB}:${HDR}
(cd${LIBTFM_SRC}&&findtomsfastmath/src-typed)|xargsmkdir-p
cdtomsfastmath;${MAKE}CFLAGS='${CFLAGS}'