1 | #
|
---|
2 | # To run the demos when linked with a shared library (default) ensure that
|
---|
3 | # libcrypto is on the library path. For example:
|
---|
4 | #
|
---|
5 | # LD_LIBRARY_PATH=../.. ./aesccm
|
---|
6 |
|
---|
7 | TESTS = aesccm \
|
---|
8 | aesgcm \
|
---|
9 | aeskeywrap \
|
---|
10 | ariacbc
|
---|
11 |
|
---|
12 | CFLAGS = -I../../include -g -Wall
|
---|
13 | LDFLAGS = -L../..
|
---|
14 | LDLIBS = -lcrypto
|
---|
15 |
|
---|
16 | all: $(TESTS)
|
---|
17 |
|
---|
18 | aesccm: aesccm.o
|
---|
19 | aesgcm: aesgcm.o
|
---|
20 | aeskeywrap: aeskeywrap.o
|
---|
21 | ariacbc: ariacbc.o
|
---|
22 |
|
---|
23 | $(TESTS):
|
---|
24 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
|
---|
25 |
|
---|
26 | clean:
|
---|
27 | $(RM) $(TESTS) *.o
|
---|
28 |
|
---|
29 | .PHONY: test
|
---|
30 | test: all
|
---|
31 | @echo "\nCipher tests:"
|
---|
32 | @set -e; for tst in $(TESTS); do \
|
---|
33 | echo "\n"$$tst; \
|
---|
34 | LD_LIBRARY_PATH=../.. ./$$tst; \
|
---|
35 | done
|
---|