Whamcloud - gitweb
b=15625
[fs/lustre-release.git] / lustre / utils / Makefile.am
index 62707cc..4066a9a 100644 (file)
 # Administration utilities Makefile
 
-SUBDIRS = Lustre
+if GSS
+SUBDIRS = gss
+endif
 
 AM_CFLAGS=$(LLCFLAGS)
-AM_CPPFLAGS=$(LLCPPFLAGS)
-AM_LDFLAGS := -L$(top_builddir)/portals/utils
+AM_CPPFLAGS=$(LLCPPFLAGS) -DLUSTRE_UTILS=1
+AM_LDFLAGS := -L$(top_builddir)/lnet/utils
 
-sbin_scripts = lconf lmc llanalyze llstat.pl llobdstat.pl lactive      \
-       load_ldap.sh lrun lwizard
-bin_scripts = lfind lstripe
+LIBPTLCTL := $(top_builddir)/lnet/utils/libptlctl.a
 
+sbin_scripts = lrun
+bin_scripts = llstat llobdstat plot-llstat llbackup
 
 if UTILS
-rootsbin_SCRIPTS = mount.lustre
-sbin_PROGRAMS = lctl obdio obdbarrier lload wirecheck wiretest llmount lsd_upcall
-bin_PROGRAMS = lfs
-lib_LIBRARIES = liblustreapi.a
-sbin_SCRIPTS = $(sbin_scripts)
+noinst_PROGRAMS = obdio obdbarrier
+EXTRA_PROGRAMS = wirecheck
+
+# mount only finds helpers in /sbin
+rootsbin_PROGRAMS = mount.lustre
+sbin_PROGRAMS = mkfs.lustre tunefs.lustre lctl wiretest \
+       l_getidentity llverfs llverdev \
+       llog_reader lr_reader
+if LIBPTHREAD
+sbin_PROGRAMS += loadgen
+endif
+bin_PROGRAMS = lfs req_layout
 bin_SCRIPTS = $(bin_scripts)
+sbin_SCRIPTS = $(sbin_scripts)
 endif # UTILS
 
-lctl_LDADD := $(LIBREADLINE) -lptlctl -lpthread
-lfs_LDADD := $(LIBREADLINE) parser.o liblustreapi.a -lptlctl obd.o
-lload_LDADD := $(LIBREADLINE) -lptlctl
+lib_LIBRARIES = liblustreapi.a libiam.a
+
+lctl_SOURCES = parser.c obd.c lustre_cfg.c lctl.c parser.h obdctl.h platform.h
+lctl_LDADD := $(LIBREADLINE) $(LIBPTLCTL)
+lctl_DEPENDENCIES := $(LIBPTLCTL)
+
+lfs_SOURCES = lfs.c parser.c obd.c lustre_cfg.c
+lfs_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL)
+lfs_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a 
+
+loadgen_SOURCES = loadgen.c lustre_cfg.c obd.c
+loadgen_LDADD := $(LIBREADLINE) $(LIBPTLCTL) $(PTHREAD_LIBS)
+loadgen_DEPENDENCIES := $(LIBPTLCTL)
+
+if EXT2FS_DEVEL
+EXT2FSLIB = -lext2fs
+E2PLIB = -le2p
+else
+E2PLIB = 
+EXT2FSLIB =
+endif
+
+if BLKID
+BLKIDLIB = -lblkid
+else
+BLKIDLIB =
+endif
+
+llverfs_LDADD := $(EXT2FSLIB) $(E2PLIB)
+
+llverdev_LDADD := $(EXT2FSLIB) $(BLKIDLIB)
+
 liblustreapi_a_SOURCES = liblustreapi.c
+libiam_a_SOURCES = libiam.c
+
 wirecheck_SOURCES = wirecheck.c
+wirecheck_CPPFLAGS = -DCC="\"$(CC)\""
+
 wiretest_SOURCES = wiretest.c
-lctl_SOURCES = parser.c obd.c lustre_cfg.c lctl.c parser.h obdctl.h
-lload_SOURCES = lload.c 
+
 obdio_SOURCES = obdio.c obdiolib.c obdiolib.h
 obdbarrier_SOURCES = obdbarrier.c obdiolib.c obdiolib.h
-lfs_SOURCES = lfs.c 
-llmount_SOURCES = llmount.c 
-llmount_LDADD = $(LIBREADLINE) -lptlctl
-lsd_upcall_SOURCES = lsd_upcall.c
+req_layout_SOURCES = req-layout.c
+
+llog_reader_SOURCES = llog_reader.c
+llog_reader_LDADD := $(LIBPTLCTL)
+llog_reader_DEPENDENCIES := $(LIBPTLCTL)
+
+lr_reader_SOURCES = lr_reader.c
+
+mount_lustre_SOURCES = mount_lustre.c mount_utils.c
+mount_lustre_LDADD := $(LIBPTLCTL)
+mount_lustre_DEPENDENCIES := $(LIBPTLCTL)
+
+mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c
+mkfs_lustre_CPPFLAGS = -UTUNEFS $(AM_CPPFLAGS)
+mkfs_lustre_LDADD := libiam.a $(LIBPTLCTL)
+mkfs_lustre_DEPENDENCIES := $(LIBPTLCTL) libiam.a
+
+tunefs_lustre_SOURCES = $(mkfs_lustre_SOURCES)
+tunefs_lustre_CPPFLAGS = -DTUNEFS $(AM_CPPFLAGS)
+tunefs_lustre_LDADD := $(mkfs_lustre_LDADD)
+tunefs_lustre_DEPENDENCIES := $(mkfs_lustre_DEPENDENCIES)
+
+l_getidentity_SOURCES = l_getidentity.c
+l_getidentity_LDADD := $(LIBPTLCTL)
+l_getidentity_DEPENDENCIES := $(LIBPTLCTL)
 
-EXTRA_DIST = $(bin_scripts) $(sbin_scripts)
+EXTRA_DIST = $(sbin_scripts) $(bin_scripts)
 
 # NOTE: this should only be run on i386.
 newwiretest: wirehdr.c wirecheck
        cp wirehdr.c wiretest.c
-       ./wirecheck >> wiretest.c
+       LANG=C ./wirecheck >> wiretest.c
+       cp ../ptlrpc/wirehdr.c ../ptlrpc/wiretest.c
+       LANG=C ./wirecheck >> ../ptlrpc/wiretest.c
 
-mount.lustre$(EXEEXT): llmount
-       cp $< $@