added credits for zero copy
[cryptodev-linux.git] / Makefile
blob1bf9e9ec5fcc12abfa646622877c5f28892f86fc
1 KERNEL_DIR = /lib/modules/$(shell uname -r)/build
2 VERSION = 0.3
4 cryptodev-objs = cryptodev_main.o cryptodev_cipher.o
6 obj-m += cryptodev.o
8 build:
9 @echo "#define VERSION \"$(VERSION)\"" > version.h
10 make -C $(KERNEL_DIR) VERSION="$VERSION" SUBDIRS=`pwd` modules
12 install:
13 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
14 @echo "Installing cryptodev.h in /usr/include/crypto ..."
15 @install -D cryptodev.h /usr/include/crypto/cryptodev.h
17 clean:
18 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
19 rm -f $(hostprogs) *~
20 KERNEL_DIR=$(KERNEL_DIR) make -C examples clean
22 check:
23 KERNEL_DIR=$(KERNEL_DIR) make -C examples check
25 FILEBASE = cryptodev-linux-$(VERSION)
26 TMPDIR ?= /tmp
27 OUTPUT = $(FILEBASE).tar.gz
29 dist: clean
30 @echo Packing
31 @rm -f *.tar.gz
32 @mkdir $(TMPDIR)/$(FILEBASE)
33 @cp -ar . $(TMPDIR)/$(FILEBASE)
34 @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts
35 @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE)
36 @rm -rf $(TMPDIR)/$(FILEBASE)
37 @echo Signing $(OUTPUT)
38 @gpg --output $(OUTPUT).sig -sb $(OUTPUT)
39 @gpg --verify $(OUTPUT).sig $(OUTPUT)
40 @mv $(OUTPUT) $(OUTPUT).sig releases/