2 # To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
3 # To compile on MinGW: add "-lws2_32" to LDFLAGS
5 # Suggested value for TROPICSSL_CFLAGS_EXTRA_WARNINGS to pass
6 # on the command line, for gcc (GCC) 4.4.6 20120305
9 # make all 'TROPICSSL_CFLAGS_EXTRA_WARNINGS= -Wextra -Wformat=2
10 # -fstrict-aliasing -Wstrict-aliasing -Wfloat-equal
11 # -Wundef -Wpointer-arith -Wbad-function-cast
12 # -Wcast-qual -Wcast-align -Wwrite-strings -Waddress
13 # -Waggregate-return -Wstrict-prototypes
14 # -Wold-style-declaration -Wold-style-definition
15 # -Wmissing-parameter-type -Wmissing-prototypes
16 # -Wmissing-declarations -Wmissing-field-initializers
17 # -Wmissing-noreturn -Wmissing-format-attribute -Wpacked
18 # -Wredundant-decls -Wnested-externs'
21 CFLAGS
= -I..
/include -D_FILE_OFFSET_BITS
=64 -Wall
$(TROPICSSL_CFLAGS_EXTRA_WARNINGS
)
23 LDFLAGS
= -L..
/library
-ltropicssl
25 ifndef TROPICSSL_CFLAGS_NO_WARNINGS_AS_ERRORS
27 endif # TROPICSSL_CFLAGS_NO_WARNINGS_AS_ERRORS
29 APPS
= aes
/aescrypt2 hash
/hello \
30 hash
/md5sum hash
/sha1sum \
31 hash
/sha2sum pkey
/dh_client \
32 pkey
/dh_genprime pkey
/dh_server \
33 pkey
/mpi_demo pkey
/rsa_genkey \
34 pkey
/rsa_sign pkey
/rsa_verify \
35 ssl
/ssl_client1 ssl
/ssl_client2 \
36 ssl
/ssl_server
test/benchmark \
37 test/selftest
test/ssl_test
43 aes
/aescrypt2
: aes
/aescrypt2.c ..
/library
/libtropicssl.a
44 @echo
" CC aes/aescrypt2.c"
45 $(CC
) $(CFLAGS
) $(OFLAGS
) aes
/aescrypt2.c
$(LDFLAGS
) -o
$@
47 hash
/hello
: hash
/hello.c ..
/library
/libtropicssl.a
48 @echo
" CC hash/hello.c"
49 $(CC
) $(CFLAGS
) $(OFLAGS
) hash
/hello.c
$(LDFLAGS
) -o
$@
51 hash
/md5sum
: hash
/md5sum.c ..
/library
/libtropicssl.a
52 @echo
" CC hash/md5sum.c"
53 $(CC
) $(CFLAGS
) $(OFLAGS
) hash
/md5sum.c
$(LDFLAGS
) -o
$@
55 hash
/sha1sum
: hash
/sha1sum.c ..
/library
/libtropicssl.a
56 @echo
" CC hash/sha1sum.c"
57 $(CC
) $(CFLAGS
) $(OFLAGS
) hash
/sha1sum.c
$(LDFLAGS
) -o
$@
59 hash
/sha2sum
: hash
/sha2sum.c ..
/library
/libtropicssl.a
60 @echo
" CC hash/sha2sum.c"
61 $(CC
) $(CFLAGS
) $(OFLAGS
) hash
/sha2sum.c
$(LDFLAGS
) -o
$@
63 pkey
/dh_client
: pkey
/dh_client.c ..
/library
/libtropicssl.a
64 @echo
" CC pkey/dh_client.c"
65 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/dh_client.c
$(LDFLAGS
) -o
$@
67 pkey
/dh_genprime
: pkey
/dh_genprime.c ..
/library
/libtropicssl.a
68 @echo
" CC pkey/dh_genprime.c"
69 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/dh_genprime.c
$(LDFLAGS
) -o
$@
71 pkey
/dh_server
: pkey
/dh_server.c ..
/library
/libtropicssl.a
72 @echo
" CC pkey/dh_server.c"
73 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/dh_server.c
$(LDFLAGS
) -o
$@
75 pkey
/mpi_demo
: pkey
/mpi_demo.c ..
/library
/libtropicssl.a
76 @echo
" CC pkey/mpi_demo.c"
77 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/mpi_demo.c
$(LDFLAGS
) -o
$@
79 pkey
/rsa_genkey
: pkey
/rsa_genkey.c ..
/library
/libtropicssl.a
80 @echo
" CC pkey/rsa_genkey.c"
81 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/rsa_genkey.c
$(LDFLAGS
) -o
$@
83 pkey
/rsa_sign
: pkey
/rsa_sign.c ..
/library
/libtropicssl.a
84 @echo
" CC pkey/rsa_sign.c"
85 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/rsa_sign.c
$(LDFLAGS
) -o
$@
87 pkey
/rsa_verify
: pkey
/rsa_verify.c ..
/library
/libtropicssl.a
88 @echo
" CC pkey/rsa_verify.c"
89 $(CC
) $(CFLAGS
) $(OFLAGS
) pkey
/rsa_verify.c
$(LDFLAGS
) -o
$@
91 ssl
/ssl_client1
: ssl
/ssl_client1.c ..
/library
/libtropicssl.a
92 @echo
" CC ssl/ssl_client1.c"
93 $(CC
) $(CFLAGS
) $(OFLAGS
) ssl
/ssl_client1.c
$(LDFLAGS
) -o
$@
95 ssl
/ssl_client2
: ssl
/ssl_client2.c ..
/library
/libtropicssl.a
96 @echo
" CC ssl/ssl_client2.c"
97 $(CC
) $(CFLAGS
) $(OFLAGS
) ssl
/ssl_client2.c
$(LDFLAGS
) -o
$@
99 ssl
/ssl_server
: ssl
/ssl_server.c ..
/library
/libtropicssl.a
100 @echo
" CC ssl/ssl_server.c"
101 $(CC
) $(CFLAGS
) $(OFLAGS
) ssl
/ssl_server.c
$(LDFLAGS
) -o
$@
103 test/benchmark
: test/benchmark.c ..
/library
/libtropicssl.a
104 @echo
" CC test/benchmark.c"
105 $(CC
) $(CFLAGS
) $(OFLAGS
) test/benchmark.c
$(LDFLAGS
) -o
$@
107 test/selftest
: test/selftest.c ..
/library
/libtropicssl.a
108 @echo
" CC test/selftest.c"
109 $(CC
) $(CFLAGS
) $(OFLAGS
) test/selftest.c
$(LDFLAGS
) -o
$@
111 test/ssl_test
: test/ssl_test.c ..
/library
/libtropicssl.a
112 @echo
" CC test/ssl_test.c"
113 $(CC
) $(CFLAGS
) $(OFLAGS
) test/ssl_test.c
$(LDFLAGS
) -o
$@