Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BUILDER / makefile / private / api / cpp / openmp.mk
1 # Version : 0.0.4
2 # Author : Cedric.Bilat@he-arc.ch
3 #
4
5 ifndef __API_OPEN_MP_MK__
6 __API_OPEN_MP_MK__=true
7
8 ##########################################
9 # OpenMP #
10 ##########################################
11
12 # OMP
13 # Visual 2008 cuda 4.1
14 # bug : /openmp ne peut pas etre use with cu files
15 # Solution : compile cu files without /openmp
16 # compile .ccp file with /openmp
17 # Tip: compile all file without /openmp
18 # modify file usinf omp
19 # compile with flag /openmp
20 # Conclusion : with this technique omp ok !
21 # Visual 2010 cuda 5.0
22 # bug : fix
23 # Conclusion : On peut compiler/linker avec /openmp
24 # Linux : ok
25
26 #########################
27 # WINDOWS #
28 #########################
29
30 ifeq ($(OS),Win)
31
32 ############
33 # Visual #
34 ############
35
36 ifeq ($(COMPILATEUR),VISUAL)
37
38 #compil
39 CXXFLAGS+= /openmp
40
41 #link
42 #rien automatique by compilateur
43
44 endif
45
46 ############
47 # Intel #
48 ############
49
50 ifeq ($(COMPILATEUR),INTEL)
51
52 #compil
53 CXXFLAGS+= /Qopenmp
54
55 #link
56 #rien automatique by compilateur
57
58 endif
59
60 ############
61 # MINGW #
62 ############
63
64 ifeq ($(COMPILATEUR),MINGW)
65
66 #compil
67 CXXFLAGS+= -fopenmp
68
69 #link
70 #ADD_LIBRARY_FILES+= gomp
71 LDFLAGS+= -lgomp
72 endif
73
74 endif
75
76 #########################
77 # LINUX #
78 #########################
79
80 ifeq ($(OS),Linux)
81
82 ############
83 # GCC #
84 ############
85
86 ifeq ($(COMPILATEUR),g++)
87
88 #compilation
89 CXXFLAGS+= -fopenmp
90
91 #link
92 #ADD_LIBRARY_FILES+= gomp
93 LDFLAGS+= -lgomp
94 #LDFLAGS+= -l$(subst :, -l,${OPENMP_LIBRARIES})
95
96 endif
97
98 ############
99 # INTEL #
100 ############
101
102 ifeq ($(COMPILATEUR),INTEL)
103
104 #compilation
105 CXXFLAGS+= -openmp
106
107 #link
108 #ADD_LIBRARY_FILES+= iomp5
109 LDFLAGS+= -liomp5
110
111 endif
112
113 ############
114 # ARM #
115 ############
116
117 ifeq ($(ARCH),arm)
118 LDFLAGS+= -L$(subst :, -L,${OPENCV_LIB})#car use opencv system
119 #RPATH_LINK+=${OPENCV_LIB}
120 endif
121
122 endif#linux
123
124 ##########################################
125 # END #
126 ##########################################
127
128 endif#__API_OPEN_MP_MK__
129