Blame src/math/Makefile

nsz 9b2923
CFLAGS+=-g -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wno-unused-function -Wno-missing-braces
nsz d22f4f
CFLAGS+=-Wno-unknown-pragmas -fno-builtin -ffloat-store -frounding-math -D_GNU_SOURCE
nsz 9b2923
LDFLAGS+=-g -lm
nsz 9b2923
nsz 9b2923
SRC=$(sort $(wildcard *.c))
nsz 9b2923
OBJ=$(SRC:.c=.o)
nsz 9b2923
BINOBJ=$(filter-out util.o,$(OBJ))
nsz 9b2923
BIN=$(BINOBJ:.o=)
nsz 9b2923
nsz 9b2923
include ../../config.mak
nsz 9b2923
nsz 9b2923
all: $(BIN)
nsz 9b2923
run: all
nsz 9b2923
	@N=0; for i in $(BIN);do ./$$i || N=$$((N+1)); done; [ "$$N" = 0 ] && echo PASS || echo FAILS: $$N
nsz 9b2923
clean:
nsz 9b2923
	rm -f $(OBJ) $(BIN)
nsz 9b2923
nsz f9d179
$(BIN): util.o
nsz 9b2923
nsz d22f4f
%.o: %.c sanity/%.h ucb/%.h crlibm/%.h util.h
nsz 9b2923
	$(CC) $(CFLAGS) -c -o $@ $<
nsz 9b2923
%: %.c
nsz 9b2923
%: %.o
nsz 9b2923
	$(CC) $(LDFLAGS) -o $@ $^