Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #334

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auxprogs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all:
cd homGeneMapping; make;
cd joingenes; make;
cd utrrnaseq; make;
cd bam2wig; make;
#cd bam2wig; make;

clean:
cd aln2wig; make clean;
Expand Down
55 changes: 1 addition & 54 deletions auxprogs/bam2wig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,10 @@

include ../../common.mk

CC ?= gcc
CFLAGS := -Wall -O2 $(CFLAGS)

HTSERRHINT=""
ifndef INCLUDE_PATH_HTSLIB
# set INCLUDE_PATH_HTSLIB and LIBRARY_PATH_HTSLIB
# or HTSLIB_INSTALL_DIR if neither of these is specified as environment variable
# and libhts-dev is not installed
# keep compatibility with old versions still using TOOLDIR
ifdef TOOLDIR
HTSLIB_INSTALL_DIR = $(TOOLDIR)/htslib
endif
HTSLIB_INSTALL_DIR ?= $(HOME)/tools/htslib
ifneq ($(wildcard ${HTSLIB_INSTALL_DIR}/include/htslib/.),) # if HTSLIB_INSTALL_DIR exists and contains include/htslib
INCLUDE_PATH_HTSLIB = -I$(HTSLIB_INSTALL_DIR)/include/htslib
LIBRARY_PATH_HTSLIB = -L$(HTSLIB_INSTALL_DIR)/lib -Wl,-rpath,$(HTSLIB_INSTALL_DIR)/lib
else
ifneq ($(wildcard ${HTSLIB_INSTALL_DIR}/htslib/.),) # if HTSLIB_INSTALL_DIR exists and contains htslib
INCLUDE_PATH_HTSLIB = -I$(HTSLIB_INSTALL_DIR)/htslib
LIBRARY_PATH_HTSLIB = -L$(HTSLIB_INSTALL_DIR) -Wl,-rpath,$(HTSLIB_INSTALL_DIR)
else
HTSERRHINT="There is no htslib folder in directory $(HTSLIB_INSTALL_DIR) - "
endif
endif
endif

# set default include paths:
INCLUDE_PATH_HTSLIB ?= -I/usr/include/htslib -I/usr/local/include/htslib/
HTSERRHINT:=$(HTSERRHINT)"Check if HTSlib is installed and of version 1.10 or higher - see README.md"

INCLS += $(INCLUDE_PATH_HTSLIB)
LDFLAGS += $(LIBRARY_PATH_HTSLIB)
LDLIBS += -lhts
INCLS += $(INCLUDE_PATH_ZLIB)
LDFLAGS += $(LIBRARY_PATH_ZLIB)
LDLIBS += -lz -lpthread

# when using a static hts library, these additional libraries may be required :
# LDLIBS += -lcurl -lcrypto -llzma -lbz2 -lm -lcurses -lssl

.PHONY: all clean test

all: bam2wig

bam2wig: bam2wig.o
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
mkdir -p ../../bin
bam2wig: bam2wig
cp -f bam2wig ../../bin/bam2wig

bam2wig.o: bam2wig.c
-$(CC) $(CPPFLAGS) $(CFLAGS) $(INCLS) -c $^
@if [ ! -f $@ ]; then echo $(HTSERRHINT); exit 1; fi

clean:
rm -f bam2wig.o bam2wig
rm -f ../../bin/bam2wig
if [ -n $(shell which python3) ] ; then cd ../../tests/short && ./execute_test.py --clean bam2wig ; fi

test: bam2wig
cd ../../tests/short && ./execute_test.py --compare --html bam2wig
Loading