Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / rsem-makefile.patch
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
4
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
9
10 ---
11 Makefile | 95 +++++++++++-----------------------------------------------------
12 1 file changed, 16 insertions(+), 79 deletions(-)
13
14 diff --git a/Makefile b/Makefile
15 index 54e2603..3a55ed8 100644
16 --- a/Makefile
17 +++ b/Makefile
18 @@ -10,133 +10,70 @@ all : $(PROGRAMS)
19 sam/libbam.a :
20 cd sam ; ${MAKE} all
21
22 -Transcript.h : utils.h
23 -
24 -Transcripts.h : utils.h my_assert.h Transcript.h
25 -
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
29
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
33
34 -BowtieRefSeqPolicy.h : RefSeqPolicy.h
35 -
36 -RefSeq.h : utils.h
37 -
38 -Refs.h : utils.h RefSeq.h RefSeqPolicy.h PolyARules.h
39 -
40 -
41 rsem-preref : preRef.o
42 $(CC) preRef.o -o rsem-preref
43
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
47
48 -
49 -SingleRead.h : Read.h
50 -
51 -SingleReadQ.h : Read.h
52 -
53 -PairedEndRead.h : Read.h SingleRead.h
54 -
55 -PairedEndReadQ.h : Read.h SingleReadQ.h
56 -
57 -
58 -PairedEndHit.h : SingleHit.h
59 -
60 -HitContainer.h : GroupInfo.h
61 -
62 -
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
64 -
65 -
66 rsem-parse-alignments : parseIt.o sam/libbam.a
67 $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
68
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
72
73 -
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
77
78 -
79 -simul.h : boost/random.hpp
80 -
81 -ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h
82 -
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
84 -
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
86 -
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
88 -
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
90 -
91 -HitWrapper.h : HitContainer.h
92 -
93 -sam_rsem_aux.h : sam/bam.h
94 -
95 -sam_rsem_cvt.h : sam/bam.h Transcript.h Transcripts.h
96 -
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
98 -
99 -sampling.h : boost/random.hpp
100 -
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
102 -
103 rsem-run-em : EM.o sam/libbam.a
104 $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
105
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
107 +EM.o : EM.cpp
108 $(CC) $(COFLAGS) EM.cpp
109
110 -bc_aux.h : sam/bam.h
111 -
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
113 -
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 $@
117
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 $@
121
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 $@
125
126 -wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h
127 +wiggle.o: wiggle.cpp
128 $(CC) $(COFLAGS) wiggle.cpp
129
130 rsem-simulate-reads : simulation.o
131 $(CC) -o rsem-simulate-reads simulation.o
132
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
136
137 rsem-run-gibbs : Gibbs.o
138 $(CC) -o rsem-run-gibbs Gibbs.o -lpthread
139
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
142 +Gibbs.o : Gibbs.cpp
143 $(CC) $(COFLAGS) Gibbs.cpp
144
145 -Buffer.h : my_assert.h
146 -
147 rsem-calculate-credibility-intervals : calcCI.o
148 $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
149
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
154
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 $@
158
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 $@
162
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 $@
166
167 ebseq :
168
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
173
174 ---
175 Makefile | 48 ++++++++++++++++++++++++------------------------
176 1 file changed, 24 insertions(+), 24 deletions(-)
177
178 diff --git a/Makefile b/Makefile
179 index 3a55ed8..1dd97ca 100644
180 --- a/Makefile
181 +++ b/Makefile
182 @@ -1,6 +1,6 @@
183 CC = g++
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
189
190 .PHONY : all ebseq clean
191 @@ -11,70 +11,70 @@ sam/libbam.a :
192 cd sam ; ${MAKE} all
193
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
197
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
201
202 rsem-preref : preRef.o
203 - $(CC) preRef.o -o rsem-preref
204 + $(CC) $(CFLAGS) preRef.o -o rsem-preref
205
206 preRef.o : preRef.cpp
207 - $(CC) $(COFLAGS) preRef.cpp
208 + $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
209
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
213
214 parseIt.o : parseIt.cpp
215 - $(CC) -Wall -O2 -c -I. parseIt.cpp
216 + $(CC) $(CFLAGS) -O2 -c parseIt.cpp
217
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
221
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
225
226 EM.o : EM.cpp
227 - $(CC) $(COFLAGS) EM.cpp
228 + $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
229
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 $@
233
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 $@
237
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 $@
241
242 wiggle.o: wiggle.cpp
243 - $(CC) $(COFLAGS) wiggle.cpp
244 + $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
245
246 rsem-simulate-reads : simulation.o
247 - $(CC) -o rsem-simulate-reads simulation.o
248 + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
249
250 simulation.o : simulation.cpp
251 - $(CC) $(COFLAGS) simulation.cpp
252 + $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
253
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
257
258 Gibbs.o : Gibbs.cpp
259 - $(CC) $(COFLAGS) Gibbs.cpp
260 + $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
261
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
265
266 calcCI.o : calcCI.cpp
267 - $(CC) $(COFLAGS) calcCI.cpp
268 + $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
269
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 $@
273
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 $@
277
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 $@
281
282 ebseq :
283 cd EBSeq ; ${MAKE} all
284
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
289
290 ---
291 Makefile | 50 ++++++++++++++++++++++++++------------------------
292 1 file changed, 26 insertions(+), 24 deletions(-)
293
294 diff --git a/Makefile b/Makefile
295 index 1dd97ca..ae4de3b 100644
296 --- a/Makefile
297 +++ b/Makefile
298 @@ -10,6 +10,32 @@ all : $(PROGRAMS)
299 sam/libbam.a :
300 cd sam ; ${MAKE} all
301
302 +ebseq :
303 + cd EBSeq ; ${MAKE} all
304 +
305 +
306 +calcCI.o : calcCI.cpp
307 + $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
308 +
309 +EM.o : EM.cpp
310 + $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
311 +
312 +Gibbs.o : Gibbs.cpp
313 + $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
314 +
315 +preRef.o : preRef.cpp
316 + $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
317 +
318 +parseIt.o : parseIt.cpp
319 + $(CC) $(CFLAGS) -O2 -c parseIt.cpp
320 +
321 +simulation.o : simulation.cpp
322 + $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
323 +
324 +wiggle.o: wiggle.cpp
325 + $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
326 +
327 +
328 rsem-extract-reference-transcripts : extractRef.cpp
329 $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
330
331 @@ -19,24 +45,15 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
332 rsem-preref : preRef.o
333 $(CC) $(CFLAGS) preRef.o -o rsem-preref
334
335 -preRef.o : preRef.cpp
336 - $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
337 -
338 rsem-parse-alignments : parseIt.o sam/libbam.a
339 $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
340
341 -parseIt.o : parseIt.cpp
342 - $(CC) $(CFLAGS) -O2 -c parseIt.cpp
343 -
344 rsem-build-read-index : buildReadIndex.cpp
345 $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
346
347 rsem-run-em : EM.o sam/libbam.a
348 $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
349
350 -EM.o : EM.cpp
351 - $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
352 -
353 rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
354 $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
355
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 $@
359
360 -wiggle.o: wiggle.cpp
361 - $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
362 -
363 rsem-simulate-reads : simulation.o
364 $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
365
366 -simulation.o : simulation.cpp
367 - $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
368 -
369 rsem-run-gibbs : Gibbs.o
370 $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
371
372 -Gibbs.o : Gibbs.cpp
373 - $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
374 -
375 rsem-calculate-credibility-intervals : calcCI.o
376 $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
377
378 -calcCI.o : calcCI.cpp
379 - $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
380 -
381 rsem-get-unique : getUnique.cpp sam/libbam.a
382 $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
383
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 $@
387
388 -ebseq :
389 - cd EBSeq ; ${MAKE} all
390 -
391 clean :
392 rm -f *.o *~ $(PROGRAMS)
393 cd sam ; ${MAKE} clean
394
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
399
400 ---
401 Makefile | 36 ++++++++++++++++++------------------
402 1 file changed, 18 insertions(+), 18 deletions(-)
403
404 diff --git a/Makefile b/Makefile
405 index ae4de3b..a87cc4d 100644
406 --- a/Makefile
407 +++ b/Makefile
408 @@ -1,11 +1,11 @@
409 CC = g++
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
414
415 .PHONY : all ebseq clean
416
417 -all : $(PROGRAMS)
418 +all : sam/libbam.a $(PROGRAMS)
419
420 sam/libbam.a :
421 cd sam ; ${MAKE} all
422 @@ -45,23 +45,23 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
423 rsem-preref : preRef.o
424 $(CC) $(CFLAGS) preRef.o -o rsem-preref
425
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
430
431 rsem-build-read-index : buildReadIndex.cpp
432 $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
433
434 -rsem-run-em : EM.o sam/libbam.a
435 - $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
436 +rsem-run-em : EM.o
437 + $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
438
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 $@
443
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 $@
448
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 $@
453
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
459
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 $@
464
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 $@
469
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 $@
474
475 clean :
476 rm -f *.o *~ $(PROGRAMS)
477
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
482
483 ---
484 Makefile | 18 +++++++++---------
485 1 file changed, 9 insertions(+), 9 deletions(-)
486
487 diff --git a/Makefile b/Makefile
488 index a87cc4d..7ec90a3 100644
489 --- a/Makefile
490 +++ b/Makefile
491 @@ -37,22 +37,22 @@ wiggle.o: wiggle.cpp
492
493
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 $@
497
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 $@
501
502 rsem-preref : preRef.o
503 - $(CC) $(CFLAGS) preRef.o -o rsem-preref
504 + $(CC) $(CFLAGS) preRef.o -o $@
505
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
509
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 $@
513
514 rsem-run-em : EM.o
515 - $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
516 + $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
517
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 $@
522
523 rsem-simulate-reads : simulation.o
524 - $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
525 + $(CC) $(CFLAGS) -o $@ simulation.o
526
527 rsem-run-gibbs : Gibbs.o
528 - $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
529 + $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
530
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
534
535 rsem-get-unique : getUnique.cpp
536 $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
537
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
542
543 ---
544 Makefile | 44 ++++++++++++++++++++++----------------------
545 1 file changed, 22 insertions(+), 22 deletions(-)
546
547 diff --git a/Makefile b/Makefile
548 index 7ec90a3..6540d81 100644
549 --- a/Makefile
550 +++ b/Makefile
551 @@ -15,71 +15,71 @@ ebseq :
552
553
554 calcCI.o : calcCI.cpp
555 - $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
556 + $(CC) $(CFLAGS) $(COFLAGS) $<
557
558 EM.o : EM.cpp
559 - $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
560 + $(CC) $(CFLAGS) $(COFLAGS) $<
561
562 Gibbs.o : Gibbs.cpp
563 - $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
564 + $(CC) $(CFLAGS) $(COFLAGS) $<
565
566 preRef.o : preRef.cpp
567 - $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
568 + $(CC) $(CFLAGS) $(COFLAGS) $<
569
570 parseIt.o : parseIt.cpp
571 - $(CC) $(CFLAGS) -O2 -c parseIt.cpp
572 + $(CC) $(CFLAGS) -O2 -c $<
573
574 simulation.o : simulation.cpp
575 - $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
576 + $(CC) $(CFLAGS) $(COFLAGS) $<
577
578 wiggle.o: wiggle.cpp
579 - $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
580 + $(CC) $(CFLAGS) $(COFLAGS) $<
581
582
583 rsem-extract-reference-transcripts : extractRef.cpp
584 - $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@
585 + $(CC) $(CFLAGS) -O3 $< -o $@
586
587 rsem-synthesis-reference-transcripts : synthesisRef.cpp
588 - $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@
589 + $(CC) $(CFLAGS) -O3 $< -o $@
590
591 rsem-preref : preRef.o
592 - $(CC) $(CFLAGS) preRef.o -o $@
593 + $(CC) $(CFLAGS) $< -o $@
594
595 rsem-parse-alignments : parseIt.o
596 - $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread
597 + $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
598
599 rsem-build-read-index : buildReadIndex.cpp
600 - $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@
601 + $(CC) $(CFLAGS) -O3 $< -o $@
602
603 rsem-run-em : EM.o
604 - $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
605 + $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
606
607 rsem-tbam2gbam : tbam2gbam.cpp
608 - $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
609 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
610
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 $@
614
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 $@
618
619 rsem-simulate-reads : simulation.o
620 - $(CC) $(CFLAGS) -o $@ simulation.o
621 + $(CC) $(CFLAGS) -o $@ $<
622
623 rsem-run-gibbs : Gibbs.o
624 - $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
625 + $(CC) $(CFLAGS) -o $@ $< -lpthread
626
627 rsem-calculate-credibility-intervals : calcCI.o
628 - $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread
629 + $(CC) $(CFLAGS) -o $@ $< -lpthread
630
631 rsem-get-unique : getUnique.cpp
632 - $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
633 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
634
635 rsem-sam-validator : samValidator.cpp
636 - $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@
637 + $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
638
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 $@
642
643 clean :
644 rm -f *.o *~ $(PROGRAMS)
645
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
650
651 ---
652 Makefile | 17 ++++++++++++++++-
653 1 file changed, 16 insertions(+), 1 deletion(-)
654
655 diff --git a/Makefile b/Makefile
656 index 6540d81..0ab04a5 100644
657 --- a/Makefile
658 +++ b/Makefile
659 @@ -1,7 +1,22 @@
660 CC = g++
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
664 +PROGRAMS = \
665 + rsem-extract-reference-transcripts \
666 + rsem-synthesis-reference-transcripts \
667 + rsem-preref \
668 + rsem-parse-alignments \
669 + rsem-build-read-index \
670 + rsem-run-em \
671 + rsem-tbam2gbam \
672 + rsem-run-gibbs \
673 + rsem-calculate-credibility-intervals \
674 + rsem-simulate-reads \
675 + rsem-bam2wig \
676 + rsem-get-unique \
677 + rsem-bam2readdepth \
678 + rsem-sam-validator \
679 + rsem-scan-for-paired-end-reads
680
681 .PHONY : all ebseq clean
682