--- rubiks-20070912/dietz/mcube/Makefile	2008-02-18 02:02:16.000000000 +0100
+++ dietz-mcube-Makefile	2015-12-21 20:13:30.293236762 +0100
@@ -1,16 +1,14 @@
 # makefile for mcube with gcc on *nix by Eric
+# This makefile was seriously broken, using for example CPP for
+# the C++ compiler, CFLAGS for compiler flags for the C++ compiler
+# DBGCFLAGS was set to an empty value, but then used. Not a serious
+# issue, but as it was surpurflous, I removed it.
+# It was broken in other ways too numerous to mention.
+# Edited by David Kirkby, 29th Sept 2009
 
-CC=gcc
-CPP=g++
-LINK=g++
-CFLAGS=-O2
-LFLAGS=
 RM=rm -f
 INCLUDES=mcube.h config.h
 OBJS=mcube.o main.o
-LIBS=
-DBGCFLAGS=
-DBGLFLAGS=
 DBGOBJS=mcube.o.dbg main.o.dbg
 DBGLIBS=
 
@@ -19,10 +17,10 @@
 debug: build-debug
 
 build: $(OBJS)
-	$(LINK) $(LFLAGS)  -o mcube  $(OBJS) $(LIBS)
+	$(CXX) $(CXXFLAGS)  -o mcube  $(OBJS) $(LIBS) $(LDFLAGS)
 
 build-debug: $(DBGOBJS)
-	$(LINK) $(DBGLFLAGS)  -o mcube  $(OBJS) $(DBGLIBS)
+	$(CXX) $(CXXFLAGS)  -o mcube  $(OBJS) $(DBGLIBS) $(LDFLAGS)
 
 clean:
 	$(RM) $(OBJS)
@@ -31,15 +29,15 @@
 	$(RM) mcube
 
 main.o: main.cpp $(INCLUDES)
-	$(CPP) $(CFLAGS) -c main.cpp
+	$(CXX) $(CXXFLAGS) -c main.cpp
 
 mcube.o: mcube.cpp $(INCLUDES)
-	$(CPP) $(CFLAGS) -c mcube.cpp
+	$(CXX) $(CXXFLAGS) -c mcube.cpp
 
 main.o.dbg: main.cpp $(INCLUDES)
-	$(CPP) $(DBGCFLAGS) -c main.cpp
+	$(CXX) -c main.cpp
 
 mcube.o.dbg: mcube.cpp $(INCLUDES)
-	$(CPP) $(DBGCFLAGS) -c mcube.cpp
+	$(CXX) -c mcube.cpp
 
 dummy:
