TP Histogramme.
[GPU.git] / WCudaMSE / BUILDER / makefile / private / script / workspace_compile.sh
1 #!/bin/bash
2 #
3 # Version: 0.0.2
4 #
5
6 #-----------------------------------------------
7 # Input
8 #-----------------------------------------------
9
10 #$1: compilateur
11
12 #linux
13 # gcc
14 # intellinux
15 #
16 #windows
17 # visual
18 # intelwin
19 # mingw
20
21
22
23 #-----------------------------------------------
24 # init
25 #-----------------------------------------------
26
27 source ./workspace_classification.sh
28
29 #-----------------------------------------------
30 # check
31 #-----------------------------------------------
32
33 if [ -z $1 ]
34 then
35
36 if [ ${OS} == "Linux" ]
37 then
38 echo "[ERROR] : .sh : input missing : gcc or intellinux"
39
40 elif [ ${OS} == "Win" ]
41 then
42 echo "[ERROR] : .sh : input missing : visual or intelwin or mingw"
43 fi
44
45 exit
46 fi
47
48 compilateur=$1
49
50 #-----------------------------------------------
51 # compile
52 #-----------------------------------------------
53
54 echo ""
55 echo ""
56 echo ""
57 echo ""
58 echo "--------------------------------------------------------------------------------------------------------"
59 echo "[Compiling Workspace]"
60 echo ""
61 echo " Workspace = "${workspaceRoot}
62 echo " Compilateur = "${compilateur}
63 echo " State = Please wait ..."
64 echo -n " Time = "
65 date +"%T"
66 echo "--------------------------------------------------------------------------------------------------------"
67
68
69 for cuda in ${setCUDA}
70 do
71 echo ""
72 echo ""
73 echo ""
74 echo ""
75 echo "----------------------------------------------------------------------------------"
76 echo "[Compiling Cuda Project]"
77 echo ""
78 echo "Project =" ${cuda}
79 echo "Workspace =" $(pwd)
80 echo "Compilateur = g++ && nvcc"
81 echo "----------------------------------------------------------------------------------"
82 cd ./${cuda}
83
84 if [ ${OS} == "Linux" ]
85 then
86 ${MAKE_CUDA_GCC} all
87
88 elif [ ${OS} == "Win" ]
89 then
90 cmd.exe //c ${MAKE_CUDA_VISUAL} all
91 fi
92
93 cd ..
94 done
95
96 for cpp in ${setCPP}
97 do
98 echo ""
99 echo ""
100 echo ""
101 echo ""
102 echo "----------------------------------------------------------------------------------"
103 echo "[Compiling CPP Project]"
104 echo ""
105 echo "Project =" ${cpp}
106 echo "Workspace =" $(pwd)
107 echo "Compilateur = ${compilateur}"
108 echo "----------------------------------------------------------------------------------"
109 cd ./${cpp}
110
111 if [ ${OS} == "Linux" ]
112 then
113
114 if [ ${compilateur} == "gcc" ]
115 then
116 ${MAKE_GCC} all
117
118 elif [ ${compilateur} == "intellinux" ]
119 then
120 ${MAKE_INTEL_LINUX} all
121 fi
122
123 elif [ ${OS} == "Win" ]
124 then
125
126 if [ ${compilateur} == "visual" ]
127 then
128 cmd.exe //c ${MAKE_VISUAL} all
129
130 elif [ ${compilateur} == "intelwin" ]
131 then
132 cmd.exe //c ${MAKE_INTEL_WIN} all
133
134 elif [ ${compilateur} == "mingw" ]
135 then
136 cmd.exe //c ${MAKE_MINGW} all
137 fi
138
139 fi
140
141 cd ..
142 done
143
144 for intel in ${setIntel}
145 do
146 echo ""
147 echo ""
148 echo ""
149 echo ""
150 echo "----------------------------------------------------------------------------------"
151 echo "[Compiling CPP-intel only Project]"
152 echo ""
153 echo "Project =" ${cpp}
154 echo "Workspace =" $(pwd)
155 echo "Compilateur = icpp"
156 echo "----------------------------------------------------------------------------------"
157 cd ./${intel}
158
159 if [ ${OS} == "Linux" ]
160 then
161 ${MAKE_INTEL_LINUX} all
162
163 elif [ ${OS} == "Win" ]
164 then
165 cmd.exe //c ${MAKE_INTEL_WIN} all
166 fi
167
168 cd ..
169 done
170
171 echo ""
172 echo ""
173 echo ""
174 echo ""
175 echo "--------------------------------------------------------------------------------------------------------"
176 echo "[Compiling Workspace]"
177 echo ""
178 echo " Workspace = "${workspaceRoot}
179 echo " State = Success!"
180 echo -n " Time = "
181 date +"%T"
182 echo "--------------------------------------------------------------------------------------------------------"
183 echo ""
184 echo ""
185 echo ""
186 echo ""
187
188 #-----------------------------------------------
189 # end
190 #-----------------------------------------------
191
192