+ # extract version number (hex, aXXYY). Newer linuxes have a different dir
+ # if not set, use the version from the installed system
+ KERNELPATH ?= $(KSRC)
+ LIN_VER := $(shell V=linux/version.h; G=. ; \
+ [ -f $(KERNELPATH)/include/$${V} ] || G=generated/uapi ;\
+ grep LINUX_VERSION_CODE $(KERNELPATH)/include/$${G}/linux/version.h | \
+ awk '{printf "%03x%02x", $$3/256, $$3%256} ')
+
+ # awk '{printf "%d %03x%02d", $$3, $$3/256, $$3%256} ')
+ # $(warning version $(LINUX_VERSION_CODE))
+ $(warning ------------- linux 2.6 and newer $(LIN_VER) ------------)