-SUBDIRS := linux
-if DARWIN
-SUBDIRS += darwin
+SUBDIRS = linux util
+DIST_SUBDIRS = linux util
+
+libcfsdir = $(includedir)/libcfs
+
+if UTILS
+libcfs_HEADERS = types.h
endif
-DIST_SUBDIRS := $(SUBDIRS)
-EXTRA_DIST := curproc.h kp30.h libcfs.h list.h lltrace.h \
- portals_utils.h types.h user-lock.h user-prim.h user-time.h \
- user-tcpip.h user-bitops.h bitmap.h
+EXTRA_DIST = \
+ bitmap.h \
+ byteorder.h \
+ curproc.h \
+ err.h \
+ libcfs.h \
+ libcfs_cpu.h \
+ libcfs_crypto.h \
+ libcfs_debug.h \
+ libcfs_fail.h \
+ libcfs_hash.h \
+ libcfs_heap.h \
+ libcfs_ioctl.h \
+ libcfs_kernelcomm.h \
+ libcfs_prim.h \
+ libcfs_private.h \
+ libcfs_string.h \
+ libcfs_time.h \
+ libcfs_workitem.h \
+ libcfsutil.h \
+ list.h \
+ lucache.h \
+ params_tree.h \
+ types.h \
+ user-bitops.h \
+ user-crypto.h \
+ user-lock.h \
+ user-mem.h \
+ user-prim.h \
+ user-tcpip.h \
+ user-time.h