diff --git a/Makefile b/Makefile
index ea340c8..d2aac5b 100644
--- a/Makefile
+++ b/Makefile
@@ -7,16 +7,16 @@ OBJS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRCS))
 
 # Ramulator currently supports g++ 5.1+ or clang++ 3.4+.  It will NOT work with
 #   g++ 4.x due to an internal compiler error when processing lambda functions.
-CXX := clang++
+#CXX := clang++
 # CXX := g++-5
-CXXFLAGS := -O3 -std=c++11 -g -Wall
+CXXFLAGS := -std=c++11 -O3 -g -Wall -fPIC
 
 .PHONY: all clean depend
 
 all: depend ramulator
 
 clean:
-	rm -f ramulator
+	rm -f ramulator libramulator.a
 	rm -rf $(OBJDIR)
 
 depend: $(OBJDIR)/.depend
@@ -36,7 +36,7 @@ ramulator: $(MAIN) $(OBJS) $(SRCDIR)/*.h | depend
 	$(CXX) $(CXXFLAGS) -DRAMULATOR -o $@ $(MAIN) $(OBJS)
 
 libramulator.a: $(OBJS) $(OBJDIR)/Gem5Wrapper.o
-	libtool -static -o $@ $(OBJS) $(OBJDIR)/Gem5Wrapper.o
+	$(AR) rcs $@ $^
 
 $(OBJS): | $(OBJDIR)
 
diff --git a/src/Request.h b/src/Request.h
index 57abd0d..a5ce061 100644
--- a/src/Request.h
+++ b/src/Request.h
@@ -36,7 +36,7 @@ public:
 
     Request(long addr, Type type, int coreid = 0)
         : is_first_command(true), addr(addr), coreid(coreid), type(type),
-      callback([](Request& req){}) {}
+      callback([](Request&){}) {}
 
     Request(long addr, Type type, function<void(Request&)> callback, int coreid = 0)
         : is_first_command(true), addr(addr), coreid(coreid), type(type), callback(callback) {}
