From cb3f86b0d8573285e55957296296b8b794625f07 Mon Sep 17 00:00:00 2001
From: Travis Geiselbrecht <travisg@google.com>
Date: Mon, 12 Sep 2016 17:45:47 -0700
Subject: [PATCH 2/2] [build][link] only use -static switches on linux

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d8d1772..4994d25 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ FLAGS += `sdl2-config --cflags`
 
 UNAME := $(shell uname -s)
 ifeq ($(UNAME),Linux)
-LIBS += -lGL -ldl
+LIBS += -lGL -ldl -static-libstdc++ -static-libgcc
 endif
 ifeq ($(UNAME),Darwin)
 LIBS += -framework OpenGl -framework CoreFoundation
@@ -62,7 +62,7 @@ out/%.o: %.S Makefile
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 out/traceviz: $(OBJS)
-	$(CXX) -static-libstdc++ -static-libgcc $(CXXFLAGS) -o $@ $(OBJS) $(LIBS)
+	$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LIBS)
 
 -include $(DEPS)
 
-- 
2.9.3

