ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/Makefile
Revision: 154
Committed: Tue Jan 24 02:29:21 2012 UTC (7 years, 9 months ago) by gpertea
File size: 3460 byte(s)
Log Message:
massive update with Daehwan's work

Line File contents
1 # Directories to search for header files
2 SEQAN = ./SeqAn-1.2
3 SEARCHDIRS := -I. -I${SEQAN} -I.. -I/opt/geo/include
4
5 SYSTYPE := $(shell uname)
6
7 # C compiler
8
9 MACHTYPE := $(shell uname -m)
10 ifeq ($(MACHTYPE), i686)
11 MARCH = -march=i686
12 else
13 MARCH =
14 endif
15
16 CC := g++
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
25 CFLAGS = -g -DMEM_DEBUG -DDEBUG $(BASEFLAGS)
26 LDFLAGS = -g -L/opt/geo/lib
27 endif
28
29 %.o : %.c
30 ${CC} ${CFLAGS} -c $< -o $@
31
32 %.o : %.cc
33 ${CC} ${CFLAGS} -c $< -o $@
34
35 %.o : %.C
36 ${CC} ${CFLAGS} -c $< -o $@
37
38 %.o : %.cpp
39 ${CC} ${CFLAGS} -c $< -o $@
40
41 %.o : %.cxx
42 ${CC} ${CFLAGS} -c $< -o $@
43
44 # C/C++ linker
45
46 LINKER := g++
47 LIBS = -lz -lbam -lpthread -lboost_thread
48
49 COM_OBJS = common.o reads.o tokenize.o utils.o
50 PREP_OBJS = ${COM_OBJS} qual.o
51 GFF_OBJS = GBase.o GStr.o codons.o gdna.o GFaSeqGet.o gff.o
52 SEG_OBJS = ${COM_OBJS} bwt_map.o junctions.o
53 LONGSR_OBJS = ${COM_OBJS} bwt_map.o junctions.o
54
55 ALL_EXE = fix_map_ordering map2gtf gtf_to_fasta bam_merge bam2fastx \
56 prep_reads extract_reads long_spanning_reads gtf_juncs segment_juncs \
57 tophat_reports
58
59 .PHONY : all
60 all: segment_juncs
61 debug: segment_juncs
62 #all: prep_reads
63 #debug: prep_reads
64
65 # all_exe: prep_reads extract_reads segment_juncs long_spanning_reads
66 #all: $(ALL_EXE)
67 #debug: $(ALL_EXE)
68 #all: segment_juncs
69 #debug: segment_juncs
70 #all: bam_dump
71 #all: sam2bam
72 #debug: sam2bam
73 #all: prep_reads
74 #debug: prep_reads
75 sam2bam: ./sam2bam.o
76 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
77 bam_dump: ./bam_dump.o
78 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
79 #all: prep_reads
80 #debug: prep_reads
81 all_bin: ${ALL_EXE}
82 bwt2sam: ${COM_OBJS} bwt_map.o bwt2sam.o
83 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
84 bam2bed: ./bam2bed.o
85 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
86 bam2fastx: ./bam2fastx.o
87 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
88 bam_merge: ./bam_merge.o ./GBase.o
89 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
90 bwt_map.o: bwt_map.h
91 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} fusions.o long_spanning_reads.o
94 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
95 prep_reads: ${PREP_OBJS} ./prep_reads.o
96 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
97 extract_reads: ${COM_OBJS} ./extract_reads.o
98 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
99 gtf_to_fasta: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./FastaTools.o ./GTFToFasta.o
100 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
101 map2gtf: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./map2gtf.o
102 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
103 gtf_juncs: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./gtf_juncs.o
104 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
105 segment_juncs: ${SEG_OBJS} fusions.o segment_juncs.o
106 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
107 tophat_reports: ${SEG_OBJS} bwt_map.o deletions.o fusions.o insertions.o inserts.o fragments.o align_status.o tophat_reports.o
108 ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
109
110 # target for removing all object files
111
112 .PHONY : clean
113 clean::
114 ${RM} *.o sam2bam core core.* ${ALL_EXE}