Skip to content

Commit

Permalink
update configure and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Dec 15, 2024
1 parent 84532a4 commit 08e1cf5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*.tar.gz
*.tbi
vignettes/*_cache
src/htslib-1.18
src/htslib-1.21
test-random.R

## lsp
Expand Down
14 changes: 13 additions & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/sh
# Configure script for R package with htslib integration

# Exit on any error
set -e

HTSLIB_DIR="src/htslib-1.21"
echo "Configuring HTSlib in $HTSLIB_DIR"
cd $HTSLIB_DIR && ./configure --enable-static --disable-shared --without-libdeflate && make
cd $HTSLIB_DIR
./configure \
--disable-shared \
--enable-static \
--without-libdeflate \
CFLAGS="-O2 -fPIC"

make

10 changes: 9 additions & 1 deletion configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@

HTSLIB_DIR="src/htslib-1.21"
echo "Configuring HTSlib in $HTSLIB_DIR"
cd $HTSLIB_DIR && ./configure --without-libdeflate && make
cd $HTSLIB_DIR
./configure \
--disable-shared \
--enable-static \
--without-libdeflate \
CFLAGS="-O2 -fPIC"

make

2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
HTSLIB_DIR='htslib-1.21'
PKG_CPPFLAGS = -I${HTSLIB_DIR} -I../inst/include
PKG_LIBS = ${HTSLIB_DIR}/libhts.a -lz -lm -lbz2 -llzma -lcurl
PKG_LIBS = ${HTSLIB_DIR}/libhts.a -fPIC -lz -lm -lbz2 -llzma -lcurl

.PHONY: all clean

Expand Down

0 comments on commit 08e1cf5

Please sign in to comment.