xref: /openssl/demos/pkey/Makefile (revision 86db9588)
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=../.. ./EVP_PKEY_EC_keygen
6
7TESTS = EVP_PKEY_EC_keygen \
8        EVP_PKEY_RSA_keygen \
9        EVP_PKEY_DSA_keygen \
10        EVP_PKEY_DSA_paramgen \
11        EVP_PKEY_DSA_paramvalidate \
12        EVP_PKEY_DSA_paramfromdata
13
14CFLAGS  = -I../../include -g -Wall
15LDFLAGS = -L../..
16LDLIBS  = -lcrypto
17
18all: $(TESTS)
19
20EVP_PKEY_DSA_keygen.o: EVP_PKEY_DSA_keygen.c dsa.inc
21EVP_PKEY_DSA_paramgen.o: EVP_PKEY_DSA_paramgen.c dsa.inc
22EVP_PKEY_DSA_paramvalidate.o: EVP_PKEY_DSA_paramvalidate.c dsa.inc
23EVP_PKEY_DSA_paramfromdata.o: EVP_PKEY_DSA_paramfromdata.c dsa.inc
24
25EVP_PKEY_EC_keygen: EVP_PKEY_EC_keygen.o
26EVP_PKEY_RSA_keygen: EVP_PKEY_RSA_keygen.o
27EVP_PKEY_DSA_keygen: EVP_PKEY_DSA_keygen.o
28EVP_PKEY_DSA_paramgen: EVP_PKEY_DSA_paramgen.o
29EVP_PKEY_DSA_paramvalidate: EVP_PKEY_DSA_paramvalidate.o
30EVP_PKEY_DSA_paramfromdata: EVP_PKEY_DSA_paramfromdata.o
31
32$(TESTS):
33	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
34
35clean:
36	$(RM) *.o $(TESTS)
37
38.PHONY: test
39test: all
40	@echo "\nPKEY tests:"
41	@set -e; for tst in $(TESTS); do \
42		echo "\n"$$tst; \
43		LD_LIBRARY_PATH=../.. ./$$tst; \
44	done
45