2021-08-11 09:12:17 +08:00
|
|
|
#
|
2023-11-11 03:02:00 +08:00
|
|
|
# To run the demos when linked with a shared library (default) ensure
|
|
|
|
# that libcrypto is on the library path. For example:
|
2021-08-11 09:12:17 +08:00
|
|
|
#
|
|
|
|
# LD_LIBRARY_PATH=../.. ./rsa_encrypt
|
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
TESTS = rsa_encrypt
|
2021-08-11 09:12:17 +08:00
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
CFLAGS = -I../../include -g -Wall
|
|
|
|
LDFLAGS = -L../..
|
|
|
|
LDLIBS = -lcrypto
|
2023-03-20 13:08:38 +08:00
|
|
|
|
|
|
|
all: $(TESTS)
|
2021-08-11 09:12:17 +08:00
|
|
|
|
2023-03-14 08:33:51 +08:00
|
|
|
rsa_encrypt: rsa_encrypt.o
|
2021-08-11 09:12:17 +08:00
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
$(TESTS):
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
|
|
|
|
|
2021-08-11 09:12:17 +08:00
|
|
|
clean:
|
2023-03-20 13:08:38 +08:00
|
|
|
$(RM) *.o $(TESTS)
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: all
|
|
|
|
@echo "\nEncrypt tests:"
|
|
|
|
@set -e; for tst in $(TESTS); do \
|
|
|
|
echo "\n"$$tst; \
|
|
|
|
LD_LIBRARY_PATH=../.. ./$$tst; \
|
|
|
|
done
|