summaryrefslogtreecommitdiffstats
path: root/examples/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile29
1 files changed, 21 insertions, 8 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 3190c4a..9dce9b7 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,14 +1,27 @@
-KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
+CC = gcc
+CFLAGS = -Wall -g -O2
-hostprogs := cipher hmac new
-example-cipher-objs := cipher.o
-example-hmac-objs := hmac.o
-new-objs := new.o
+progs := cipher hmac ncr pk
-check: $(hostprogs)
- ./new
+all: $(progs)
+
+cipher: cipher.c
+ $(CC) $(CFLAGS) $< -o $@
+
+hmac: hmac.c
+ $(CC) $(CFLAGS) $< -o $@
+
+ncr: ncr.c
+ $(CC) $(CFLAGS) $< -o $@
+
+pk: pk.c
+ $(CC) $(CFLAGS) $< -o $@ -L/usr/local/lib -lgnutls
+
+check: $(progs)
+ ./ncr
+ ./pk
./cipher
./hmac
clean:
- rm -f *.o *~ hmac cipher new
+ rm -f *.o *~ hmac cipher ncr pk