diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/Makefile Csdp-6.2.0/Makefile
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/Makefile	2017-07-17 17:34:04.000000000 -0700
+++ Csdp-6.2.0/Makefile	2018-12-26 15:34:22.000000000 -0800
@@ -11,49 +11,50 @@
 #
 # CFLAGS settings for 64 bit Linux/unix systems.
 #
-export CFLAGS=-m64 -march=native -mtune=native -Ofast -fopenmp -ansi -Wall -DBIT64 -DUSEOPENMP -DSETNUMTHREADS -DUSESIGTERM -DUSEGETTIME -I../include
+export CFLAGS += -ansi -Wall -DUSEOPENMP -DSETNUMTHREADS -DUSESIGTERM -DUSEGETTIME -I../include
 #
 # LIBS settings for 64 bit Linux/unix systems.
 #
-export LIBS=-static -L../lib -lsdp -llapack -lblas -lm
+export LIBS=-L../lib -lsdp -llapack -lblas -lm
+
 #
 #
 # On most systems, this should handle everything.
 #
 all:
-	cd lib; make libsdp.a
-	cd solver; make csdp
-	cd theta; make all
-	cd example; make all
+	$(MAKE) -C lib libsdp.a
+	$(MAKE) -C solver csdp
+	$(MAKE) -C theta all
+	$(MAKE) -C example all
 
 #
 # Perform a unitTest
 #
 
 unitTest:
-	cd test; make all
+	$(MAKE) -C test all
 
 #
-# Install the executables in /usr/local/bin.
+# Install the executables in $(prefix)/bin.
 #
 
 install:
-	cp -f solver/csdp /usr/local/bin
-	cp -f theta/theta /usr/local/bin
-	cp -f theta/graphtoprob /usr/local/bin
-	cp -f theta/complement /usr/local/bin
-	cp -f theta/rand_graph /usr/local/bin
+	cp -f solver/csdp $(prefix)/bin
+	cp -f theta/theta $(prefix)/bin
+	cp -f theta/graphtoprob $(prefix)/bin
+	cp -f theta/complement $(prefix)/bin
+	cp -f theta/rand_graph $(prefix)/bin
 
 #
 # Clean out all of the directories.
 # 
 
 clean:
-	cd lib; make clean
-	cd solver; make clean
-	cd theta; make clean
-	cd test; make clean
-	cd example; make clean
+	$(MAKE) -C lib clean
+	$(MAKE) -C solver clean
+	$(MAKE) -C theta clean
+	$(MAKE) -C test clean
+	$(MAKE) -C example clean
 
 
 
diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/example/Makefile Csdp-6.2.0/example/Makefile
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/example/Makefile	2017-07-17 16:47:30.000000000 -0700
+++ Csdp-6.2.0/example/Makefile	2018-12-26 15:34:22.000000000 -0800
@@ -6,7 +6,7 @@
 # This builds the example code.
 #
 example: example.o 
-	$(CC) $(CFLAGS) example.o $(LIBS) -o example
+	$(CC) $(CFLAGS) example.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o example
 #
 # To clean up the directory.
 #
diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/lib/user_exit.c Csdp-6.2.0/lib/user_exit.c
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/lib/user_exit.c	2017-07-21 09:32:48.000000000 -0700
+++ Csdp-6.2.0/lib/user_exit.c	2018-12-26 15:34:22.000000000 -0800
@@ -13,6 +13,7 @@
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <signal.h>
+#include <stdio.h>
 
 int sigterm_signaled=0;
 
diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/solver/Makefile Csdp-6.2.0/solver/Makefile
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/solver/Makefile	2017-07-17 16:47:30.000000000 -0700
+++ Csdp-6.2.0/solver/Makefile	2018-12-26 15:34:22.000000000 -0800
@@ -1,8 +1,10 @@
 #
 #  This builds the stand alone solver.
 #
+
 csdp: csdp.o 
-	$(CC) $(CFLAGS) csdp.o $(LIBS) -o csdp
+	$(CC) $(CFLAGS) csdp.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o csdp
+
 #
 # To clean out the directory:
 #
diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/theta/Makefile Csdp-6.2.0/theta/Makefile
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/theta/Makefile	2017-07-17 16:47:30.000000000 -0700
+++ Csdp-6.2.0/theta/Makefile	2018-12-26 15:34:22.000000000 -0800
@@ -6,23 +6,23 @@
 # This builds the theta number code. 
 #
 theta: theta.o 
-	$(CC) $(CFLAGS) theta.o $(LIBS) -o theta
+	$(CC) $(CFLAGS) theta.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o theta
 #
 # Complement computes the complement of a graph.
 #
 complement: complement.o 
-	$(CC) $(CFLAGS) complement.o $(LIBS) -o complement
+	$(CC) $(CFLAGS) complement.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o complement
 #
 # rand_graph generates a random graph.  
 #
 rand_graph: rand_graph.o
-	$(CC) $(CFLAGS) rand_graph.o $(LIBS) -o rand_graph
+	$(CC) $(CFLAGS) rand_graph.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o rand_graph
 #
 # graphtoprob converts a file in the graph format to an SDP problem in our
 # SDP format.
 #
 graphtoprob: graphtoprob.o 
-	$(CC) $(CFLAGS) graphtoprob.o $(LIBS) -o graphtoprob
+	$(CC) $(CFLAGS) graphtoprob.o $(LDFLAGS) $(LDLIBS) $(LIBS) -o graphtoprob
 #
 # To clean up the directory.
 #
diff -ur /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/theta/rand_graph.c Csdp-6.2.0/theta/rand_graph.c
--- /Users/dan/src/M2/M2/M2/BUILD/dan/builds.tmp/einsteinium-master/libraries/csdp/tmp/Csdp-6.2.0/theta/rand_graph.c	2006-07-12 11:52:29.000000000 -0700
+++ Csdp-6.2.0/theta/rand_graph.c	2018-12-26 15:34:32.000000000 -0800
@@ -30,7 +30,7 @@
   FILE *fidout;
   int i;
   int j;
-  int n;
+  int n=0;
   int m;
   int s;
   double p;
@@ -44,8 +44,8 @@
     {
       printf("Usage: rand_graph <file> <n> <p> [<seed>] \n");
       exit(1);
-    };
-  if (argc >= 4)
+    }
+  else
     {
       fidout=fopen(*++argv,"w");
       n=atoi(*++argv);
