ulps: Fix long lines
[mathlib.git] / ulps / Makefile
1 CC99=gcc -std=c99
2 CCFLAGS=-Wall -W -Wformat-nonliteral -Wcast-align -Wpointer-arith               \
3         -Wbad-function-cast -Wmissing-prototypes                                \
4         -Wmissing-declarations -Winline -Wundef -Wnested-externs -Wcast-qual    \
5         -Wshadow -Wwrite-strings -Wno-unused-parameter                          \
6         -Wswitch -Wbad-function-cast -g
7 INCLUDE= -I../include -I/usr/include/gmp -I/usr/include/mpfr                    \
8          -I/usr/local/include -I/usr/opt/include -I/usr/pkg/include
9 LIBS=-lm -lmpfr -lmpc -L/usr/local/lib -L/usr/opt/lib -L/usr/pkg/lib            \
10          -R/usr/local/lib -R/usr/opt/lib
11
12 # Don't use 'obj' or funny things will happen with VPATH set to ../
13 OBJDIR = obj-ulps
14
15 # For ../subr_*.c
16 VPATH=../
17
18 .PHONY: all
19 all:    ulpcalc
20
21 $(OBJDIR):
22         @mkdir -p $(OBJDIR)
23
24 config.h:
25         autoreconf && ./configure
26
27 $(OBJDIR)/%.o: %.c | $(OBJDIR) config.h
28         $(CC99) -c -o $@ $< $(CCFLAGS) $(INCLUDE)
29
30 _DEPS = main.o basic-complex.o gen.o subr_mpc.o subr_random.o ulp_real.o \
31         ulp_complex.o
32  DEPS = $(_DEPS:%=$(OBJDIR)/%)
33 ulpcalc: $(DEPS)
34         $(CC99) -o ulps $(DEPS) $(CCFLAGS) $(INCLUDE) $(LIBS)
35
36 .PHONY: clean
37 clean:
38         rm -f $(OBJDIR)/*.o *~ core
39
40 .PHONY: git-clean
41 git-clean:
42         git clean -fd > /dev/null
43
44 # Hacky; create tar to ../ or else it will be included in the final tar
45 .PHONY: dist
46 dist:
47         autoreconf && ./configure >/dev/null
48         cp ../subr_random.c .
49         cp ../include/mytypes.h .
50         cp ../include/subr_fpclassify.h .
51         cp ../include/subr_random.h .
52         tar czfv ../ulp-0.1.tar.gz .
53         mv ../ulp-0.1.tar.gz .