summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-02-20 10:54:35 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-02-20 10:54:35 +0100
commit2194982a6602203f7aae3c1bc4dccfa469c34e1a (patch)
treea977da561a16d1efafb2a72c1a0203e9b0f3a6b7
parentcceea9e9eacfa8d165d4ad11900f061ac6401a11 (diff)
downloadcryptodev-linux-2194982a6602203f7aae3c1bc4dccfa469c34e1a.tar.gz
cryptodev-linux-2194982a6602203f7aae3c1bc4dccfa469c34e1a.tar.xz
cryptodev-linux-2194982a6602203f7aae3c1bc4dccfa469c34e1a.zip
Examples were moved to examples/ directory.
-rw-r--r--.gitignore2
-rw-r--r--Makefile11
-rw-r--r--examples/Makefile9
-rw-r--r--examples/cipher.c (renamed from example-cipher.c)0
-rw-r--r--examples/hmac.c (renamed from example-hmac.c)0
5 files changed, 14 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 103bb25..3621fff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ Module.symvers
*.o
*.mod.c
modules.order
+examples/cipher
+examples/hmac
diff --git a/Makefile b/Makefile
index 5a8eb2b..faab5f7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-KERNEL_DIR := /lib/modules/$(shell uname -r)/build
+KERNEL_DIR = /lib/modules/$(shell uname -r)/build
cryptodev-objs = cryptodev_main.o cryptodev_cipher.o
@@ -16,10 +16,5 @@ clean:
make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
rm -f $(hostprogs)
-hostprogs := example-cipher example-hmac
-example-cipher-objs := example-cipher.o
-example-hmac-objs := example-hmac.o
-
-check: $(hostprogs)
- ./example-cipher
- ./example-hmac
+check:
+ KERNEL_DIR=$(KERNEL_DIR) make -C examples check
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..eb50a5f
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,9 @@
+KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
+
+hostprogs := cipher hmac
+example-cipher-objs := cipher.o
+example-hmac-objs := hmac.o
+
+check: $(hostprogs)
+ ./cipher
+ ./hmac
diff --git a/example-cipher.c b/examples/cipher.c
index d7982ae..d7982ae 100644
--- a/example-cipher.c
+++ b/examples/cipher.c
diff --git a/example-hmac.c b/examples/hmac.c
index e652c1e..e652c1e 100644
--- a/example-hmac.c
+++ b/examples/hmac.c