--with-release=* ) ;;
--with-kmp-moddir=* ) ;;
--with-linux=* | --with-linux-obj=* ) ;;
+ --enable-shared | --disable-shared ) ;;
+ --enable-static | --disable-static ) ;;
--enable-ldiskfs | --disable-ldiskfs ) ;;
--enable-modules | --disable-modules ) ;;
--enable-server | --disable-server ) ;;
if test x$enable_manpages != xyes ; then
RPMBINARGS="$RPMBINARGS --without manpages"
fi
+if test x$enable_shared != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without shared"
+fi
+if test x$enable_static != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without static"
+fi
RPMBUILD_BINARY_ARGS=$RPMBINARGS
lustre/contrib/README usr/share/doc/lustre-dev/contrib
lustre/contrib/mpich-1.2.6-lustre.patch usr/share/doc/lustre-dev/contrib
debian/tmp/usr/include/lustre/* usr/include/lustre
+debian/tmp/usr/lib/*.so.* usr/lib
debian/tmp/usr/lib/*.so usr/lib
debian/tmp/usr/lib/*.a usr/lib
if BUILD_DLC
SUBDIRS = lnetconfig
-AM_LDFLAGS += -L$(top_builddir)/lnet/utils/lnetconfig
endif # BUILD_DLC
LIBCFS= $(top_builddir)/libcfs/libcfs/libcfs.a
CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c
lnetctl_SOURCES = lnetctl.c $(CYAML)
-lnetctl_LDADD = -llnetconfig $(LIBCFSUTIL) $(LIBCFS) \
- $(LIBREADLINE) $(LIBEFENCE) -lyaml -lm
-lnetctl_DEPENDENCIES = $(top_builddir)/lnet/utils/lnetconfig/liblnetconfig.so
+lnetctl_LDADD = $(top_builddir)/lnet/utils/lnetconfig/liblnetconfig.la \
+ $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) -lyaml -lm
+lnetctl_DEPENDENCIES = $(top_builddir)/lnet/utils/lnetconfig/liblnetconfig.la
endif # UTILS
# Amir Shehata <amir.shehata@intel.com>
#
-AM_CFLAGS := -fPIC \
- -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 \
- -I$(top_builddir)/lnet/utils \
- -I$(top_builddir)/lnet/utils/cyaml
-AM_LDFLAGS := -L$(top_builddir)/libcfs/libcfs
-
-lib_LIBRARIES = liblnetconfig.a
-noinst_LIBRARIES = liblnetconfigtmp.a
+lib_LTLIBRARIES = liblnetconfig.la
CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c \
$(top_builddir)/lnet/utils/cyaml/cyaml.h
-liblnetconfigtmp_a_SOURCES := liblnetconfig.c liblnetconfig.h $(CYAML)
-
-# build static and share lib lnet config library
-liblnetconfig.a : liblnetconfigtmp.a
- rm -f liblnetconfig.a liblnetconfig.so
- $(CC) $(LDFLAGS) $(AM_LDFLAGS) -shared -o liblnetconfig.so `$(AR) -t liblnetconfigtmp.a`
- mv liblnetconfigtmp.a liblnetconfig.a
-
-install-exec-hook:
- cp liblnetconfig.so $(DESTDIR)$(libdir)/
+liblnetconfig_la_SOURCES = liblnetconfig.c liblnetconfig.h $(CYAML)
+liblnetconfig_la_CPPFLAGS = -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 \
+ -DLUSTRE_UTILS=1 -I$(top_builddir)/lnet/utils/cyaml
+liblnetconfig_la_LDFLAGS = -L$(top_builddir)/libcfs/libcfs -version-info 1:0:0
EXTRA_DIST =
%bcond_without lustre_modules
%bcond_with lnet_dlc
%bcond_without manpages
+%bcond_without shared
+%bcond_without static
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
%{?with_lustre_tests:--enable-tests}%{!?with_lustre_tests:--disable-tests} \
%{?with_lustre_utils:--enable-utils}%{!?with_lustre_utils:--disable-utils} \
%{?with_lustre_modules:--enable-modules}%{!?with_lustre_modules:--disable-modules} \
+ %{!?with_shared:--disable-shared} \
+ %{!?with_static:--disable-static} \
%{!?with_lustre_iokit:--disable-iokit} \
%{!?with_ldiskfs:--disable-ldiskfs} \
%{!?with_servers:--disable-server} \
find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
%if %{with lnet_dlc}
+rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
+%if %{with static}
echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
+%endif
+%if %{with shared}
echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
+echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
+%endif
%endif
%if %{with ldiskfs}
-agent_LTLIBRARIES = lustresnmp.la
+agent_LTLIBRARIES = liblustresnmp.la
mib_DATA = Lustre-MIB.txt
-lustresnmp_la_SOURCES = \
+liblustresnmp_la_SOURCES = \
lustre-snmp.c \
lustre-snmp.h \
lustre-snmp-trap.c \
lustre-snmp-util.c \
lustre-snmp-util.h
-lustresnmp_la_LIBADD := $(NET_SNMP_LIBS)
-lustresnmp_la_CFLAGS := -fPIC $(NET_SNMP_CFLAGS)
-lustresnmp_la_LDFLAGS = -fPIC -shared -module -avoid-version
+liblustresnmp_la_CFLAGS := $(NET_SNMP_CFLAGS)
+liblustresnmp_la_LIBADD := $(NET_SNMP_LIBS)
+liblustresnmp_la_LDFLAGS := -version-info 1:0:0
SUBDIRS =
DIST_SUBDIRS = autoconf