| 1 |
CXX = g++ |
| 2 |
ARCH = -mtune=generic |
| 3 |
VERSION = 0.7.5 |
| 4 |
# ARCH = -march=core2 |
| 5 |
# ARCH = -march=native |
| 6 |
|
| 7 |
|
| 8 |
# Use O1 for debuiggging so it's not totally slow. |
| 9 |
DBGFLAGS = -O1 -ggdb -U_FORTIFY_SOURCE |
| 10 |
COFLAGS = $(ARCH) -O2 -pipe |
| 11 |
CXXFLAGS += $(CPPFLAGS) -DBS_VERSION=\"$(VERSION)\" -Wall $(COFLAGS) |
| 12 |
# -Wvla does not work with old gcc |
| 13 |
# -ffast-math segfaults with old gcc, don't use. |
| 14 |
LDFLAGS += -Wl,-gc-sections |
| 15 |
BOOSTFLAGS = -I . |
| 16 |
OPENMP = -fopenmp -DSUPPORT_OPENMP |
| 17 |
|
| 18 |
PROGRAMS = \ |
| 19 |
convertSamples \ |
| 20 |
estimateDE \ |
| 21 |
estimateExpression \ |
| 22 |
estimateHyperPar \ |
| 23 |
estimateVBExpression \ |
| 24 |
extractSamples \ |
| 25 |
getFoldChange \ |
| 26 |
getGeneExpression \ |
| 27 |
getPPLR \ |
| 28 |
getVariance \ |
| 29 |
getWithinGeneExpression \ |
| 30 |
parseAlignment \ |
| 31 |
transposeLargeFile |
| 32 |
|
| 33 |
all: $(PROGRAMS) |
| 34 |
|
| 35 |
COMMON_DEPS = ArgumentParser.o common.o FileHeader.o misc.o MyTimer.o |
| 36 |
# PROGRAMS: |
| 37 |
convertSamples: convertSamples.cpp $(COMMON_DEPS) TranscriptInfo.o |
| 38 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) convertSamples.cpp $(COMMON_DEPS) TranscriptInfo.o -o convertSamples |
| 39 |
|
| 40 |
estimateDE: estimateDE.cpp $(COMMON_DEPS) PosteriorSamples.o |
| 41 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) $(LDFLAGS) estimateDE.cpp $(COMMON_DEPS) PosteriorSamples.o -o estimateDE |
| 42 |
|
| 43 |
estimateExpression: estimateExpression.cpp $(COMMON_DEPS) CollapsedSampler.o GibbsParameters.o GibbsSampler.o Sampler.o TagAlignments.o TranscriptInfo.o transposeFiles.o |
| 44 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) $(OPENMP) $(LDFLAGS) estimateExpression.cpp $(COMMON_DEPS) CollapsedSampler.o GibbsParameters.o GibbsSampler.o Sampler.o TagAlignments.o TranscriptInfo.o transposeFiles.o -o estimateExpression |
| 45 |
|
| 46 |
estimateHyperPar: estimateHyperPar.cpp $(COMMON_DEPS) lowess.o PosteriorSamples.o TranscriptExpression.o |
| 47 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) $(LDFLAGS) estimateHyperPar.cpp $(COMMON_DEPS) lowess.o PosteriorSamples.o TranscriptExpression.o -o estimateHyperPar |
| 48 |
|
| 49 |
estimateVBExpression: estimateVBExpression.cpp $(COMMON_DEPS) SimpleSparse.o TagAlignments.o TranscriptInfo.o transposeFiles.o VariationalBayes.o |
| 50 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) $(OPENMP) $(LDFLAGS) estimateVBExpression.cpp $(COMMON_DEPS) SimpleSparse.o TagAlignments.o TranscriptInfo.o transposeFiles.o VariationalBayes.o -o estimateVBExpression |
| 51 |
|
| 52 |
extractSamples: extractSamples.cpp $(COMMON_DEPS) PosteriorSamples.o |
| 53 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) extractSamples.cpp $(COMMON_DEPS) PosteriorSamples.o -o extractSamples |
| 54 |
|
| 55 |
getFoldChange: getFoldChange.cpp $(COMMON_DEPS) PosteriorSamples.o |
| 56 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) getFoldChange.cpp $(COMMON_DEPS) PosteriorSamples.o -o getFoldChange |
| 57 |
|
| 58 |
getGeneExpression: getGeneExpression.cpp $(COMMON_DEPS) PosteriorSamples.o TranscriptInfo.o |
| 59 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) getGeneExpression.cpp $(COMMON_DEPS) PosteriorSamples.o TranscriptInfo.o -o getGeneExpression |
| 60 |
|
| 61 |
getPPLR: getPPLR.cpp $(COMMON_DEPS) PosteriorSamples.o |
| 62 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) getPPLR.cpp $(COMMON_DEPS) PosteriorSamples.o -o getPPLR |
| 63 |
|
| 64 |
getVariance: getVariance.cpp $(COMMON_DEPS) PosteriorSamples.o |
| 65 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) getVariance.cpp $(COMMON_DEPS) PosteriorSamples.o -o getVariance |
| 66 |
|
| 67 |
getWithinGeneExpression: getWithinGeneExpression.cpp $(COMMON_DEPS) PosteriorSamples.o TranscriptInfo.o |
| 68 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) getWithinGeneExpression.cpp $(COMMON_DEPS) PosteriorSamples.o TranscriptInfo.o -o getWithinGeneExpression |
| 69 |
|
| 70 |
parseAlignment: parseAlignment.cpp $(COMMON_DEPS) ReadDistribution.o TranscriptExpression.o TranscriptInfo.o TranscriptSequence.o |
| 71 |
$(CXX) $(CXXFLAGS) $(OPENMP) $(LDFLAGS) -pthread parseAlignment.cpp $(COMMON_DEPS) ReadDistribution.o TranscriptExpression.o TranscriptInfo.o TranscriptSequence.o -lbam -lz -o parseAlignment |
| 72 |
|
| 73 |
transposeLargeFile: transposeLargeFile.cpp $(COMMON_DEPS) transposeFiles.o |
| 74 |
$(CXX) $(CXXFLAGS) $(LDFLAGS) transposeLargeFile.cpp $(COMMON_DEPS) transposeFiles.o -o transposeLargeFile |
| 75 |
|
| 76 |
# LIBRARIES: |
| 77 |
ArgumentParser.o: ArgumentParser.cpp ArgumentParser.h |
| 78 |
$(CXX) $(CXXFLAGS) -ffunction-sections -fdata-sections -c ArgumentParser.cpp |
| 79 |
|
| 80 |
CollapsedSampler.o: CollapsedSampler.cpp CollapsedSampler.h GibbsParameters.h Sampler.h |
| 81 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) -c CollapsedSampler.cpp |
| 82 |
|
| 83 |
FileHeader.o: common.h misc.h FileHeader.cpp FileHeader.h |
| 84 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) -ffunction-sections -fdata-sections -c FileHeader.cpp |
| 85 |
|
| 86 |
GibbsSampler.o: GibbsSampler.cpp GibbsSampler.h GibbsParameters.h Sampler.h |
| 87 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) -c GibbsSampler.cpp |
| 88 |
|
| 89 |
misc.o: ArgumentParser.h PosteriorSamples.h misc.cpp misc.h |
| 90 |
$(CXX) $(CXXFLAGS) -ffunction-sections -fdata-sections -c misc.cpp |
| 91 |
|
| 92 |
MyTimer.o: MyTimer.h MyTimer.cpp |
| 93 |
$(CXX) $(CXXFLAGS) -ffunction-sections -fdata-sections -c MyTimer.cpp |
| 94 |
|
| 95 |
PosteriorSamples.o: PosteriorSamples.cpp PosteriorSamples.h FileHeader.h |
| 96 |
$(CXX) $(CXXFLAGS) -ffunction-sections -fdata-sections -c PosteriorSamples.cpp |
| 97 |
|
| 98 |
ReadDistribution.o: ReadDistribution.cpp ReadDistribution.h TranscriptExpression.h TranscriptInfo.h TranscriptSequence.h |
| 99 |
$(CXX) $(CXXFLAGS) $(OPENMP) -c ReadDistribution.cpp |
| 100 |
|
| 101 |
Sampler.o: Sampler.cpp Sampler.h GibbsParameters.h |
| 102 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) -c Sampler.cpp |
| 103 |
|
| 104 |
SimpleSparse.o: SimpleSparse.cpp SimpleSparse.h |
| 105 |
$(CXX) $(CXXFLAGS) $(OPENMP) -c SimpleSparse.cpp |
| 106 |
|
| 107 |
VariationalBayes.o: VariationalBayes.cpp VariationalBayes.h SimpleSparse.h |
| 108 |
$(CXX) $(CXXFLAGS) $(BOOSTFLAGS) $(OPENMP) -c VariationalBayes.cpp |
| 109 |
|
| 110 |
common.o: common.cpp common.h |
| 111 |
GibbsParameters.o: ArgumentParser.h GibbsParameters.cpp GibbsParameters.h |
| 112 |
lowess.o: lowess.cpp lowess.h |
| 113 |
TagAlignments.o: TagAlignments.cpp TagAlignments.h |
| 114 |
TranscriptExpression.o: TranscriptExpression.cpp TranscriptExpression.h |
| 115 |
TranscriptInfo.o: TranscriptInfo.cpp TranscriptInfo.h |
| 116 |
TranscriptSequence.o: TranscriptSequence.cpp TranscriptSequence.h |
| 117 |
transposeFiles.o: transposeFiles.cpp transposeFiles.h FileHeader.h |
| 118 |
|
| 119 |
# CLEAN: |
| 120 |
clean: |
| 121 |
rm -f *.o $(PROGRAMS) |
| 122 |
|
| 123 |
clean-all: |
| 124 |
rm -f samtools/*.o *.o $(PROGRAMS) |
| 125 |
|