makefile revision 165743
1112158Sdas# /**************************************************************** 2112158Sdas# Copyright (C) 1998 by Lucent Technologies 3112158Sdas# All Rights Reserved 4112158Sdas# 5112158Sdas# Permission to use, copy, modify, and distribute this software and 6112158Sdas# its documentation for any purpose and without fee is hereby 7112158Sdas# granted, provided that the above copyright notice appear in all 8112158Sdas# copies and that both that the copyright notice and this 9112158Sdas# permission notice and warranty disclaimer appear in supporting 10112158Sdas# documentation, and that the name of Lucent or any of its entities 11112158Sdas# not be used in advertising or publicity pertaining to 12112158Sdas# distribution of the software without specific, written prior 13112158Sdas# permission. 14112158Sdas# 15112158Sdas# LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16112158Sdas# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 17112158Sdas# IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18112158Sdas# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19112158Sdas# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20112158Sdas# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21112158Sdas# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22112158Sdas# THIS SOFTWARE. 23112158Sdas# 24112158Sdas# ****************************************************************/ 25112158Sdas 26112158Sdas.SUFFIXES: .c .o 27112158SdasCC = cc 28112158SdasCFLAGS = -g -DINFNAN_CHECK 29112158Sdas 30112158Sdas.c.o: 31112158Sdas $(CC) -c $(CFLAGS) $*.c 32112158Sdas 33165743Sdasall: arith.h gd_qnan.h gdtoa.a 34112158Sdas 35112158Sdasarith.h: arithchk.c 36112158Sdas $(CC) $(CFLAGS) arithchk.c || $(CC) -DNO_LONG_LONG $(CFLAGS) arithchk.c 37112158Sdas ./a.out >arith.h 38112158Sdas rm -f a.out arithchk.o 39112158Sdas 40165743Sdasgd_qnan.h: arith.h qnan.c 41165743Sdas $(CC) $(CFLAGS) qnan.c 42165743Sdas ./a.out >gd_qnan.h 43165743Sdas rm -f a.out qnan.o 44165743Sdas 45112158Sdasgdtoa.a: dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c g_ffmt.c\ 46112158Sdas g_xLfmt.c g_xfmt.c gdtoa.c gethex.c gmisc.c hd_init.c hexnan.c\ 47112158Sdas misc.c smisc.c strtoIQ.c strtoId.c strtoIdd.c strtoIf.c strtoIg.c\ 48112158Sdas strtoIx.c strtoIxL.c strtod.c strtodI.c strtodg.c strtof.c strtopQ.c\ 49112158Sdas strtopd.c strtopdd.c strtopf.c strtopx.c strtopxL.c strtorQ.c\ 50112158Sdas strtord.c strtordd.c strtorf.c strtorx.c strtorxL.c sum.c ulp.c 51112158Sdas $(CC) -c $(CFLAGS) $? 52112158Sdas x=`echo $? | sed 's/\.c/.o/g'` && ar ruv gdtoa.a $$x && rm $$x 53112158Sdas ranlib gdtoa.a || true 54112158Sdas 55112158Sdas# If your system lacks ranlib, you do not need it. 56112158Sdas 57112158Sdasxs0 = README arithchk.c dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c\ 58112158Sdas g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h gdtoaimp.h gethex.c\ 59165743Sdas gmisc.c hd_init.c hexnan.c makefile misc.c qnan.c smisc.c strtoIQ.c\ 60112158Sdas strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c strtoIxL.c\ 61165743Sdas strtod.c strtodI.c strtodg.c strtodnrp.c strtof.c strtopQ.c strtopd.c\ 62165743Sdas strtopdd.c strtopf.c strtopx.c strtopxL.c strtorQ.c strtord.c strtordd.c\ 63112158Sdas strtorf.c strtorx.c strtorxL.c sum.c ulp.c 64112158Sdas 65112158Sdas# "make xsum.out" to check for transmission errors; source for xsum is 66112158Sdas# netlib's "xsum.c from f2c", e.g., 67112158Sdas# ftp://netlib.bell-labs.com/netlib/f2c/xsum.c.gz 68112158Sdas 69112158Sdasxsum.out: xsum0.out $(xs0) 70112158Sdas xsum $(xs0) >xsum1.out 71112158Sdas cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out 72112158Sdas 73112158Sdasclean: 74165743Sdas rm -f arith.h gd_qnan.h *.[ao] xsum.out xsum1.out 75