summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--examples/Makefile7
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 3e227d0..49848b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ modules.order
examples/cipher
examples/hmac
examples/ncr
+examples/ncr_lib
examples/pk
examples/speed
releases
diff --git a/examples/Makefile b/examples/Makefile
index 749a4b8..56b92b2 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,7 +1,8 @@
CC = gcc
CFLAGS = -Wall -g -O2
+USERSPACE_LDFLAGS = -L../userspace -lcryptodev
-progs := cipher hmac ncr pk speed
+progs := cipher hmac ncr ncr_lib pk speed
all: $(progs)
@@ -17,11 +18,15 @@ hmac: hmac.c
ncr: ncr.c
$(CC) $(CFLAGS) $< -o $@
+ncr_lib: ncr_lib.c
+ $(CC) $(CFLAGS) $< $(USERSPACE_LDFLAGS) -o $@
+
pk: pk.c
$(CC) $(CFLAGS) $< -o $@ -L/usr/local/lib -lgnutls
check: $(progs)
./ncr
+ LD_LIBRARY_PATH=../userspace ./ncr_lib
./pk
./cipher
./hmac