xref: /freebsd/crypto/openssl/demos/mac/Makefile (revision 95eb4b873b6a8b527c5bd78d7191975dfca38998)
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=../.. ./gmac
9#    LD_LIBRARY_PATH=../.. ./poly1305
10
11CFLAGS = $(OPENSSL_INCS_LOCATION) -Wall
12LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
13
14all: gmac hmac-sha512 cmac-aes256 poly1305
15
16gmac: gmac.o
17hmac-sha512: hmac-sha512.o
18cmac-aes256: cmac-aes256.o
19poly1305: poly1305.o
20
21gmac hmac-sha512 cmac-aes256 poly1305:
22	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
23
24clean:
25	$(RM) gmac hmac-sha512 cmac-aes256 poly1305 *.o
26