File: Makefile

package info (click to toggle)
libtabixpp 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 372 kB
  • ctags: 41
  • sloc: cpp: 163; makefile: 41; sh: 16
file content (42 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

# Use ?= to allow override from the env or command-line.

CC?=		gcc
CXX?= 		g++
CXXFLAGS+= -fPIC
INCLUDES?=	-Ihtslib
HTS_HEADERS?=	htslib/htslib/bgzf.h htslib/htslib/tbx.h
HTS_LIB?=	htslib/libhts.a
LIBPATH?=	-L. -Lhtslib
SONUMBER=0

DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE
PROG=		tabix++
SUBDIRS=.

.SUFFIXES:.c .o

.c.o:
	$(CC) -c $(CXXFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@

all:	$(PROG) libtabixpp.so.$(SONUMBER) libtabixpp.a

tabix.o: tabix.cpp tabix.hpp
	$(CXX) $(CXXFLAGS) -c tabix.cpp $(INCLUDES)

libtabixpp.a: tabix.o
	ar rcs $@ $<

libtabixpp.so.$(SONUMBER): tabix.o
	$(CXX) -shared -o $@ $< -fPIC -Wl,-soname,libtabixpp.so.$(SONUMBER) $(LDFLAGS) -lhts

tabix++: tabix.o main.cpp
	$(CXX) $(CXXFLAGS) -o $@ main.cpp tabix.o $(INCLUDES) $(LIBPATH) \
		-lhts -lpthread -lm -lz

cleanlocal:
	rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a tabix.aux tabix.log \
		tabix.pdf *.class libtabix*.dylib libtabix*so*
	#cd htslib && $(MAKE) clean

clean: cleanlocal