1 |
|
# Directories to search for header files |
2 |
< |
SEQAN = ./SeqAn-1.2 |
2 |
> |
SEQAN = ./SeqAn-1.3 |
3 |
|
SEARCHDIRS := -I. -I${SEQAN} -I.. -I/opt/geo/include |
4 |
|
|
5 |
|
SYSTYPE := $(shell uname) |
10 |
|
ifeq ($(MACHTYPE), i686) |
11 |
|
MARCH = -march=i686 |
12 |
|
else |
13 |
< |
MARCH = |
14 |
< |
endif |
13 |
> |
MARCH = -march=core2 |
14 |
> |
endif |
15 |
|
|
16 |
|
CC := g++ |
17 |
< |
BASEFLAGS = -Wall ${SEARCHDIRS} $(MARCH) -DHAVE_CONFIG_H \ |
17 |
> |
BASEFLAGS = -Wall -pthread ${SEARCHDIRS} $(MARCH) -DHAVE_CONFIG_H \ |
18 |
|
-fno-strict-aliasing -D_REENTRANT |
19 |
|
|
20 |
|
|
21 |
< |
ifeq ($(findstring debug,$(MAKECMDGOALS)),) |
22 |
< |
CFLAGS = -O2 -DNDEBUG $(BASEFLAGS) |
23 |
< |
LDFLAGS = -L/opt/geo/lib |
24 |
< |
else |
21 |
> |
ifeq ($(findstring nodebug,$(MAKECMDGOALS)),) |
22 |
|
CFLAGS = -g -DMEM_DEBUG -DDEBUG $(BASEFLAGS) |
23 |
|
LDFLAGS = -g -L/opt/geo/lib |
24 |
+ |
else |
25 |
+ |
CFLAGS = -O3 -msse2 -DNDEBUG $(BASEFLAGS) |
26 |
+ |
LDFLAGS = -L/opt/geo/lib |
27 |
|
endif |
28 |
|
|
29 |
|
%.o : %.c |
44 |
|
# C/C++ linker |
45 |
|
|
46 |
|
LINKER := g++ |
47 |
< |
LIBS = -lz -lbam |
47 |
> |
LIBS = -lz -lbam |
48 |
> |
BLIBS = ${LIBS} -lpthread -lboost_thread |
49 |
|
|
50 |
< |
COM_OBJS = common.o reads.o tokenize.o |
50 |
> |
COM_OBJS = common.o reads.o tokenize.o utils.o |
51 |
|
PREP_OBJS = ${COM_OBJS} qual.o |
52 |
|
GFF_OBJS = GBase.o GStr.o codons.o gdna.o GFaSeqGet.o gff.o |
53 |
< |
SEG_OBJS = ${COM_OBJS} bwt_map.o junctions.o |
54 |
< |
LONGSR_OBJS = ${COM_OBJS} bwt_map.o junctions.o |
53 |
> |
SEG_OBJS = ${COM_OBJS} bwt_map.o junctions.o insertions.o coverage.o \ |
54 |
> |
fragments.o align_status.o deletions.o fusions.o |
55 |
|
|
56 |
|
ALL_EXE = fix_map_ordering map2gtf gtf_to_fasta bam_merge bam2fastx \ |
57 |
< |
prep_reads extract_reads long_spanning_reads gtf_juncs segment_juncs \ |
57 |
> |
prep_reads extract_reads juncs_db long_spanning_reads gtf_juncs segment_juncs \ |
58 |
|
tophat_reports |
59 |
|
|
60 |
|
.PHONY : all |
61 |
< |
all: segment_juncs |
62 |
< |
debug: segment_juncs |
61 |
> |
#all: fix_map_ordering |
62 |
> |
all: prep_reads |
63 |
> |
#.PHONY : nodebug |
64 |
> |
nodebug : all |
65 |
|
#all: prep_reads |
66 |
|
#debug: prep_reads |
67 |
|
|
68 |
< |
# all_exe: prep_reads extract_reads segment_juncs long_spanning_reads |
68 |
> |
all_exe: $(ALL_EXE) |
69 |
|
#all: $(ALL_EXE) |
70 |
|
#debug: $(ALL_EXE) |
71 |
|
#all: segment_juncs |
88 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
89 |
|
bam2fastx: ./bam2fastx.o |
90 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
91 |
< |
bam_merge: ./bam_merge.o ./GBase.o |
91 |
> |
bam_merge: ./common.o ./tokenize.o ./bam_merge.o |
92 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
93 |
|
bwt_map.o: bwt_map.h |
94 |
< |
fix_map_ordering: ${COM_OBJS} bwt_map.o ./fix_map_ordering.o |
92 |
< |
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
93 |
< |
long_spanning_reads: ${SEG_OBJS} ./long_spanning_reads.o |
94 |
< |
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
95 |
< |
prep_reads: ${PREP_OBJS} ./prep_reads.o |
94 |
> |
fix_map_ordering: ${COM_OBJS} bwt_map.o fix_map_ordering.o |
95 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
96 |
< |
extract_reads: ${COM_OBJS} ./extract_reads.o |
96 |
> |
long_spanning_reads: ${SEG_OBJS} fusions.o long_spanning_reads.o |
97 |
> |
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${BLIBS} |
98 |
> |
prep_reads: ${PREP_OBJS} prep_reads.o |
99 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
100 |
< |
gtf_to_fasta: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./FastaTools.o ./GTFToFasta.o |
100 |
> |
extract_reads: ${COM_OBJS} extract_reads.o |
101 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
102 |
< |
map2gtf: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./map2gtf.o |
102 |
> |
gtf_to_fasta: ${COM_OBJS} bwt_map.o ${GFF_OBJS} FastaTools.o GTFToFasta.o |
103 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
104 |
< |
gtf_juncs: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./gtf_juncs.o |
104 |
> |
map2gtf: ${COM_OBJS} bwt_map.o ${GFF_OBJS} map2gtf.o |
105 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
106 |
< |
segment_juncs: ${SEG_OBJS} ./segment_juncs.o |
106 |
> |
gtf_juncs: ${COM_OBJS} bwt_map.o ${GFF_OBJS} gtf_juncs.o |
107 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
108 |
< |
tophat_reports: ${SEG_OBJS} bwt_map.o deletions.o insertions.o inserts.o fragments.o align_status.o tophat_reports.o |
108 |
> |
segment_juncs: ${SEG_OBJS} segment_juncs.o |
109 |
> |
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${BLIBS} |
110 |
> |
juncs_db: ${SEG_OBJS} juncs_db.o |
111 |
|
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS} |
112 |
+ |
tophat_reports: ${SEG_OBJS} inserts.o tophat_reports.o |
113 |
+ |
${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${BLIBS} |
114 |
+ |
tophat_reports.o prep_reads.o fix_map_ordering.o map2gtf.o bam_merge.o bam2fastx.o bwt_map.o common.o: common.h |
115 |
+ |
bwt_map.o: common.h bwt_map.h |
116 |
|
|
117 |
|
# target for removing all object files |
118 |
|
|