X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FBUILDER%2Fmakefile%2Fprivate%2Fapi%2Fcpp%2Fopenmp.mk;fp=WCudaMSE%2FBUILDER%2Fmakefile%2Fprivate%2Fapi%2Fcpp%2Fopenmp.mk;h=c740e906daec8e272838811300fe8e3046dd8d0d;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/BUILDER/makefile/private/api/cpp/openmp.mk b/WCudaMSE/BUILDER/makefile/private/api/cpp/openmp.mk new file mode 100755 index 0000000..c740e90 --- /dev/null +++ b/WCudaMSE/BUILDER/makefile/private/api/cpp/openmp.mk @@ -0,0 +1,129 @@ +# Version : 0.0.4 +# Author : Cedric.Bilat@he-arc.ch +# + +ifndef __API_OPEN_MP_MK__ +__API_OPEN_MP_MK__=true + +########################################## +# OpenMP # +########################################## + +# OMP +# Visual 2008 cuda 4.1 +# bug : /openmp ne peut pas etre use with cu files +# Solution : compile cu files without /openmp +# compile .ccp file with /openmp +# Tip: compile all file without /openmp +# modify file usinf omp +# compile with flag /openmp +# Conclusion : with this technique omp ok ! +# Visual 2010 cuda 5.0 +# bug : fix +# Conclusion : On peut compiler/linker avec /openmp +# Linux : ok + +######################### +# WINDOWS # +######################### + +ifeq ($(OS),Win) + +############ +# Visual # +############ + +ifeq ($(COMPILATEUR),VISUAL) + + #compil + CXXFLAGS+= /openmp + + #link + #rien automatique by compilateur + +endif + +############ +# Intel # +############ + +ifeq ($(COMPILATEUR),INTEL) + + #compil + CXXFLAGS+= /Qopenmp + + #link + #rien automatique by compilateur + +endif + +############ +# MINGW # +############ + +ifeq ($(COMPILATEUR),MINGW) + + #compil + CXXFLAGS+= -fopenmp + + #link + #ADD_LIBRARY_FILES+= gomp + LDFLAGS+= -lgomp +endif + +endif + +######################### +# LINUX # +######################### + +ifeq ($(OS),Linux) + +############ +# GCC # +############ + +ifeq ($(COMPILATEUR),g++) + + #compilation + CXXFLAGS+= -fopenmp + + #link + #ADD_LIBRARY_FILES+= gomp + LDFLAGS+= -lgomp + #LDFLAGS+= -l$(subst :, -l,${OPENMP_LIBRARIES}) + +endif + +############ +# INTEL # +############ + +ifeq ($(COMPILATEUR),INTEL) + + #compilation + CXXFLAGS+= -openmp + + #link + #ADD_LIBRARY_FILES+= iomp5 + LDFLAGS+= -liomp5 + +endif + +############ +# ARM # +############ + +ifeq ($(ARCH),arm) + LDFLAGS+= -L$(subst :, -L,${OPENCV_LIB})#car use opencv system + #RPATH_LINK+=${OPENCV_LIB} +endif + +endif#linux + +########################################## +# END # +########################################## + +endif#__API_OPEN_MP_MK__ +