At least in Fedora there is no /proc/config.gz but instead
/lib/modules/`uname -r`/config, so use that as a fallback.
Signed-off-by: Phil Sutter <phil@nwl.cc>
ifneq (,$(wildcard /proc/config.gz))
KENV := $(shell cat /proc/config.gz | gunzip | grep ^CONFIG)
+else
+KVER := $(shell uname -r)
+KCPATH := /lib/modules/${KVER}/config
+ifneq (,$(wildcard ${KCPATH}))
+ KENV := $(shell cat ${KCPATH} | grep ^CONFIG)
+endif
endif
.PHONY: compile listtests alltests configure $(TESTS)