# Compile Noise Source as Linux kernel module
# Remove the compiler flags if the make file is integrated with the kernel
# build system
#ccflags-y +=-DCRYPTO_CPU_JITTERENTROPY_DBG -DCRYPTO_CPU_JITTERENTROPY_KCAPI

# This enables the readout of the collection loop counter
ccflags-y +=-D CRYPTO_CPU_JITTERENTROPY_DBG -DCRYPTO_CPU_JITTERENTROPY_KCAPI -DCRYPTO_CPU_JITTERENTROPY_STAT

obj-m += jitterentropy.o
jitterentropy-y := jitterentropy-base.o jitterentropy-drng-kernel.o
#ifeq ($(CRYPTO_CPU_JITTERENTROPY_DBG),y)
jitterentropy-y += jitterentropy-dbg-kernel.o
#endif
#ifeq ($(CRYPTO_CPU_JITTERENTROPY_KCAPI),y)
jitterentropy-y += jitterentropy-kcapi-kernel.o
#endif
#ifeq ($(CRYPTO_CPU_JITTERENTROPY_STAT),y)
jitterentropy-y += jitterentropy-stat.o
#endif


all:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
