properly init sg in empty case
[cryptodev-linux.git] / Makefile
blobbca19ad000de12c029a1b6efa6ead74e8ccfc0a2
1 KBUILD_CFLAGS += -I$(src)
2 KERNEL_DIR = /lib/modules/$(shell uname -r)/build
3 VERSION = 1.4
5 cryptodev-objs = ioctl.o main.o cryptlib.o authenc.o zc.o util.o
7 obj-m += cryptodev.o
9 build: version.h
10 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules
12 version.h: Makefile
13 @echo "#define VERSION \"$(VERSION)\"" > version.h
15 install:
16 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
17 @echo "Installing cryptodev.h in /usr/include/crypto ..."
18 @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h
20 clean:
21 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
22 rm -f $(hostprogs) *~
23 KERNEL_DIR=$(KERNEL_DIR) make -C tests clean
25 check:
26 KERNEL_DIR=$(KERNEL_DIR) make -C tests check
28 FILEBASE = cryptodev-linux-$(VERSION)
29 TMPDIR ?= /tmp
30 OUTPUT = $(FILEBASE).tar.gz
32 dist: clean
33 @echo Packing
34 @rm -f *.tar.gz
35 @mkdir $(TMPDIR)/$(FILEBASE)
36 @cp -ar crypto extras tests examples Makefile *.c *.h README NEWS \
37 AUTHORS COPYING $(TMPDIR)/$(FILEBASE)
38 @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts
39 @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE)
40 @rm -rf $(TMPDIR)/$(FILEBASE)
41 @echo Signing $(OUTPUT)
42 @gpg --output $(OUTPUT).sig -sb $(OUTPUT)
43 @gpg --verify $(OUTPUT).sig $(OUTPUT)
44 @mv $(OUTPUT) $(OUTPUT).sig releases/