]> git.ipfire.org Git - thirdparty/hostap.git/blame - tests/Makefile
Add SAE and FT-SAE key_mgmt to hostapd GET_CONFIG
[thirdparty/hostap.git] / tests / Makefile
CommitLineData
0d7773b6 1TESTS=test-base64 test-md4 test-md5 test-milenage test-ms_funcs \
bdb112d3 2 test-bitfield \
0d7773b6
JM
3 test-printf \
4 test-sha1 \
f551fa8d 5 test-sha256 test-aes test-asn1 test-x509 test-x509v3 test-list test-rc4
1801bd7f
JM
6
7all: $(TESTS)
8
9ifndef CC
10CC=gcc
11endif
12
13ifndef LDO
14LDO=$(CC)
15endif
16
17ifndef CFLAGS
18CFLAGS = -MMD -O2 -Wall -g
19endif
20
21CFLAGS += -I../src
953f8343 22CFLAGS += -I../src/utils
1801bd7f 23
0bc377fa
JM
24SLIBS = ../src/utils/libutils.a
25
26DLIBS = ../src/crypto/libcrypto.a \
ab7ddc74 27 ../src/tls/libtls.a
1801bd7f 28
0bc377fa
JM
29LIBS = $(SLIBS) $(DLIBS)
30LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS)
31
6be79541
JM
32# glibc < 2.17 needs -lrt for clock_gettime()
33LLIBS += -lrt
34
6a230ba2
JM
35../src/utils/libutils.a:
36 $(MAKE) -C ../src/utils
953f8343 37
631afd99
JM
38../src/crypto/libcrypto.a:
39 $(MAKE) -C ../src/crypto
40
ab7ddc74
JM
41../src/tls/libtls.a:
42 $(MAKE) -C ../src/tls
43
1801bd7f 44
f8cf3ce6 45test-aes: test-aes.o $(LIBS)
c2372d7c 46 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f8cf3ce6 47
ab7ddc74 48test-asn1: test-asn1.o $(LIBS)
6be79541 49 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
ab7ddc74 50
c7ab5122 51test-base64: test-base64.o $(LIBS)
6be79541 52 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
1801bd7f 53
bdb112d3 54test-bitfield: test-bitfield.o $(LIBS)
6be79541 55 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
bdb112d3 56
d10b1398
JM
57test-https: test-https.o $(LIBS)
58 $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
59
dacf4783 60test-list: test-list.o $(LIBS)
6be79541 61 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
dacf4783 62
668562d5 63test-md4: test-md4.o $(LIBS)
6be79541 64 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
953f8343 65
f8cf3ce6 66test-md5: test-md5.o $(LIBS)
6be79541 67 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f8cf3ce6 68
c7ab5122 69test-milenage: test-milenage.o $(LIBS)
6be79541 70 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
953f8343 71
f8cf3ce6 72test-ms_funcs: test-ms_funcs.o $(LIBS)
6be79541 73 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f8cf3ce6 74
0d7773b6 75test-printf: test-printf.o $(LIBS)
6be79541 76 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
0d7773b6 77
f551fa8d 78test-rc4: test-rc4.o $(LIBS)
6be79541 79 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f551fa8d 80
f8cf3ce6 81test-sha1: test-sha1.o $(LIBS)
6be79541 82 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f8cf3ce6
JM
83
84test-sha256: test-sha256.o $(LIBS)
6be79541 85 $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
f8cf3ce6 86
ab7ddc74 87test-x509: test-x509.o $(LIBS)
0bc377fa 88 $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
ab7ddc74 89
655702f3
JM
90test-x509v3: test-x509v3.o $(LIBS)
91 $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
92
953f8343
JM
93
94run-tests: $(TESTS)
f8cf3ce6 95 ./test-aes
bdb112d3 96 ./test-bitfield
dacf4783 97 ./test-list
668562d5 98 ./test-md4
f8cf3ce6 99 ./test-md5
953f8343 100 ./test-milenage
0d7773b6 101 ./test-printf
f8cf3ce6
JM
102 ./test-sha1
103 ./test-sha256
104 @echo
105 @echo All tests completed successfully.
953f8343 106
1801bd7f
JM
107clean:
108 $(MAKE) -C ../src clean
8ad733d5 109 rm -f $(TESTS) *~ *.o *.d
b87346c4 110 rm -f test-https
655702f3
JM
111 rm -f test_x509v3_nist.out.*
112 rm -f test_x509v3_nist2.out.*
8ad733d5
JM
113
114-include $(OBJS:%.o=%.d)