math: add fenv pragma, relax the error check, simplify util.h
[libc-test.git] / src / math / Makefile
blob8c640acbe2a02ea1ae4cc464d1c01bd221c5456d
1 CFLAGS+=-g -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wno-unused-function -Wno-missing-braces
2 CFLAGS+=-Wno-unknown-pragmas -fno-builtin -ffloat-store -frounding-math -D_GNU_SOURCE
3 LDFLAGS+=-g -lm
5 SRC=$(sort $(wildcard *.c))
6 OBJ=$(SRC:.c=.o)
7 BINOBJ=$(filter-out util.o,$(OBJ))
8 BIN=$(BINOBJ:.o=)
10 include ../../config.mak
12 all: $(BIN)
13 run: all
14 @N=0; for i in $(BIN);do ./$$i || N=$$((N+1)); done; [ "$$N" = 0 ] && echo PASS || echo FAILS: $$N
15 clean:
16 rm -f $(OBJ) $(BIN)
18 $(BIN): util.o
20 %.o: %.c sanity/%.h ucb/%.h crlibm/%.h util.h
21 $(CC) $(CFLAGS) -c -o $@ $<
22 %: %.c
23 %: %.o
24 $(CC) $(LDFLAGS) -o $@ $^