aboutsummaryrefslogtreecommitdiff
path: root/c/sha1/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'c/sha1/Makefile')
-rw-r--r--c/sha1/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/c/sha1/Makefile b/c/sha1/Makefile
new file mode 100644
index 0000000..4012c1d
--- /dev/null
+++ b/c/sha1/Makefile
@@ -0,0 +1,15 @@
+all: sha1-naïve sha1-x86
+
+sha1-naïve: main.c sha1-naïve.c
+ cc -flto -O3 -o $@ main.c $@.c
+
+sha1-x86: main.c sha1-x86.c
+ cc -flto -O3 -msha -msse4.1 -o $@ main.c $@.c
+
+expected:
+ { yes 'a' | tr -d '\n' | head -c1000000; \
+ yes 'b' | tr -d '\n' | head -c1000000; } \
+ | sha1sum | cut -d' ' -f1
+
+clean:
+ rm -f sha1-naïve sha1-x86