diff -ru trinityrnaseq_r2012-10-05.orig/trinity-plugins/rsem-1.2.0/EBSeq/makefile trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/EBSeq/makefile
--- trinityrnaseq_r2012-10-05.orig/trinity-plugins/rsem-1.2.0/EBSeq/makefile	2012-10-05 16:41:37.000000000 +0200
+++ trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/EBSeq/makefile	2013-01-23 16:19:37.564712275 +0100
@@ -1,4 +1,4 @@
-CC = g++
+CXX = g++
 PROGRAMS = blockmodeling EBSeq rsem-for-ebseq-calculate-clustering-info
 
 all : $(PROGRAMS)
@@ -10,7 +10,7 @@
 	R CMD INSTALL -l "." EBSeq_1.1.3.tar.gz
 
 rsem-for-ebseq-calculate-clustering-info : calcClusteringInfo.cpp
-	$(CC) -O3 -Wall calcClusteringInfo.cpp -o $@
+	$(CXX) -O3 -Wall calcClusteringInfo.cpp -o $@
 
 clean : 
 	rm -rf $(PROGRAMS) *~
diff -ru trinityrnaseq_r2012-10-05.orig/trinity-plugins/rsem-1.2.0/makefile trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/makefile
--- trinityrnaseq_r2012-10-05.orig/trinity-plugins/rsem-1.2.0/makefile	2012-10-05 16:42:00.000000000 +0200
+++ trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/makefile	2013-01-23 16:19:30.066623805 +0100
@@ -1,4 +1,4 @@
-CC = g++
+CXX = g++
 CFLAGS = -Wall -c -I.
 COFLAGS = -Wall -O3 -ffast-math -c -I.
 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
@@ -13,10 +13,10 @@
 Transcripts.h : my_assert.h Transcript.h
 
 rsem-extract-reference-transcripts : utils.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp
-	$(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
+	$(CXX) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
 
 rsem-synthesis-reference-transcripts : utils.h Transcript.h Transcripts.h synthesisRef.cpp
-	$(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
+	$(CXX) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
 
 BowtieRefSeqPolicy.h : RefSeqPolicy.h
 
@@ -26,10 +26,10 @@
 
 
 rsem-preref : preRef.o
-	$(CC) preRef.o -o rsem-preref
+	$(CXX) preRef.o -o rsem-preref
 
 preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp
-	$(CC) $(COFLAGS) preRef.cpp
+	$(CXX) $(COFLAGS) preRef.cpp
 
 
 SingleRead.h : Read.h
@@ -50,14 +50,14 @@
 
 
 rsem-parse-alignments : parseIt.o sam/libbam.a
-	$(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz 
+	$(CXX) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz 
 
 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
-	$(CC) -Wall -O2 -c -I. parseIt.cpp
+	$(CXX) -Wall -O2 -c -I. parseIt.cpp
 
 
 rsem-build-read-index : utils.h buildReadIndex.cpp
-	$(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
+	$(CXX) -O3 buildReadIndex.cpp -o rsem-build-read-index
 
 
 simul.h : boost/random.hpp
@@ -83,57 +83,57 @@
 sampling.h : boost/random.hpp
 
 rsem-run-em : EM.o sam/libbam.a
-	$(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread
+	$(CXX) -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 EM.cpp
-	$(CC) $(COFLAGS) EM.cpp
+	$(CXX) $(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
-	$(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -o $@
 
 rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2wig.cpp
-	$(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -o $@
 
 rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2readdepth.cpp
-	$(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -o $@
 
 wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h
-	$(CC) $(COFLAGS) wiggle.cpp
+	$(CXX) $(COFLAGS) wiggle.cpp
 
 rsem-simulate-reads : simulation.o
-	$(CC) -o rsem-simulate-reads simulation.o
+	$(CXX) -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 simulation.cpp
-	$(CC) $(COFLAGS) simulation.cpp
+	$(CXX) $(COFLAGS) simulation.cpp
 
 rsem-run-gibbs : Gibbs.o
-	$(CC) -o rsem-run-gibbs Gibbs.o -lpthread
+	$(CXX) -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 Gibbs.cpp 
-	$(CC) $(COFLAGS) Gibbs.cpp
+	$(CXX) $(COFLAGS) Gibbs.cpp
 
 Buffer.h : my_assert.h
 
 rsem-calculate-credibility-intervals : calcCI.o
-	$(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread
+	$(CXX) -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 Buffer.h calcCI.cpp
-	$(CC) $(COFLAGS) calcCI.cpp
+	$(CXX) $(COFLAGS) calcCI.cpp
 
 rsem-get-unique : sam/bam.h sam/sam.h getUnique.cpp sam/libbam.a
-	$(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall getUnique.cpp sam/libbam.a -lz -o $@
 
 rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a
-	$(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall samValidator.cpp sam/libbam.a -lz -o $@
 
 rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a
-	$(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -o $@
+	$(CXX) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -o $@
 
 ebseq :
 	cd EBSeq ; ${MAKE} all
--- trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/sam/Makefile.orig	2012-10-05 16:41:36.000000000 +0200
+++ trinityrnaseq_r2012-10-05/trinity-plugins/rsem-1.2.0/sam/Makefile	2013-01-24 11:59:42.930136223 +0100
@@ -48,7 +48,7 @@
 		$(AR) -csru $@ $(LOBJS)
 
 samtools:lib-recur $(AOBJS)
-		$(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) libbam.a -lbcf $(LIBCURSES) -lm -lz
+		$(CC) $(CFLAGS) -o $@ $(AOBJS) -Lbcftools $(LIBPATH) libbam.a -lbcf $(LIBCURSES) -lm -lz -lpthread
 
 razip:razip.o razf.o $(KNETFILE_O)
 		$(CC) $(CFLAGS) -o $@ razf.o razip.o $(KNETFILE_O) -lz
