add support for CRYPTO_AES_ECB
[cryptodev-linux.git] / Makefile
blobd5bb6496ca8eeb6f85ddb082f84b6d1e2e678bbc
1 KERNEL_DIR = /lib/modules/$(shell uname -r)/build
2 VERSION = 0.8
4 cryptodev-objs = cryptodev_main.o cryptodev_cipher.o
6 obj-m += cryptodev.o
8 build: version.h
9 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules
11 version.h: Makefile
12 @echo "#define VERSION \"$(VERSION)\"" > version.h
14 install:
15 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
16 @echo "Installing cryptodev.h in /usr/include/crypto ..."
17 @install -D cryptodev.h /usr/include/crypto/cryptodev.h
19 clean:
20 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
21 rm -f $(hostprogs) *~
22 KERNEL_DIR=$(KERNEL_DIR) make -C examples clean
24 check:
25 KERNEL_DIR=$(KERNEL_DIR) make -C examples check
27 FILEBASE = cryptodev-linux-$(VERSION)
28 TMPDIR ?= /tmp
29 OUTPUT = $(FILEBASE).tar.gz
31 dist: clean
32 @echo Packing
33 @rm -f *.tar.gz
34 @mkdir $(TMPDIR)/$(FILEBASE)
35 @cp -ar extras examples Makefile *.c *.h README NEWS \
36 AUTHORS COPYING $(TMPDIR)/$(FILEBASE)
37 @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts
38 @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE)
39 @rm -rf $(TMPDIR)/$(FILEBASE)
40 @echo Signing $(OUTPUT)
41 @gpg --output $(OUTPUT).sig -sb $(OUTPUT)
42 @gpg --verify $(OUTPUT).sig $(OUTPUT)
43 @mv $(OUTPUT) $(OUTPUT).sig releases/