@echo
$(NAME): init $(PROTO_OBJS) $(OBJS)
- $(CXX) -shared -o $(NAME) $(OBJS) $(LDFLAGS) $(WARNINGS)
+ $(CXX) -shared -o $(NAME) $(OBJS) $(CXXFLAGS) $(LDFLAGS) $(WARNINGS)
@echo
$(STATIC_NAME): init $(PROTO_OBJS) $(OBJS)
for testbin in $(TEST_BINS); do $$testbin $(TEST_GPUID); done
$(TEST_BINS): %.testbin : %.o $(GTEST_OBJ) $(STATIC_NAME) $(TEST_HDRS)
- $(CXX) $< $(GTEST_OBJ) $(STATIC_NAME) -o $@ $(LDFLAGS) $(WARNINGS)
+ $(CXX) $< $(GTEST_OBJ) $(STATIC_NAME) -o $@ $(CXXFLAGS) $(LDFLAGS) $(WARNINGS)
$(EXAMPLE_BINS): %.bin : %.o $(STATIC_NAME)
- $(CXX) $< $(STATIC_NAME) -o $@ $(LDFLAGS) $(WARNINGS)
+ $(CXX) $< $(STATIC_NAME) -o $@ $(CXXFLAGS) $(LDFLAGS) $(WARNINGS)
@echo
$(OBJS): $(PROTO_GEN_CC) $(HXX_SRCS)
# For OS X, use clang++.
CXX=/usr/bin/g++
+# For OS X 10.9, use libstdc++ instead of libc++ for CUDA compatibility.
+#CXXFLAGS=-stdlib=libstdc++
BUILD_DIR=build
DISTRIBUTE_DIR=distribute