Index: head/sys/modules/linprocfs/Makefile =================================================================== --- head/sys/modules/linprocfs/Makefile +++ head/sys/modules/linprocfs/Makefile @@ -7,4 +7,8 @@ device_if.h bus_if.h \ linprocfs.c +.if !defined(KERNBUILDDIR) +.warning Building Linuxulator outside of a kernel does not make sense +.endif + .include Index: head/sys/modules/linsysfs/Makefile =================================================================== --- head/sys/modules/linsysfs/Makefile +++ head/sys/modules/linsysfs/Makefile @@ -7,4 +7,8 @@ device_if.h bus_if.h pci_if.h \ linsysfs.c +.if !defined(KERNBUILDDIR) +.warning Building Linuxulator outside of a kernel does not make sense +.endif + .include Index: head/sys/modules/linux/Makefile =================================================================== --- head/sys/modules/linux/Makefile +++ head/sys/modules/linux/Makefile @@ -80,4 +80,8 @@ linux${SFX}_genassym.o: offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} +.if !defined(KERNBUILDDIR) +.warning Building Linuxulator outside of a kernel does not make sense +.endif + .include Index: head/sys/modules/linux64/Makefile =================================================================== --- head/sys/modules/linux64/Makefile +++ head/sys/modules/linux64/Makefile @@ -55,4 +55,8 @@ linux_genassym.o: offset.inc ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} +.if !defined(KERNBUILDDIR) +.warning Building Linuxulator outside of a kernel does not make sense +.endif + .include Index: head/sys/modules/linux_common/Makefile =================================================================== --- head/sys/modules/linux_common/Makefile +++ head/sys/modules/linux_common/Makefile @@ -15,4 +15,8 @@ EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease +.if !defined(KERNBUILDDIR) +.warning Building Linuxulator outside of a kernel does not make sense +.endif + .include