blob: ce51084c973171a3b72495c93501487d2e09a31b [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From a826c7c722db40bfedf00e51ce38411550ae8216 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@openwide.fr>
3Date: Thu, 25 Dec 2014 19:22:16 +0100
4Subject: [PATCH] Make.rules: Handle static/shared only build
5
6Do not build .a library when enable_static is set to "no"
7Do not build .so library when enable_shared is set to "no"
8
Patrick Williams8e7b46e2023-05-01 14:19:06 -05009Upstream-Status: Pending
Brad Bishop19323692019-04-05 15:28:33 -040010Signed-off-by: Romain Naour <romain.naour@openwide.fr>
11---
12 Make.rules | 10 ++++++++--
13 1 file changed, 8 insertions(+), 2 deletions(-)
14
15diff --git a/Make.rules b/Make.rules
16index 3410d7b..d274e16 100644
17--- a/Make.rules
18+++ b/Make.rules
19@@ -9,7 +9,13 @@ ifneq ($(lib_name),)
20 CFLAGS_LIB ?= -fPIC
21 CFLAGS += $(CFLAGS_LIB)
22
23-libraries = $(lib_name).so $(lib_name).a
24+ifneq ($(enable_static),no)
25+libraries += $(lib_name).a
26+endif
27+
28+ifneq ($(enable_shared),no)
29+libraries += $(lib_name).so
30+endif
31
32 .PHONY: library
33
34@@ -23,7 +29,7 @@ prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries))
35
36 .PHONY: clean install
37
38-ifeq ($(static),1)
39+ifneq ($(enable_static),no)
40 LDFLAGS += -static
41 endif
42
43--
441.9.3
45