From 66ae3a75781c9780b78b64582a5cfc561e763d4a Mon Sep 17 00:00:00 2001 From: "tqchen@graphlab.com" Date: Mon, 18 Aug 2014 10:17:49 -0700 Subject: [PATCH] add no omp flag --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2a30564e1..6fae8eb0a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ export CC = gcc export CXX = g++ -export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas +export LDFLAGS= -pthread -lm + +ifeq ($(no_omp),1) + export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas +else + export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas -fopenmp +endif # specify tensor path BIN = xgboost @@ -9,7 +15,6 @@ SLIB = python/libxgboostwrapper.so .PHONY: clean all all: $(BIN) $(OBJ) $(SLIB) -export LDFLAGS= -pthread -lm xgboost: src/xgboost_main.cpp io.o src/data.h src/tree/*.h src/tree/*.hpp src/gbm/*.h src/gbm/*.hpp src/utils/*.h src/learner/*.h src/learner/*.hpp io.o: src/io/io.cpp src/data.h src/utils/*.h