-if LIBLUSTRE
+SUBDIRS = linux
+DIST_SUBDIRS = linux
-noinst_LIBRARIES = liblustreclass.a
-liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c uuid.c
-liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c mea.c
-liblustreclass_a_SOURCES += obdo.c obd_config.c llog_swab.c llog_obd.c #llog_ioctl.c rbtree.c
-liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) -DLUSTRE_VERSION=\"32\" -DBUILD_VERSION=\"1\"
-liblustreclass_a_CFLAGS = $(LLCFLAGS)
+if MODULES
-endif
+if LINUX
+modulefs_DATA = obdclass$(KMODEXT)
+if TESTS
+modulefs_DATA += llog_test$(KMODEXT)
+endif # TESTS
+endif # LINUX
-if MODULES
-modulefs_DATA = obdclass$(KMODEXT) confobd$(KMODEXT)
-noinst_DATA = llog_test$(KMODEXT)
endif # MODULES
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ llog-test.c
-DIST_SOURCES = $(filter-out llog-test.c,$(obdclass-objs:.o=.c)) confobd.c llog_test.c
+MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
+MOSTLYCLEANFILES += linux/*.o