obj-m += fid/
obj-m += obdclass/
obj-m += ptlrpc/
+obj-m += ldlm/
obj-m += obdecho/
obj-m += mgc/
obj-m += ec/
obj-m += tests/kernel/
-@SERVER_TRUE@obj-m += ost/ mgs/ mdt/ mdd/ ofd/ quota/ osp/ lod/ lfsck/
+@SERVER_TRUE@obj-m += ost/ mgs/ mdt/ mdd/ ofd/ quota/ osp/ lod/ lfsck/ target/
@CLIENT_TRUE@obj-m += lov/ osc/ mdc/ lmv/ llite/ fld/
@LDISKFS_ENABLED_TRUE@obj-m += osd-ldiskfs/
@ZFS_ENABLED_TRUE@obj-m += osd-zfs/
lustre/kernel_patches/targets/5.14-sles15sp4.target
lustre/kernel_patches/targets/3.x-fc18.target
lustre/ldlm/Makefile
+lustre/ldlm/autoMakefile
lustre/ec/autoMakefile
lustre/ec/Makefile
lustre/fid/Makefile
lustre/mgs/Makefile
lustre/mgs/autoMakefile
lustre/target/Makefile
+lustre/target/autoMakefile
lustre/ptlrpc/Makefile
lustre/ptlrpc/autoMakefile
lustre/ptlrpc/gss/Makefile
+++ /dev/null
-/Makefile.in
--- /dev/null
+# This is included by ptlrpc
+
+ldlm_objs := l_lock.o ldlm_lock.o
+ldlm_objs += ldlm_resource.o ldlm_lib.o
+ldlm_objs += ldlm_plain.o ldlm_extent.o
+ldlm_objs += ldlm_request.o ldlm_lockd.o
+ldlm_objs += ldlm_flock.o ldlm_inodebits.o
+ldlm_objs += ldlm_pool.o ldlm_reclaim.o
+
+EXTRA_DIST = $(ldlm_objs:.o=.c) $(ldlm_server_objs:.o=.c) ldlm_internal.h
+
+ifneq "$(MODULES)" "ptlrpc"
+@INCLUDE_RULES@
+endif
# ldlm is built into ptlrpc
#
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
-EXTRA_DIST = ldlm_extent.c ldlm_flock.c ldlm_internal.h ldlm_lib.c \
- ldlm_lock.c ldlm_lockd.c ldlm_plain.c ldlm_request.c \
- ldlm_resource.c l_lock.c ldlm_inodebits.c ldlm_pool.c \
- ldlm_reclaim.c
+MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
MODULES := ptlrpc
+ptlrpc_dir := $(dir $(lastword $(MAKEFILE_LIST)))
LDLM := @top_srcdir@/lustre/ldlm/
TARGET := @top_srcdir@/lustre/target/
-ldlm_objs := $(LDLM)l_lock.o $(LDLM)ldlm_lock.o
-ldlm_objs += $(LDLM)ldlm_resource.o $(LDLM)ldlm_lib.o
-ldlm_objs += $(LDLM)ldlm_plain.o $(LDLM)ldlm_extent.o
-ldlm_objs += $(LDLM)ldlm_request.o $(LDLM)ldlm_lockd.o
-ldlm_objs += $(LDLM)ldlm_flock.o $(LDLM)ldlm_inodebits.o
-ldlm_objs += $(LDLM)ldlm_pool.o $(LDLM)ldlm_reclaim.o
-
-target_objs := $(TARGET)tgt_main.o $(TARGET)tgt_lastrcvd.o
-target_objs += $(TARGET)tgt_handler.o $(TARGET)out_handler.o
-target_objs += $(TARGET)out_lib.o $(TARGET)update_trans.o
-target_objs += $(TARGET)update_records.o $(TARGET)update_recovery.o
-target_objs += $(TARGET)tgt_grant.o $(TARGET)tgt_fmd.o
-target_objs += $(TARGET)tgt_mount.o $(TARGET)barrier.o
-
ptlrpc_objs := client.o recover.o connection.o niobuf.o pack_generic.o
ptlrpc_objs += events.o ptlrpc_module.o service.o pinger.o
ptlrpc_objs += llog_net.o llog_client.o import.o ptlrpcd.o
nodemap_objs += nodemap_idmap.o nodemap_rbtree.o nodemap_member.o
nodemap_objs += nodemap_storage.o
-ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs)
-@SERVER_TRUE@ptlrpc-objs += $(target_objs) $(nodemap_objs) $(nrs_server_objs)
+include $(ptlrpc_dir)/../ldlm/Makefile
+include $(ptlrpc_dir)/../target/Makefile
+
+ptlrpc-objs := $(ptlrpc_objs)
+ptlrpc-objs += $(patsubst %,$(LDLM)%,$(ldlm_objs))
+@SERVER_TRUE@ptlrpc-objs += $(nodemap_objs) $(nrs_server_objs)
@SERVER_TRUE@ptlrpc-objs += pack_server.o llog_server.o
+@SERVER_TRUE@ptlrpc-objs += $(patsubst %,$(TARGET)%,$(target_objs))
@GSS_TRUE@obj-m += gss/
default: all
-ldlm_%.c: @LUSTRE@/ldlm/ldlm_%.c
- ln -sf $< $@
-
-l_lock.c: @LUSTRE@/ldlm/l_lock.c
- ln -sf $< $@
-
-tgt_%.c: @LUSTRE@/target/tgt_%.c
- ln -sf $< $@
-
-out_%.c: @LUSTRE@/target/out_%.c
- ln -sf $< $@
-
-barrier.c: @LUSTRE@/target/barrier.c
- ln -sf $< $@
-
EXTRA_DIST := $(ptlrpc_objs:.o=.c) ptlrpc_internal.h
EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h heap.h
EXTRA_DIST += $(nrs_server_objs:.o=.c)
+++ /dev/null
-/Makefile.in
--- /dev/null
+# This is included by ptlrpc
+
+target_objs := tgt_main.o tgt_lastrcvd.o
+target_objs += tgt_handler.o out_handler.o
+target_objs += out_lib.o update_trans.o
+target_objs += update_records.o update_recovery.o
+target_objs += tgt_grant.o tgt_fmd.o barrier.o
+target_objs += tgt_mount.o
+
+EXTRA_DIST = $(target_objs:.o=.c) tgt_internal.h
+
+ifneq "$(MODULES)" "ptlrpc"
+@INCLUDE_RULES@
+endif
# in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU General Public License
-# version 2 along with this program; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 021110-1307, USA
+# version 2 along with this program; If not, see
+# http://www.gnu.org/licenses/gpl-2.0.html
#
# GPL HEADER END
#
-#
-# Copyright (c) 2012, 2017, Intel Corporation.
-# Use is subject to license terms.
-#
-
-#
-# target is built into ptlrpc
-#
-
MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
-EXTRA_DIST = tgt_main.c tgt_lastrcvd.c tgt_handler.c tgt_internal.h \
- tgt_grant.c out_handler.c out_lib.c barrier.c tgt_fmd.c \
- tgt_mount.c
-EXTRA_DIST += update_trans.c
-EXTRA_DIST += update_records.c
-EXTRA_DIST += update_recovery.c