mv polarssl
[gnuk/gnuk.git] / polarssl / programs / Makefile
1
2 # To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
3 # To compile on MinGW: add "-lws2_32" to LDFLAGS
4
5 CFLAGS  = -I../include -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement
6 OFLAGS  = -O
7 LDFLAGS = -L../library -lpolarssl
8
9 APPS =  aes/aescrypt2           hash/hello              \
10         hash/md5sum                     hash/sha1sum            \
11         hash/sha2sum            pkey/dh_client          \
12         pkey/dh_genprime        pkey/dh_server          \
13         pkey/mpi_demo           pkey/rsa_genkey         \
14         pkey/rsa_sign           pkey/rsa_verify         \
15         ssl/ssl_client1         ssl/ssl_client2         \
16         ssl/ssl_server          test/ssl_cert_test      \
17         test/benchmark          test/selftest           \
18         test/ssl_test           x509/cert_app
19
20 .SILENT:
21
22 all: $(APPS)
23
24 aes/aescrypt2: aes/aescrypt2.c ../library/libpolarssl.a
25         echo   "  CC    aes/aescrypt2.c"
26         $(CC) $(CFLAGS) $(OFLAGS) aes/aescrypt2.c    $(LDFLAGS) -o $@
27
28 hash/hello: hash/hello.c ../library/libpolarssl.a
29         echo   "  CC    hash/hello.c"
30         $(CC) $(CFLAGS) $(OFLAGS) hash/hello.c       $(LDFLAGS) -o $@
31
32 hash/md5sum: hash/md5sum.c ../library/libpolarssl.a
33         echo   "  CC    hash/md5sum.c"
34         $(CC) $(CFLAGS) $(OFLAGS) hash/md5sum.c      $(LDFLAGS) -o $@
35
36 hash/sha1sum: hash/sha1sum.c ../library/libpolarssl.a
37         echo   "  CC    hash/sha1sum.c"
38         $(CC) $(CFLAGS) $(OFLAGS) hash/sha1sum.c     $(LDFLAGS) -o $@
39
40 hash/sha2sum: hash/sha2sum.c ../library/libpolarssl.a
41         echo   "  CC    hash/sha2sum.c"
42         $(CC) $(CFLAGS) $(OFLAGS) hash/sha2sum.c     $(LDFLAGS) -o $@
43
44 pkey/dh_client: pkey/dh_client.c ../library/libpolarssl.a
45         echo   "  CC    pkey/dh_client.c"
46         $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_client.c   $(LDFLAGS) -o $@
47
48 pkey/dh_genprime: pkey/dh_genprime.c ../library/libpolarssl.a
49         echo   "  CC    pkey/dh_genprime.c"
50         $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_genprime.c $(LDFLAGS) -o $@
51
52 pkey/dh_server: pkey/dh_server.c ../library/libpolarssl.a
53         echo   "  CC    pkey/dh_server.c"
54         $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_server.c   $(LDFLAGS) -o $@
55
56 pkey/mpi_demo: pkey/mpi_demo.c ../library/libpolarssl.a
57         echo   "  CC    pkey/mpi_demo.c"
58         $(CC) $(CFLAGS) $(OFLAGS) pkey/mpi_demo.c    $(LDFLAGS) -o $@
59
60 pkey/rsa_genkey: pkey/rsa_genkey.c ../library/libpolarssl.a
61         echo   "  CC    pkey/rsa_genkey.c"
62         $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_genkey.c  $(LDFLAGS) -o $@
63
64 pkey/rsa_sign: pkey/rsa_sign.c ../library/libpolarssl.a
65         echo   "  CC    pkey/rsa_sign.c"
66         $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_sign.c    $(LDFLAGS) -o $@
67
68 pkey/rsa_verify: pkey/rsa_verify.c ../library/libpolarssl.a
69         echo   "  CC    pkey/rsa_verify.c"
70         $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_verify.c  $(LDFLAGS) -o $@
71
72 ssl/ssl_client1: ssl/ssl_client1.c ../library/libpolarssl.a
73         echo   "  CC    ssl/ssl_client1.c"
74         $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client1.c  $(LDFLAGS) -o $@
75
76 ssl/ssl_client2: ssl/ssl_client2.c ../library/libpolarssl.a
77         echo   "  CC    ssl/ssl_client2.c"
78         $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client2.c  $(LDFLAGS) -o $@
79
80 ssl/ssl_server: ssl/ssl_server.c ../library/libpolarssl.a
81         echo   "  CC    ssl/ssl_server.c"
82         $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_server.c   $(LDFLAGS) -o $@
83
84 test/ssl_cert_test: test/ssl_cert_test.c ../library/libpolarssl.a
85         echo   "  CC    test/ssl_cert_test.c"
86         $(CC) $(CFLAGS) $(OFLAGS) test/ssl_cert_test.c   $(LDFLAGS) -o $@
87
88 test/benchmark: test/benchmark.c ../library/libpolarssl.a
89         echo   "  CC    test/benchmark.c"
90         $(CC) $(CFLAGS) $(OFLAGS) test/benchmark.c   $(LDFLAGS) -o $@
91
92 test/selftest: test/selftest.c ../library/libpolarssl.a
93         echo   "  CC    test/selftest.c"
94         $(CC) $(CFLAGS) $(OFLAGS) test/selftest.c    $(LDFLAGS) -o $@
95
96 test/ssl_test: test/ssl_test.c ../library/libpolarssl.a
97         echo   "  CC    test/ssl_test.c"
98         $(CC) $(CFLAGS) $(OFLAGS) test/ssl_test.c    $(LDFLAGS) -o $@
99
100 x509/cert_app: x509/cert_app.c ../library/libpolarssl.a
101         echo   "  CC    x509/cert_app.c"
102         $(CC) $(CFLAGS) $(OFLAGS) x509/cert_app.c    $(LDFLAGS) -o $@
103
104 clean:
105         rm -f $(APPS)
106