aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2013-08-26 11:18:02 -0400
committerJeff Mahoney <jeffm@suse.com>2013-08-26 19:02:20 -0400
commit19566d08786018414e789d24c5352e6e1e5e4067 (patch)
tree361619bd5337f56d024308f3aab12e9461739b05
parent97fa94485154f217285f1dce8e607ff8ab2247d7 (diff)
downloadreiserfsprogs-19566d08786018414e789d24c5352e6e1e5e4067.tar.gz
build: introduce shared libreiserfscore.so and export it
In order to use reiserfs functionality in external programs, we need to make a shared library and includes available. This converts both libmisc and libreiserfscore into shared libraries, and links libmisc into libreiserfscore. We also export the includes and a pkg-config file. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
-rw-r--r--configure.ac3
-rw-r--r--debugreiserfs/Makefile.am2
-rw-r--r--fsck/Makefile.am7
-rw-r--r--include/Makefile.am4
-rw-r--r--lib/Makefile.am4
-rw-r--r--mkreiserfs/Makefile.am2
-rw-r--r--reiserfscore/Makefile.am10
-rw-r--r--reiserfscore/reiserfscore.pc.in10
-rw-r--r--resize_reiserfs/Makefile.am2
-rw-r--r--tune/Makefile.am2
10 files changed, 32 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 19edde1..82a686d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
dnl Checks for libraries.
@@ -131,6 +131,7 @@ AC_OUTPUT(
lib/Makefile
Makefile
reiserfscore/Makefile
+ reiserfscore/reiserfscore.pc
debugreiserfs/Makefile
debugreiserfs/debugreiserfs.8
tune/Makefile
diff --git a/debugreiserfs/Makefile.am b/debugreiserfs/Makefile.am
index ddb70a8..d0af47d 100644
--- a/debugreiserfs/Makefile.am
+++ b/debugreiserfs/Makefile.am
@@ -4,7 +4,7 @@ debugreiserfs_SOURCES = debugreiserfs.c pack.c unpack.c stat.c corruption.c scan
man_MANS = debugreiserfs.8
EXTRA_DIST = $(man_MANS)
-LDADD = $(top_builddir)/reiserfscore/libcore.a $(top_builddir)/lib/libmisc.a
+LDADD = $(top_builddir)/reiserfscore/libreiserfscore.la
install-exec-hook:
$(LN_S) debugreiserfs $(DESTDIR)$(sbindir)/debugfs.reiserfs
diff --git a/fsck/Makefile.am b/fsck/Makefile.am
index f7ca820..7e318ba 100644
--- a/fsck/Makefile.am
+++ b/fsck/Makefile.am
@@ -1,13 +1,14 @@
sbin_PROGRAMS = reiserfsck
reiserfsck_SOURCES = main.c pass0.c pass1.c pass2.c semantic_check.c \
-semantic_rebuild.c pass4.c lost+found.c ubitmap.c uobjectid.c ustree.c \
-ufile.c check_tree.c info.c super.c fsck.h
+ semantic_rebuild.c pass4.c lost+found.c ubitmap.c \
+ uobjectid.c ustree.c ufile.c check_tree.c info.c \
+ super.c fsck.h
man_MANS = reiserfsck.8
EXTRA_DIST = $(man_MANS)
-reiserfsck_LDADD = $(top_builddir)/reiserfscore/libcore.a $(top_builddir)/lib/libmisc.a
+reiserfsck_LDADD = $(top_builddir)/reiserfscore/libreiserfscore.la
install-exec-hook:
$(LN_S) reiserfsck $(DESTDIR)$(sbindir)/fsck.reiserfs
diff --git a/include/Makefile.am b/include/Makefile.am
index 2ebfa24..e3b3d0c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1 +1,3 @@
-noinst_HEADERS = io.h misc.h reiserfs_fs.h reiserfs_lib.h swab.h parse_time.h progbar.h
+noinst_HEADERS = parse_time.h progbar.h
+reiserfsdir = $(includedir)/reiserfs
+reiserfs_HEADERS = io.h misc.h reiserfs_fs.h reiserfs_lib.h swab.h
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4336124..4a3a3f9 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,5 @@
-noinst_LIBRARIES = libmisc.a
+noinst_LTLIBRARIES = libmisc.la
-libmisc_a_SOURCES = io.c misc.c parse_time.c progbar.c
+libmisc_la_SOURCES = io.c misc.c parse_time.c progbar.c
##reiserfs.c
diff --git a/mkreiserfs/Makefile.am b/mkreiserfs/Makefile.am
index 7c8e35d..9c50ba3 100644
--- a/mkreiserfs/Makefile.am
+++ b/mkreiserfs/Makefile.am
@@ -4,7 +4,7 @@ mkreiserfs_SOURCES = mkreiserfs.c
man_MANS = mkreiserfs.8
EXTRA_DIST = $(man_MANS)
-LDADD = $(top_builddir)/reiserfscore/libcore.a $(top_builddir)/lib/libmisc.a
+LDADD = $(top_builddir)/reiserfscore/libreiserfscore.la
install-exec-hook:
$(LN_S) mkreiserfs $(DESTDIR)$(sbindir)/mkfs.reiserfs
diff --git a/reiserfscore/Makefile.am b/reiserfscore/Makefile.am
index f1b9be3..f9b1e61 100644
--- a/reiserfscore/Makefile.am
+++ b/reiserfscore/Makefile.am
@@ -1,5 +1,9 @@
-noinst_LIBRARIES = libcore.a
+lib_LTLIBRARIES = libreiserfscore.la
-libcore_a_SOURCES = do_balan.c fix_node.c hashes.c ibalance.c lbalance.c prints.c \
-stree.c node_formats.c reiserfslib.c bitmap.c journal.c includes.h
+libreiserfscore_la_SOURCES = do_balan.c fix_node.c hashes.c ibalance.c \
+ lbalance.c prints.c stree.c node_formats.c \
+ reiserfslib.c bitmap.c journal.c includes.h
+libreiserfscore_la_LIBADD = ../lib/libmisc.la
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = reiserfscore.pc
diff --git a/reiserfscore/reiserfscore.pc.in b/reiserfscore/reiserfscore.pc.in
new file mode 100644
index 0000000..c593847
--- /dev/null
+++ b/reiserfscore/reiserfscore.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: reiserfscore
+Description: ReiserFS Core Library
+Version: @REISERFSPROGS_VERSION@
+Cflags: -I${includedir}/reiserfs -I${includedir}
+Libs: -L${libdir} -lreiserfscore
diff --git a/resize_reiserfs/Makefile.am b/resize_reiserfs/Makefile.am
index 8cee04e..9758083 100644
--- a/resize_reiserfs/Makefile.am
+++ b/resize_reiserfs/Makefile.am
@@ -4,5 +4,5 @@ resize_reiserfs_SOURCES = fe.c resize_reiserfs.c do_shrink.c resize.h
man_MANS = resize_reiserfs.8
EXTRA_DIST = $(man_MANS)
-LDADD = $(top_builddir)/reiserfscore/libcore.a $(top_builddir)/lib/libmisc.a
+LDADD = $(top_builddir)/reiserfscore/libreiserfscore.la
diff --git a/tune/Makefile.am b/tune/Makefile.am
index 3522a59..2b03ad1 100644
--- a/tune/Makefile.am
+++ b/tune/Makefile.am
@@ -5,7 +5,7 @@ reiserfstune_SOURCES = tune.c tune.h
man_MANS = reiserfstune.8
EXTRA_DIST = $(man_MANS)
-LDADD = $(top_builddir)/reiserfscore/libcore.a $(top_builddir)/lib/libmisc.a
+LDADD = $(top_builddir)/reiserfscore/libreiserfscore.la
install-exec-hook:
$(LN_S) reiserfstune $(DESTDIR)$(sbindir)/tunefs.reiserfs