| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 1 |  | 
|  | 2 | # To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS | 
| Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 3 | # To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your env | 
| Paul Bakker | 43b7e35 | 2011-01-18 15:27:19 +0000 | [diff] [blame] | 4 | # To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 5 |  | 
| Paul Bakker | 46eb138 | 2011-01-30 17:10:13 +0000 | [diff] [blame] | 6 | CFLAGS	+= -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement \ | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 7 | -Wno-unused-function -Wno-unused-value | 
|  | 8 |  | 
| Paul Bakker | f1ab0ec | 2012-10-23 12:12:53 +0000 | [diff] [blame] | 9 | OFLAGS	= -O2 | 
| Paul Bakker | a585beb | 2011-06-21 08:59:44 +0000 | [diff] [blame] | 10 | LDFLAGS	+= -L../library -lpolarssl $(SYS_LDFLAGS) | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 11 |  | 
| Paul Bakker | c7ffd36 | 2012-04-05 12:08:29 +0000 | [diff] [blame] | 12 | ifdef DEBUG | 
|  | 13 | CFLAGS += -g3 | 
|  | 14 | endif | 
|  | 15 |  | 
| Paul Bakker | cd5b529 | 2012-05-10 20:49:10 +0000 | [diff] [blame] | 16 | ifdef WINDOWS | 
|  | 17 | LDFLAGS += -lws2_32 | 
|  | 18 | endif | 
|  | 19 |  | 
| Paul Bakker | 2770fbd | 2012-07-03 13:30:23 +0000 | [diff] [blame] | 20 | # Zlib shared library extensions: | 
|  | 21 | ifdef ZLIB | 
|  | 22 | LDFLAGS += -lz | 
|  | 23 | endif | 
|  | 24 |  | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 25 | APPS =	test_suite_aes.ecb		test_suite_aes.cbc		\ | 
|  | 26 | test_suite_aes.cfb		test_suite_aes.rest		\ | 
|  | 27 | test_suite_arc4									\ | 
| Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 28 | test_suite_base64		test_suite_blowfish		\ | 
| Paul Bakker | 6132d0a | 2012-07-04 17:10:40 +0000 | [diff] [blame] | 29 | test_suite_camellia		test_suite_cipher.aes	\ | 
| Manuel Pégourié-Gonnard | 07f8fa5 | 2013-08-30 18:34:08 +0200 | [diff] [blame] | 30 | test_suite_cipher.arc4	test_suite_cipher.gcm	\ | 
| Paul Bakker | 6132d0a | 2012-07-04 17:10:40 +0000 | [diff] [blame] | 31 | test_suite_cipher.blowfish						\ | 
|  | 32 | test_suite_cipher.camellia						\ | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 33 | test_suite_cipher.des	test_suite_cipher.null	\ | 
| Manuel Pégourié-Gonnard | d5fdcaf | 2013-07-24 18:05:00 +0200 | [diff] [blame] | 34 | test_suite_cipher.padding						\ | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 35 | test_suite_ctr_drbg		test_suite_debug		\ | 
| Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 36 | test_suite_des			test_suite_dhm			\ | 
| Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 37 | test_suite_ecdh			test_suite_ecdsa		\ | 
| Paul Bakker | a95919b | 2013-01-16 17:00:05 +0100 | [diff] [blame] | 38 | test_suite_ecp									\ | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 39 | test_suite_error								\ | 
|  | 40 | test_suite_gcm.decrypt_128						\ | 
|  | 41 | test_suite_gcm.decrypt_192						\ | 
|  | 42 | test_suite_gcm.decrypt_256						\ | 
|  | 43 | test_suite_gcm.encrypt_128						\ | 
|  | 44 | test_suite_gcm.encrypt_192						\ | 
|  | 45 | test_suite_gcm.encrypt_256						\ | 
|  | 46 | test_suite_hmac_shax							\ | 
| Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 47 | test_suite_md			test_suite_mdx			\ | 
| Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 48 | test_suite_mpi			test_suite_pbkdf2		\ | 
| Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 49 | test_suite_pkcs1_v21	test_suite_pkcs5		\ | 
| Paul Bakker | c7bb02b | 2013-09-15 14:54:56 +0200 | [diff] [blame^] | 50 | test_suite_pkparse		test_suite_pkwrite		\ | 
| Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 51 | test_suite_rsa			test_suite_shax			\ | 
| Paul Bakker | 6d62050 | 2012-02-16 14:09:13 +0000 | [diff] [blame] | 52 | test_suite_x509parse	test_suite_x509write	\ | 
|  | 53 | test_suite_xtea			test_suite_version | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 54 |  | 
|  | 55 | .SILENT: | 
|  | 56 |  | 
|  | 57 | all: $(APPS) | 
|  | 58 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 59 | test_suite_aes.ecb.c : suites/test_suite_aes.function suites/test_suite_aes.ecb.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 60 | echo   "  Generate	$@" | 
|  | 61 | scripts/generate_code.pl suites test_suite_aes test_suite_aes.ecb | 
|  | 62 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 63 | test_suite_aes.cbc.c : suites/test_suite_aes.function suites/test_suite_aes.cbc.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 64 | echo   "  Generate	$@" | 
|  | 65 | scripts/generate_code.pl suites test_suite_aes test_suite_aes.cbc | 
|  | 66 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 67 | test_suite_aes.cfb.c : suites/test_suite_aes.function suites/test_suite_aes.cfb.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 68 | echo   "  Generate	$@" | 
|  | 69 | scripts/generate_code.pl suites test_suite_aes test_suite_aes.cfb | 
|  | 70 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 71 | test_suite_aes.rest.c : suites/test_suite_aes.function suites/test_suite_aes.rest.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 72 | echo   "  Generate	$@" | 
|  | 73 | scripts/generate_code.pl suites test_suite_aes test_suite_aes.rest | 
|  | 74 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 75 | test_suite_cipher.aes.c : suites/test_suite_cipher.function suites/test_suite_cipher.aes.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 76 | echo   "  Generate	$@" | 
|  | 77 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.aes | 
|  | 78 |  | 
| Manuel Pégourié-Gonnard | 37e230c | 2013-08-28 13:50:42 +0200 | [diff] [blame] | 79 | test_suite_cipher.arc4.c : suites/test_suite_cipher.function suites/test_suite_cipher.arc4.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
|  | 80 | echo   "  Generate	$@" | 
|  | 81 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.arc4 | 
|  | 82 |  | 
| Manuel Pégourié-Gonnard | 07f8fa5 | 2013-08-30 18:34:08 +0200 | [diff] [blame] | 83 | test_suite_cipher.gcm.c : suites/test_suite_cipher.function suites/test_suite_cipher.gcm.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
|  | 84 | echo   "  Generate	$@" | 
|  | 85 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.gcm | 
|  | 86 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 87 | test_suite_cipher.blowfish.c : suites/test_suite_cipher.function suites/test_suite_cipher.blowfish.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 6132d0a | 2012-07-04 17:10:40 +0000 | [diff] [blame] | 88 | echo   "  Generate	$@" | 
|  | 89 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.blowfish | 
|  | 90 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 91 | test_suite_cipher.camellia.c : suites/test_suite_cipher.function suites/test_suite_cipher.camellia.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 92 | echo   "  Generate	$@" | 
|  | 93 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.camellia | 
|  | 94 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 95 | test_suite_cipher.des.c : suites/test_suite_cipher.function suites/test_suite_cipher.des.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 96 | echo   "  Generate	$@" | 
|  | 97 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.des | 
|  | 98 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 99 | test_suite_cipher.null.c : suites/test_suite_cipher.function suites/test_suite_cipher.null.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 100 | echo   "  Generate	$@" | 
|  | 101 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.null | 
|  | 102 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 103 | test_suite_cipher.padding.c : suites/test_suite_cipher.function suites/test_suite_cipher.padding.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Manuel Pégourié-Gonnard | d5fdcaf | 2013-07-24 18:05:00 +0200 | [diff] [blame] | 104 | echo   "  Generate	$@" | 
|  | 105 | scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.padding | 
|  | 106 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 107 | test_suite_gcm.decrypt_128.c : suites/test_suite_gcm.function suites/test_suite_gcm.decrypt_128.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 108 | echo   "  Generate	$@" | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 109 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.decrypt_128 | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 110 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 111 | test_suite_gcm.decrypt_192.c : suites/test_suite_gcm.function suites/test_suite_gcm.decrypt_192.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 112 | echo   "  Generate	$@" | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 113 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.decrypt_192 | 
|  | 114 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 115 | test_suite_gcm.decrypt_256.c : suites/test_suite_gcm.function suites/test_suite_gcm.decrypt_256.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 116 | echo   "  Generate	$@" | 
|  | 117 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.decrypt_256 | 
|  | 118 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 119 | test_suite_gcm.encrypt_128.c : suites/test_suite_gcm.function suites/test_suite_gcm.encrypt_128.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 120 | echo   "  Generate	$@" | 
|  | 121 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.encrypt_128 | 
|  | 122 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 123 | test_suite_gcm.encrypt_192.c : suites/test_suite_gcm.function suites/test_suite_gcm.encrypt_192.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 124 | echo   "  Generate	$@" | 
|  | 125 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.encrypt_192 | 
|  | 126 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 127 | test_suite_gcm.encrypt_256.c : suites/test_suite_gcm.function suites/test_suite_gcm.encrypt_256.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 128 | echo   "  Generate	$@" | 
|  | 129 | scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.encrypt_256 | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 130 |  | 
| Paul Bakker | 1934318 | 2013-08-16 13:31:10 +0200 | [diff] [blame] | 131 | %.c : suites/%.function suites/%.data scripts/generate_code.pl suites/helpers.function suites/main_test.function | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 132 | echo   "  Generate	$@" | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 133 | scripts/generate_code.pl suites $* $* | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 134 |  | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 135 | test_suite_aes.ecb: test_suite_aes.ecb.c ../library/libpolarssl.a | 
|  | 136 | echo   "  CC    	$@.c" | 
|  | 137 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 138 |  | 
|  | 139 | test_suite_aes.cbc: test_suite_aes.cbc.c ../library/libpolarssl.a | 
|  | 140 | echo   "  CC    	$@.c" | 
|  | 141 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 142 |  | 
|  | 143 | test_suite_aes.cfb: test_suite_aes.cfb.c ../library/libpolarssl.a | 
|  | 144 | echo   "  CC    	$@.c" | 
|  | 145 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 146 |  | 
|  | 147 | test_suite_aes.rest: test_suite_aes.rest.c ../library/libpolarssl.a | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 148 | echo   "  CC    	$@.c" | 
|  | 149 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 150 |  | 
|  | 151 | test_suite_arc4: test_suite_arc4.c ../library/libpolarssl.a | 
|  | 152 | echo   "  CC    	$@.c" | 
|  | 153 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 154 |  | 
|  | 155 | test_suite_base64: test_suite_base64.c ../library/libpolarssl.a | 
|  | 156 | echo   "  CC    	$@.c" | 
|  | 157 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 158 |  | 
| Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 159 | test_suite_blowfish: test_suite_blowfish.c ../library/libpolarssl.a | 
|  | 160 | echo   "  CC    	$@.c" | 
|  | 161 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 162 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 163 | test_suite_camellia: test_suite_camellia.c ../library/libpolarssl.a | 
|  | 164 | echo   "  CC    	$@.c" | 
|  | 165 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 166 |  | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 167 | test_suite_cipher.aes: test_suite_cipher.aes.c ../library/libpolarssl.a | 
|  | 168 | echo   "  CC    	$@.c" | 
|  | 169 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 170 |  | 
| Manuel Pégourié-Gonnard | 37e230c | 2013-08-28 13:50:42 +0200 | [diff] [blame] | 171 | test_suite_cipher.arc4: test_suite_cipher.arc4.c ../library/libpolarssl.a | 
|  | 172 | echo   "  CC    	$@.c" | 
|  | 173 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 174 |  | 
| Manuel Pégourié-Gonnard | 07f8fa5 | 2013-08-30 18:34:08 +0200 | [diff] [blame] | 175 | test_suite_cipher.gcm: test_suite_cipher.gcm.c ../library/libpolarssl.a | 
|  | 176 | echo   "  CC    	$@.c" | 
|  | 177 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 178 |  | 
| Paul Bakker | 6132d0a | 2012-07-04 17:10:40 +0000 | [diff] [blame] | 179 | test_suite_cipher.blowfish: test_suite_cipher.blowfish.c ../library/libpolarssl.a | 
|  | 180 | echo   "  CC    	$@.c" | 
|  | 181 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 182 |  | 
| Paul Bakker | 46c1794 | 2011-07-13 14:54:54 +0000 | [diff] [blame] | 183 | test_suite_cipher.camellia: test_suite_cipher.camellia.c ../library/libpolarssl.a | 
|  | 184 | echo   "  CC    	$@.c" | 
|  | 185 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 186 |  | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 187 | test_suite_cipher.des: test_suite_cipher.des.c ../library/libpolarssl.a | 
| Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 188 | echo   "  CC    	$@.c" | 
|  | 189 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 190 |  | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 191 | test_suite_cipher.null: test_suite_cipher.null.c ../library/libpolarssl.a | 
|  | 192 | echo   "  CC    	$@.c" | 
|  | 193 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 194 |  | 
| Manuel Pégourié-Gonnard | d5fdcaf | 2013-07-24 18:05:00 +0200 | [diff] [blame] | 195 | test_suite_cipher.padding: test_suite_cipher.padding.c ../library/libpolarssl.a | 
|  | 196 | echo   "  CC    	$@.c" | 
|  | 197 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 198 |  | 
| Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 199 | test_suite_ctr_drbg: test_suite_ctr_drbg.c ../library/libpolarssl.a | 
| Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 200 | echo   "  CC    	$@.c" | 
|  | 201 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 202 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 203 | test_suite_des: test_suite_des.c ../library/libpolarssl.a | 
|  | 204 | echo   "  CC    	$@.c" | 
|  | 205 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 206 |  | 
|  | 207 | test_suite_dhm: test_suite_dhm.c ../library/libpolarssl.a | 
|  | 208 | echo   "  CC    	$@.c" | 
|  | 209 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 210 |  | 
| Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 211 | test_suite_ecdh: test_suite_ecdh.c ../library/libpolarssl.a | 
|  | 212 | echo   "  CC    	$@.c" | 
|  | 213 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 214 |  | 
|  | 215 | test_suite_ecdsa: test_suite_ecdsa.c ../library/libpolarssl.a | 
|  | 216 | echo   "  CC    	$@.c" | 
|  | 217 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 218 |  | 
| Paul Bakker | a95919b | 2013-01-16 17:00:05 +0100 | [diff] [blame] | 219 | test_suite_ecp: test_suite_ecp.c ../library/libpolarssl.a | 
|  | 220 | echo   "  CC    	$@.c" | 
|  | 221 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 222 |  | 
| Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 223 | test_suite_error: test_suite_error.c ../library/libpolarssl.a | 
|  | 224 | echo   "  CC    	$@.c" | 
|  | 225 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 226 |  | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 227 | test_suite_gcm.decrypt_128: test_suite_gcm.decrypt_128.c ../library/libpolarssl.a | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 228 | echo   "  CC    	$@.c" | 
|  | 229 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 230 |  | 
| Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 231 | test_suite_gcm.decrypt_192: test_suite_gcm.decrypt_192.c ../library/libpolarssl.a | 
|  | 232 | echo   "  CC    	$@.c" | 
|  | 233 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 234 |  | 
|  | 235 | test_suite_gcm.decrypt_256: test_suite_gcm.decrypt_256.c ../library/libpolarssl.a | 
|  | 236 | echo   "  CC    	$@.c" | 
|  | 237 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 238 |  | 
|  | 239 | test_suite_gcm.encrypt_128: test_suite_gcm.encrypt_128.c ../library/libpolarssl.a | 
|  | 240 | echo   "  CC    	$@.c" | 
|  | 241 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 242 |  | 
|  | 243 | test_suite_gcm.encrypt_192: test_suite_gcm.encrypt_192.c ../library/libpolarssl.a | 
|  | 244 | echo   "  CC    	$@.c" | 
|  | 245 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 246 |  | 
|  | 247 | test_suite_gcm.encrypt_256: test_suite_gcm.encrypt_256.c ../library/libpolarssl.a | 
| Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 248 | echo   "  CC    	$@.c" | 
|  | 249 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 250 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 251 | test_suite_hmac_shax: test_suite_hmac_shax.c ../library/libpolarssl.a | 
|  | 252 | echo   "  CC    	$@.c" | 
|  | 253 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 254 |  | 
| Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 255 | test_suite_md: test_suite_md.c ../library/libpolarssl.a | 
|  | 256 | echo   "  CC    	$@.c" | 
|  | 257 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 258 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 259 | test_suite_mdx: test_suite_mdx.c ../library/libpolarssl.a | 
|  | 260 | echo   "  CC    	$@.c" | 
|  | 261 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 262 |  | 
|  | 263 | test_suite_mpi: test_suite_mpi.c ../library/libpolarssl.a | 
|  | 264 | echo   "  CC    	$@.c" | 
|  | 265 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 266 |  | 
| Paul Bakker | f518b16 | 2012-08-23 13:03:18 +0000 | [diff] [blame] | 267 | test_suite_pbkdf2: test_suite_pbkdf2.c ../library/libpolarssl.a | 
|  | 268 | echo   "  CC    	$@.c" | 
|  | 269 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 270 |  | 
| Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 271 | test_suite_pkcs1_v21: test_suite_pkcs1_v21.c ../library/libpolarssl.a | 
|  | 272 | echo   "  CC    	$@.c" | 
|  | 273 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 274 |  | 
| Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 275 | test_suite_pkcs5: test_suite_pkcs5.c ../library/libpolarssl.a | 
|  | 276 | echo   "  CC    	$@.c" | 
|  | 277 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 278 |  | 
| Paul Bakker | 1a7550a | 2013-09-15 13:01:22 +0200 | [diff] [blame] | 279 | test_suite_pkparse: test_suite_pkparse.c ../library/libpolarssl.a | 
|  | 280 | echo   "  CC    	$@.c" | 
|  | 281 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 282 |  | 
| Paul Bakker | c7bb02b | 2013-09-15 14:54:56 +0200 | [diff] [blame^] | 283 | test_suite_pkwrite: test_suite_pkwrite.c ../library/libpolarssl.a | 
|  | 284 | echo   "  CC    	$@.c" | 
|  | 285 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 286 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 287 | test_suite_rsa: test_suite_rsa.c ../library/libpolarssl.a | 
|  | 288 | echo   "  CC    	$@.c" | 
|  | 289 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 290 |  | 
|  | 291 | test_suite_shax: test_suite_shax.c ../library/libpolarssl.a | 
|  | 292 | echo   "  CC    	$@.c" | 
|  | 293 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 294 |  | 
|  | 295 | test_suite_x509parse: test_suite_x509parse.c ../library/libpolarssl.a | 
|  | 296 | echo   "  CC    	$@.c" | 
|  | 297 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 298 |  | 
| Paul Bakker | 6d62050 | 2012-02-16 14:09:13 +0000 | [diff] [blame] | 299 | test_suite_x509write: test_suite_x509write.c ../library/libpolarssl.a | 
|  | 300 | echo   "  CC    	$@.c" | 
|  | 301 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 302 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 303 | test_suite_xtea: test_suite_xtea.c ../library/libpolarssl.a | 
|  | 304 | echo   "  CC    	$@.c" | 
|  | 305 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 306 |  | 
| Paul Bakker | 7d7f4f4 | 2010-02-18 18:26:04 +0000 | [diff] [blame] | 307 | test_suite_debug: test_suite_debug.c ../library/libpolarssl.a | 
|  | 308 | echo   "  CC    	$@.c" | 
|  | 309 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 310 |  | 
| Paul Bakker | 3ac1b2d | 2010-06-18 22:47:29 +0000 | [diff] [blame] | 311 | test_suite_version: test_suite_version.c ../library/libpolarssl.a | 
|  | 312 | echo   "  CC    	$@.c" | 
|  | 313 | $(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@ | 
|  | 314 |  | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 315 | clean: | 
| Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 316 | ifndef WINDOWS | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 317 | rm -f $(APPS) *.c | 
| Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 318 | endif | 
|  | 319 | ifdef WINDOWS | 
|  | 320 | del /Q /F *.c *.exe | 
|  | 321 | endif | 
| Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 322 |  | 
| Paul Bakker | 9794cb4 | 2009-07-28 18:55:00 +0000 | [diff] [blame] | 323 | check: $(APPS) | 
| Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 324 | ifndef WINDOWS | 
| Paul Bakker | d14cd35 | 2012-05-08 15:39:50 +0000 | [diff] [blame] | 325 | echo "Running checks (Success if all tests PASSED)" | 
|  | 326 | RETURN=0;																\ | 
| Paul Bakker | d947d76 | 2009-07-28 20:16:47 +0000 | [diff] [blame] | 327 | for i in $(APPS);														\ | 
|  | 328 | do																		\ | 
|  | 329 | echo " - $${i}";													\ | 
| Paul Bakker | 667086b | 2013-08-20 23:11:06 +0200 | [diff] [blame] | 330 | RESULT=`./$${i} | grep -v 'PASS$$' | grep -v -- '----' | grep -v '^$$'`;	\ | 
| Paul Bakker | d14cd35 | 2012-05-08 15:39:50 +0000 | [diff] [blame] | 331 | FAILED=`echo $$RESULT |grep FAILED`; 								\ | 
|  | 332 | echo "   $$RESULT";													\ | 
|  | 333 | if [ "$$FAILED" != "" ];											\ | 
|  | 334 | then																\ | 
|  | 335 | echo "**** Failed ***************";								\ | 
|  | 336 | RETURN=1;														\ | 
|  | 337 | fi; 																\ | 
| Paul Bakker | d947d76 | 2009-07-28 20:16:47 +0000 | [diff] [blame] | 338 | echo "";															\ | 
| Paul Bakker | d14cd35 | 2012-05-08 15:39:50 +0000 | [diff] [blame] | 339 | done;																	\ | 
|  | 340 | if [ "$$RETURN" -eq 1 ]; then exit 1; fi | 
| Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 341 | endif |