ulps: Fix long lines
[mathlib.git] / ulps / Makefile
CommitLineData
9195a7a0 1CC99=gcc -std=c99
a5658343
SK
2CCFLAGS=-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 \
9195a7a0 6 -Wswitch -Wbad-function-cast -g
5b209071 7INCLUDE= -I../include -I/usr/include/gmp -I/usr/include/mpfr \
8 -I/usr/local/include -I/usr/opt/include -I/usr/pkg/include
9LIBS=-lm -lmpfr -lmpc -L/usr/local/lib -L/usr/opt/lib -L/usr/pkg/lib \
10 -R/usr/local/lib -R/usr/opt/lib
9195a7a0 11
78d54f7c 12# Don't use 'obj' or funny things will happen with VPATH set to ../
a5658343 13OBJDIR = obj-ulps
78d54f7c 14
c790c117
SK
15# For ../subr_*.c
16VPATH=../
9195a7a0 17
ed5de5a7
SK
18.PHONY: all
19all: ulpcalc
20
21$(OBJDIR):
a5658343 22 @mkdir -p $(OBJDIR)
ed5de5a7
SK
23
24config.h:
25 autoreconf && ./configure
26
27$(OBJDIR)/%.o: %.c | $(OBJDIR) config.h
c790c117
SK
28 $(CC99) -c -o $@ $< $(CCFLAGS) $(INCLUDE)
29
1ebc9503
SK
30_DEPS = main.o basic-complex.o gen.o subr_mpc.o subr_random.o ulp_real.o \
31 ulp_complex.o
2c4f44b0 32 DEPS = $(_DEPS:%=$(OBJDIR)/%)
c790c117 33ulpcalc: $(DEPS)
c790c117 34 $(CC99) -o ulps $(DEPS) $(CCFLAGS) $(INCLUDE) $(LIBS)
0921cdfd 35
a5658343
SK
36.PHONY: clean
37clean:
38 rm -f $(OBJDIR)/*.o *~ core
39
40.PHONY: git-clean
41git-clean:
42 git clean -fd > /dev/null
43
469fbda3 44# Hacky; create tar to ../ or else it will be included in the final tar
c790c117 45.PHONY: dist
469fbda3 46dist:
dea83408
SK
47 autoreconf && ./configure >/dev/null
48 cp ../subr_random.c .
1ebc9503
SK
49 cp ../include/mytypes.h .
50 cp ../include/subr_fpclassify.h .
dea83408
SK
51 cp ../include/subr_random.h .
52 tar czfv ../ulp-0.1.tar.gz .
53 mv ../ulp-0.1.tar.gz .