--- /dev/null
+# There are no libmds_types so use the full mds library for dencoder for now
+DENCODER_SOURCES += $(LIBMDS_SOURCES)
+
+DENCODER_DEPS += $(LIBMDS_DEPS)
--- /dev/null
+if WITH_MDS
+
+libmds_la_SOURCES = $(LIBMDS_SOURCES)
+libmds_la_LIBADD = $(LIBMDS_DEPS)
+noinst_LTLIBRARIES += libmds.la
+
+noinst_HEADERS += \
+ mds/inode_backtrace.h \
+ mds/flock.h \
+ mds/locks.c \
+ mds/locks.h \
+ mds/CDentry.h \
+ mds/CDir.h \
+ mds/CInode.h \
+ mds/Capability.h \
+ mds/InoTable.h \
+ mds/JournalPointer.h \
+ mds/LocalLock.h \
+ mds/Locker.h \
+ mds/LogEvent.h \
+ mds/LogSegment.h \
+ mds/MDBalancer.h \
+ mds/MDCache.h \
+ mds/RecoveryQueue.h \
+ mds/StrayManager.h \
+ mds/MDLog.h \
+ mds/MDS.h \
+ mds/Beacon.h \
+ mds/MDSContext.h \
+ mds/MDSAuthCaps.h \
+ mds/MDSMap.h \
+ mds/MDSTable.h \
+ mds/MDSTableServer.h \
+ mds/MDSTableClient.h \
+ mds/Mutation.h \
+ mds/Migrator.h \
+ mds/ScatterLock.h \
+ mds/Server.h \
+ mds/SessionMap.h \
+ mds/SimpleLock.h \
+ mds/SnapClient.h \
+ mds/SnapRealm.h \
+ mds/SnapServer.h \
+ mds/inode_backtrace.h \
+ mds/mds_table_types.h \
+ mds/mdstypes.h \
+ mds/snap.h \
+ mds/MDSContinuation.h
+
+noinst_HEADERS += \
+ mds/events/ECommitted.h \
+ mds/events/EExport.h \
+ mds/events/EFragment.h \
+ mds/events/EImportFinish.h \
+ mds/events/EImportStart.h \
+ mds/events/EMetaBlob.h \
+ mds/events/ENoOp.h \
+ mds/events/EOpen.h \
+ mds/events/EResetJournal.h \
+ mds/events/ESession.h \
+ mds/events/ESessions.h \
+ mds/events/ESlaveUpdate.h \
+ mds/events/ESubtreeMap.h \
+ mds/events/ETableClient.h \
+ mds/events/ETableServer.h \
+ mds/events/EUpdate.h
+
+endif # WITH_MDS
-if ENABLE_SERVER
-if WITH_MDS
-
-libmds_la_SOURCES = \
+LIBMDS_SOURCES = \
mds/Capability.cc \
mds/MDS.cc \
mds/Beacon.cc \
mds/MDSAuthCaps.cc \
mds/MDLog.cc \
common/TrackedOp.cc
-libmds_la_LIBADD = $(LIBOSDC)
-noinst_LTLIBRARIES += libmds.la
+LIBMDS_DEPS = $(LIBOSDC)
-noinst_HEADERS += \
- mds/inode_backtrace.h \
- mds/flock.h \
- mds/locks.c \
- mds/locks.h \
- mds/CDentry.h \
- mds/CDir.h \
- mds/CInode.h \
- mds/Capability.h \
- mds/InoTable.h \
- mds/JournalPointer.h \
- mds/LocalLock.h \
- mds/Locker.h \
- mds/LogEvent.h \
- mds/LogSegment.h \
- mds/MDBalancer.h \
- mds/MDCache.h \
- mds/RecoveryQueue.h \
- mds/StrayManager.h \
- mds/MDLog.h \
- mds/MDS.h \
- mds/Beacon.h \
- mds/MDSContext.h \
- mds/MDSAuthCaps.h \
- mds/MDSMap.h \
- mds/MDSTable.h \
- mds/MDSTableServer.h \
- mds/MDSTableClient.h \
- mds/Mutation.h \
- mds/Migrator.h \
- mds/ScatterLock.h \
- mds/Server.h \
- mds/SessionMap.h \
- mds/SimpleLock.h \
- mds/SnapClient.h \
- mds/SnapRealm.h \
- mds/SnapServer.h \
- mds/inode_backtrace.h \
- mds/mds_table_types.h \
- mds/mdstypes.h \
- mds/snap.h \
- mds/MDSContinuation.h
+if ENABLE_CLIENT
+include mds/Makefile-client.am
+endif
-noinst_HEADERS += \
- mds/events/ECommitted.h \
- mds/events/EExport.h \
- mds/events/EFragment.h \
- mds/events/EImportFinish.h \
- mds/events/EImportStart.h \
- mds/events/EMetaBlob.h \
- mds/events/ENoOp.h \
- mds/events/EOpen.h \
- mds/events/EResetJournal.h \
- mds/events/ESession.h \
- mds/events/ESessions.h \
- mds/events/ESlaveUpdate.h \
- mds/events/ESubtreeMap.h \
- mds/events/ETableClient.h \
- mds/events/ETableServer.h \
- mds/events/EUpdate.h
-
-endif # WITH_MDS
-endif # ENABLE_SERVER
+if ENABLE_SERVER
+include mds/Makefile-server.am
+endif