Threading libraries test for Thrift C++


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665041 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/threads/Makefile b/test/threads/Makefile
new file mode 100644
index 0000000..79c0134
--- /dev/null
+++ b/test/threads/Makefile
@@ -0,0 +1,46 @@
+# Makefile for Thrift test project.
+# 
+# Author:
+#   Mark Slee <mcslee@facebook.com>
+
+# Default target is everything
+
+ifndef thrift_home
+thrift_home=../../
+endif #thrift_home
+
+target: all
+
+ifndef boost_home
+boost_home=/usr/local/include/boost-1_33_1
+endif #boost_home
+target: all
+
+include_paths = $(thrift_home)/lib/cpp/src \
+		$(boost_home)
+
+include_flags = $(patsubst %,-I%, $(include_paths))
+
+# Tools
+ifndef THRIFT
+THRIFT = ../../compiler/cpp/thrift
+endif # THRIFT
+
+CC     = g++
+LD     = g++
+
+# Compiler flags
+LFL   =  -L$(thrift_home)/lib/cpp/.libs -lthrift
+CCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags)
+CFL   = $(CCFL) $(LFL)
+
+all: server
+
+stubs: ThreadsTest.thrift
+	$(THRIFT) -cpp -py ThreadsTest.thrift
+
+server: stubs
+	g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp
+
+clean:
+	rm -fr *.o ThreadsServer gen-cpp