Added support SHA224
[cryptodev-linux.git] / Makefile
blob40d784a411e70beeaa1d96cc41493cc259ffcdf5
1 KBUILD_CFLAGS += -I$(src)
2 KERNEL_DIR = /lib/modules/$(shell uname -r)/build
3 VERSION = 1.6
4 PREFIX =
6 cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o
8 obj-m += cryptodev.o
10 build: version.h
11 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules
13 version.h: Makefile
14 @echo "#define VERSION \"$(VERSION)\"" > version.h
16 install: modules_install
18 modules_install:
19 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
20 @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
21 @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
23 clean:
24 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
25 rm -f $(hostprogs) *~
26 KERNEL_DIR=$(KERNEL_DIR) make -C tests clean
28 check:
29 KERNEL_DIR=$(KERNEL_DIR) make -C tests check
31 FILEBASE = cryptodev-linux-$(VERSION)
32 TMPDIR ?= /tmp
33 OUTPUT = $(FILEBASE).tar.gz
35 dist: clean
36 @echo Packing
37 @rm -f *.tar.gz
38 @mkdir $(TMPDIR)/$(FILEBASE)
39 @cp -ar crypto extras tests examples Makefile *.c *.h README NEWS \
40 AUTHORS COPYING $(TMPDIR)/$(FILEBASE)
41 @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts
42 @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE)
43 @rm -rf $(TMPDIR)/$(FILEBASE)
44 @echo Signing $(OUTPUT)
45 @gpg --output $(OUTPUT).sig -sb $(OUTPUT)
46 @gpg --verify $(OUTPUT).sig $(OUTPUT)
47 @mv $(OUTPUT) $(OUTPUT).sig releases/