Skip to content

Commit

Permalink
Use htslib_static.mk to get static link flags
Browse files Browse the repository at this point in the history
  • Loading branch information
daviesrob authored and mcshane committed Mar 7, 2017
1 parent 3c4f17e commit c3de3c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ all: $(PROG) $(TEST_PROG)
# Adjust $(HTSDIR) to point to your top-level htslib directory
HTSDIR = ../htslib
include $(HTSDIR)/htslib.mk
include $(HTSDIR)/htslib_static.mk
HTSLIB = $(HTSDIR)/libhts.a
BGZIP = $(HTSDIR)/bgzip
TABIX = $(HTSDIR)/tabix
HTSLIB_LDFLAGS = $(HTSLIB_static_LDFLAGS)
HTSLIB_LIBS = $(HTSLIB_static_LIBS)

CC = gcc
CPPFLAGS =
Expand Down Expand Up @@ -208,10 +211,10 @@ test/test-rbuf: test/test-rbuf.o
test/test-regidx.o: test/test-regidx.c regidx.h

test/test-regidx: test/test-regidx.o regidx.o $(HTSLIB)
$(CC) $(ALL_LDFLAGS) -o $@ $^ $(HTSLIB) -lpthread $(ALL_LIBS)
$(CC) $(ALL_LDFLAGS) -o $@ $^ $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(ALL_LIBS)

bcftools: $(HTSLIB) $(OBJS)
$(CC) $(DYNAMIC_FLAGS) $(ALL_LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread $(GSL_LIBS) $(ALL_LIBS)
$(CC) $(DYNAMIC_FLAGS) $(ALL_LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread $(HTSLIB_LIBS) $(GSL_LIBS) $(ALL_LIBS)

doc/bcftools.1: doc/bcftools.txt
cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt
Expand Down

0 comments on commit c3de3c4

Please sign in to comment.