unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob a1ae786d137bd17eef799440d4f1f1f7ec704e38 1782 bytes (raw)
name: packages/patches/cadical-add-shared-library.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
From fcb865786b524917aa9d3df8745aca66716794bf Mon Sep 17 00:00:00 2001
From: Mate Soos <soos.mate@gmail.com>
Date: Sun, 2 Jun 2024 21:50:06 -0400
Subject: [PATCH] Also add a dynamic library

---
Liliana Marie Prikler <liliana.prikler@gmail.com>:
  Added -L.
  Squashed fix for cadical and mobical.

 makefile.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/makefile.in b/makefile.in
index 291cb3e3..d179f591 100644
--- a/makefile.in
+++ b/makefile.in
@@ -34,7 +34,7 @@ COMPILE=$(CXX) $(CXXFLAGS) -I$(DIR) -I$(ROOT)/src
 
 #--------------------------------------------------------------------------#
 
-all: libcadical.a cadical mobical
+all: libcadical.so libcadical.a cadical mobical
 
 #--------------------------------------------------------------------------#
 
@@ -54,10 +54,10 @@ contrib/%.o: $(ROOT)/contrib/%.cpp $(ROOT)/contrib/%.hpp $(ROOT)/src/*.hpp makef
 # tester 'mobical') and the library are the main build targets.
 
 cadical: src/cadical.o libcadical.a makefile
-	$(COMPILE) -o $@ $< -L. -lcadical $(LIBS)
+	$(COMPILE) -static -o $@ $< -L. -lcadical $(LIBS)
 
 mobical: src/mobical.o libcadical.a makefile $(LIBS)
-	$(COMPILE) -o $@ $< -L. -lcadical
+	$(COMPILE) -static -o $@ $< -L. -lcadical
 
 libcadical.a: $(OBJ_SOLVER) $(OBJ_CONTRIB) makefile
 	ar rc $@ $(OBJ_SOLVER) $(OBJ_CONTRIB)
@@ -62,5 +62,8 @@ mobical: src/mobical.o libcadical.a makefile $(LIBS)
 libcadical.a: $(OBJ_SOLVER) $(OBJ_CONTRIB) makefile
 	ar rc $@ $(OBJ_SOLVER) $(OBJ_CONTRIB)
 
+libcadical.so: $(OBJ_SOLVER) $(OBJ_CONTRIB) $(LIBS) makefile
+	$(COMPILE) -shared -o $@ $(OBJ_SOLVER) $(OBJ_CONTRIB) $(LIBS)
+
 #--------------------------------------------------------------------------#
 
 # Note that 'build.hpp' is generated and resides in the build directory.

debug log:

solving a1ae786d137bd17eef799440d4f1f1f7ec704e38 ...
found a1ae786d137bd17eef799440d4f1f1f7ec704e38 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).