aboutsummaryrefslogtreecommitdiff
path: root/c/sha1/Makefile
blob: 4012c1d7a5fbaab438a4c3bb7bd21d0a4ee698fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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