xref: /freebsd/crypto/openssl/demos/cipher/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=../.. ./aesccm
9*e0c4386eSCy Schubert#    LD_LIBRARY_PATH=../.. ./aesgcm
10*e0c4386eSCy Schubert#    LD_LIBRARY_PATH=../.. ./aeskeywrap
11*e0c4386eSCy Schubert#    LD_LIBRARY_PATH=../.. ./ariacbc
12*e0c4386eSCy Schubert
13*e0c4386eSCy SchubertCFLAGS = $(OPENSSL_INCS_LOCATION)
14*e0c4386eSCy SchubertLDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
15*e0c4386eSCy Schubert
16*e0c4386eSCy Schubertall: aesccm aesgcm aeskeywrap ariacbc
17*e0c4386eSCy Schubert
18*e0c4386eSCy Schubertaesccm: aesccm.o
19*e0c4386eSCy Schubertaesgcm: aesgcm.o
20*e0c4386eSCy Schubertaeskeywrap: aeskeywrap.o
21*e0c4386eSCy Schubertariacbc: ariacbc.o
22*e0c4386eSCy Schubert
23*e0c4386eSCy Schubertaesccm aesgcm aeskeywrap ariacbc:
24*e0c4386eSCy Schubert	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
25*e0c4386eSCy Schubert
26*e0c4386eSCy Schubertclean:
27*e0c4386eSCy Schubert	$(RM) aesccm aesgcm aeskeywrap ariacbc *.o
28