]> git.ozlabs.org Git - ccan/blobdiff - ccan/crypto/sha256/benchmarks/Makefile
crypto/sha256: include Intel ASM versions in benchmarks.
[ccan] / ccan / crypto / sha256 / benchmarks / Makefile
index 9621962abf1ebf006a062e9ff5501bbc3c14aacd..a9f1b29fc7dbd821cd3a4f7e5c16536813bec4dc 100644 (file)
@@ -1,8 +1,18 @@
 CCANDIR := ../../../../
-CFLAGS := -Wall -I$(CCANDIR) -O3 -flto
+CFLAGS := -Wall -I$(CCANDIR) -O3 -flto -DCCAN_USE_ORIGINAL=1
 LDFLAGS := -O3 -flto
 
-double-sha-bench: double-sha-bench.o ccan-time.o ccan-crypto-sha256.o
+INTEL_OBJS := sha256_avx1.o sha256_avx2_rorx2.o sha256_avx2_rorx8.o sha256_sse4.o
+
+double-sha-bench: double-sha-bench.o ccan-time.o $(INTEL_OBJS)  #ccan-crypto-sha256.o
+
+$(INTEL_OBJS): %.o : %.asm
+
+%.o : %.asm
+       yasm -f x64 -f elf64 -X gnu -g dwarf2 -D LINUX -o $@ $<
+
+clean:
+       $(RM) -f *.o
 
 ccan-crypto-sha256.o: $(CCANDIR)/ccan/crypto/sha256/sha256.c
        $(CC) $(CFLAGS) -c -o $@ $<