xref: /freebsd/crypto/openssl/demos/mac/Makefile (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1*e0c4386eSCy Schubert# Quick instruction:
2*e0c4386eSCy Schubert# To build against an OpenSSL built in the source tree, do this:
3*e0c4386eSCy Schubert#
4*e0c4386eSCy Schubert#    make OPENSSL_INCS_LOCATION=-I../../include OPENSSL_LIBS_LOCATION=-L../..
5*e0c4386eSCy Schubert#
6*e0c4386eSCy Schubert# To run the demos when linked with a shared library (default):
7*e0c4386eSCy Schubert#
8*e0c4386eSCy Schubert#    LD_LIBRARY_PATH=../.. ./gmac
9*e0c4386eSCy Schubert#    LD_LIBRARY_PATH=../.. ./poly1305
10*e0c4386eSCy Schubert
11*e0c4386eSCy SchubertCFLAGS = $(OPENSSL_INCS_LOCATION) -Wall
12*e0c4386eSCy SchubertLDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
13*e0c4386eSCy Schubert
14*e0c4386eSCy Schubertall: gmac hmac-sha512 cmac-aes256 poly1305
15*e0c4386eSCy Schubert
16*e0c4386eSCy Schubertgmac: gmac.o
17*e0c4386eSCy Schuberthmac-sha512: hmac-sha512.o
18*e0c4386eSCy Schubertcmac-aes256: cmac-aes256.o
19*e0c4386eSCy Schubertpoly1305: poly1305.o
20*e0c4386eSCy Schubert
21*e0c4386eSCy Schubertgmac hmac-sha512 cmac-aes256 poly1305:
22*e0c4386eSCy Schubert	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
23*e0c4386eSCy Schubert
24*e0c4386eSCy Schubertclean:
25*e0c4386eSCy Schubert	$(RM) gmac hmac-sha512 cmac-aes256 poly1305 *.o
26