Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics (remove uggly windows linefeeds)
[simgrid.git] / buildtools / vc7 / simgrid / w32_makefile
1 ########################################################################################################################\r
2 #\r
3 # Project                                       : w32_makefile\r
4 #\r
5 # Description                           : it's the make file used to build the Windows SimGrid dynamic link library (DLL) and the files \r
6 #                                                         that come with (the static library SimGrid.lib, the program database (PDB) file that holds \r
7 #                                                         debugging information used to display the Windows backtrace.\r
8 #\r
9 # Note                                          : [(1) the manifest of the SimGrid is directly embeded in the DLL                                       ]\r
10 #                                                       : [(2) both C code and C++ (the MSG wrappers) code are linked in the same library       ]  \r
11 #  \r
12 # Compiler (CL.EXE) version     :Microsoft Compiler (R) 32 bits C/C++ version 14.00.50727.42 for 80x86\r
13\r
14 # Command line                          : nmake -f w32_makefile [all]\r
15 #\r
16 # Author                                        : Abdelmalek CHERIER\r
17 ########################################################################################################################\r
18 \r
19 # The name of the libray\r
20 LIBRARY=simgrid.dll\r
21 \r
22 # The default global goal\r
23 all: \r
24         cd C:\buildslave\projects\simgrid\builddir\build\build\vc7\simgrid\r
25         $(MAKE) -f w32_makefile real_all\r
26 \r
27 real_all: $(LIBRARY)\r
28 \r
29 \r
30 ########################################################################################################################\r
31 #\r
32 # C source files section\r
33 #\r
34 # Note                                          : [(1) This section contains all the names of the C source file of the project.         ]\r
35 #                                                         [ (2) All new C source files must be added in this section.                                           ] \r
36 #\r
37 ########################################################################################################################\r
38 \r
39 CSRC= ..\..\..\src\xbt\xbt_virtu.c \\r
40 ..\..\..\src\xbt\xbt_strbuff.c \\r
41 ..\..\..\src\xbt\xbt_str.c \\r
42 ..\..\..\src\xbt\xbt_sg_time.c \\r
43 ..\..\..\src\xbt\xbt_sg_synchro.c \\r
44 ..\..\..\src\xbt\xbt_queue.c \\r
45 ..\..\..\src\xbt\xbt_peer.c \\r
46 ..\..\..\src\xbt\xbt_os_time.c \\r
47 ..\..\..\src\xbt\xbt_os_thread.c \\r
48 ..\..\..\src\xbt\xbt_matrix.c \\r
49 ..\..\..\src\xbt\xbt_main.c \\r
50 ..\..\..\src\xbt\xbt_log_layout_simple.c \\r
51 ..\..\..\src\xbt\xbt_log_layout_format.c \\r
52 ..\..\..\src\xbt\xbt_log_appender_file.c \\r
53 ..\..\..\src\xbt\xbt_context_thread.c \\r
54 ..\..\..\src\xbt\xbt_context_java.c \\r
55 ..\..\..\src\xbt\xbt_context.c \\r
56 ..\..\..\src\surf\workstation_ptask_L07.c \\r
57 ..\..\..\src\surf\workstation.c \\r
58 ..\..\..\src\gras\Transport\transport_plugin_sg.c \\r
59 ..\..\..\src\gras\Transport\transport.c \\r
60 ..\..\..\src\surf\trace_mgr.c \\r
61 ..\..\..\src\gras\Msg\timer.c \\r
62 ..\..\..\src\msg\task.c \\r
63 ..\..\..\src\xbt\swag.c \\r
64 ..\..\..\src\surf\surfxml_parse.c \\r
65 ..\..\..\src\surf\surf_timer.c \\r
66 ..\..\..\src\surf\surf.c \\r
67 ..\..\..\src\xbt\snprintf.c \\r
68 ..\..\..\src\simix\smx_synchro.c \\r
69 ..\..\..\src\simix\smx_process.c \\r
70 ..\..\..\src\simix\smx_host.c \\r
71 ..\..\..\src\simix\smx_global.c \\r
72 ..\..\..\src\simix\smx_environment.c \\r
73 ..\..\..\src\simix\smx_deployment.c \\r
74 ..\..\..\src\simix\smx_config.c \\r
75 ..\..\..\src\simix\smx_action.c \\r
76 simgrid.c \\r
77 ..\..\..\src\gras\Transport\sg_transport.c \\r
78 ..\..\..\src\gras\Virtu\sg_process.c \\r
79 ..\..\..\src\gras\Msg\sg_msg.c \\r
80 ..\..\..\src\gras\Virtu\sg_emul.c \\r
81 ..\..\..\src\gras\Virtu\sg_dns.c \\r
82 ..\..\..\src\xbt\set.c \\r
83 ..\..\..\src\simdag\sd_workstation.c \\r
84 ..\..\..\src\simdag\sd_task.c \\r
85 ..\..\..\src\simdag\sd_link.c \\r
86 ..\..\..\src\simdag\sd_global.c \\r
87 ..\..\..\src\amok\Bandwidth\saturate.c \\r
88 ..\..\..\src\gras\Msg\rpc.c \\r
89 ..\..\..\src\surf\random_mgr.c \\r
90 ..\..\..\src\gras\Virtu\process.c \\r
91 ..\..\..\src\amok\PeerManagement\peermanagement.c \\r
92 ..\..\..\src\surf\network_constant.c \\r
93 ..\..\..\src\surf\network.c \\r
94 ..\..\..\src\msg\msg_mailbox.c \\r
95 ..\..\..\src\msg\msg_config.c \\r
96 ..\..\..\src\surf\maxmin.c \\r
97 ..\..\..\src\xbt\mallocator.c \\r
98 ..\..\..\src\msg\m_process.c \\r
99 ..\..\..\src\xbt\log.c \\r
100 ..\..\..\src\surf\lagrange.c \\r
101 ..\..\..\src\java\jxbt_utilities.c \\r
102 ..\..\..\src\java\jmsg_task.c \\r
103 ..\..\..\src\java\jmsg_process.c \\r
104 ..\..\..\src\java\jmsg_host.c \\r
105 ..\..\..\src\java\jmsg_channel.c \\r
106 ..\..\..\src\java\jmsg_application_handler.c \\r
107 ..\..\..\src\java\jmsg.c \\r
108 ..\..\..\src\msg\host.c \\r
109 ..\..\..\src\xbt\heap.c \\r
110 ..\..\..\src\gras\Msg\gras_msg_types.c \\r
111 ..\..\..\src\gras\Msg\gras_msg_mod.c \\r
112 ..\..\..\src\gras\Msg\gras_msg_listener.c \\r
113 ..\..\..\src\gras\Msg\gras_msg_exchange.c \\r
114 ..\..\..\src\gras\Virtu\gras_module.c \\r
115 ..\..\..\src\gras\gras.c \\r
116 ..\..\..\src\xbt\graphxml_parse.c \\r
117 ..\..\..\src\xbt\graph.c \\r
118 ..\..\..\src\msg\gos.c \\r
119 ..\..\..\src\msg\global.c \\r
120 ..\..\..\src\xbt\fifo.c \\r
121 ..\..\..\src\surf\fair_bottleneck.c \\r
122 ..\..\..\src\xbt\ex.c \\r
123 ..\..\..\src\msg\environment.c \\r
124 ..\..\..\src\xbt\dynar.c \\r
125 ..\..\..\src\xbt\dict_multi.c \\r
126 ..\..\..\src\xbt\dict_elm.c \\r
127 ..\..\..\src\xbt\dict_cursor.c \\r
128 ..\..\..\src\xbt\dict.c \\r
129 ..\..\..\src\msg\deployment.c \\r
130 ..\..\..\src\gras\DataDesc\ddt_parse.yy.c \\r
131 ..\..\..\src\gras\DataDesc\ddt_parse.c \\r
132 ..\..\..\src\gras\DataDesc\ddt_exchange.c \\r
133 ..\..\..\src\gras\DataDesc\ddt_create.c \\r
134 ..\..\..\src\gras\DataDesc\ddt_convert.c \\r
135 ..\..\..\src\gras\DataDesc\datadesc.c \\r
136 ..\..\..\src\xbt\cunit.c \\r
137 ..\..\..\src\surf\cpu.c \\r
138 ..\..\..\src\xbt\config.c \\r
139 ..\..\..\src\gras\DataDesc\cbps.c \\r
140 ..\..\..\src\amok\Bandwidth\bandwidth.c \\r
141 ..\..\..\src\xbt\asserts.c \\r
142 ..\..\..\src\amok\amok_base.c\r
143 \r
144 ########################################################################################################################\r
145 #\r
146 # C++ source files (Wrappers) section\r
147 #\r
148 # Note                                          : [(1) This section contains all the names of the C++ source file of the project.       ]\r
149 #                                                         [ (2) All new C++ source files must be added in this section.                                         ] \r
150 #\r
151 ########################################################################################################################\r
152 \r
153 \r
154 CXXSRC = ..\..\..\src\cxx\MsgApplication.cxx \\r
155 ..\..\..\src\cxx\MsgApplicationHandler.cxx \\r
156 ..\..\..\src\cxx\BadAllocException.cxx \\r
157 ..\..\..\src\cxx\ClassNotFoundException.cxx \\r
158 ..\..\..\src\cxx\MsgEnvironment.cxx \\r
159 ..\..\..\src\cxx\Exception.cxx \\r
160 ..\..\..\src\cxx\FileNotFoundException.cxx \\r
161 ..\..\..\src\cxx\HostNotFoundException.cxx \\r
162 ..\..\..\src\cxx\InvalidArgumentException.cxx \\r
163 ..\..\..\src\cxx\LogicException.cxx \\r
164 ..\..\..\src\cxx\Msg.cxx \\r
165 ..\..\..\src\cxx\MsgException.cxx \\r
166 ..\..\..\src\cxx\NullPointerException.cxx \\r
167 ..\..\..\src\cxx\Object.cxx \\r
168 ..\..\..\src\cxx\OutOfBoundsException.cxx \\r
169 ..\..\..\src\cxx\MsgProcess.cxx \\r
170 ..\..\..\src\cxx\ProcessNotFoundException.cxx \\r
171 ..\..\..\src\cxx\MsgSimulation.cxx \\r
172 ..\..\..\src\cxx\StringHelper.cxx \\r
173 ..\..\..\src\cxx\MsgTask.cxx \\r
174 ..\..\..\src\cxx\MsgHost.cxx\r
175 \r
176 ########################################################################################################################\r
177 # C compiler flags section\r
178\r
179 # Flags descriptions :\r
180 #       \r
181 #       -> Od   : disable the compiler optimisations\r
182 #       -> Gd   : __cdecl calling convention usage\r
183 #       -> RTC1 : enable a run-time check \r
184 #       -> MD   : defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines \r
185 #                         are selected from the standard header files. This option also causes the compiler to place the library \r
186 #                         name MSVCRT.LIB into the object file.\r
187 #       -> Fp   : specify precompiled header file name\r
188 #       -> Fo   : create an object file\r
189 #       -> Fd   : the path of program database file (PDB) \r
190 #       -> FR   : generate the browser file (in Debug directory)\r
191 #       -> W3   : warning level (3)\r
192 #       -> c    : compile without linking (cl.exe only generate the object file, link.exe do the rest)\r
193 #       -> ZI   : include debug information in the program database compatible with Edit and Continue (used by backtrace)\r
194 #       -> TC   : it's a C source file (use the C compilation) \r
195 #\r
196 # Disable warnings :\r
197 #\r
198 #       -> 4996 : usage of functions declaraed as deprecated\r
199 #       -> 4244 : conversion from 'type1' to 'type2', possible loss of data\r
200 #       -> 4715 : not all control paths of a function return a value\r
201 #       -> 4090 : different 'modifier' qualifiers in the operation\r
202 #       -> 4018 : signed/unsigned mismatch in an expression\r
203 #\r
204 # Preprocessor macro descriptions :\r
205 #\r
206 #       -> _CRT_SECURE_NO_DEPRECATE : disable deprecation\r
207 #       -> WIN32                                        : it's a WIN32 DLL\r
208 #       -> _WINDOWS                                     : Windows protected-mode is selected with /GA, /Gw, /GW, /Mq, or /GD\r
209 #       -> _USRDLL                                      : it's a regulare DLL\r
210 #       -> DLL_EXPORT                           : export all the SimGrid API (__declspec(dllexport) usage)\r
211 #       -> _VC80_UPGRADE=0x0600         : it was a Visual C++ 6 project\r
212 #       -> _WINDLL                                      : Windows protected-mode dynamic-link library is selected with /GD\r
213 #       -> _STATIC_CPPLIB                       : A VOIR\r
214 #       \r
215 #\r
216 ########################################################################################################################\r
217 \r
218 CFLAGS = /Gd /Od /D "_CRT_SECURE_NO_DEPRECATE" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "SIMGRID_EXPORTS" /D "DLL_EXPORT" /D "_VC80_UPGRADE=0x0600" /D "_WINDLL" /RTC1 /D "_STATIC_CPPLIB" /MD /Fp".\Debug/simgrid.pch" /Fo /Fd".\Debug/" /FR".\Debug\\" /W3 /c /ZI /TC /wd4127 /wd4996 /wd4244 /wd4715 /wd4090 /wd4018 /errorReport:prompt    \r
219 \r
220 ########################################################################################################################\r
221 # C++ compiler flags section\r
222\r
223 # Flags descriptions :\r
224 #\r
225 #       -> Ge   : activate stack probes\r
226 #       -> Gd   : __cdecl calling convention usage      \r
227 #       -> Od   : disable the compiler optimisations\r
228 #       -> Gm   : enable minimal rebuild\r
229 #       -> EHsc : specify the synchronous exception handling model\r
230 #       -> RTC1 : enable a run-time check \r
231 #       -> MD   : defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines \r
232 #                         are selected from the standard header files. This option also causes the compiler to place the library \r
233 #                         name MSVCRT.LIB into the object file.\r
234 #       -> Fp   : specify precompiled header file name\r
235 #       -> Fo   : create an object file\r
236 #       -> Fd   : the path of program database file (PDB) \r
237 #       -> FR   : generate the browser file (in Debug directory)\r
238 #       -> W3   : warning level (3)\r
239 #       -> c    : compile without linking (cl.exe only generate the object file, link.exe do the rest)\r
240 #       -> ZI   : include debug information in the program database compatible with Edit and Continue (used by backtrace)\r
241 #       -> TP   : it's a C++ source file (use the C++ compilation) \r
242 #       -> Wp64 : portability problem detection on 64 bits architecture\r
243 #\r
244 # Disable warnings :\r
245 #\r
246 #       -> 4290 : disable the warning thows when a function is declared using exception specification\r
247 #\r
248 # Preprocessor macro descriptions :\r
249 #\r
250 #       -> _CRT_SECURE_NO_DEPRECATE : disable deprecation\r
251 #       -> _WIN32/WIN32                         : it's a WIN32 DLL\r
252 #       -> _WINDOWS                                     : Windows protected-mode is selected with /GA, /Gw, /GW, /Mq, or /GD\r
253 #       -> _USRDLL                                      : it's a regulare DLL\r
254 #       -> DLL_EXPORT                           : export all the SimGrid API (__declspec(dllexport) usage)\r
255 #       -> _VC80_UPGRADE=0x0600         : it was a Visual C++ 6 project\r
256 #       -> _WINDLL                                      : Windows protected-mode dynamic-link library is selected with /GD\r
257 #       -> _STATIC_CPPLIB                       : use libcpmt.lib instead msvcprt.lib                   : \r
258 #       -> DLL_STATIC                           : avoid to export a another time the functions of the SimGrid API       \r
259 #       -> SIMGRIDX_EXPORTS                     : export the C++ Wrapper classes \r
260 #\r
261 ########################################################################################################################\r
262 CXXFLAGS = /Ge /Gd /Od /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "DLL_STATIC" /D "SIMGRID_EXPORTS"  /D "SIMGRIDX_EXPORTS" /D "_WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_WINDLL" /Gm /EHsc /RTC1 /D "_STATIC_CPPLIB" /MD  /Fo  /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP /wd4290\r
263 \r
264 \r
265 \r
266 # Include directories\r
267 #\r
268 # Note : [ the environment variable INCLUDE must contains the value of the paths of the include directories \r
269 #          of Microsoft Visual C++. Normaly, the installer do that during the installation of Microsoft Visual\r
270 #                  C++]\r
271 \r
272 INCLUDES = /I..\..\..\include /I..\..\..\src /I..\..\..\src\include /I..\..\..\src\cxx\r
273 \r
274 \r
275 # Libraries to link with\r
276 \r
277 LIBS = odbc32.lib odbccp32.lib WSOCK32.LIB  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib\r
278 \r
279 \r
280 ########################################################################################################################\r
281 #\r
282 # Linker flags to link with.\r
283 #\r
284 # The linker build the DLL store it in the Windows system32 directory\r
285 # It produce the manifest of the DLL, the PDB file and the static library.\r
286 #\r
287 # Note : [(1) The static library and the PDB file is stored in the Debug directory                                              ]\r
288 #                [(2) The manifest file is produced and embeded in the DLL by using the tool Mt.exe (see below) ]       \r
289 #\r
290 ########################################################################################################################\r
291 \r
292 LINKFLAGS = "/OUT:$(SYSTEMROOT)\system32\simgrid.dll" /INCREMENTAL /DLL /MANIFEST "/MANIFESTFILE:$(SYSTEMROOT)\system32\simgrid.dll.manifest" /DEBUG "/PDB:.\Debug/simgrid.pdb" "/IMPLIB:.\Debug/simgrid.lib" /MACHINE:X86 \r
293 \r
294 \r
295 # The list of all .obj files to create.\r
296 \r
297 OBJS= $(CSRC:.c=.obj) $(CXXSRC:.cxx=.obj)\r
298 \r
299 \r
300 \r
301 # Link .obj files to create an executable.\r
302\r
303 # Note : [ the commande : mt /manifest $(SYSTEMROOT)\system32\simgrid.dll.manifest /outputresource:$(SYSTEMROOT)\system32\simgrid.dll;#2\r
304 #                  insert the manifest in a section of the dll (this is used to locate the appropriate crt library]\r
305 \r
306 $(LIBRARY): $(OBJS)\r
307         link -out:$@ $(**F) "/OUT:$(SYSTEMROOT)\system32\simgrid.dll" /INCREMENTAL /DLL /DEBUG /PDB:".\Debug/simgrid.pdb" /IMPLIB:".\Debug/simgrid.lib" /MACHINE:X86 /ERRORREPORT:PROMPT odbc32.lib odbccp32.lib WSOCK32.LIB  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib      \r
308         mt /manifest $(SYSTEMROOT)\system32\simgrid.dll.manifest /outputresource:$(SYSTEMROOT)\system32\simgrid.dll;#2\r
309         \r
310 # link -out:$@ $(**F) $(LIBS) $(LINKFLAGS)\r
311 \r
312 \r
313 \r
314 # Create .obj files from .cpp files (ANSI C++)\r
315 \r
316 .cxx.obj:\r
317         cl $(CXXFLAGS) $(INCLUDES) $*.cxx\r
318         \r
319 \r
320 # Create .obj files from .c files (ANSI C)\r
321 \r
322 \r
323 .c.obj:\r
324         cl $(CFLAGS) $(INCLUDES) $*.c\r
325 \r
326 \r