1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
| | This patch simplifies the Makefile, making it much easier to build rsem
without the bundled version of samtools. It has already been submitted
upstream: https://github.com/bli25wisc/RSEM/pull/11
From 161894e91a16c7e15af57e4fcfe8cb613711c7fa Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 14:51:07 +0200
Subject: [PATCH 1/7] remove all headers from Makefile
---
Makefile | 95 +++++++++++-----------------------------------------------------
1 file changed, 16 insertions(+), 79 deletions(-)
diff --git a/Makefile b/Makefile
index 54e2603..3a55ed8 100644
--- a/Makefile
+++ b/Makefile
@@ -10,133 +10,70 @@ all : $(PROGRAMS)
sam/libbam.a :
cd sam ; ${MAKE} all
-Transcript.h : utils.h
-
-Transcripts.h : utils.h my_assert.h Transcript.h
-
-rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp
+rsem-extract-reference-transcripts : extractRef.cpp
$(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
-rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp
+rsem-synthesis-reference-transcripts : synthesisRef.cpp
$(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
-BowtieRefSeqPolicy.h : RefSeqPolicy.h
-
-RefSeq.h : utils.h
-
-Refs.h : utils.h RefSeq.h RefSeqPolicy.h PolyARules.h
-
-
rsem-preref : preRef.o
$(CC) preRef.o -o rsem-preref
-preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp
+preRef.o : preRef.cpp
$(CC) $(COFLAGS) preRef.cpp
-
-SingleRead.h : Read.h
-
-SingleReadQ.h : Read.h
-
-PairedEndRead.h : Read.h SingleRead.h
-
-PairedEndReadQ.h : Read.h SingleReadQ.h
-
-
-PairedEndHit.h : SingleHit.h
-
-HitContainer.h : GroupInfo.h
-
-
-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
-
-
rsem-parse-alignments : parseIt.o sam/libbam.a
$(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
-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
+parseIt.o : parseIt.cpp
$(CC) -Wall -O2 -c -I. parseIt.cpp
-
-rsem-build-read-index : utils.h buildReadIndex.cpp
+rsem-build-read-index : buildReadIndex.cpp
$(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
-
-simul.h : boost/random.hpp
-
-ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h
-
-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
-
-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
-
-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
-
-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
-
-HitWrapper.h : HitContainer.h
-
-sam_rsem_aux.h : sam/bam.h
-
-sam_rsem_cvt.h : sam/bam.h Transcript.h Transcripts.h
-
-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
-
-sampling.h : boost/random.hpp
-
-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
-
rsem-run-em : EM.o sam/libbam.a
$(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
-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
+EM.o : EM.cpp
$(CC) $(COFLAGS) EM.cpp
-bc_aux.h : sam/bam.h
-
-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
-
-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
+rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
$(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
-rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2wig.cpp
+rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
$(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
-rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2readdepth.cpp
+rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
$(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
-wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h
+wiggle.o: wiggle.cpp
$(CC) $(COFLAGS) wiggle.cpp
rsem-simulate-reads : simulation.o
$(CC) -o rsem-simulate-reads simulation.o
-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
+simulation.o : simulation.cpp
$(CC) $(COFLAGS) simulation.cpp
rsem-run-gibbs : Gibbs.o
$(CC) -o rsem-run-gibbs Gibbs.o -lpthread
-#some header files are omitted
-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
+Gibbs.o : Gibbs.cpp
$(CC) $(COFLAGS) Gibbs.cpp
-Buffer.h : my_assert.h
-
rsem-calculate-credibility-intervals : calcCI.o
$(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
-#some header files are omitted
-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
+calcCI.o : calcCI.cpp
$(CC) $(COFLAGS) calcCI.cpp
-rsem-get-unique : sam/bam.h sam/sam.h getUnique.cpp sam/libbam.a
+rsem-get-unique : getUnique.cpp sam/libbam.a
$(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@
-rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a
+rsem-sam-validator : samValidator.cpp sam/libbam.a
$(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@
-rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a
+rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
$(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
ebseq :
From ec136638a727632e20abfaeb65c22c46d15ca8c4 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:06:41 +0200
Subject: [PATCH 2/7] include current dir, ./sam and ./boost by default
---
Makefile | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/Makefile b/Makefile
index 3a55ed8..1dd97ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC = g++
-CFLAGS = -Wall -c -I.
-COFLAGS = -Wall -O3 -ffast-math -c -I.
+CFLAGS = -Wall -I. -I./sam -I./boost
+COFLAGS = -O3 -ffast-math -c
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
.PHONY : all ebseq clean
@@ -11,70 +11,70 @@ sam/libbam.a :
cd sam ; ${MAKE} all
rsem-extract-reference-transcripts : extractRef.cpp
- $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
+ $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
rsem-synthesis-reference-transcripts : synthesisRef.cpp
- $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
+ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
rsem-preref : preRef.o
- $(CC) preRef.o -o rsem-preref
+ $(CC) $(CFLAGS) preRef.o -o rsem-preref
preRef.o : preRef.cpp
- $(CC) $(COFLAGS) preRef.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
rsem-parse-alignments : parseIt.o sam/libbam.a
- $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
+ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
parseIt.o : parseIt.cpp
- $(CC) -Wall -O2 -c -I. parseIt.cpp
+ $(CC) $(CFLAGS) -O2 -c parseIt.cpp
rsem-build-read-index : buildReadIndex.cpp
- $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
+ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
rsem-run-em : EM.o sam/libbam.a
- $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
+ $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
EM.o : EM.cpp
- $(CC) $(COFLAGS) EM.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
- $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
- $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
- $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
wiggle.o: wiggle.cpp
- $(CC) $(COFLAGS) wiggle.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
rsem-simulate-reads : simulation.o
- $(CC) -o rsem-simulate-reads simulation.o
+ $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
simulation.o : simulation.cpp
- $(CC) $(COFLAGS) simulation.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
rsem-run-gibbs : Gibbs.o
- $(CC) -o rsem-run-gibbs Gibbs.o -lpthread
+ $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
Gibbs.o : Gibbs.cpp
- $(CC) $(COFLAGS) Gibbs.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
rsem-calculate-credibility-intervals : calcCI.o
- $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
+ $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
calcCI.o : calcCI.cpp
- $(CC) $(COFLAGS) calcCI.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
rsem-get-unique : getUnique.cpp sam/libbam.a
- $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
rsem-sam-validator : samValidator.cpp sam/libbam.a
- $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@
rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
- $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
ebseq :
cd EBSeq ; ${MAKE} all
From d366614ea50f79fdd93e3c76383ccb6fcdeaa8e0 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:10:49 +0200
Subject: [PATCH 3/7] separate object rules from rules for executables
---
Makefile | 50 ++++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/Makefile b/Makefile
index 1dd97ca..ae4de3b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,32 @@ all : $(PROGRAMS)
sam/libbam.a :
cd sam ; ${MAKE} all
+ebseq :
+ cd EBSeq ; ${MAKE} all
+
+
+calcCI.o : calcCI.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
+
+EM.o : EM.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
+
+Gibbs.o : Gibbs.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
+
+preRef.o : preRef.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
+
+parseIt.o : parseIt.cpp
+ $(CC) $(CFLAGS) -O2 -c parseIt.cpp
+
+simulation.o : simulation.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
+
+wiggle.o: wiggle.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
+
+
rsem-extract-reference-transcripts : extractRef.cpp
$(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
@@ -19,24 +45,15 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
rsem-preref : preRef.o
$(CC) $(CFLAGS) preRef.o -o rsem-preref
-preRef.o : preRef.cpp
- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
-
rsem-parse-alignments : parseIt.o sam/libbam.a
$(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
-parseIt.o : parseIt.cpp
- $(CC) $(CFLAGS) -O2 -c parseIt.cpp
-
rsem-build-read-index : buildReadIndex.cpp
$(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
rsem-run-em : EM.o sam/libbam.a
$(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
-EM.o : EM.cpp
- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
-
rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
$(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
@@ -46,27 +63,15 @@ rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
$(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
-wiggle.o: wiggle.cpp
- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
-
rsem-simulate-reads : simulation.o
$(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
-simulation.o : simulation.cpp
- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
-
rsem-run-gibbs : Gibbs.o
$(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
-Gibbs.o : Gibbs.cpp
- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
-
rsem-calculate-credibility-intervals : calcCI.o
$(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
-calcCI.o : calcCI.cpp
- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
-
rsem-get-unique : getUnique.cpp sam/libbam.a
$(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
@@ -76,9 +81,6 @@ rsem-sam-validator : samValidator.cpp sam/libbam.a
rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
$(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
-ebseq :
- cd EBSeq ; ${MAKE} all
-
clean :
rm -f *.o *~ $(PROGRAMS)
cd sam ; ${MAKE} clean
From 6ba1c33cccdf7c8e7df7a3189e7db204be3b1e8d Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:28:30 +0200
Subject: [PATCH 4/7] add ./sam to library directories, link with -lbam
---
Makefile | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index ae4de3b..a87cc4d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
CC = g++
-CFLAGS = -Wall -I. -I./sam -I./boost
+CFLAGS = -Wall -I. -I./sam -I./boost -L./sam
COFLAGS = -O3 -ffast-math -c
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
.PHONY : all ebseq clean
-all : $(PROGRAMS)
+all : sam/libbam.a $(PROGRAMS)
sam/libbam.a :
cd sam ; ${MAKE} all
@@ -45,23 +45,23 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp
rsem-preref : preRef.o
$(CC) $(CFLAGS) preRef.o -o rsem-preref
-rsem-parse-alignments : parseIt.o sam/libbam.a
- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
+rsem-parse-alignments : parseIt.o
+ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread
rsem-build-read-index : buildReadIndex.cpp
$(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
-rsem-run-em : EM.o sam/libbam.a
- $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
+rsem-run-em : EM.o
+ $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
-rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a
- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-tbam2gbam : tbam2gbam.cpp
+ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
-rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp
- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
+rsem-bam2wig : wiggle.o bam2wig.cpp
+ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@
-rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp
- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@
+rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
+ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
rsem-simulate-reads : simulation.o
$(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
@@ -72,14 +72,14 @@ rsem-run-gibbs : Gibbs.o
rsem-calculate-credibility-intervals : calcCI.o
$(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
-rsem-get-unique : getUnique.cpp sam/libbam.a
- $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-get-unique : getUnique.cpp
+ $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
-rsem-sam-validator : samValidator.cpp sam/libbam.a
- $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-sam-validator : samValidator.cpp
+ $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@
-rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a
- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp
+ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@
clean :
rm -f *.o *~ $(PROGRAMS)
From 5402b88c269df79ee245c1c59e15f3c8282a0220 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:33:02 +0200
Subject: [PATCH 5/7] do not repeat target name, use $@ instead
---
Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index a87cc4d..7ec90a3 100644
--- a/Makefile
+++ b/Makefile
@@ -37,22 +37,22 @@ wiggle.o: wiggle.cpp
rsem-extract-reference-transcripts : extractRef.cpp
- $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts
+ $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@
rsem-synthesis-reference-transcripts : synthesisRef.cpp
- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
+ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@
rsem-preref : preRef.o
- $(CC) $(CFLAGS) preRef.o -o rsem-preref
+ $(CC) $(CFLAGS) preRef.o -o $@
rsem-parse-alignments : parseIt.o
- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread
+ $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread
rsem-build-read-index : buildReadIndex.cpp
- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index
+ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@
rsem-run-em : EM.o
- $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread
+ $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
rsem-tbam2gbam : tbam2gbam.cpp
$(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
@@ -64,13 +64,13 @@ rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
$(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
rsem-simulate-reads : simulation.o
- $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o
+ $(CC) $(CFLAGS) -o $@ simulation.o
rsem-run-gibbs : Gibbs.o
- $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread
+ $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
rsem-calculate-credibility-intervals : calcCI.o
- $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
+ $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread
rsem-get-unique : getUnique.cpp
$(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
From f60784bc7aa303cc825bd87dd3f5d7d26c51bded Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:44:53 +0200
Subject: [PATCH 6/7] use automatic variables to refer to prerequisites
---
Makefile | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/Makefile b/Makefile
index 7ec90a3..6540d81 100644
--- a/Makefile
+++ b/Makefile
@@ -15,71 +15,71 @@ ebseq :
calcCI.o : calcCI.cpp
- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
EM.o : EM.cpp
- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
Gibbs.o : Gibbs.cpp
- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
preRef.o : preRef.cpp
- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
parseIt.o : parseIt.cpp
- $(CC) $(CFLAGS) -O2 -c parseIt.cpp
+ $(CC) $(CFLAGS) -O2 -c $<
simulation.o : simulation.cpp
- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
wiggle.o: wiggle.cpp
- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp
+ $(CC) $(CFLAGS) $(COFLAGS) $<
rsem-extract-reference-transcripts : extractRef.cpp
- $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@
+ $(CC) $(CFLAGS) -O3 $< -o $@
rsem-synthesis-reference-transcripts : synthesisRef.cpp
- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@
+ $(CC) $(CFLAGS) -O3 $< -o $@
rsem-preref : preRef.o
- $(CC) $(CFLAGS) preRef.o -o $@
+ $(CC) $(CFLAGS) $< -o $@
rsem-parse-alignments : parseIt.o
- $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread
+ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
rsem-build-read-index : buildReadIndex.cpp
- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@
+ $(CC) $(CFLAGS) -O3 $< -o $@
rsem-run-em : EM.o
- $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread
+ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread
rsem-tbam2gbam : tbam2gbam.cpp
- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
rsem-bam2wig : wiggle.o bam2wig.cpp
- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@
rsem-bam2readdepth : wiggle.o bam2readdepth.cpp
- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@
rsem-simulate-reads : simulation.o
- $(CC) $(CFLAGS) -o $@ simulation.o
+ $(CC) $(CFLAGS) -o $@ $<
rsem-run-gibbs : Gibbs.o
- $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread
+ $(CC) $(CFLAGS) -o $@ $< -lpthread
rsem-calculate-credibility-intervals : calcCI.o
- $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread
+ $(CC) $(CFLAGS) -o $@ $< -lpthread
rsem-get-unique : getUnique.cpp
- $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
rsem-sam-validator : samValidator.cpp
- $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp
- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@
+ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@
clean :
rm -f *.o *~ $(PROGRAMS)
From 0cf9721077f67fb4ca15fdc59cbfbf24a944debd Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 22 Apr 2015 15:49:19 +0200
Subject: [PATCH 7/7] split long line
---
Makefile | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 6540d81..0ab04a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,22 @@
CC = g++
CFLAGS = -Wall -I. -I./sam -I./boost -L./sam
COFLAGS = -O3 -ffast-math -c
-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
+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
.PHONY : all ebseq clean
|