File: Makefile

package info (click to toggle)
whirlpool 1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 188 kB
  • ctags: 65
  • sloc: ansic: 764; sh: 101; makefile: 90
file content (46 lines) | stat: -rw-r--r-- 1,376 bytes parent folder | download
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
# Written because whirlpool did not come with a Makefile
# This Makefile is under the same license as the rest of the Whirlpool software

FLAGS = -O3
#FLAGS = -g

all: whirlpool whirlpool0 whirlpool1

clean:
	rm -f core whirlpool1 whirlpool 64bit_tables*.h make_64bit_tables whirlpool0.o whirlpool.o whirlpool0 

make_64bit_tables: make_64bit_tables.c
	$(CC) -o make_64bit_tables make_64bit_tables.c

make_64bit_tables_v3: make_64bit_tables_v3.c
	$(CC) -o make_64bit_tables_v3 make_64bit_tables_v3.c

64bit_tables2.h: make_64bit_tables
	./make_64bit_tables_v3 > 64bit_tables2.h

64bit_tables1.h: make_64bit_tables
	./make_64bit_tables > 64bit_tables1.h

64bit_tables0.h: make_64bit_tables
	./make_64bit_tables 0 > 64bit_tables0.h

whirlpool.o: whirlpool.c nessie.h 64bit_tables2.h
	cp 64bit_tables2.h 64bit_tables.h
	$(CC) -c $(FLAGS) -o whirlpool.o whirlpool.c

whirlpool1.o: whirlpool.c nessie.h 64bit_tables1.h
	cp 64bit_tables1.h 64bit_tables.h
	$(CC) -c $(FLAGS) -o whirlpool1.o whirlpool.c

whirlpool0.o: whirlpool.c nessie.h 64bit_tables0.h
	cp 64bit_tables0.h 64bit_tables.h
	$(CC) -c $(FLAGS) -o whirlpool0.o whirlpool.c

whirlpool: whirlpool.o main.c
	$(CC) $(FLAGS) -o whirlpool main.c whirlpool.o

whirlpool1: whirlpool1.o main.c
	$(CC) $(FLAGS) -o whirlpool1 main.c whirlpool1.o

whirlpool0: whirlpool0.o main.c 
	$(CC) $(FLAGS) -o whirlpool0 main.c whirlpool0.o