[Cbe-oss-dev] [patch 8/9] petitboot: Create a petitboot library
Geoff Levand
geoffrey.levand at am.sony.com
Fri Nov 7 11:21:29 EST 2008
From: Yuji Mano <yuji.mano at am.sony.com>
Create a petitboot library that petitboot-udev-helper and parser-test
link to.
Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
---
This change is a step to convert petitboot into a collection of applications
linking to a core petitboot library.
Makefile.am | 30 +++++-------------------------
lib/Makefile.am | 45 +++++++++++++++++++++++++++++++++++++++++++++
test/Makefile.am | 13 +++----------
3 files changed, 53 insertions(+), 35 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,34 +30,14 @@ AM_CFLAGS = \
-Wredundant-decls \
-Winline
-AM_LDFLAGS = -L$(libdir)
+AM_LDFLAGS = -Llib -L$(libdir)
sbin_PROGRAMS = petitboot-udev-helper petitboot-gui
-petitboot_headers = \
- petitboot-gui.h \
- lib/petitboot-paths.h \
- lib/params.h \
- lib/yaboot-cfg.h \
- lib/parser.h \
- lib/paths.h \
- lib/message.h
-
-petitboot_udev_helper_SOURCES = \
- $(petitboot_headers) \
- petitboot-udev-helper.c \
- lib/params.c \
- lib/parser.c \
- lib/paths.c \
- lib/yaboot-cfg.c \
- lib/native-parser.c \
- lib/yaboot-parser.c \
- lib/kboot-parser.c
-
-petitboot_gui_SOURCES = \
- $(petitboot_headers) \
- petitboot-gui.c \
- devices.c
+petitboot_udev_helper_SOURCES = petitboot-udev-helper.c
+petitboot_udev_helper_LDADD = -lpetitboot
+
+petitboot_gui_SOURCES = petitboot-gui.h petitboot-gui.c devices.c
petitboot_gui_LDADD = -ltwin -lpng -ljpeg -lz -lm
EXTRA_DIST = bootstrap
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -14,4 +14,49 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+AM_CFLAGS = \
+ -g \
+ -Wall \
+ -W \
+ -Wunused \
+ -Wstrict-prototypes \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wredundant-decls \
+ -Winline
+
+pkginclude_HEADERS = \
+ message.h \
+ parser.h \
+ paths.h \
+ petitboot-paths.h
+
+petitboot_headers = \
+ params.h \
+ yaboot-cfg.h
+
+lib_LTLIBRARIES = libpetitboot.la
+
+# version-info rules (current:revision:age):
+# * If the library source code has changed since the last release, then
+# increment revision.
+# * If any interfaces have been added, removed, or changed since the
+# last release, then increment current and set revision to 0.
+# * If any interfaces have been added since the last release, then
+# increment age.
+# * If any interfaces have been removed since the last release, then
+# set age to 0.
+
+libpetitboot_la_DEPENDENCIES = Makefile
+libpetitboot_la_SOURCES = \
+ $(petitboot_headers) \
+ params.c \
+ parser.c \
+ paths.c \
+ yaboot-cfg.c \
+ native-parser.c \
+ yaboot-parser.c \
+ kboot-parser.c
+libpetitboot_la_LDFLAGS = -version-info 1:0:0
+
MAINTAINERCLEANFILES = Makefile.in
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -27,21 +27,14 @@ AM_CFLAGS = \
-Wredundant-decls \
-Winline
-AM_LDFLAGS = -L$(libdir)
+AM_LDFLAGS = -L../lib -L$(libdir)
check_PROGRAMS = parser-test
check_SCRIPTS = parser-test.sh
-parser_test_SOURCES = \
- parser-test.c \
- ../lib/params.c \
- ../lib/parser.c \
- ../lib/paths.c \
- ../lib/yaboot-cfg.c \
- ../lib/native-parser.c \
- ../lib/yaboot-parser.c \
- ../lib/kboot-parser.c
+parser_test_SOURCES = parser-test.c
+parser_test_LDADD = -lpetitboot
composed_scripts = parser-test.sh
--
More information about the cbe-oss-dev
mailing list