ulps: Fix long lines
[mathlib.git] / etc / Makefile
1 PROGS=proffenv profmath realgen testrand testrand2
2 ALL: $(PROGS)
3
4 # -Wstrict-prototypes
5 CC99=gcc -std=c99
6 CCFLAGS=-Wall -W -Wformat-nonliteral -Wcast-align -Wpointer-arith               \
7         -Wbad-function-cast -Wmissing-prototypes                                \
8         -Wmissing-declarations -Winline -Wundef -Wnested-externs -Wcast-qual    \
9         -Wshadow -Wwrite-strings -Wno-unused-parameter                          \
10         -Wswitch -Wbad-function-cast -g
11 INCLUDE=-I../include -I../ulps -I/usr/include/gmp -I/usr/include/mpfr           \
12         -I/usr/opt/include -I/usr/local/include
13 LIB=-lm -lmpfr -lmpc -L/usr/opt/lib -L/usr/local/lib -R/usr/opt/lib
14
15 proffenv: proffenv.c
16         $(CC99) $(CCFLAGS) $(INCLUDE) proffenv.c -o proffenv $(LIB)
17
18 profmath: profmath.c ../ulps/basic-complex.c ../ulps/gen.c ../subr_random.c
19         $(CC99) $(CCFLAGS) $(INCLUDE)                           \
20                 profmath.c ../ulps/basic-complex.c ../ulps/gen.c ../subr_random.c       \
21         -o profmath $(LIB)
22
23 realgen: realgen.c ../ulps/basic-complex.c ../ulps/gen.c ../subr_random.c
24         @test -f ../ulps/config.h \
25         || (echo "You should first run autoreconf && ./configure in ../ulps" \
26         && exit 1)
27         $(CC99) $(CCFLAGS) $(INCLUDE)                           \
28                 realgen.c ../ulps/basic-complex.c ../ulps/gen.c \
29                 ../subr_random.c                                \
30         -o realgen                                              \
31         $(LIB)
32
33 testrand: testrand.c ../subr_random.c
34         $(CC99) $(CCFLAGS) $(INCLUDE)                           \
35                 testrand.c ../subr_random.c                     \
36         -o testrand -lm
37
38 testrand2: testrand2.c ../subr_random.c
39         $(CC99) $(CCFLAGS) $(INCLUDE)                           \
40                 testrand2.c ../subr_random.c                    \
41         -o testrand2 -lm
42
43 gen-csv: profmath
44
45 gen-graphs: gen-csv
46         @type gnuplot > /dev/null || \
47         (echo "Sorry, you need to have gnuplot installed" && exit 111)
48         @echo "*** Generating .csv data files ***"
49         @./profmath
50         @echo "*** Generating .png plot graphs ***"
51         @mkdir -p graphs
52         @rm -f graphs/*
53         @./csv2plot.sh graphs
54         @mkdir -p csv
55         @rm -f csv/*
56         @mv *.csv csv/
57
58 clean:
59         rm -f $(PROGS) *.o *~ core
60
61 git-clean:
62         git clean -fd > /dev/null