Makefile: introduce PREFIX variable
Makefile: changed to not use trailing slashes in path variables
Makefile: separate openssl specific paths into own variables

This way it is very easy for packagers to adjust the paths to their needs,
without touching the common LDFLAGS for linking.

On my ubuntu derivate I simply compile it by hand in the following way using
the distribution provided openssl libs and development headers:

----------------------------------------------------------------------------
make OPENSSL_INCLUDE=/usr/include/openssl OPENSSL_LIB=/lib/i386-linux-gnu
----------------------------------------------------------------------------

Besides that it fixes the linking process by putting the LDFLAGS at the end
of the gcc call because the order really matters.

Without this reordering I experienced following linking issue:
----------------------------------------------------------------------------
gcc -g -Wall -lssl -lcrypto -o sslscan sslscan.c -L/lib/i386-linux-gnu -I/usr/include/openssl
/tmp/ccXzvZ7g.o: In function `populateCipherList':
/src/sslscan/sslscan/sslscan.c:210: undefined reference to `SSL_CTX_new'
/src/sslscan/sslscan/sslscan.c:216: undefined reference to `SSL_CTX_set_cipher_list'
/src/sslscan/sslscan/sslscan.c:218: undefined reference to `SSL_new'
/src/sslscan/sslscan/sslscan.c:221: undefined reference to `SSL_CTX_free'
/src/sslscan/sslscan/sslscan.c:225: undefined reference to `SSL_get_ciphers'
/src/sslscan/sslscan/sslscan.c:249: undefined reference to `sk_value'
/src/sslscan/sslscan/sslscan.c:249: undefined reference to `SSL_CIPHER_get_name'
/src/sslscan/sslscan/sslscan.c:250: undefined reference to `sk_value'
/src/sslscan/sslscan/sslscan.c:250: undefined reference to `SSL_CIPHER_get_version'
/src/sslscan/sslscan/sslscan.c:251: undefined reference to `sk_value'
/src/sslscan/sslscan/sslscan.c:251: undefined reference to `SSL_CIPHER_description'
/src/sslscan/sslscan/sslscan.c:252: undefined reference to `sk_value'
/src/sslscan/sslscan/sslscan.c:252: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:228: undefined reference to `sk_num'
/src/sslscan/sslscan/sslscan.c:255: undefined reference to `SSL_free'
/src/sslscan/sslscan/sslscan.c:256: undefined reference to `SSL_CTX_free'
/tmp/ccXzvZ7g.o: In function `loadCerts':
/src/sslscan/sslscan/sslscan.c:599: undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
/src/sslscan/sslscan/sslscan.c:600: undefined reference to `SSL_CTX_set_default_passwd_cb'
/src/sslscan/sslscan/sslscan.c:607: undefined reference to `SSL_CTX_use_certificate_file'
/src/sslscan/sslscan/sslscan.c:609: undefined reference to `SSL_CTX_use_certificate_file'
/src/sslscan/sslscan/sslscan.c:611: undefined reference to `SSL_CTX_use_certificate_chain_file'
/src/sslscan/sslscan/sslscan.c:622: undefined reference to `SSL_CTX_use_PrivateKey_file'
/src/sslscan/sslscan/sslscan.c:624: undefined reference to `SSL_CTX_use_PrivateKey_file'
/src/sslscan/sslscan/sslscan.c:628: undefined reference to `SSL_CTX_use_RSAPrivateKey_file'
/src/sslscan/sslscan/sslscan.c:630: undefined reference to `SSL_CTX_use_RSAPrivateKey_file'
/src/sslscan/sslscan/sslscan.c:647: undefined reference to `d2i_PKCS12_fp'
/src/sslscan/sslscan/sslscan.c:655: undefined reference to `PKCS12_parse'
/src/sslscan/sslscan/sslscan.c:662: undefined reference to `SSL_CTX_use_certificate'
/src/sslscan/sslscan/sslscan.c:667: undefined reference to `SSL_CTX_use_PrivateKey'
/src/sslscan/sslscan/sslscan.c:673: undefined reference to `PKCS12_free'
/src/sslscan/sslscan/sslscan.c:687: undefined reference to `SSL_CTX_check_private_key'
/tmp/ccXzvZ7g.o: In function `tls_reneg_init':
/src/sslscan/sslscan/sslscan.c:759: undefined reference to `SSL_library_init'
/src/sslscan/sslscan/sslscan.c:760: undefined reference to `SSL_load_error_strings'
/src/sslscan/sslscan/sslscan.c:762: undefined reference to `SSLeay'
/src/sslscan/sslscan/sslscan.c:765: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:771: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:777: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:787: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:792: undefined reference to `SSL_CTX_ctrl'
/tmp/ccXzvZ7g.o: In function `testRenegotiation':
/src/sslscan/sslscan/sslscan.c:820: undefined reference to `SSL_CTX_new'
/src/sslscan/sslscan/sslscan.c:823: undefined reference to `SSL_CTX_set_cipher_list'
/src/sslscan/sslscan/sslscan.c:833: undefined reference to `SSL_new'
/src/sslscan/sslscan/sslscan.c:838: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:844: undefined reference to `BIO_new_socket'
/src/sslscan/sslscan/sslscan.c:847: undefined reference to `SSL_set_bio'
/src/sslscan/sslscan/sslscan.c:862: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:866: undefined reference to `SSL_connect'
/src/sslscan/sslscan/sslscan.c:878: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:890: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:908: undefined reference to `SSL_renegotiate'
/src/sslscan/sslscan/sslscan.c:912: undefined reference to `SSL_do_handshake'
/src/sslscan/sslscan/sslscan.c:916: undefined reference to `SSL_do_handshake'
/src/sslscan/sslscan/sslscan.c:939: undefined reference to `SSL_shutdown'
/src/sslscan/sslscan/sslscan.c:943: undefined reference to `SSL_free'
/src/sslscan/sslscan/sslscan.c:960: undefined reference to `SSL_CTX_free'
/tmp/ccXzvZ7g.o: In function `testCipher':
/src/sslscan/sslscan/sslscan.c:1012: undefined reference to `SSL_CTX_set_cipher_list'
/src/sslscan/sslscan/sslscan.c:1016: undefined reference to `SSL_new'
/src/sslscan/sslscan/sslscan.c:1020: undefined reference to `BIO_new_socket'
/src/sslscan/sslscan/sslscan.c:1023: undefined reference to `SSL_set_bio'
/src/sslscan/sslscan/sslscan.c:1027: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:1031: undefined reference to `SSL_connect'
/src/sslscan/sslscan/sslscan.c:1050: undefined reference to `BIO_s_file'
/src/sslscan/sslscan/sslscan.c:1050: undefined reference to `BIO_new'
/src/sslscan/sslscan/sslscan.c:1051: undefined reference to `BIO_ctrl'
/src/sslscan/sslscan/sslscan.c:1054: undefined reference to `SSL_write'
/src/sslscan/sslscan/sslscan.c:1056: undefined reference to `SSL_read'
/src/sslscan/sslscan/sslscan.c:1112: undefined reference to `SSL_get_error'
/src/sslscan/sslscan/sslscan.c:1144: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:1154: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:1164: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:1173: undefined reference to `TLSv1_2_client_method'
/src/sslscan/sslscan/sslscan.c:1209: undefined reference to `SSL_shutdown'
/src/sslscan/sslscan/sslscan.c:1212: undefined reference to `SSL_free'
/tmp/ccXzvZ7g.o: In function `defaultCipher':
/src/sslscan/sslscan/sslscan.c:1256: undefined reference to `SSL_CTX_new'
/src/sslscan/sslscan/sslscan.c:1259: undefined reference to `SSL_CTX_set_cipher_list'
/src/sslscan/sslscan/sslscan.c:1269: undefined reference to `SSL_new'
/src/sslscan/sslscan/sslscan.c:1273: undefined reference to `BIO_new_socket'
/src/sslscan/sslscan/sslscan.c:1276: undefined reference to `SSL_set_bio'
/src/sslscan/sslscan/sslscan.c:1280: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:1284: undefined reference to `SSL_connect'
/src/sslscan/sslscan/sslscan.c:1299: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:1309: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:1319: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:1328: undefined reference to `TLSv1_2_client_method'
/src/sslscan/sslscan/sslscan.c:1339: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1339: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:1341: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1341: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:1346: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1346: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:1348: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1348: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:1355: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1355: undefined reference to `SSL_CIPHER_get_name'
/src/sslscan/sslscan/sslscan.c:1355: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1355: undefined reference to `SSL_CIPHER_get_bits'
/src/sslscan/sslscan/sslscan.c:1357: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1357: undefined reference to `SSL_CIPHER_get_name'
/src/sslscan/sslscan/sslscan.c:1359: undefined reference to `SSL_get_current_cipher'
/src/sslscan/sslscan/sslscan.c:1359: undefined reference to `SSL_CIPHER_get_name'
/src/sslscan/sslscan/sslscan.c:1362: undefined reference to `SSL_shutdown'
/src/sslscan/sslscan/sslscan.c:1366: undefined reference to `SSL_free'
/src/sslscan/sslscan/sslscan.c:1382: undefined reference to `SSL_CTX_free'
/tmp/ccXzvZ7g.o: In function `getCertificate':
/src/sslscan/sslscan/sslscan.c:1435: undefined reference to `TLSv1_method'
/src/sslscan/sslscan/sslscan.c:1439: undefined reference to `SSLv23_method'
/src/sslscan/sslscan/sslscan.c:1441: undefined reference to `SSL_CTX_new'
/src/sslscan/sslscan/sslscan.c:1445: undefined reference to `SSL_CTX_set_cipher_list'
/src/sslscan/sslscan/sslscan.c:1455: undefined reference to `SSL_new'
/src/sslscan/sslscan/sslscan.c:1460: undefined reference to `BIO_new_socket'
/src/sslscan/sslscan/sslscan.c:1463: undefined reference to `SSL_set_bio'
/src/sslscan/sslscan/sslscan.c:1477: undefined reference to `SSL_ctrl'
/src/sslscan/sslscan/sslscan.c:1481: undefined reference to `SSL_connect'
/src/sslscan/sslscan/sslscan.c:1486: undefined reference to `BIO_s_file'
/src/sslscan/sslscan/sslscan.c:1486: undefined reference to `BIO_new'
/src/sslscan/sslscan/sslscan.c:1487: undefined reference to `BIO_ctrl'
/src/sslscan/sslscan/sslscan.c:1490: undefined reference to `BIO_s_file'
/src/sslscan/sslscan/sslscan.c:1490: undefined reference to `BIO_new'
/src/sslscan/sslscan/sslscan.c:1491: undefined reference to `BIO_ctrl'
/src/sslscan/sslscan/sslscan.c:1498: undefined reference to `SSL_get_peer_certificate'
/src/sslscan/sslscan/sslscan.c:1504: undefined reference to `PEM_write_bio_X509'
/src/sslscan/sslscan/sslscan.c:1508: undefined reference to `PEM_write_bio_X509'
/src/sslscan/sslscan/sslscan.c:1517: undefined reference to `ASN1_INTEGER_get'
/src/sslscan/sslscan/sslscan.c:1529: undefined reference to `BIO_new_fp'
/src/sslscan/sslscan/sslscan.c:1531: undefined reference to `BIO_new_fp'
/src/sslscan/sslscan/sslscan.c:1535: undefined reference to `X509_get_serialNumber'
/src/sslscan/sslscan/sslscan.c:1537: undefined reference to `BIO_write'
/src/sslscan/sslscan/sslscan.c:1542: undefined reference to `ASN1_INTEGER_get'
/src/sslscan/sslscan/sslscan.c:1550: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1553: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1559: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1563: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1568: undefined reference to `BIO_printf'
/tmp/ccXzvZ7g.o:/src/sslscan/sslscan/sslscan.c:1574: more undefined references to `BIO_printf' follow
/tmp/ccXzvZ7g.o: In function `getCertificate':
/src/sslscan/sslscan/sslscan.c:1591: undefined reference to `BIO_free'
/src/sslscan/sslscan/sslscan.c:1599: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1604: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1612: undefined reference to `X509_get_issuer_name'
/src/sslscan/sslscan/sslscan.c:1612: undefined reference to `X509_NAME_oneline'
/src/sslscan/sslscan/sslscan.c:1622: undefined reference to `ASN1_TIME_print'
/src/sslscan/sslscan/sslscan.c:1626: undefined reference to `ASN1_TIME_print'
/src/sslscan/sslscan/sslscan.c:1630: undefined reference to `ASN1_TIME_print'
/src/sslscan/sslscan/sslscan.c:1635: undefined reference to `ASN1_TIME_print'
/src/sslscan/sslscan/sslscan.c:1643: undefined reference to `X509_get_subject_name'
/src/sslscan/sslscan/sslscan.c:1643: undefined reference to `X509_NAME_oneline'
/src/sslscan/sslscan/sslscan.c:1653: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1658: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1663: undefined reference to `X509_get_pubkey'
/src/sslscan/sslscan/sslscan.c:1677: undefined reference to `BN_num_bits'
/src/sslscan/sslscan/sslscan.c:1679: undefined reference to `BN_num_bits'
/src/sslscan/sslscan/sslscan.c:1680: undefined reference to `RSA_print'
/src/sslscan/sslscan/sslscan.c:1683: undefined reference to `RSA_print'
/src/sslscan/sslscan/sslscan.c:1698: undefined reference to `DSA_print'
/src/sslscan/sslscan/sslscan.c:1701: undefined reference to `DSA_print'
/src/sslscan/sslscan/sslscan.c:1718: undefined reference to `EC_KEY_print'
/src/sslscan/sslscan/sslscan.c:1721: undefined reference to `EC_KEY_print'
/src/sslscan/sslscan/sslscan.c:1738: undefined reference to `EVP_PKEY_free'
/src/sslscan/sslscan/sslscan.c:1745: undefined reference to `sk_num'
/src/sslscan/sslscan/sslscan.c:1753: undefined reference to `sk_value'
/src/sslscan/sslscan/sslscan.c:1757: undefined reference to `X509_EXTENSION_get_object'
/src/sslscan/sslscan/sslscan.c:1758: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1759: undefined reference to `X509_EXTENSION_get_critical'
/src/sslscan/sslscan/sslscan.c:1760: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1764: undefined reference to `i2a_ASN1_OBJECT'
/src/sslscan/sslscan/sslscan.c:1765: undefined reference to `BIO_printf'
/src/sslscan/sslscan/sslscan.c:1769: undefined reference to `X509V3_EXT_print'
/src/sslscan/sslscan/sslscan.c:1772: undefined reference to `ASN1_STRING_print'
/src/sslscan/sslscan/sslscan.c:1776: undefined reference to `X509V3_EXT_print'
/src/sslscan/sslscan/sslscan.c:1777: undefined reference to `ASN1_STRING_print'
/src/sslscan/sslscan/sslscan.c:1750: undefined reference to `sk_num'
/src/sslscan/sslscan/sslscan.c:1789: undefined reference to `SSL_get_verify_result'
/src/sslscan/sslscan/sslscan.c:1793: undefined reference to `X509_verify_cert_error_string'
/src/sslscan/sslscan/sslscan.c:1796: undefined reference to `X509_free'
/src/sslscan/sslscan/sslscan.c:1807: undefined reference to `BIO_free'
/src/sslscan/sslscan/sslscan.c:1809: undefined reference to `BIO_free'
/src/sslscan/sslscan/sslscan.c:1812: undefined reference to `SSL_shutdown'
/src/sslscan/sslscan/sslscan.c:1816: undefined reference to `SSL_free'
/src/sslscan/sslscan/sslscan.c:1832: undefined reference to `SSL_CTX_free'
/tmp/ccXzvZ7g.o: In function `testHost':
/src/sslscan/sslscan/sslscan.c:1944: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:1958: undefined reference to `SSL_CTX_new'
/src/sslscan/sslscan/sslscan.c:1964: undefined reference to `SSL_CTX_ctrl'
/src/sslscan/sslscan/sslscan.c:1966: undefined reference to `SSL_CTX_ctrl'
/src/sslscan/sslscan/sslscan.c:1977: undefined reference to `SSL_CTX_free'
/src/sslscan/sslscan/sslscan.c:2005: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:2007: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:2011: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:2013: undefined reference to `TLSv1_2_client_method'
/src/sslscan/sslscan/sslscan.c:2024: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:2027: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:2032: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:2035: undefined reference to `TLSv1_2_client_method'
/tmp/ccXzvZ7g.o: In function `main':
/src/sslscan/sslscan/sslscan.c:2128: undefined reference to `SSL_library_init'
/src/sslscan/sslscan/sslscan.c:2295: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:2362: undefined reference to `SSLeay_version'
/src/sslscan/sslscan/sslscan.c:2365: undefined reference to `OPENSSL_add_all_algorithms_noconf'
/src/sslscan/sslscan/sslscan.c:2366: undefined reference to `ERR_load_crypto_strings'
/src/sslscan/sslscan/sslscan.c:2377: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:2378: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:2381: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:2382: undefined reference to `TLSv1_2_client_method'
/src/sslscan/sslscan/sslscan.c:2392: undefined reference to `SSLv3_client_method'
/src/sslscan/sslscan/sslscan.c:2395: undefined reference to `TLSv1_client_method'
/src/sslscan/sslscan/sslscan.c:2400: undefined reference to `TLSv1_1_client_method'
/src/sslscan/sslscan/sslscan.c:2403: undefined reference to `TLSv1_2_client_method'
collect2: ld returned 1 exit status
make: *** [all] Error 1
----------------------------------------------------------------------------
Merge pull request #1 from morfoh/master

Makefile improvements and fixes