Whamcloud - gitweb
landing b_cmobd_merge on HEAD
[fs/lustre-release.git] / lustre / ptlrpc / autoMakefile.am
similarity index 72%
rename from lustre/ptlrpc/Makefile.am
rename to lustre/ptlrpc/autoMakefile.am
index 1c2da01..96dcfe3 100644 (file)
@@ -3,8 +3,6 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-DEFS=
-
 LDLM_COMM_SOURCES= $(top_srcdir)/ldlm/l_lock.c $(top_srcdir)/ldlm/ldlm_lock.c \
     $(top_srcdir)/ldlm/ldlm_resource.c $(top_srcdir)/ldlm/ldlm_lib.c          \
     $(top_srcdir)/ldlm/ldlm_plain.c $(top_srcdir)/ldlm/ldlm_extent.c          \
@@ -19,23 +17,16 @@ COMMON_SOURCES =  client.c recover.c connection.c niobuf.c pack_generic.c   \
 if LIBLUSTRE
 
 noinst_LIBRARIES = libptlrpc.a
-libptlrpc_a_CFLAGS = -fPIC
 libptlrpc_a_SOURCES = $(COMMON_SOURCES)
-
-else
-
-MODULE = ptlrpc
-modulefs_DATA = ptlrpc.o
-EXTRA_PROGRAMS = ptlrpc
-
-ptlrpc_SOURCES = $(top_srcdir)/ldlm/ldlm_flock.c $(COMMON_SOURCES) \
-    lproc_ptlrpc.c
+libptlrpc_a_CPPFLAGS = $(LLCPPFLGS)
+libptlrpc_a_CFLAGS = $(LLCFLAGS)
 
 endif
 
-ptlrpc_DEPENDENCIES=symlinks
+if MODULES
+modulefs_DATA = ptlrpc$(KMODEXT)
+endif # MODULES
 
-symlinks:
-       ln -sf $(subst /ldlm/,/ptlrpc/,$(addsuffix .o,$(basename $(LDLMSOURCES)))) ../ldlm
+MOSTLYCLEANFILES = *.o *.ko *.mod.c ldlm_*.c l_lock.c
+DIST_SOURCES = $(filter-out @top_srcdir@/ldlm/%,$(ptlrpc-objs:%.o=%.c)) ptlrpc_internal.h
 
-include $(top_srcdir)/Rules