# 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 += -DCRYPTO_CPU_JITTERENTROPY_DBG -DCRYPTO_CPU_JITTERENTROPY_KCAPI -DCRYPTO_CPU_JITTERENTROPY_STAT

obj-m += jitterentropy.o
jitterentropy-y := jitterentropy-base.o jitterentropy-drng.o
#ifeq ($(CRYPTO_CPU_JITTERENTROPY_DBG),y)
jitterentropy-y += jitterentropy-dbg.o
#endif
#ifeq ($(CRYPTO_CPU_JITTERENTROPY_KCAPI),y)
jitterentropy-y += jitterentropy-kcapi.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
