2009-01-03 21:22:43 +00:00
|
|
|
|
|
|
|
# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
|
|
|
|
# To compile on MinGW: add "-lws2_32" to LDFLAGS
|
|
|
|
|
2009-03-28 17:53:03 +00:00
|
|
|
CFLAGS = -I../include -D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement
|
2009-01-03 21:22:43 +00:00
|
|
|
OFLAGS = -O
|
2009-01-03 21:51:57 +00:00
|
|
|
LDFLAGS = -L../library -lpolarssl
|
2009-01-03 21:22:43 +00:00
|
|
|
|
|
|
|
APPS = aes/aescrypt2 hash/hello \
|
2010-03-18 20:11:58 +00:00
|
|
|
hash/md5sum hash/sha1sum \
|
2009-01-03 21:22:43 +00:00
|
|
|
hash/sha2sum pkey/dh_client \
|
|
|
|
pkey/dh_genprime pkey/dh_server \
|
|
|
|
pkey/mpi_demo pkey/rsa_genkey \
|
|
|
|
pkey/rsa_sign pkey/rsa_verify \
|
|
|
|
ssl/ssl_client1 ssl/ssl_client2 \
|
2009-02-09 22:32:35 +00:00
|
|
|
ssl/ssl_server test/ssl_cert_test \
|
2010-03-18 20:11:58 +00:00
|
|
|
test/benchmark test/selftest \
|
|
|
|
test/ssl_test x509/cert_app
|
2009-01-03 21:22:43 +00:00
|
|
|
|
|
|
|
.SILENT:
|
|
|
|
|
|
|
|
all: $(APPS)
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
aes/aescrypt2: aes/aescrypt2.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC aes/aescrypt2.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) aes/aescrypt2.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
hash/hello: hash/hello.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC hash/hello.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) hash/hello.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
hash/md5sum: hash/md5sum.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC hash/md5sum.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) hash/md5sum.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
hash/sha1sum: hash/sha1sum.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC hash/sha1sum.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) hash/sha1sum.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
hash/sha2sum: hash/sha2sum.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC hash/sha2sum.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) hash/sha2sum.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/dh_client: pkey/dh_client.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/dh_client.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/dh_client.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/dh_genprime: pkey/dh_genprime.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/dh_genprime.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/dh_genprime.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/dh_server: pkey/dh_server.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/dh_server.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/dh_server.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/mpi_demo: pkey/mpi_demo.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/mpi_demo.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/mpi_demo.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/rsa_genkey: pkey/rsa_genkey.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/rsa_genkey.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_genkey.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/rsa_sign: pkey/rsa_sign.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/rsa_sign.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_sign.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
pkey/rsa_verify: pkey/rsa_verify.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC pkey/rsa_verify.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_verify.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
ssl/ssl_client1: ssl/ssl_client1.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC ssl/ssl_client1.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client1.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
ssl/ssl_client2: ssl/ssl_client2.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC ssl/ssl_client2.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client2.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
ssl/ssl_server: ssl/ssl_server.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC ssl/ssl_server.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_server.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-02-09 22:32:35 +00:00
|
|
|
test/ssl_cert_test: test/ssl_cert_test.c ../library/libpolarssl.a
|
|
|
|
echo " CC test/ssl_cert_test.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) test/ssl_cert_test.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
test/benchmark: test/benchmark.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC test/benchmark.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) test/benchmark.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
test/selftest: test/selftest.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC test/selftest.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) test/selftest.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:51:57 +00:00
|
|
|
test/ssl_test: test/ssl_test.c ../library/libpolarssl.a
|
2009-01-03 21:22:43 +00:00
|
|
|
echo " CC test/ssl_test.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) test/ssl_test.c $(LDFLAGS) -o $@
|
|
|
|
|
2010-03-18 20:11:58 +00:00
|
|
|
x509/cert_app: x509/cert_app.c ../library/libpolarssl.a
|
|
|
|
echo " CC x509/cert_app.c"
|
|
|
|
$(CC) $(CFLAGS) $(OFLAGS) x509/cert_app.c $(LDFLAGS) -o $@
|
|
|
|
|
2009-01-03 21:22:43 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(APPS)
|
|
|
|
|