From e6c2d8f74bf2a473825f4bacf1f6e70e97315a26 Mon Sep 17 00:00:00 2001 From: Zilong-Li Date: Sat, 14 Dec 2024 21:21:58 +0100 Subject: [PATCH] fix configure, cleanup --- cleanup | 4 ++-- cleanup.win | 4 ++-- configure.win | 2 +- src/htslib-1.21/Makefile | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cleanup b/cleanup index 0582d76..8b57b8e 100755 --- a/cleanup +++ b/cleanup @@ -1,4 +1,4 @@ #!/bin/sh -rm -f src/htslib-1.19.1/config.h src/*.o src/*.so src/*.dll src/*.dylib -cd src/htslib-1.19.1/ && make clean && cd - +rm -f src/htslib-1.21/config.h src/*.o src/*.so src/*.dll src/*.dylib +cd src/htslib-1.21/ && make clean && cd - diff --git a/cleanup.win b/cleanup.win index 1675add..8b57b8e 100755 --- a/cleanup.win +++ b/cleanup.win @@ -1,4 +1,4 @@ #!/bin/sh -rm -f src/htslib-1.18/config.h src/*.o src/*.so src/*.dll src/*.dylib -cd src/htslib-1.18/ && make clean && cd - +rm -f src/htslib-1.21/config.h src/*.o src/*.so src/*.dll src/*.dylib +cd src/htslib-1.21/ && make clean && cd - diff --git a/configure.win b/configure.win index 6446244..6c9c0cc 100755 --- a/configure.win +++ b/configure.win @@ -2,4 +2,4 @@ HTSLIB_DIR="src/htslib-1.21" echo "Configuring HTSlib in $HTSLIB_DIR" -cd $HTSLIB_DIR && ./configure && make +cd $HTSLIB_DIR && ./configure --without-libdeflate && make diff --git a/src/htslib-1.21/Makefile b/src/htslib-1.21/Makefile index ef9b5a9..c97d2a3 100644 --- a/src/htslib-1.21/Makefile +++ b/src/htslib-1.21/Makefile @@ -22,9 +22,9 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -CC = gcc -AR = ar -RANLIB = ranlib +CC := $(shell ${R_HOME}/bin/R CMD config CC) +AR := $(shell ${R_HOME}/bin/R CMD config AR) +RANLIB := $(shell ${R_HOME}/bin/R CMD config RANLIB) # Default libraries to link if configure is not used htslib_default_libs = -lz -lm -lbz2 -llzma -lcurl @@ -35,7 +35,7 @@ CPPFLAGS = # TODO: probably update cram code to make it compile cleanly with -Wc++-compat # For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600 #CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -CFLAGS = -g -Wall -O2 -fvisibility=hidden +CFLAGS = -g -Wall -O2 -fvisibility=hidden -fPIC EXTRA_CFLAGS_PIC = -fpic TARGET_CFLAGS = LDFLAGS = -fvisibility=hidden