Home | History | Annotate | Line # | Download | only in gdtoa
makefile revision 1.1.1.2
      1      1.1    kleink # /****************************************************************
      2      1.1    kleink # Copyright (C) 1998 by Lucent Technologies
      3      1.1    kleink # All Rights Reserved
      4      1.1    kleink #
      5      1.1    kleink # Permission to use, copy, modify, and distribute this software and
      6      1.1    kleink # its documentation for any purpose and without fee is hereby
      7      1.1    kleink # granted, provided that the above copyright notice appear in all
      8      1.1    kleink # copies and that both that the copyright notice and this
      9      1.1    kleink # permission notice and warranty disclaimer appear in supporting
     10      1.1    kleink # documentation, and that the name of Lucent or any of its entities
     11      1.1    kleink # not be used in advertising or publicity pertaining to
     12      1.1    kleink # distribution of the software without specific, written prior
     13      1.1    kleink # permission.
     14      1.1    kleink #
     15      1.1    kleink # LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
     16      1.1    kleink # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
     17      1.1    kleink # IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
     18      1.1    kleink # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     19      1.1    kleink # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
     20      1.1    kleink # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     21      1.1    kleink # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
     22      1.1    kleink # THIS SOFTWARE.
     23      1.1    kleink #
     24      1.1    kleink # ****************************************************************/
     25      1.1    kleink 
     26      1.1    kleink .SUFFIXES: .c .o
     27      1.1    kleink CC = cc
     28  1.1.1.2  christos CFLAGS = -g
     29      1.1    kleink 
     30      1.1    kleink .c.o:
     31      1.1    kleink 	$(CC) -c $(CFLAGS) $*.c
     32      1.1    kleink 
     33  1.1.1.2  christos # invoke "make Printf" to add printf.o to gdtoa.a (if desired)
     34  1.1.1.2  christos 
     35      1.1    kleink all: arith.h gd_qnan.h gdtoa.a
     36      1.1    kleink 
     37      1.1    kleink arith.h: arithchk.c
     38      1.1    kleink 	$(CC) $(CFLAGS) arithchk.c || $(CC) -DNO_LONG_LONG $(CFLAGS) arithchk.c
     39      1.1    kleink 	./a.out >arith.h
     40      1.1    kleink 	rm -f a.out arithchk.o
     41      1.1    kleink 
     42      1.1    kleink gd_qnan.h: arith.h qnan.c
     43      1.1    kleink 	$(CC) $(CFLAGS) qnan.c
     44      1.1    kleink 	./a.out >gd_qnan.h
     45      1.1    kleink 	rm -f a.out qnan.o
     46      1.1    kleink 
     47  1.1.1.2  christos gdtoa.a:  dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c\
     48  1.1.1.2  christos 	 g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gethex.c gmisc.c hd_init.c\
     49  1.1.1.2  christos 	 hexnan.c misc.c smisc.c strtoIQ.c strtoId.c strtoIdd.c\
     50  1.1.1.2  christos 	 strtoIf.c strtoIg.c strtoIx.c strtoIxL.c strtod.c strtodI.c\
     51  1.1.1.2  christos 	 strtodg.c strtof.c strtopQ.c strtopd.c strtopdd.c strtopf.c\
     52  1.1.1.2  christos 	 strtopx.c strtopxL.c strtorQ.c strtord.c strtordd.c strtorf.c\
     53  1.1.1.2  christos 	 strtorx.c strtorxL.c sum.c ulp.c
     54      1.1    kleink 	$(CC) -c $(CFLAGS) $?
     55      1.1    kleink 	x=`echo $? | sed 's/\.c/.o/g'` && ar ruv gdtoa.a $$x && rm $$x
     56      1.1    kleink 	ranlib gdtoa.a || true
     57      1.1    kleink 
     58  1.1.1.2  christos Printf: all printf.c
     59  1.1.1.2  christos 	$(CC) -c $(CFLAGS) printf.c
     60  1.1.1.2  christos 	ar ruv gdtoa.a printf.o
     61  1.1.1.2  christos 	rm printf.o
     62  1.1.1.2  christos 	touch Printf
     63  1.1.1.2  christos 
     64      1.1    kleink # If your system lacks ranlib, you do not need it.
     65      1.1    kleink 
     66  1.1.1.2  christos xs0 = README arithchk.c dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c\
     67  1.1.1.2  christos 	 g_dfmt.c g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h\
     68  1.1.1.2  christos 	 gdtoa_fltrnds.h gdtoaimp.h gethex.c gmisc.c hd_init.c hexnan.c\
     69  1.1.1.2  christos 	 makefile misc.c printf.c printf.c0 qnan.c smisc.c stdio1.h\
     70  1.1.1.2  christos 	 strtoIQ.c strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c\
     71  1.1.1.2  christos 	 strtoIxL.c strtod.c strtodI.c strtodg.c strtodnrp.c strtof.c\
     72  1.1.1.2  christos 	 strtopQ.c strtopd.c strtopdd.c strtopf.c strtopx.c strtopxL.c\
     73  1.1.1.2  christos 	 strtorQ.c strtord.c strtordd.c strtorf.c strtorx.c strtorxL.c\
     74  1.1.1.2  christos 	 sum.c ulp.c
     75      1.1    kleink 
     76  1.1.1.2  christos # "make -r xsum.out" to check for transmission errors; source for xsum is
     77      1.1    kleink # netlib's "xsum.c from f2c", e.g.,
     78      1.1    kleink # ftp://netlib.bell-labs.com/netlib/f2c/xsum.c.gz
     79      1.1    kleink 
     80      1.1    kleink xsum.out: xsum0.out $(xs0)
     81      1.1    kleink 	xsum $(xs0) >xsum1.out
     82      1.1    kleink 	cmp xsum0.out xsum1.out && mv xsum1.out xsum.out || diff xsum[01].out
     83      1.1    kleink 
     84      1.1    kleink clean:
     85  1.1.1.2  christos 	rm -f arith.h gd_qnan.h *.[ao] Printf xsum.out xsum1.out
     86