[go: up one dir, main page]

File: Makefile

package info (click to toggle)
aespipe 2.3e-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 516 kB
  • ctags: 589
  • sloc: ansic: 2,798; asm: 1,786; makefile: 157; sh: 40
file content (73 lines) | stat: -rw-r--r-- 2,905 bytes parent folder | download | duplicates (5)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
#  Makefile.in
#
#  Written by Jari Ruusu, June 4 2003
#
#  Copyright 2002,2003 by Jari Ruusu.
#  Redistribution of this file is permitted under the GNU Public License.
#

CC = gcc -g -O2 -DPACKAGE_NAME=\"aespipe\" -DPACKAGE_TARNAME=\"aespipe\" -DPACKAGE_VERSION=\"2\" -DPACKAGE_STRING=\"aespipe\ 2\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_MLOCKALL=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1  -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
LINK = gcc 
prefix = /usr/local
exec_prefix = ${prefix}


aespipe: aespipe.o aes.o sha512.o rmd160.o
	$(LINK) -o aespipe aespipe.o aes.o sha512.o rmd160.o 
	strip aespipe
i586: aespipe.o aes-i586.o sha512.o rmd160.o
	$(LINK) -o aespipe aespipe.o aes-i586.o sha512.o rmd160.o 
	strip aespipe
aespipe.o: aespipe.c aes.h sha512.h rmd160.h
	$(CC) -o aespipe.o -c aespipe.c
aes.o: aes.c aes.h
	$(CC) -o aes.o -c aes.c
aes-i586.o: aes-i586.S aes.h
	$(CC) -o aes-i586.o -c aes-i586.S
sha512.o: sha512.c sha512.h
	$(CC) -o sha512.o -c sha512.c
rmd160.o: rmd160.c rmd160.h
	$(CC) -o rmd160.o -c rmd160.c

clean:
	rm -f *.o aespipe test-file[12345] config.log config.status configure.lineno
	rm -f -r autom4te.cache
distclean: clean
	rm -f Makefile

install:
	mkdir -p ${exec_prefix}/bin
	rm -f ${exec_prefix}/bin/aespipe
	cp aespipe ${exec_prefix}/bin/aespipe
	mkdir -p ${prefix}/man/man1
	rm -f ${prefix}/man/man1/aespipe.1
	cp aespipe.1 ${prefix}/man/man1/aespipe.1

tests:
	dd if=/dev/zero of=test-file3 bs=1024 count=10
	echo 12345678901234567890 >test-file4
	$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0  MD=d1ebb2873aec9cee47835c45ebdbb507 MD5WORK=test-part3
	$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0  MD=1ed138ff36b688fd46031cb7b8a24e55 MD5WORK=test-part3
	$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0  MD=818fa5f242bd2ff55244acbde0e9fd8f MD5WORK=test-part3
	$(MAKE) test-part2 CT=AES256 HF=rmd160 ITER=0  MD=8789fbc0e6b475cbef1ca1b362c8cc04 MD5WORK=test-part3
	$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=10 MD=7a4f907a3b280a3f1f3089f7416f7c15 MD5WORK=test-part3
	rm -f test-file[12345]
	@echo "*** Test results ok ***"
test-part2:
	./aespipe -p 3 -e $(CT) -H $(HF) -C $(ITER) <test-file3 >test-file1 3<test-file4
	$(MAKE) $(MD5WORK)
	cmp test-file2 test-file5
	./aespipe -d -p 3 -e $(CT) -H $(HF) -C $(ITER) <test-file1 >test-file2 3<test-file4
	cmp test-file3 test-file2
test-part3:
	md5sum test-file1 >test-file2
	echo "$(MD)  test-file1" >test-file5
test-part4:
	md5 test-file1 >test-file2
	echo "MD5 (test-file1) = $(MD)" >test-file5
test-part5:
	echo "NO MD5 TEST" >test-file2
	echo "NO MD5 TEST" >test-file5

.PHONY: aespipe i586 clean distclean install tests test-part2 test-part3 test-part4 test-part5