File: makefile

package info (click to toggle)
pbdagcon 0.3+git20161121.0000000+ds-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,432 kB
  • sloc: ansic: 17,770; cpp: 7,747; python: 1,075; makefile: 295; sh: 51
file content (76 lines) | stat: -rw-r--r-- 1,794 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
all:

THISDIR:=$(dir $(lastword ${MAKEFILE_LIST}))
-include ${CURDIR}/../../defines.mk

COMMON_OBJECTS := Alignment.o AlnGraphBoost.o
PBDAGCON_OBJECTS := BlasrM5AlnProvider.o main.o SimpleAligner.o
DAZCON_OBJECTS := DB.o QV.o align.o DazAlnProvider.o dazcon.o

CPPFLAGS += -MMD -MP
CXXFLAGS += -O3 -std=c++11 -Wall -Wuninitialized -pedantic
CFLAGS += -O3 -Wall -Wextra -fno-strict-aliasing

INCDIRS := \
	${DAZZ_DB_INCLUDE} \
	${DALIGNER_INCLUDE} \
	${LIBBLASR_INCLUDE} \
	${LIBPBDATA_INCLUDE} \
	${LIBPBIHDF_INCLUDE} \
	${PBBAM_INCLUDE} \
	${HDF5_INCLUDE} \
	${HTSLIB_INCLUDE}
SYS_INCDIRS := \
	${BOOST_INCLUDE} \
	${THISDIR}/third-party
LIBDIRS := \
	${LIBBLASR_LIB} \
	${LIBPBDATA_LIB} \
	${LIBPBIHDF_LIB} \
	${PBBAM_LIB} \
	${HDF5_LIB} \
	${HTSLIB_LIB} \
	${GCC_LIB} \
	${ZLIB_LIB}
LDLIBS+= \
	${LIBBLASR_LIBFLAGS} \
	${LIBPBDATA_LIBFLAGS} \
	${LIBPBIHDF_LIBFLAGS} \
	${PBBAM_LIBFLAGS} \
	${HDF5_LIBFLAGS} \
	${HTSLIB_LIBFLAGS} \
	${ZLIB_LIBFLAGS} \
	${PTHREAD_LIBFLAGS} \
	${DL_LIBFLAGS}
CPPFLAGS+=$(patsubst %,-I%,${INCDIRS}) $(patsubst %,-isystem%,${SYS_INCDIRS})
LDFLAGS+=$(patsubst %,-L %,${LIBDIRS})
LDFLAGS += ${EXTRA_LDFLAGS}

vpath align.c ${DALIGNER_SRC}
vpath DB.c ${DAZZ_DB_SRC}
vpath QV.c ${DAZZ_DB_SRC}

all: pbdagcon dazcon

# Technically does not need pbdata or blasr, but so what?
dazcon: $(COMMON_OBJECTS) $(DAZCON_OBJECTS)
	$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)

pbdagcon: $(COMMON_OBJECTS) $(PBDAGCON_OBJECTS)
	$(CXX) -o $@ $^ $(LDFLAGS) $(LDLIBS)

$(COMMON_OBJECTS) $(PBDAGCON_OBJECTS):

clean:
	$(RM) *.d
	$(RM) *.o
	$(RM) pbdagcon
	$(RM) dazcon

.PHONY: all clean

SRCS:=    $(notdir $(wildcard ${THISDIR}/*.c))
CPP_SRCS:=$(notdir $(wildcard ${THISDIR}/*.cpp))
DEPS:=$(patsubst %.c,%.d,${SRCS})
CPP_DEPS:=$(patsubst %.cpp,%.d,${CPP_SRCS})
-include ${DEPS} ${CPP_DEPS}