projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
457b0db
)
math: use separate makefile
author
nsz
<nsz@port70.net>
Sun, 7 Oct 2012 19:53:52 +0000
(21:53 +0200)
committer
nsz
<nsz@port70.net>
Sun, 7 Oct 2012 19:53:52 +0000
(21:53 +0200)
src/math/Makefile
patch
|
blob
|
history
diff --git
a/src/math/Makefile
b/src/math/Makefile
index
a29f715
..
e251c6d
100644
(file)
--- a/
src/math/Makefile
+++ b/
src/math/Makefile
@@
-1,4
+1,24
@@
-NONBIN=util.o
-include ../../Makefile.inc
+CFLAGS+=-g -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wno-unused-function -Wno-missing-braces
CFLAGS+=-fno-builtin -D_GNU_SOURCE
CFLAGS+=-fno-builtin -D_GNU_SOURCE
+LDFLAGS+=-g -lm
+
+SRC=$(sort $(wildcard *.c))
+OBJ=$(SRC:.c=.o)
+BINOBJ=$(filter-out util.o,$(OBJ))
+BIN=$(BINOBJ:.o=)
+
+include ../../config.mak
+
+all: $(BIN)
+run: all
+ @N=0; for i in $(BIN);do ./$$i || N=$$((N+1)); done; [ "$$N" = 0 ] && echo PASS || echo FAILS: $$N
+clean:
+ rm -f $(OBJ) $(BIN)
+
$(BIN): util.o
$(BIN): util.o
+
+%.o: %.c sanity/%.h ucb/%.h crlibm/%.h
+ $(CC) $(CFLAGS) -c -o $@ $<
+%: %.c
+%: %.o
+ $(CC) $(LDFLAGS) -o $@ $^