xref: /freebsd/crypto/openssl/demos/cipher/Makefile (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1# Quick instruction:
2# To build against an OpenSSL built in the source tree, do this:
3#
4#    make OPENSSL_INCS_LOCATION=-I../../include OPENSSL_LIBS_LOCATION=-L../..
5#
6# To run the demos when linked with a shared library (default):
7#
8#    LD_LIBRARY_PATH=../.. ./aesccm
9#    LD_LIBRARY_PATH=../.. ./aesgcm
10#    LD_LIBRARY_PATH=../.. ./aeskeywrap
11#    LD_LIBRARY_PATH=../.. ./ariacbc
12
13CFLAGS = $(OPENSSL_INCS_LOCATION)
14LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
15
16all: aesccm aesgcm aeskeywrap ariacbc
17
18aesccm: aesccm.o
19aesgcm: aesgcm.o
20aeskeywrap: aeskeywrap.o
21ariacbc: ariacbc.o
22
23aesccm aesgcm aeskeywrap ariacbc:
24	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
25
26clean:
27	$(RM) aesccm aesgcm aeskeywrap ariacbc *.o
28