blob: ccaacfc8ff5d41948057ce98877d77ca8fed4df5 [file] [log] [blame]
Paul Bakker0049c2f2009-07-11 19:15:43 +00001
2# To compile on SunOS: add "-lsocket -lnsl" to LDFLAGS
Paul Bakker43b7e352011-01-18 15:27:19 +00003# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
Paul Bakker0049c2f2009-07-11 19:15:43 +00004
Alon Bar-Levf7a9f302015-02-18 17:55:05 +02005CFLAGS ?= -O2
6WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement -Wno-unused-function -Wno-unused-value
Alon Bar-Levada41052015-02-18 17:47:52 +02007LDFLAGS ?=
Paul Bakker0049c2f2009-07-11 19:15:43 +00008
Alon Bar-Levf7a9f302015-02-18 17:55:05 +02009LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020010LOCAL_LDFLAGS = -L../library \
Manuel Pégourié-Gonnard21e1ac22015-06-25 08:45:12 +020011 -lmbedtls$(SHARED_SUFFIX) \
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020012 -lmbedx509$(SHARED_SUFFIX) \
Manuel Pégourié-Gonnard21e1ac22015-06-25 08:45:12 +020013 -lmbedcrypto$(SHARED_SUFFIX)
Paul Bakker0049c2f2009-07-11 19:15:43 +000014
Paul Bakker674e0b02014-03-26 13:26:52 +010015ifndef SHARED
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020016DEP=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
Paul Bakker674e0b02014-03-26 13:26:52 +010017CHECK_PRELOAD=
18else
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020019DEP=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
20CHECK_PRELOAD= LD_PRELOAD=$(DEP)
Paul Bakker674e0b02014-03-26 13:26:52 +010021endif
22
Paul Bakkerc7ffd362012-04-05 12:08:29 +000023ifdef DEBUG
Alon Bar-Levf7a9f302015-02-18 17:55:05 +020024LOCAL_CFLAGS += -g3
Paul Bakkerc7ffd362012-04-05 12:08:29 +000025endif
26
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020027# if we're running on Windows, build for Windows
Paul Bakkercd5b5292012-05-10 20:49:10 +000028ifdef WINDOWS
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020029WINDOWS_BUILD=1
30endif
31
32ifdef WINDOWS_BUILD
33DLEXT=dll
34EXEXT=.exe
Alon Bar-Levada41052015-02-18 17:47:52 +020035LOCAL_LDFLAGS += -lws2_32
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020036ifdef SHARED
37SHARED_SUFFIX=.$(DLEXT)
38endif
Manuel Pégourié-Gonnard8d4a6132015-06-24 12:16:20 +020039else
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020040DLEXT=so
Manuel Pégourié-Gonnard8d4a6132015-06-24 12:16:20 +020041EXEXT=
42SHARED_SUFFIX=
Paul Bakkercd5b5292012-05-10 20:49:10 +000043endif
44
Paul Bakker2770fbd2012-07-03 13:30:23 +000045# Zlib shared library extensions:
46ifdef ZLIB
Alon Bar-Levada41052015-02-18 17:47:52 +020047LOCAL_LDFLAGS += -lz
Paul Bakker2770fbd2012-07-03 13:30:23 +000048endif
49
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020050APPS = test_suite_aes.ecb$(EXEXT) test_suite_aes.cbc$(EXEXT) \
51 test_suite_aes.cfb$(EXEXT) test_suite_aes.rest$(EXEXT) \
52 test_suite_arc4$(EXEXT) test_suite_asn1write$(EXEXT) \
53 test_suite_base64$(EXEXT) test_suite_blowfish$(EXEXT) \
54 test_suite_camellia$(EXEXT) test_suite_ccm$(EXEXT) \
55 test_suite_cipher.aes$(EXEXT) \
56 test_suite_cipher.arc4$(EXEXT) test_suite_cipher.ccm$(EXEXT) \
57 test_suite_cipher.gcm$(EXEXT) \
58 test_suite_cipher.blowfish$(EXEXT) \
59 test_suite_cipher.camellia$(EXEXT) \
60 test_suite_cipher.des$(EXEXT) test_suite_cipher.null$(EXEXT) \
61 test_suite_cipher.padding$(EXEXT) \
62 test_suite_ctr_drbg$(EXEXT) test_suite_debug$(EXEXT) \
63 test_suite_des$(EXEXT) test_suite_dhm$(EXEXT) \
64 test_suite_ecdh$(EXEXT) test_suite_ecdsa$(EXEXT) \
65 test_suite_ecp$(EXEXT) \
66 test_suite_error$(EXEXT) test_suite_entropy$(EXEXT) \
67 test_suite_gcm.aes128_de$(EXEXT) \
68 test_suite_gcm.aes192_de$(EXEXT) \
69 test_suite_gcm.aes256_de$(EXEXT) \
70 test_suite_gcm.aes128_en$(EXEXT) \
71 test_suite_gcm.aes192_en$(EXEXT) \
72 test_suite_gcm.aes256_en$(EXEXT) \
Manuel Pégourié-Gonnardec4a3392015-03-24 16:59:49 +010073 test_suite_gcm.camellia$(EXEXT) \
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020074 test_suite_hmac_drbg.misc$(EXEXT) \
75 test_suite_hmac_drbg.no_reseed$(EXEXT) \
76 test_suite_hmac_drbg.nopr$(EXEXT) \
77 test_suite_hmac_drbg.pr$(EXEXT) \
78 test_suite_md$(EXEXT) test_suite_mdx$(EXEXT) \
79 test_suite_memory_buffer_alloc$(EXEXT) \
Manuel Pégourié-Gonnardb6b16bd2015-03-11 11:20:43 +000080 test_suite_mpi$(EXEXT) \
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020081 test_suite_pem$(EXEXT) \
82 test_suite_pkcs1_v21$(EXEXT) test_suite_pkcs5$(EXEXT) \
83 test_suite_pkparse$(EXEXT) test_suite_pkwrite$(EXEXT) \
84 test_suite_pk$(EXEXT) \
85 test_suite_rsa$(EXEXT) test_suite_shax$(EXEXT) \
Manuel Pégourié-Gonnardd901d172015-02-16 18:37:53 +000086 test_suite_ssl$(EXEXT) \
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +020087 test_suite_x509parse$(EXEXT) test_suite_x509write$(EXEXT) \
88 test_suite_xtea$(EXEXT) test_suite_version$(EXEXT)
Paul Bakker0049c2f2009-07-11 19:15:43 +000089
90.SILENT:
91
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020092.PHONY: all check test clean
93
Paul Bakker0049c2f2009-07-11 19:15:43 +000094all: $(APPS)
95
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +020096$(DEP):
97 make -C ../library
98
Paul Bakker19343182013-08-16 13:31:10 +020099test_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 Bakker286bf3c2013-04-08 18:09:51 +0200100 echo " Generate $@"
101 scripts/generate_code.pl suites test_suite_aes test_suite_aes.ecb
102
Paul Bakker19343182013-08-16 13:31:10 +0200103test_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 Bakker286bf3c2013-04-08 18:09:51 +0200104 echo " Generate $@"
105 scripts/generate_code.pl suites test_suite_aes test_suite_aes.cbc
106
Paul Bakker19343182013-08-16 13:31:10 +0200107test_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 Bakker286bf3c2013-04-08 18:09:51 +0200108 echo " Generate $@"
109 scripts/generate_code.pl suites test_suite_aes test_suite_aes.cfb
110
Paul Bakker19343182013-08-16 13:31:10 +0200111test_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 Bakker286bf3c2013-04-08 18:09:51 +0200112 echo " Generate $@"
113 scripts/generate_code.pl suites test_suite_aes test_suite_aes.rest
114
Paul Bakker19343182013-08-16 13:31:10 +0200115test_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 Bakker46c17942011-07-13 14:54:54 +0000116 echo " Generate $@"
117 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.aes
118
Manuel Pégourié-Gonnard37e230c2013-08-28 13:50:42 +0200119test_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
120 echo " Generate $@"
121 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.arc4
122
Manuel Pégourié-Gonnard542eac52014-05-15 16:03:07 +0200123test_suite_cipher.ccm.c : suites/test_suite_cipher.function suites/test_suite_cipher.ccm.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
124 echo " Generate $@"
125 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.ccm
126
Manuel Pégourié-Gonnard07f8fa52013-08-30 18:34:08 +0200127test_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
128 echo " Generate $@"
129 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.gcm
130
Paul Bakker19343182013-08-16 13:31:10 +0200131test_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 Bakker6132d0a2012-07-04 17:10:40 +0000132 echo " Generate $@"
133 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.blowfish
134
Paul Bakker19343182013-08-16 13:31:10 +0200135test_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 Bakker46c17942011-07-13 14:54:54 +0000136 echo " Generate $@"
137 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.camellia
138
Paul Bakker19343182013-08-16 13:31:10 +0200139test_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 Bakker46c17942011-07-13 14:54:54 +0000140 echo " Generate $@"
141 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.des
142
Paul Bakker19343182013-08-16 13:31:10 +0200143test_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 Bakkerfab5c822012-02-06 16:45:10 +0000144 echo " Generate $@"
145 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.null
146
Paul Bakker19343182013-08-16 13:31:10 +0200147test_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é-Gonnardd5fdcaf2013-07-24 18:05:00 +0200148 echo " Generate $@"
149 scripts/generate_code.pl suites test_suite_cipher test_suite_cipher.padding
150
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200151test_suite_gcm.aes128_de.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes128_de.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker89e80c92012-03-20 13:50:09 +0000152 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200153 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes128_de
Paul Bakker89e80c92012-03-20 13:50:09 +0000154
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200155test_suite_gcm.aes192_de.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes192_de.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker89e80c92012-03-20 13:50:09 +0000156 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200157 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes192_de
Paul Bakker286bf3c2013-04-08 18:09:51 +0200158
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200159test_suite_gcm.aes256_de.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes256_de.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker286bf3c2013-04-08 18:09:51 +0200160 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200161 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes256_de
Paul Bakker286bf3c2013-04-08 18:09:51 +0200162
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200163test_suite_gcm.aes128_en.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes128_en.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker286bf3c2013-04-08 18:09:51 +0200164 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200165 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes128_en
Paul Bakker286bf3c2013-04-08 18:09:51 +0200166
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200167test_suite_gcm.aes192_en.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes192_en.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker286bf3c2013-04-08 18:09:51 +0200168 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200169 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes192_en
Paul Bakker286bf3c2013-04-08 18:09:51 +0200170
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200171test_suite_gcm.aes256_en.c : suites/test_suite_gcm.function suites/test_suite_gcm.aes256_en.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker286bf3c2013-04-08 18:09:51 +0200172 echo " Generate $@"
Manuel Pégourié-Gonnard94dd5b42013-10-24 11:57:47 +0200173 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.aes256_en
Paul Bakker89e80c92012-03-20 13:50:09 +0000174
Manuel Pégourié-Gonnard13e0d442013-10-24 12:59:00 +0200175test_suite_gcm.camellia.c : suites/test_suite_gcm.function suites/test_suite_gcm.camellia.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
176 echo " Generate $@"
177 scripts/generate_code.pl suites test_suite_gcm test_suite_gcm.camellia
Paul Bakker0049c2f2009-07-11 19:15:43 +0000178
Manuel Pégourié-Gonnard48bc3e82014-01-30 21:11:16 +0100179test_suite_hmac_drbg.misc.c : suites/test_suite_hmac_drbg.function suites/test_suite_hmac_drbg.misc.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
180 echo " Generate $@"
181 scripts/generate_code.pl suites test_suite_hmac_drbg test_suite_hmac_drbg.misc
182
Manuel Pégourié-Gonnard6801f392014-01-30 17:22:14 +0100183test_suite_hmac_drbg.no_reseed.c : suites/test_suite_hmac_drbg.function suites/test_suite_hmac_drbg.no_reseed.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
184 echo " Generate $@"
185 scripts/generate_code.pl suites test_suite_hmac_drbg test_suite_hmac_drbg.no_reseed
186
Manuel Pégourié-Gonnard24600b72014-01-31 09:54:14 +0100187test_suite_hmac_drbg.nopr.c : suites/test_suite_hmac_drbg.function suites/test_suite_hmac_drbg.nopr.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
188 echo " Generate $@"
189 scripts/generate_code.pl suites test_suite_hmac_drbg test_suite_hmac_drbg.nopr
190
Manuel Pégourié-Gonnard62273b82014-01-31 10:16:57 +0100191test_suite_hmac_drbg.pr.c : suites/test_suite_hmac_drbg.function suites/test_suite_hmac_drbg.pr.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
192 echo " Generate $@"
193 scripts/generate_code.pl suites test_suite_hmac_drbg test_suite_hmac_drbg.pr
194
Paul Bakker19343182013-08-16 13:31:10 +0200195%.c : suites/%.function suites/%.data scripts/generate_code.pl suites/helpers.function suites/main_test.function
Paul Bakker0049c2f2009-07-11 19:15:43 +0000196 echo " Generate $@"
Paul Bakker46c17942011-07-13 14:54:54 +0000197 scripts/generate_code.pl suites $* $*
Paul Bakker0049c2f2009-07-11 19:15:43 +0000198
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200199test_suite_aes.ecb$(EXEXT): test_suite_aes.ecb.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200200 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200201 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200202
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200203test_suite_aes.cbc$(EXEXT): test_suite_aes.cbc.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200204 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200205 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200206
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200207test_suite_aes.cfb$(EXEXT): test_suite_aes.cfb.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200208 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200209 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200210
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200211test_suite_aes.rest$(EXEXT): test_suite_aes.rest.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200212 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200213 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000214
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200215test_suite_arc4$(EXEXT): test_suite_arc4.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200216 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200217 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000218
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200219test_suite_asn1write$(EXEXT): test_suite_asn1write.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200220 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200221 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard36178ff2014-05-29 14:26:03 +0200222
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200223test_suite_base64$(EXEXT): test_suite_base64.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200224 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200225 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000226
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200227test_suite_blowfish$(EXEXT): test_suite_blowfish.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200228 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200229 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkera9379c02012-07-04 11:02:11 +0000230
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200231test_suite_camellia$(EXEXT): test_suite_camellia.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200232 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200233 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000234
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200235test_suite_ccm$(EXEXT): test_suite_ccm.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200236 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200237 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnarda6916fa2014-05-02 15:17:29 +0200238
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200239test_suite_cipher.aes$(EXEXT): test_suite_cipher.aes.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200240 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200241 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker46c17942011-07-13 14:54:54 +0000242
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200243test_suite_cipher.arc4$(EXEXT): test_suite_cipher.arc4.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200244 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200245 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard37e230c2013-08-28 13:50:42 +0200246
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200247test_suite_cipher.ccm$(EXEXT): test_suite_cipher.ccm.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200248 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200249 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard542eac52014-05-15 16:03:07 +0200250
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200251test_suite_cipher.gcm$(EXEXT): test_suite_cipher.gcm.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200252 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200253 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard07f8fa52013-08-30 18:34:08 +0200254
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200255test_suite_cipher.blowfish$(EXEXT): test_suite_cipher.blowfish.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200256 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200257 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker6132d0a2012-07-04 17:10:40 +0000258
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200259test_suite_cipher.camellia$(EXEXT): test_suite_cipher.camellia.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200260 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200261 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker46c17942011-07-13 14:54:54 +0000262
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200263test_suite_cipher.des$(EXEXT): test_suite_cipher.des.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200264 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200265 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0e04d0e2011-11-27 14:46:59 +0000266
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200267test_suite_cipher.null$(EXEXT): test_suite_cipher.null.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200268 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200269 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerfab5c822012-02-06 16:45:10 +0000270
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200271test_suite_cipher.padding$(EXEXT): test_suite_cipher.padding.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200272 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200273 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +0200274
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200275test_suite_ctr_drbg$(EXEXT): test_suite_ctr_drbg.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200276 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200277 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker8123e9d2011-01-06 15:37:30 +0000278
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200279test_suite_des$(EXEXT): test_suite_des.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200280 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200281 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000282
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200283test_suite_dhm$(EXEXT): test_suite_dhm.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200284 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200285 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000286
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200287test_suite_ecdh$(EXEXT): test_suite_ecdh.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200288 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200289 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100290
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200291test_suite_ecdsa$(EXEXT): test_suite_ecdsa.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200292 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200293 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerd589a0d2013-03-13 16:30:17 +0100294
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200295test_suite_ecp$(EXEXT): test_suite_ecp.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200296 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200297 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkera95919b2013-01-16 17:00:05 +0100298
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200299test_suite_entropy$(EXEXT): test_suite_entropy.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200300 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200301 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard2c25eb02014-05-30 10:38:18 +0200302
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200303test_suite_error$(EXEXT): test_suite_error.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200304 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200305 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker9d781402011-05-09 16:17:09 +0000306
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200307test_suite_gcm.aes128_de$(EXEXT): test_suite_gcm.aes128_de.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200308 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200309 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker89e80c92012-03-20 13:50:09 +0000310
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200311test_suite_gcm.aes192_de$(EXEXT): test_suite_gcm.aes192_de.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200312 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200313 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200314
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200315test_suite_gcm.aes256_de$(EXEXT): test_suite_gcm.aes256_de.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200316 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200317 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200318
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200319test_suite_gcm.aes128_en$(EXEXT): test_suite_gcm.aes128_en.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200320 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200321 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200322
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200323test_suite_gcm.aes192_en$(EXEXT): test_suite_gcm.aes192_en.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200324 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200325 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker286bf3c2013-04-08 18:09:51 +0200326
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200327test_suite_gcm.aes256_en$(EXEXT): test_suite_gcm.aes256_en.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200328 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200329 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker89e80c92012-03-20 13:50:09 +0000330
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200331test_suite_gcm.camellia$(EXEXT): test_suite_gcm.camellia.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200332 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200333 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker9dcc3222011-03-08 14:16:06 +0000334
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200335test_suite_hmac_drbg.misc$(EXEXT): test_suite_hmac_drbg.misc.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200336 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200337 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard48bc3e82014-01-30 21:11:16 +0100338
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200339test_suite_hmac_drbg.no_reseed$(EXEXT): test_suite_hmac_drbg.no_reseed.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200340 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200341 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard6801f392014-01-30 17:22:14 +0100342
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200343test_suite_hmac_drbg.nopr$(EXEXT): test_suite_hmac_drbg.nopr.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200344 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200345 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard24600b72014-01-31 09:54:14 +0100346
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200347test_suite_hmac_drbg.pr$(EXEXT): test_suite_hmac_drbg.pr.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200348 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200349 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard62273b82014-01-31 10:16:57 +0100350
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200351test_suite_md$(EXEXT): test_suite_md.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200352 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200353 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker17373852011-01-06 14:20:01 +0000354
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200355test_suite_mdx$(EXEXT): test_suite_mdx.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200356 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200357 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000358
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200359test_suite_memory_buffer_alloc$(EXEXT): test_suite_memory_buffer_alloc.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200360 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200361 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard765bb312014-11-27 11:55:27 +0100362
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200363test_suite_mpi$(EXEXT): test_suite_mpi.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200364 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200365 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000366
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200367test_suite_pbkdf2$(EXEXT): test_suite_pbkdf2.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200368 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200369 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerf518b162012-08-23 13:03:18 +0000370
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200371test_suite_pem$(EXEXT): test_suite_pem.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200372 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200373 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker16300582014-04-11 13:28:43 +0200374
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200375test_suite_pkcs1_v21$(EXEXT): test_suite_pkcs1_v21.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200376 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200377 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker9dcc3222011-03-08 14:16:06 +0000378
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200379test_suite_pkcs5$(EXEXT): test_suite_pkcs5.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200380 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200381 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerb0c19a42013-06-24 19:26:38 +0200382
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200383test_suite_pkparse$(EXEXT): test_suite_pkparse.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200384 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200385 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker1a7550a2013-09-15 13:01:22 +0200386
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200387test_suite_pkwrite$(EXEXT): test_suite_pkwrite.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200388 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200389 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakkerc7bb02b2013-09-15 14:54:56 +0200390
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200391test_suite_pk$(EXEXT): test_suite_pk.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200392 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200393 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker32925622013-10-28 17:32:48 +0100394
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200395test_suite_rsa$(EXEXT): test_suite_rsa.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200396 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200397 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000398
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200399test_suite_shax$(EXEXT): test_suite_shax.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200400 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200401 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000402
Manuel Pégourié-Gonnardd901d172015-02-16 18:37:53 +0000403test_suite_ssl$(EXEXT): test_suite_ssl.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200404 echo " CC $<"
Manuel Pégourié-Gonnard7f7aebc2015-03-13 17:15:49 +0000405 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Manuel Pégourié-Gonnard4956fd72014-09-24 11:13:44 +0200406
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200407test_suite_x509parse$(EXEXT): test_suite_x509parse.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200408 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200409 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000410
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200411test_suite_x509write$(EXEXT): test_suite_x509write.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200412 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200413 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker6d620502012-02-16 14:09:13 +0000414
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200415test_suite_xtea$(EXEXT): test_suite_xtea.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200416 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200417 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker0049c2f2009-07-11 19:15:43 +0000418
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200419test_suite_debug$(EXEXT): test_suite_debug.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200420 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200421 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker7d7f4f42010-02-18 18:26:04 +0000422
Alon Bar-Lev18ba0cc2015-02-14 01:04:58 +0200423test_suite_version$(EXEXT): test_suite_version.c $(DEP)
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200424 echo " CC $<"
Alon Bar-Levf7a9f302015-02-18 17:55:05 +0200425 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
Paul Bakker3ac1b2d2010-06-18 22:47:29 +0000426
Paul Bakker0049c2f2009-07-11 19:15:43 +0000427clean:
Paul Bakker62f88dc2012-05-10 21:26:28 +0000428ifndef WINDOWS
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200429 rm -f $(APPS)
430else
Paul Bakker62f88dc2012-05-10 21:26:28 +0000431 del /Q /F *.c *.exe
432endif
Paul Bakker0049c2f2009-07-11 19:15:43 +0000433
Paul Bakker62f88dc2012-05-10 21:26:28 +0000434ifndef WINDOWS
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200435check: $(APPS)
Paul Bakker674e0b02014-03-26 13:26:52 +0100436 echo "Running checks (Success if all tests PASSED)"
Paul Bakkerd14cd352012-05-08 15:39:50 +0000437 RETURN=0; \
Paul Bakkerd947d762009-07-28 20:16:47 +0000438 for i in $(APPS); \
439 do \
440 echo " - $${i}"; \
Paul Bakker674e0b02014-03-26 13:26:52 +0100441 RESULT=`$(CHECK_PRELOAD) ./$${i} | grep -v 'PASS$$' | grep -v -- '----' | grep -v '^$$'`; \
Rich Evansb1c846e2015-02-02 12:15:44 +0000442 PASSED=`echo $$RESULT |grep PASSED`; \
Paul Bakkerd14cd352012-05-08 15:39:50 +0000443 echo " $$RESULT"; \
Manuel Pégourié-Gonnard70b8b372015-04-02 09:51:03 +0100444 if [ "x$$PASSED" = "x" ]; \
Paul Bakkerd14cd352012-05-08 15:39:50 +0000445 then \
446 echo "**** Failed ***************"; \
447 RETURN=1; \
448 fi; \
Paul Bakkerd947d762009-07-28 20:16:47 +0000449 echo ""; \
Paul Bakkerd14cd352012-05-08 15:39:50 +0000450 done; \
451 if [ "$$RETURN" -eq 1 ]; then exit 1; fi
Manuel Pégourié-Gonnard5c59a4f2015-06-24 13:06:24 +0200452
453test: check
Paul Bakker62f88dc2012-05-10 21:26:28 +0000454endif