blob: e254aa461216ee8432b2836d7099a42402a8817b [file] [log] [blame]
Paul Bakker0049c2f2009-07-11 19:15:43 +00001
2# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
3# To compile on MinGW: add "-lws2_32" to LDFLAGS
4
5CFLAGS = -I../include -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement \
6 -Wno-unused-function -Wno-unused-value
7
8OFLAGS = -O
9LDFLAGS = -L../library -lpolarssl
10
11APPS = test_suite_aes test_suite_arc4 \
12 test_suite_base64 test_suite_camellia \
13 test_suite_des test_suite_dhm \
14 test_suite_hmac_shax test_suite_mdx \
15 test_suite_mpi test_suite_rsa \
16 test_suite_shax test_suite_x509parse\
17 test_suite_xtea
18
19.SILENT:
20
21all: $(APPS)
22
23%.c : suites/%.function suites/%.data scripts/generate_code.pl
24 echo " Generate $@"
25 scripts/generate_code.pl suites $*
26
27test_suite_aes: test_suite_aes.c ../library/libpolarssl.a
28 echo " CC $@.c"
29 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
30
31test_suite_arc4: test_suite_arc4.c ../library/libpolarssl.a
32 echo " CC $@.c"
33 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
34
35test_suite_base64: test_suite_base64.c ../library/libpolarssl.a
36 echo " CC $@.c"
37 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
38
39test_suite_camellia: test_suite_camellia.c ../library/libpolarssl.a
40 echo " CC $@.c"
41 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
42
43test_suite_des: test_suite_des.c ../library/libpolarssl.a
44 echo " CC $@.c"
45 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
46
47test_suite_dhm: test_suite_dhm.c ../library/libpolarssl.a
48 echo " CC $@.c"
49 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
50
51test_suite_hmac_shax: test_suite_hmac_shax.c ../library/libpolarssl.a
52 echo " CC $@.c"
53 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
54
55test_suite_mdx: test_suite_mdx.c ../library/libpolarssl.a
56 echo " CC $@.c"
57 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
58
59test_suite_mpi: test_suite_mpi.c ../library/libpolarssl.a
60 echo " CC $@.c"
61 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
62
63test_suite_rsa: test_suite_rsa.c ../library/libpolarssl.a
64 echo " CC $@.c"
65 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
66
67test_suite_shax: test_suite_shax.c ../library/libpolarssl.a
68 echo " CC $@.c"
69 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
70
71test_suite_x509parse: test_suite_x509parse.c ../library/libpolarssl.a
72 echo " CC $@.c"
73 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
74
75test_suite_xtea: test_suite_xtea.c ../library/libpolarssl.a
76 echo " CC $@.c"
77 $(CC) $(CFLAGS) $(OFLAGS) $@.c $(LDFLAGS) -o $@
78
79clean:
80 rm -f $(APPS) *.c
81
Paul Bakker9794cb42009-07-28 18:55:00 +000082check: $(APPS)
83 echo "Running checks"
84 for i in $(APPS); do echo " - $${i}"; ./$${i} | grep PASSED; done