projects
/
libc-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix div bench in foo
[libc-test]
/
Makefile.inc
diff --git
a/Makefile.inc
b/Makefile.inc
index
62356af
..
5f1d614
100644
(file)
--- a/
Makefile.inc
+++ b/
Makefile.inc
@@
-35,33
+35,33
@@
endif
all: t b
clean:
all: t b
clean:
- rm -f $(OBJS) t
main.o main.h b bench.o tests.a
+ rm -f $(OBJS) t
t.o b b.o tests.a tests.h
.c.o:
$(CC) $(CFLAGS) $(INC) -c -o $@ $<
.c.o:
$(CC) $(CFLAGS) $(INC) -c -o $@ $<
-$(OBJS): $(ROOTDIR)/common/test.h
+$(OBJS): $(ROOTDIR)/common/test.h
$(ROOTDIR)/Makefile.conf
-
main
.h: $(OBJS)
+
tests
.h: $(OBJS)
nm -f posix $+ |awk ' \
/^test/ && $$2=="T"{print "T(" $$1 ")"} \
/^bench/ && $$2=="T"{print "B(" $$1 ")"} \
nm -f posix $+ |awk ' \
/^test/ && $$2=="T"{print "T(" $$1 ")"} \
/^bench/ && $$2=="T"{print "B(" $$1 ")"} \
- ' >
main
.h
+ ' >
tests
.h
tests.a: $(OBJS)
$(AR) rc $@ $+
$(RANLIB) $@
tests.a: $(OBJS)
$(AR) rc $@ $+
$(RANLIB) $@
-
main.o: $(ROOTDIR)/common/main.c $(ROOTDIR)/common/test.h main
.h
+
t.o: $(ROOTDIR)/common/t.c $(ROOTDIR)/common/test.h tests
.h
$(CC) $(CFLAGS) $(INC) -I. -c -o $@ $<
$(CC) $(CFLAGS) $(INC) -I. -c -o $@ $<
-t:
main
.o tests.a
+t:
t
.o tests.a
$(CC) $+ $(LDFLAGS) -o $@
$(CC) $+ $(LDFLAGS) -o $@
-b
ench.o: $(ROOTDIR)/common/bench.c $(ROOTDIR)/common/test.h main
.h
+b
.o: $(ROOTDIR)/common/b.c $(ROOTDIR)/common/test.h tests
.h
$(CC) $(CFLAGS) $(INC) -I. -c -o $@ $<
$(CC) $(CFLAGS) $(INC) -I. -c -o $@ $<
-b: b
ench
.o tests.a
+b: b.o tests.a
$(CC) $+ $(LDFLAGS) -lrt -o $@
.PHONY: all clean
$(CC) $+ $(LDFLAGS) -lrt -o $@
.PHONY: all clean