summaryrefslogtreecommitdiffstats
path: root/examples/Makefile
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-23 20:28:32 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-23 20:28:32 +0200
commitb3fcd1e159bf7bd5b318d4558198fca090deb2fe (patch)
treed1821ce0be2ede05bc3417bcba2ace0e2002e250 /examples/Makefile
parentc3eeccf6491c632037dfef737f3e40ed24e5bf72 (diff)
parenta3fe06856efe0a7b4ad713ff73a14f6af995d07e (diff)
downloadcryptodev-linux-integration.tar.gz
cryptodev-linux-integration.tar.xz
cryptodev-linux-integration.zip
Merge branch 'userspace' into integrationintegration
Conflicts: examples/Makefile
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/examples/Makefile b/examples/Makefile
index d149088..69c1f5c 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,7 +1,9 @@
CC = gcc
-CFLAGS = -Wall -g -O2
+CFLAGS = -Wall -g -O2 -I../userspace
+GNUTLS_LDFLAGS = -L/usr/local/lib -lgnutls
+USERSPACE_LDFLAGS = -L../userspace -lcryptodev
-progs := ncr pk speed
+progs := ncr ncr_lib pk pk_lib speed
all: $(progs)
@@ -11,13 +13,21 @@ speed: speed.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
+ $(CC) $(CFLAGS) $< -o $@ $(GNUTLS_LDFLAGS)
+
+pk_lib: pk_lib.c
+ $(CC) $(CFLAGS) $< $(GNUTLS_LDFLAGS) $(USERSPACE_LDFLAGS) -o $@
check: $(progs)
./ncr
+ LD_LIBRARY_PATH=../userspace ./ncr_lib
./pk
+ LD_LIBRARY_PATH=../userspace ./pk_lib
./speed
clean:
- rm -f *.o *~ ncr pk speed
+ rm -f *.o *~ $(progs) \ No newline at end of file