-ifeq (@MODULES_TRUE@,)
-
subdir-m += libcfs
-ifeq (@CRAY_PORTALS_FALSE@,)
-subdir-m += portals
-subdir-m += knals
-subdir-m += router
-subdir-m += tests
-endif # CRAY_PORTALS_FALSE
-endif # MODULES
+lnet-subdirs += lnet
+lnet-subdirs += klnds
+subdir-m += $(lnet-subdirs)
@INCLUDE_RULES@