Measure CPU seconds instead of wall time, and move the timing functions into a
[fjl] / Makefile
index 926fa57317ff1cb35e75d80356f0f95244be5387..c3e6ff7d09f6b2e1228931a46ef1bf0ab91fc626 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
 CC=gcc
 CFLAGS=-std=gnu99 -O2 -msse4.1 -g -Wall -Wextra
-LDFLAGS=-lm
+LDFLAGS=-lm -lrt
 
 all: tests
 
-UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o
+UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o benchmark.o
 unstuff_test: $(UNSTUFF_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(UNSTUFF_TEST_OBJS)
 
@@ -20,7 +20,7 @@ BYTESOURCE_TEST_OBJS=bytesource.o choice.o unstuff.o bytesource_test.o
 bytesource_test: $(BYTESOURCE_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(BYTESOURCE_TEST_OBJS)
 
-IDCT_TEST_OBJS=idct.o idct_test.o
+IDCT_TEST_OBJS=idct.o idct_test.o benchmark.o
 idct_test: $(IDCT_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(IDCT_TEST_OBJS)