Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Yu Zongchun <b40527@freescale.com> |
| 3 | Date: Sun, 28 Apr 2013 14:39:22 +0800 |
| 4 | Subject: [PATCH] Add the compile and install rules for cryptodev tests folder |
| 5 | |
| 6 | This is required to install the cryptodev tests folder to rootfs |
| 7 | |
| 8 | Signed-off-by: Yu Zongchun <b40527@freescale.com> |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | --- |
| 13 | Makefile | 6 ++++++ |
| 14 | tests/Makefile | 8 ++++++++ |
| 15 | 2 files changed, 14 insertions(+), 0 deletions(-) |
| 16 | |
| 17 | diff --git a/Makefile b/Makefile |
| 18 | index 31c4b3f..2ecf2a9 100644 |
| 19 | --- a/Makefile |
| 20 | +++ b/Makefile |
| 21 | @@ -34,6 +34,9 @@ modules_install: |
| 22 | @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." |
| 23 | @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h |
| 24 | |
| 25 | +install_tests: |
| 26 | + make -C tests install DESTDIR=$(PREFIX) |
| 27 | + |
| 28 | clean: |
| 29 | make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean |
| 30 | rm -f $(hostprogs) *~ |
| 31 | @@ -42,6 +45,9 @@ clean: |
| 32 | check: |
| 33 | CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check |
| 34 | |
| 35 | +testprogs: |
| 36 | + KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs |
| 37 | + |
| 38 | CPOPTS = |
| 39 | ifneq (${SHOW_TYPES},) |
| 40 | CPOPTS += --show-types |
| 41 | diff --git a/tests/Makefile b/tests/Makefile |
| 42 | index c9f04e8..cd202af 100644 |
| 43 | --- a/tests/Makefile |
| 44 | +++ b/tests/Makefile |
| 45 | @@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o |
| 46 | example-async-speed-objs := async_speed.o |
| 47 | example-hashcrypt-speed-objs := hashcrypt_speed.c |
| 48 | |
| 49 | +install: |
| 50 | + install -d $(DESTDIR)/usr/bin/tests_cryptodev |
| 51 | + for bin in $(hostprogs); do \ |
| 52 | + install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ |
| 53 | + done |
| 54 | + |
| 55 | check: $(hostprogs) |
| 56 | ./cipher |
| 57 | ./hmac |
| 58 | @@ -28,6 +34,8 @@ check: $(hostprogs) |
| 59 | ./cipher-gcm |
| 60 | ./cipher-aead |
| 61 | |
| 62 | +testprogs: $(hostprogs) |
| 63 | + |
| 64 | clean: |
| 65 | rm -f *.o *~ $(hostprogs) |
| 66 | |