1 From 0f48e046f44624f4d4d8255ac5bd26397a38f16c Mon Sep 17 00:00:00 2001
2 From: Keshav Kini <keshav.kini@gmail.com>
3 Date: Sun, 23 Feb 2020 14:09:30 -0800
4 Subject: [PATCH] Support shared library build
6 Patch taken from [the ACL2 Books documentation][1].
8 - Add " -fPIC" to the CXXFLAGS to build position-independent code,
9 required for shared libraries.
11 - Add the line "export CXXFLAGS" below the setting of CXXFLAGS, so that
12 those flags apply to the recursive make of the core solver library.
14 - Fix a typo: replace the occurrence of "CXXLAGS" with "CXXFLAGS".
16 [1]: http://www.cs.utexas.edu/users/moore/acl2/v8-2/combined-manual/index.html?topic=IPASIR____BUILDING-AN-IPASIR-SOLVER-LIBRARY
19 1 file changed, 3 insertions(+), 2 deletions(-)
21 diff --git a/makefile b/makefile
22 index 07121de..4e85c4b 100755
25 @@ -29,7 +29,8 @@ TARGET=libipasir$(SIG).a
29 -CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3
30 +CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3 -fPIC
33 #-----------------------------------------------------------------------#
34 #- REQUIRED TOP RULES --------------------------------------------------#
35 @@ -67,7 +68,7 @@ libipasir$(SIG).a: .FORCE
36 #-----------------------------------------------------------------------#
38 ipasir$(NAME)glue.o: ipasir$(NAME)glue.cc ipasir.h makefile
39 - $(CXX) -g -std=c++11 $(CXXLAGS) \
40 + $(CXX) -g -std=c++11 $(CXXFLAGS) \
41 -DVERSION=\"$(VERSION)\" \
42 -I$(DIR) -I$(DIR)/core -c ipasir$(NAME)glue.cc