KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build VERSION = 0.1 cryptodev-objs = cryptodev_main.o cryptodev_cipher.o ncr.o \ ncr-data.o ncr-key.o ncr-limits.o ncr-sessions.o \ ncr-key-wrap.o ncr-key-storage.o obj-m += cryptodev.o build: make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules install: make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install @echo "Installing cryptodev.h in /usr/include/crypto ..." @install -D cryptodev.h /usr/include/crypto/cryptodev.h @install -D ncr.h /usr/include/crypto/ncr.h clean: make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean rm -f $(hostprogs) KERNEL_DIR=$(KERNEL_DIR) make -C examples clean check: KERNEL_DIR=$(KERNEL_DIR) make -C examples check FILEBASE = cryptodev-linux-$(VERSION) TMPDIR ?= /tmp OUTPUT = $(FILEBASE).tar.gz dist: clean @echo Packing @rm -f *.tar.gz @mkdir $(TMPDIR)/$(FILEBASE) @cp -ar . $(TMPDIR)/$(FILEBASE) @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE) @rm -rf $(TMPDIR)/$(FILEBASE) @echo Signing $(OUTPUT) @gpg --output $(OUTPUT).sig -sb $(OUTPUT) @gpg --verify $(OUTPUT).sig $(OUTPUT) @mv $(OUTPUT) $(OUTPUT).sig releases/