ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/Makefile
Revision: 67
Committed: Mon Sep 19 19:39:49 2011 UTC (12 years, 11 months ago) by gpertea
File size: 2998 byte(s)
Log Message:
fixed segment_juncs to work with .bam files

Line User Rev File contents
1 gpertea 29 # Directories to search for header files
2     SEQAN = ./SeqAn-1.2
3     SEARCHDIRS := -I. -I${SEQAN} -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 ${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
48    
49     COM_OBJS = common.o reads.o tokenize.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 bam_merge bam2fastx prep_reads extract_reads long_spanning_reads segment_juncs tophat_reports
56    
57     .PHONY : all
58     # all: prep_reads
59     # all_exe: prep_reads extract_reads segment_juncs long_spanning_reads
60 gpertea 67 all: $(ALL_EXE)
61     debug: $(ALL_EXE)
62 gpertea 29 #all: bam_dump
63     #all: sam2bam
64     #debug: sam2bam
65     #all: prep_reads
66     #debug: prep_reads
67     sam2bam: ./sam2bam.o
68     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
69     bam_dump: ./bam_dump.o
70     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
71     #all: prep_reads
72     #debug: prep_reads
73     all_bin: ${ALL_EXE}
74     bwt2sam: ${COM_OBJS} bwt_map.o bwt2sam.o
75     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
76     bam2bed: ./bam2bed.o
77     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
78     bam2fastx: ./bam2fastx.o
79     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
80     bam_merge: ./bam_merge.o ./GBase.o
81     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
82     bwt_map.o: bwt_map.h
83     fix_map_ordering: ${COM_OBJS} bwt_map.o ./fix_map_ordering.o
84     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
85     long_spanning_reads: ${SEG_OBJS} ./long_spanning_reads.o
86     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
87     prep_reads: ${PREP_OBJS} ./prep_reads.o
88     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
89     extract_reads: ${COM_OBJS} ./extract_reads.o
90     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
91     gtf_juncs: ${COM_OBJS} bwt_map.o ${GFF_OBJS} ./gtf_juncs.o
92     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
93     segment_juncs: ${SEG_OBJS} ./segment_juncs.o
94     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
95     tophat_reports: ${SEG_OBJS} bwt_map.o deletions.o insertions.o inserts.o fragments.o align_status.o tophat_reports.o
96     ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LIBS}
97    
98     # target for removing all object files
99    
100     .PHONY : clean
101     clean::
102     ${RM} *.o sam2bam core core.* ${ALL_EXE} *.o*