| 1 |
# Makefile corresponding to BAM2HINTS |
| 2 |
# |
| 3 |
# NOTE: |
| 4 |
# a) "-g" option allows for debugging |
| 5 |
# b) libbamtools.a and lz library are used during the linking process |
| 6 |
# |
| 7 |
|
| 8 |
include ../../common.mk |
| 9 |
|
| 10 |
CXX ?= g++ |
| 11 |
CXXFLAGS := -Wall -O3 ${CXXFLAGS} # -g -p -g -ggdb |
| 12 |
|
| 13 |
# keep compatibility with old versions still using BAMTOOLS_INSTALL_DIR |
| 14 |
BAMTOOLS_INSTALL_DIR ?= /usr |
| 15 |
|
| 16 |
# sets the default locations if it has not already been set in common.mk |
| 17 |
INCLUDE_PATH_BAMTOOLS ?= -I$(BAMTOOLS_INSTALL_DIR)/include/bamtools |
| 18 |
LIBRARY_PATH_BAMTOOLS ?= -L$(BAMTOOLS_INSTALL_DIR)/lib -Wl,-rpath,$(BAMTOOLS_INSTALL_DIR)/lib |
| 19 |
|
| 20 |
INCLS += $(INCLUDE_PATH_BAMTOOLS) |
| 21 |
LDFLAGS += $(LIBRARY_PATH_BAMTOOLS) |
| 22 |
LDLIBS += -lbamtools |
| 23 |
INCLS += $(INCLUDE_PATH_ZLIB) |
| 24 |
LDFLAGS += $(LIBRARY_PATH_ZLIB) |
| 25 |
LDLIBS += -lz |
| 26 |
|
| 27 |
.PHONY: all clean |
| 28 |
|
| 29 |
all: bam2hints |
| 30 |
|
| 31 |
bam2hints: bam2hints.o |
| 32 |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(INCLS) -o $@ $^ $(LDLIBS) |
| 33 |
mkdir -p ../../bin |
| 34 |
cp -f bam2hints ../../bin |
| 35 |
|
| 36 |
bam2hints.o: bam2hints.cc |
| 37 |
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLS) -c $^ |
| 38 |
|
| 39 |
clean: |
| 40 |
rm -f bam2hints.o bam2hints ../../bin/bam2hints |