# Remove preset CXX and CPPFLAGS for each makefile, such that it uses the ones defined by EB.
# Author: Bob Dröge - Rijksuniversiteit Groningen (RUG)
--- RSEM-1.2.30/Makefile	2016-04-20 23:59:26.000000000 +0200
+++ RSEM-1.2.30.new/Makefile	2016-05-13 16:25:04.000000000 +0200
@@ -11,12 +11,12 @@
 BOOST = .
 
 # Compilation variables
-CXX = g++
-CXXFLAGS = -std=gnu++98 -Wall -I. -I$(BOOST) -I$(SAMTOOLS)/$(HTSLIB)
-CPPFLAGS =
+#CXX = g++
+CXXFLAGS += -std=gnu++98 -Wall -I. -I$(BOOST) -I$(SAMTOOLS)/$(HTSLIB)
+#CPPFLAGS =
 
-LDFLAGS =
-LDLIBS =
+#LDFLAGS =
+#LDLIBS =
 
 # Installation variables
 INSTALL = install
--- RSEM-1.2.30/samtools-1.3/Makefile	2016-04-20 23:59:26.000000000 +0200
+++ RSEM-1.2.30.new/samtools-1.3/Makefile	2016-05-13 16:25:42.000000000 +0200
@@ -21,10 +21,10 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-CC       = gcc
-CPPFLAGS =
-CFLAGS   = -g -Wall -O2
-LDFLAGS  =
+#CC       = gcc
+#CPPFLAGS =
+#CFLAGS   = -g -Wall -O2
+#LDFLAGS  =
 LIBS     =
 
 DFLAGS=     -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
--- RSEM-1.2.30/samtools-1.3/htslib-1.3/Makefile	2016-04-20 23:59:26.000000000 +0200
+++ RSEM-1.2.30.new/samtools-1.3/htslib-1.3/Makefile	2016-05-13 16:26:24.000000000 +0200
@@ -22,15 +22,15 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-CC     = gcc
+#CC     = gcc
 AR     = ar
 RANLIB = ranlib
 
-CPPFLAGS =
+#CPPFLAGS =
 # TODO: probably update cram code to make it compile cleanly with -Wc++-compat
-CFLAGS   = -g -Wall -O2
+#CFLAGS   = -g -Wall -O2
 EXTRA_CFLAGS_PIC = -fpic
-LDFLAGS  =
+#LDFLAGS  =
 LIBS     =
 
 # For now these don't work too well as samtools also needs to know to
