mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
66f4782f14
Adds a Makefile with all, clean, and test targets. This has only been added for demos that already contain Makefiles. For problematic tests that require inputs, the test target does nothing. (Note: Demos should be self contained and not require unknown external inputs. This PR does not attempt to fix this.) Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20546)
36 lines
794 B
Makefile
36 lines
794 B
Makefile
# Quick instruction:
|
|
# To build against an OpenSSL built in the source tree, do this:
|
|
#
|
|
# make OPENSSL_INCS_LOCATION=-I../../include OPENSSL_LIBS_LOCATION=-L../..
|
|
#
|
|
# To run the demos when linked with a shared library (default):
|
|
#
|
|
# LD_LIBRARY_PATH=../.. ./gmac
|
|
# LD_LIBRARY_PATH=../.. ./poly1305
|
|
|
|
CFLAGS = $(OPENSSL_INCS_LOCATION) -Wall
|
|
LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
|
|
|
|
TESTS=gmac hmac-sha512 cmac-aes256 poly1305
|
|
|
|
all: $(TESTS)
|
|
|
|
gmac: gmac.o
|
|
hmac-sha512: hmac-sha512.o
|
|
cmac-aes256: cmac-aes256.o
|
|
poly1305: poly1305.o
|
|
|
|
gmac hmac-sha512 cmac-aes256 poly1305:
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
|
|
|
clean:
|
|
$(RM) *.o $(TESTS)
|
|
|
|
.PHONY: test
|
|
test: all
|
|
@echo "\nMAC tests:"
|
|
@set -e; for tst in $(TESTS); do \
|
|
echo "\n"$$tst; \
|
|
LD_LIBRARY_PATH=../.. ./$$tst; \
|
|
done
|