blob: 348afe10e9fc5f66a2b418760a967868ce853ea4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
CFLAGS=-Wall -O3
K1C_CC=k1-mbr-gcc
K1C_CFLAGS=-Wall -O3
K1C_CCOMP=../../../ccomp
K1C_CCOMPFLAGS=-Wall -O3 -D__thread= -D__int128=int -U __SIZE_TYPE__ -D __SIZE_TYPE__='unsigned long long'
all: md2.all md5.all sha1.all sha256.all blowfish.all des.all
k1c: md2_test.ccomp.k1c md5_test.ccomp.k1c sha1_test.ccomp.k1c sha256_test.ccomp.k1c blowfish_test.ccomp.k1c des_test.ccomp.k1c
md2.all : md2_test.ccomp.k1c.out md2_test.gcc.k1c.out
md5.all : md5_test.ccomp.k1c.out md5_test.gcc.k1c.out
arcfour.all : arcfour_test.ccomp.k1c.out arcfour_test.gcc.k1c.out
blowfish.all : blowfish_test.ccomp.k1c.out blowfish_test.gcc.k1c.out
rot-13.all : rot-13_test.ccomp.k1c.out rot-13_test.gcc.k1c.out
sha1.all : sha1_test.ccomp.k1c.out sha1_test.gcc.k1c.out
sha256.all : sha256_test.ccomp.k1c.out sha256_test.gcc.k1c.out
des.all: des_test.ccomp.k1c.out des_test.gcc.k1c.out
%.gcc.k1c.s: %.c
$(K1C_CC) $(K1C_CFLAGS) -S $< -o $@
%.gcc.k1c.o: %.gcc.k1c.s
$(K1C_CC) $(K1C_CFLAGS) -c $< -o $@
%.ccomp.k1c.s: %.c
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@
%.ccomp.k1c.o: %.ccomp.k1c.s
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@
%_test.host: %.c %_test.c %.h
$(CC) $(CFLAGS) $*.c $*_test.c -o $@
%.gcc.k1c.s %.ccomp.k1c.s %_test.gcc.k1c.s: %.h
%_test.gcc.k1c: %.gcc.k1c.o %_test.gcc.k1c.o
$(K1C_CC) $(K1C_CFLAGS) $+ -o $@
%_test.ccomp.k1c: %.ccomp.k1c.o %_test.gcc.k1c.o modulo_division.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
%.k1c.out: %.k1c
k1-cluster --cycle-based -- $< | tee $@
clean:
$(RM) -f *.s *.o *.out *.k1c *.host
.PHONY: clean all md2.all md5.all rot-13.all sha1.all sha256.all md5.all blowfish.all arcfour.all des.all
|