From patchwork Thu Jul 31 11:41:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 34582 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 51A1C20540 for ; Thu, 31 Jul 2014 11:41:27 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp18sf10494842obc.5 for ; Thu, 31 Jul 2014 04:41:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=JwlDwFZkBt36bGSTk7Y6Mm8Cp17QTGVVS4YT2YLoXCs=; b=eV5metirm+ls2fijRvxKAqgERPzXRON3ksbg2LTBT4TE2I7TV9w0NhUqaLZv3jfIOt 88rtPGsxkzATjvDspwcg5W18gb2LuqLqDRlIiGOBzx+UcQhNUElSuor6EtUN3kEVYV1Z flpgGVVe38seipIeIrjgB5ONo9eMaK/MT8QbkXCaR+ZmV2go7bJMdxSWCdbXHAJtwkHk aS5d4fXTV38JRCT9sis5Ge+mb9HzpTLGmfPbDeTJuY/WtEaORJm+d1Y/GIAkZ2WYACh9 l+UnE1MZatdpUkQOWeFkz4biFGbi9Lp72JDN/jD/68+Hus3G9l0A4pm16JwUtPNNqiJp WYHA== X-Gm-Message-State: ALoCoQlir6s6NPnbrrcX6AJMpL+1rcwJ8xOlWuYTvv81bSWs3QUBqbnwUSC0OlXx6wefWZdt6Zpt X-Received: by 10.182.142.135 with SMTP id rw7mr1249031obb.46.1406806886204; Thu, 31 Jul 2014 04:41:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls784246qgf.66.gmail; Thu, 31 Jul 2014 04:41:26 -0700 (PDT) X-Received: by 10.52.106.198 with SMTP id gw6mr13978995vdb.23.1406806885577; Thu, 31 Jul 2014 04:41:25 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id bh2si4092133vec.95.2014.07.31.04.41.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Jul 2014 04:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so3983055vcb.1 for ; Thu, 31 Jul 2014 04:41:25 -0700 (PDT) X-Received: by 10.220.50.8 with SMTP id x8mr11932720vcf.18.1406806885495; Thu, 31 Jul 2014 04:41:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp11188vcb; Thu, 31 Jul 2014 04:41:25 -0700 (PDT) X-Received: by 10.229.178.202 with SMTP id bn10mr17429948qcb.6.1406806884989; Thu, 31 Jul 2014 04:41:24 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id z15si9247127qaq.3.2014.07.31.04.41.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 31 Jul 2014 04:41:24 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XCojc-000177-3m; Thu, 31 Jul 2014 11:41:24 +0000 Received: from mail-la0-f51.google.com ([209.85.215.51]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XCojW-000172-Qy for lng-odp@lists.linaro.org; Thu, 31 Jul 2014 11:41:18 +0000 Received: by mail-la0-f51.google.com with SMTP id pn19so1883068lab.24 for ; Thu, 31 Jul 2014 04:41:11 -0700 (PDT) X-Received: by 10.152.4.65 with SMTP id i1mr11553885lai.16.1406806871064; Thu, 31 Jul 2014 04:41:11 -0700 (PDT) Received: from localhost (c-4f6635ac-74736162.cust.telenor.se. [79.102.53.172]) by mx.google.com with ESMTPSA id z8sm746153laa.28.2014.07.31.04.41.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Jul 2014 04:41:09 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Thu, 31 Jul 2014 13:41:03 +0200 Message-Id: <1406806863-30363-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] build both static and dynamic linked libs X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Move static decisions to Makefiles instead in the configure scripts. This makes it possible to build binaries with shared, static or all-static without reconfiguring and libodp is built both static and dynamic per default. Signed-off-by: Anders Roxell --- configure.ac | 2 +- example/generator/Makefile.am | 1 + example/l2fwd/Makefile.am | 1 + example/odp_example/Makefile.am | 1 + example/packet/Makefile.am | 1 + example/packet_netmap/Makefile.am | 1 + example/timer/Makefile.am | 1 + test/api_test/Makefile.am | 4 ++++ 8 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 22d5c80..6b75e66 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET #Use libtool -LT_INIT([disable-shared static]) +LT_INIT([]) AC_SUBST([LIBTOOL_DEPS]) AM_PROG_LIBTOOL diff --git a/example/generator/Makefile.am b/example/generator/Makefile.am index d3bd5bf..5b3d55a 100644 --- a/example/generator/Makefile.am +++ b/example/generator/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_generator +odp_generator_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_generator_SOURCES = odp_generator.c diff --git a/example/l2fwd/Makefile.am b/example/l2fwd/Makefile.am index 9b5a7ef..a83e757 100644 --- a/example/l2fwd/Makefile.am +++ b/example/l2fwd/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_l2fwd +odp_l2fwd_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_l2fwd_SOURCES = odp_l2fwd.c diff --git a/example/odp_example/Makefile.am b/example/odp_example/Makefile.am index c1b4ed3..e6f23d0 100644 --- a/example/odp_example/Makefile.am +++ b/example/odp_example/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_example +odp_example_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_example_SOURCES = odp_example.c diff --git a/example/packet/Makefile.am b/example/packet/Makefile.am index 2d778dd..603a1ab 100644 --- a/example/packet/Makefile.am +++ b/example/packet/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_pktio +odp_pktio_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_pktio_SOURCES = odp_pktio.c diff --git a/example/packet_netmap/Makefile.am b/example/packet_netmap/Makefile.am index 6db0f98..5a5913c 100644 --- a/example/packet_netmap/Makefile.am +++ b/example/packet_netmap/Makefile.am @@ -2,6 +2,7 @@ include $(top_srcdir)/example/Makefile.inc if ODP_NETMAP_ENABLED bin_PROGRAMS = odp_pktio_netmap +odp_pktio_netmap_LDFLAGS = $(AM_LDFLAGS) -static endif dist_odp_pktio_netmap_SOURCES = odp_pktio_netmap.c diff --git a/example/timer/Makefile.am b/example/timer/Makefile.am index 09253a6..6229f13 100644 --- a/example/timer/Makefile.am +++ b/example/timer/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_timer_test +odp_timer_test_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_timer_test_SOURCES = odp_timer_test.c diff --git a/test/api_test/Makefile.am b/test/api_test/Makefile.am index fd7eab3..5104454 100644 --- a/test/api_test/Makefile.am +++ b/test/api_test/Makefile.am @@ -1,6 +1,10 @@ include $(top_srcdir)/test/Makefile.inc bin_PROGRAMS = odp_atomic odp_shm odp_ring odp_timer_ping +odp_atomic_LDFLAGS = $(AM_LDFLAGS) -static +odp_shm_LDFLAGS = $(AM_LDFLAGS) -static +odp_ring_LDFLAGS = $(AM_LDFLAGS) -static +odp_timer_ping_LDFLAGS = $(AM_LDFLAGS) -static dist_odp_atomic_SOURCES = odp_atomic_test.c odp_common.c dist_odp_shm_SOURCES = odp_shm_test.c odp_common.c