forked from bioconda/bioconda-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build shared library for quicktree (bioconda#45326)
* Build shared library for quicktree * Make BSD mkdir happy
- Loading branch information
1 parent
faf579b
commit 820dc54
Showing
3 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p $PREFIX/bin | ||
set -eux | ||
|
||
mkdir -p "$PREFIX"/{bin,lib,include/quicktree} | ||
|
||
make CC=$CC | ||
|
||
cp quicktree $PREFIX/bin | ||
cp libquicktree.so "${PREFIX}/lib/" | ||
# some header files are named generic enough to warrant namespacing | ||
cp include/*.h "${PREFIX}/include/quicktree/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
recipes/quicktree/patches/0001-Add-rule-to-build-shared-library.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 390c2db84a0fd0ff3a05d77407d18da3b9c26d63 Mon Sep 17 00:00:00 2001 | ||
From: Travis Wrightsman <[email protected]> | ||
Date: Sat, 20 Jan 2024 17:46:20 -0500 | ||
Subject: [PATCH] Add rule to build shared library | ||
|
||
--- | ||
Makefile | 9 ++++++--- | ||
1 file changed, 6 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index 14e42a4..7fe8385 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -15,15 +15,18 @@ QUICKTREEOBJ = $(COMMON) $(OBJ)/quicktree.o $(OBJ)/buildtree.o $(OBJ)/tree.o | ||
|
||
|
||
CC = gcc | ||
-CFLAGS = -c -I$(INC) -O2 -Wunused-result | ||
+CFLAGS = -c -I$(INC) -O2 -Wunused-result -fPIC | ||
|
||
LFLAGS = -g | ||
|
||
-all: quicktree | ||
+all: quicktree libquicktree.so | ||
|
||
quicktree : $(QUICKTREEOBJ) | ||
$(CC) $(LFLAGS) -o $@ $(QUICKTREEOBJ) -lm | ||
|
||
+libquicktree.so: $(QUICKTREEOBJ) | ||
+ $(CC) -shared $(LFLAGS) -o $@ $(QUICKTREEOBJ) -lm | ||
+ | ||
$(OBJ)/quicktree.o : $(SRC)/quicktree.c $(INC)/version.h | ||
$(CC) $(CFLAGS) -o $(OBJ)/quicktree.o $(SRC)/quicktree.c | ||
|
||
@@ -52,4 +55,4 @@ $(OBJ)/options.o : $(SRC)/options.c $(INC)/options.h | ||
$(CC) $(CFLAGS) -o $(OBJ)/options.o $(SRC)/options.c | ||
|
||
clean: | ||
- rm $(OBJ)/*.o quicktree | ||
+ rm $(OBJ)/*.o quicktree libquicktree.so | ||
-- | ||
2.39.2 | ||
|