From patchwork Fri Nov 7 00:21:29 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 7632 X-Patchwork-Delegate: jk@ozlabs.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 02213DE08E for ; Fri, 7 Nov 2008 11:23:06 +1100 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from SG2EHSOBE002.bigfish.com (outbound-sin.frontbridge.com [207.46.51.80]) by ozlabs.org (Postfix) with ESMTP id CBCF2DDE1F; Fri, 7 Nov 2008 11:22:23 +1100 (EST) Received: from mail55-sin-R.bigfish.com (10.3.40.3) by SG2EHSOBE002.bigfish.com (10.3.40.22) with Microsoft SMTP Server id 8.1.291.1; Fri, 7 Nov 2008 00:22:18 +0000 Received: from mail55-sin (localhost.localdomain [127.0.0.1]) by mail55-sin-R.bigfish.com (Postfix) with ESMTP id 59E4D13201C8; Fri, 7 Nov 2008 00:22:18 +0000 (UTC) X-BigFish: VPS-3(zz18c1Kzzzzz2fh6bh62h) X-Spam-TCS-SCL: 1:0 Received: by mail55-sin (MessageSwitch) id 1226017336750313_1673; Fri, 7 Nov 2008 00:22:16 +0000 (UCT) Received: from mail8.fw-bc.sony.com (mail8.fw-bc.sony.com [160.33.98.75]) by mail55-sin.bigfish.com (Postfix) with ESMTP id E44E54E0071; Fri, 7 Nov 2008 00:22:15 +0000 (UTC) Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211]) by mail8.fw-bc.sony.com (8.14.2/8.14.2) with ESMTP id mA70MEGC008017; Fri, 7 Nov 2008 00:22:14 GMT Received: from ussdixhub21.spe.sony.com (ussdixhub21.spe.sony.com [43.130.141.76]) by mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id mA70MDGG000627; Fri, 7 Nov 2008 00:22:13 GMT Received: from USSDIXRG02.am.sony.com (43.130.140.32) by ussdixhub21.spe.sony.com (43.130.141.76) with Microsoft SMTP Server id 8.1.291.1; Thu, 6 Nov 2008 16:22:13 -0800 Received: from ussdixms03.am.sony.com ([43.130.140.23]) by USSDIXRG02.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 6 Nov 2008 16:22:13 -0800 Received: from [192.168.1.10] ([43.135.148.226]) by ussdixms03.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 6 Nov 2008 16:22:12 -0800 Message-ID: <49138A09.8050203@am.sony.com> Date: Thu, 6 Nov 2008 16:21:29 -0800 From: Geoff Levand User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: jk@ozlabs.org References: <491385D1.2070704@am.sony.com> In-Reply-To: <491385D1.2070704@am.sony.com> X-Enigmail-Version: 0.95.7 X-OriginalArrivalTime: 07 Nov 2008 00:22:12.0687 (UTC) FILETIME=[E146E5F0:01C9406E] X-SEL-encryption-scan: scanned Cc: cbe-oss-dev@ozlabs.org Subject: [Cbe-oss-dev] [patch 8/9] petitboot: Create a petitboot library X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org From: Yuji Mano Create a petitboot library that petitboot-udev-helper and parser-test link to. Signed-off-by: Yuji Mano Signed-off-by: Geoff Levand --- 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