]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/benchmarks/Makefile
ccan/io: benchmarks.
[ccan] / ccan / io / benchmarks / Makefile
diff --git a/ccan/io/benchmarks/Makefile b/ccan/io/benchmarks/Makefile
new file mode 100644 (file)
index 0000000..21f3441
--- /dev/null
@@ -0,0 +1,25 @@
+ALL:=run-loop run-different-speed run-length-prefix
+CCANDIR:=../../..
+CFLAGS:=-Wall -I$(CCANDIR) -O3 -flto
+LDFLAGS:=-O3 -flto
+LDLIBS:=-lrt
+
+OBJS:=time.o poll.o io.o err.o
+
+default: $(ALL)
+
+run-loop: run-loop.o $(OBJS)
+run-different-speed: run-different-speed.o $(OBJS)
+run-length-prefix: run-length-prefix.o $(OBJS)
+
+time.o: $(CCANDIR)/ccan/time/time.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+poll.o: $(CCANDIR)/ccan/io/poll.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+io.o: $(CCANDIR)/ccan/io/io.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+err.o: $(CCANDIR)/ccan/err/err.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+       $(RM) -f *.o $(ALL)