1 This patch simplifies the Makefile, making it much easier to build rsem
2 without the bundled version of samtools. It has already been submitted
3 upstream: https://github.com/bli25wisc/RSEM/pull/11
5 From 161894e91a16c7e15af57e4fcfe8cb613711c7fa Mon Sep 17 00:00:00 2001
6 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
7 Date: Wed, 22 Apr 2015 14:51:07 +0200
8 Subject: [PATCH 1/7] remove all headers from Makefile
11 Makefile | 95 +++++++++++-----------------------------------------------------
12 1 file changed, 16 insertions(+), 79 deletions(-)
14 diff --git a/Makefile b/Makefile
15 index 54e2603..3a55ed8 100644
18 @@ -10,133 +10,70 @@ all : $(PROGRAMS)
22 -Transcript.h : utils.h
24 -Transcripts.h : utils.h my_assert.h Transcript.h
26 -rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp
27 +rsem-extract-reference-transcripts : extractRef.cpp
28 $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
30 -rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp
31 +rsem-synthesis-reference-transcripts : synthesisRef.cpp
32 $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
34 -BowtieRefSeqPolicy.h : RefSeqPolicy.h
38 -Refs.h : utils.h RefSeq.h RefSeqPolicy.h PolyARules.h
41 rsem-preref : preRef.o
42 $(CC) preRef.o -o rsem-preref
44 -preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp
45 +preRef.o : preRef.cpp
46 $(CC) $(COFLAGS) preRef.cpp
49 -SingleRead.h : Read.h
51 -SingleReadQ.h : Read.h
53 -PairedEndRead.h : Read.h SingleRead.h
55 -PairedEndReadQ.h : Read.h SingleReadQ.h
58 -PairedEndHit.h : SingleHit.h
60 -HitContainer.h : GroupInfo.h
63 -SamParser.h : sam/sam.h sam/bam.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h
66 rsem-parse-alignments : parseIt.o sam/libbam.a
67 $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
69 -parseIt.o : utils.h GroupInfo.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h Transcripts.h sam/sam.h sam/bam.h parseIt.cpp
70 +parseIt.o : parseIt.cpp
71 $(CC) -Wall -O2 -c -I. parseIt.cpp
74 -rsem-build-read-index : utils.h buildReadIndex.cpp
75 +rsem-build-read-index : buildReadIndex.cpp
76 $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
79 -simul.h : boost/random.hpp
81 -ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h
83 -SingleModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h SingleHit.h ReadReader.h simul.h
85 -SingleQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h SingleHit.h ReadReader.h simul.h
87 -PairedEndModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h PairedEndRead.h PairedEndHit.h ReadReader.h simul.h
89 -PairedEndQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h PairedEndReadQ.h PairedEndHit.h ReadReader.h simul.h
91 -HitWrapper.h : HitContainer.h
93 -sam_rsem_aux.h : sam/bam.h
95 -sam_rsem_cvt.h : sam/bam.h Transcript.h Transcripts.h
97 -BamWriter.h : sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h SingleHit.h PairedEndHit.h HitWrapper.h Transcript.h Transcripts.h
99 -sampling.h : boost/random.hpp
101 -WriteResults.h : utils.h my_assert.h GroupInfo.h Transcript.h Transcripts.h RefSeq.h Refs.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h
103 rsem-run-em : EM.o sam/libbam.a
104 $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
106 -EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h sam/bam.h sam/sam.h simul.h sam_rsem_aux.h sampling.h boost/random.hpp WriteResults.h EM.cpp
108 $(CC) $(COFLAGS) EM.cpp
110 -bc_aux.h : sam/bam.h
112 -BamConverter.h : utils.h my_assert.h sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h bc_aux.h Transcript.h Transcripts.h
114 -rsem-tbam2gbam : utils.h Transcripts.h Transcript.h bc_aux.h BamConverter.h sam/sam.h sam/bam.h sam/libbam.a sam_rsem_aux.h sam_rsem_cvt.h tbam2gbam.cpp sam/libbam.a
115 +rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
116 $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
118 -rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2wig.cpp
119 +rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
120 $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
122 -rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2readdepth.cpp
123 +rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
124 $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
126 -wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h
127 +wiggle.o: wiggle.cpp
128 $(CC) $(COFLAGS) wiggle.cpp
130 rsem-simulate-reads : simulation.o
131 $(CC) -o rsem-simulate-reads simulation.o
133 -simulation.o : utils.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h RefSeq.h GroupInfo.h Transcript.h Transcripts.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h Profile.h NoiseProfile.h simul.h boost/random.hpp WriteResults.h simulation.cpp
134 +simulation.o : simulation.cpp
135 $(CC) $(COFLAGS) simulation.cpp
137 rsem-run-gibbs : Gibbs.o
138 $(CC) -o rsem-run-gibbs Gibbs.o -lpthread
140 -#some header files are omitted
141 -Gibbs.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Gibbs.cpp
143 $(CC) $(COFLAGS) Gibbs.cpp
145 -Buffer.h : my_assert.h
147 rsem-calculate-credibility-intervals : calcCI.o
148 $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
150 -#some header files are omitted
151 -calcCI.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Buffer.h calcCI.cpp
152 +calcCI.o : calcCI.cpp
153 $(CC) $(COFLAGS) calcCI.cpp
155 -rsem-get-unique : sam/bam.h sam/sam.h getUnique.cpp sam/libbam.a
156 +rsem-get-unique : getUnique.cpp sam/libbam.a
157 $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@
159 -rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a
160 +rsem-sam-validator : samValidator.cpp sam/libbam.a
161 $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@
163 -rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a
164 +rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
165 $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
169 From ec136638a727632e20abfaeb65c22c46d15ca8c4 Mon Sep 17 00:00:00 2001
170 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
171 Date: Wed, 22 Apr 2015 15:06:41 +0200
172 Subject: [PATCH 2/7] include current dir, ./sam and ./boost by default
175 Makefile | 48 ++++++++++++++++++++++++------------------------
176 1 file changed, 24 insertions(+), 24 deletions(-)
178 diff --git a/Makefile b/Makefile
179 index 3a55ed8..1dd97ca 100644
184 -CFLAGS = -Wall -c -I.
185 -COFLAGS = -Wall -O3 -ffast-math -c -I.
186 +CFLAGS = -Wall -I. -I./sam -I./boost
187 +COFLAGS = -O3 -ffast-math -c
188 PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads
190 .PHONY : all ebseq clean
191 @@ -11,70 +11,70 @@ sam/libbam.a :
194 rsem-extract-reference-transcripts : extractRef.cpp
195 - $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
196 + $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
198 rsem-synthesis-reference-transcripts : synthesisRef.cpp
199 - $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
200 + $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
202 rsem-preref : preRef.o
203 - $(CC) preRef.o -o rsem-preref
204 + $(CC) $(CFLAGS) preRef.o -o rsem-preref
206 preRef.o : preRef.cpp
207 - $(CC) $(COFLAGS) preRef.cpp
208 + $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
210 rsem-parse-alignments : parseIt.o sam/libbam.a
211 - $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
212 + $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
214 parseIt.o : parseIt.cpp
215 - $(CC) -Wall -O2 -c -I. parseIt.cpp
216 + $(CC) $(CFLAGS) -O2 -c parseIt.cpp
218 rsem-build-read-index : buildReadIndex.cpp
219 - $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
220 + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
222 rsem-run-em : EM.o sam/libbam.a
223 - $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
224 + $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
227 - $(CC) $(COFLAGS) EM.cpp
228 + $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
230 rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
231 - $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
232 + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
234 rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
235 - $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
236 + $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
238 rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
239 - $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
240 + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
243 - $(CC) $(COFLAGS) wiggle.cpp
244 + $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
246 rsem-simulate-reads : simulation.o
247 - $(CC) -o rsem-simulate-reads simulation.o
248 + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
250 simulation.o : simulation.cpp
251 - $(CC) $(COFLAGS) simulation.cpp
252 + $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
254 rsem-run-gibbs : Gibbs.o
255 - $(CC) -o rsem-run-gibbs Gibbs.o -lpthread
256 + $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
259 - $(CC) $(COFLAGS) Gibbs.cpp
260 + $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
262 rsem-calculate-credibility-intervals : calcCI.o
263 - $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
264 + $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
266 calcCI.o : calcCI.cpp
267 - $(CC) $(COFLAGS) calcCI.cpp
268 + $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
270 rsem-get-unique : getUnique.cpp sam/libbam.a
271 - $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@
272 + $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
274 rsem-sam-validator : samValidator.cpp sam/libbam.a
275 - $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@
276 + $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@
278 rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
279 - $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
280 + $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
283 cd EBSeq ; ${MAKE} all
285 From d366614ea50f79fdd93e3c76383ccb6fcdeaa8e0 Mon Sep 17 00:00:00 2001
286 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
287 Date: Wed, 22 Apr 2015 15:10:49 +0200
288 Subject: [PATCH 3/7] separate object rules from rules for executables
291 Makefile | 50 ++++++++++++++++++++++++++------------------------
292 1 file changed, 26 insertions(+), 24 deletions(-)
294 diff --git a/Makefile b/Makefile
295 index 1dd97ca..ae4de3b 100644
298 @@ -10,6 +10,32 @@ all : $(PROGRAMS)
303 + cd EBSeq ; ${MAKE} all
306 +calcCI.o : calcCI.cpp
307 + $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
310 + $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
313 + $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
315 +preRef.o : preRef.cpp
316 + $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
318 +parseIt.o : parseIt.cpp
319 + $(CC) $(CFLAGS) -O2 -c parseIt.cpp
321 +simulation.o : simulation.cpp
322 + $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
324 +wiggle.o: wiggle.cpp
325 + $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
328 rsem-extract-reference-transcripts : extractRef.cpp
329 $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
331 @@ -19,24 +45,15 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
332 rsem-preref : preRef.o
333 $(CC) $(CFLAGS) preRef.o -o rsem-preref
335 -preRef.o : preRef.cpp
336 - $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
338 rsem-parse-alignments : parseIt.o sam/libbam.a
339 $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
341 -parseIt.o : parseIt.cpp
342 - $(CC) $(CFLAGS) -O2 -c parseIt.cpp
344 rsem-build-read-index : buildReadIndex.cpp
345 $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
347 rsem-run-em : EM.o sam/libbam.a
348 $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
351 - $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
353 rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
354 $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
356 @@ -46,27 +63,15 @@ rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
357 rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
358 $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
360 -wiggle.o: wiggle.cpp
361 - $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
363 rsem-simulate-reads : simulation.o
364 $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
366 -simulation.o : simulation.cpp
367 - $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
369 rsem-run-gibbs : Gibbs.o
370 $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
373 - $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
375 rsem-calculate-credibility-intervals : calcCI.o
376 $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
378 -calcCI.o : calcCI.cpp
379 - $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
381 rsem-get-unique : getUnique.cpp sam/libbam.a
382 $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
384 @@ -76,9 +81,6 @@ rsem-sam-validator : samValidator.cpp sam/libbam.a
385 rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
386 $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
389 - cd EBSeq ; ${MAKE} all
392 rm -f *.o *~ $(PROGRAMS)
393 cd sam ; ${MAKE} clean
395 From 6ba1c33cccdf7c8e7df7a3189e7db204be3b1e8d Mon Sep 17 00:00:00 2001
396 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
397 Date: Wed, 22 Apr 2015 15:28:30 +0200
398 Subject: [PATCH 4/7] add ./sam to library directories, link with -lbam
401 Makefile | 36 ++++++++++++++++++------------------
402 1 file changed, 18 insertions(+), 18 deletions(-)
404 diff --git a/Makefile b/Makefile
405 index ae4de3b..a87cc4d 100644
410 -CFLAGS = -Wall -I. -I./sam -I./boost
411 +CFLAGS = -Wall -I. -I./sam -I./boost -L./sam
412 COFLAGS = -O3 -ffast-math -c
413 PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads
415 .PHONY : all ebseq clean
418 +all : sam/libbam.a $(PROGRAMS)
422 @@ -45,23 +45,23 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
423 rsem-preref : preRef.o
424 $(CC) $(CFLAGS) preRef.o -o rsem-preref
426 -rsem-parse-alignments : parseIt.o sam/libbam.a
427 - $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
428 +rsem-parse-alignments : parseIt.o
429 + $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread
431 rsem-build-read-index : buildReadIndex.cpp
432 $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
434 -rsem-run-em : EM.o sam/libbam.a
435 - $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
437 + $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
439 -rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
440 - $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
441 +rsem-tbam2gbam : tbam2gbam.cpp
442 + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
444 -rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
445 - $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
446 +rsem-bam2wig : wiggle.o bam2wig.cpp
447 + $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@
449 -rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
450 - $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
451 +rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
452 + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
454 rsem-simulate-reads : simulation.o
455 $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
456 @@ -72,14 +72,14 @@ rsem-run-gibbs : Gibbs.o
457 rsem-calculate-credibility-intervals : calcCI.o
458 $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
460 -rsem-get-unique : getUnique.cpp sam/libbam.a
461 - $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
462 +rsem-get-unique : getUnique.cpp
463 + $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
465 -rsem-sam-validator : samValidator.cpp sam/libbam.a
466 - $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@
467 +rsem-sam-validator : samValidator.cpp
468 + $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@
470 -rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
471 - $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
472 +rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp
473 + $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@
476 rm -f *.o *~ $(PROGRAMS)
478 From 5402b88c269df79ee245c1c59e15f3c8282a0220 Mon Sep 17 00:00:00 2001
479 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
480 Date: Wed, 22 Apr 2015 15:33:02 +0200
481 Subject: [PATCH 5/7] do not repeat target name, use $@ instead
484 Makefile | 18 +++++++++---------
485 1 file changed, 9 insertions(+), 9 deletions(-)
487 diff --git a/Makefile b/Makefile
488 index a87cc4d..7ec90a3 100644
491 @@ -37,22 +37,22 @@ wiggle.o: wiggle.cpp
494 rsem-extract-reference-transcripts : extractRef.cpp
495 - $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
496 + $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@
498 rsem-synthesis-reference-transcripts : synthesisRef.cpp
499 - $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
500 + $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@
502 rsem-preref : preRef.o
503 - $(CC) $(CFLAGS) preRef.o -o rsem-preref
504 + $(CC) $(CFLAGS) preRef.o -o $@
506 rsem-parse-alignments : parseIt.o
507 - $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread
508 + $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread
510 rsem-build-read-index : buildReadIndex.cpp
511 - $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
512 + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@
515 - $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
516 + $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
518 rsem-tbam2gbam : tbam2gbam.cpp
519 $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
520 @@ -64,13 +64,13 @@ rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
521 $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
523 rsem-simulate-reads : simulation.o
524 - $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
525 + $(CC) $(CFLAGS) -o $@ simulation.o
527 rsem-run-gibbs : Gibbs.o
528 - $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
529 + $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
531 rsem-calculate-credibility-intervals : calcCI.o
532 - $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
533 + $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread
535 rsem-get-unique : getUnique.cpp
536 $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
538 From f60784bc7aa303cc825bd87dd3f5d7d26c51bded Mon Sep 17 00:00:00 2001
539 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
540 Date: Wed, 22 Apr 2015 15:44:53 +0200
541 Subject: [PATCH 6/7] use automatic variables to refer to prerequisites
544 Makefile | 44 ++++++++++++++++++++++----------------------
545 1 file changed, 22 insertions(+), 22 deletions(-)
547 diff --git a/Makefile b/Makefile
548 index 7ec90a3..6540d81 100644
551 @@ -15,71 +15,71 @@ ebseq :
554 calcCI.o : calcCI.cpp
555 - $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
556 + $(CC) $(CFLAGS) $(COFLAGS) $<
559 - $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
560 + $(CC) $(CFLAGS) $(COFLAGS) $<
563 - $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
564 + $(CC) $(CFLAGS) $(COFLAGS) $<
566 preRef.o : preRef.cpp
567 - $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
568 + $(CC) $(CFLAGS) $(COFLAGS) $<
570 parseIt.o : parseIt.cpp
571 - $(CC) $(CFLAGS) -O2 -c parseIt.cpp
572 + $(CC) $(CFLAGS) -O2 -c $<
574 simulation.o : simulation.cpp
575 - $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
576 + $(CC) $(CFLAGS) $(COFLAGS) $<
579 - $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
580 + $(CC) $(CFLAGS) $(COFLAGS) $<
583 rsem-extract-reference-transcripts : extractRef.cpp
584 - $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@
585 + $(CC) $(CFLAGS) -O3 $< -o $@
587 rsem-synthesis-reference-transcripts : synthesisRef.cpp
588 - $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@
589 + $(CC) $(CFLAGS) -O3 $< -o $@
591 rsem-preref : preRef.o
592 - $(CC) $(CFLAGS) preRef.o -o $@
593 + $(CC) $(CFLAGS) $< -o $@
595 rsem-parse-alignments : parseIt.o
596 - $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread
597 + $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
599 rsem-build-read-index : buildReadIndex.cpp
600 - $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@
601 + $(CC) $(CFLAGS) -O3 $< -o $@
604 - $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
605 + $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
607 rsem-tbam2gbam : tbam2gbam.cpp
608 - $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
609 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
611 rsem-bam2wig : wiggle.o bam2wig.cpp
612 - $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@
613 + $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@
615 rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
616 - $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
617 + $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@
619 rsem-simulate-reads : simulation.o
620 - $(CC) $(CFLAGS) -o $@ simulation.o
621 + $(CC) $(CFLAGS) -o $@ $<
623 rsem-run-gibbs : Gibbs.o
624 - $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
625 + $(CC) $(CFLAGS) -o $@ $< -lpthread
627 rsem-calculate-credibility-intervals : calcCI.o
628 - $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread
629 + $(CC) $(CFLAGS) -o $@ $< -lpthread
631 rsem-get-unique : getUnique.cpp
632 - $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
633 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
635 rsem-sam-validator : samValidator.cpp
636 - $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@
637 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
639 rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp
640 - $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@
641 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
644 rm -f *.o *~ $(PROGRAMS)
646 From 0cf9721077f67fb4ca15fdc59cbfbf24a944debd Mon Sep 17 00:00:00 2001
647 From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
648 Date: Wed, 22 Apr 2015 15:49:19 +0200
649 Subject: [PATCH 7/7] split long line
652 Makefile | 17 ++++++++++++++++-
653 1 file changed, 16 insertions(+), 1 deletion(-)
655 diff --git a/Makefile b/Makefile
656 index 6540d81..0ab04a5 100644
661 CFLAGS = -Wall -I. -I./sam -I./boost -L./sam
662 COFLAGS = -O3 -ffast-math -c
663 -PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads
665 + rsem-extract-reference-transcripts \
666 + rsem-synthesis-reference-transcripts \
668 + rsem-parse-alignments \
669 + rsem-build-read-index \
673 + rsem-calculate-credibility-intervals \
674 + rsem-simulate-reads \
677 + rsem-bam2readdepth \
678 + rsem-sam-validator \
679 + rsem-scan-for-paired-end-reads
681 .PHONY : all ebseq clean