Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the Windows make file used to built the SimGrid dynamic link library.
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 12 Sep 2008 13:11:37 +0000 (13:11 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 12 Sep 2008 13:11:37 +0000 (13:11 +0000)
This make file permits to store in the same library the C++ Msg Wrappers and the C code of the SimGrid API (mix of C code and C++ code)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5919 48e7efb5-ca39-0410-a469-dd3cf9ba447f

build/vc7/simgrid/w32_makefile [new file with mode: 0644]

diff --git a/build/vc7/simgrid/w32_makefile b/build/vc7/simgrid/w32_makefile
new file mode 100644 (file)
index 0000000..ef08f42
--- /dev/null
@@ -0,0 +1,322 @@
+########################################################################################################################\r
+#\r
+# Project                                      : w32_makefile\r
+#\r
+# Description                          : it's the make file used to build the Windows SimGrid dynamic link library (DLL) and the files \r
+#                                                        that come with (the static library SimGrid.lib, the program database (PDB) file that holds \r
+#                                                        debugging information used to display the Windows backtrace.\r
+#\r
+# Note                                         : [(1) the manifest of the SimGrid is directly embeded in the DLL                                       ]\r
+#                                                      : [(2) both C code and C++ (the MSG wrappers) code are linked in the same library       ]  \r
+#  \r
+# Compiler (CL.EXE) version    :Microsoft Compiler (R) 32 bits C/C++ version 14.00.50727.42 for 80x86\r
+# \r
+# Command line                         : nmake -f w32_makefile [all]\r
+#\r
+# Author                                       : Abdelmalek CHERIER\r
+########################################################################################################################\r
+\r
+# The name of the libray\r
+LIBRARY=simgrid.dll\r
+\r
+# The default global goal\r
+all: $(LIBRARY)\r
+\r
+########################################################################################################################\r
+#\r
+# C source files section\r
+#\r
+# Note                                         : [(1) This section contains all the names of the C source file of the project.         ]\r
+#                                                        [ (2) All new C source files must be added in this section.                                           ] \r
+#\r
+########################################################################################################################\r
+\r
+CSRC= ..\..\..\src\xbt\xbt_virtu.c \\r
+..\..\..\src\xbt\xbt_strbuff.c \\r
+..\..\..\src\xbt\xbt_str.c \\r
+..\..\..\src\xbt\xbt_sg_time.c \\r
+..\..\..\src\xbt\xbt_sg_synchro.c \\r
+..\..\..\src\xbt\xbt_queue.c \\r
+..\..\..\src\xbt\xbt_peer.c \\r
+..\..\..\src\xbt\xbt_os_time.c \\r
+..\..\..\src\xbt\xbt_os_thread.c \\r
+..\..\..\src\xbt\xbt_matrix.c \\r
+..\..\..\src\xbt\xbt_main.c \\r
+..\..\..\src\xbt\xbt_log_layout_simple.c \\r
+..\..\..\src\xbt\xbt_log_layout_format.c \\r
+..\..\..\src\xbt\xbt_log_appender_file.c \\r
+..\..\..\src\xbt\xbt_context_thread.c \\r
+..\..\..\src\xbt\xbt_context_java.c \\r
+..\..\..\src\xbt\xbt_context.c \\r
+..\..\..\src\surf\workstation_ptask_L07.c \\r
+..\..\..\src\surf\workstation.c \\r
+..\..\..\src\gras\Transport\transport_plugin_sg.c \\r
+..\..\..\src\gras\Transport\transport.c \\r
+..\..\..\src\surf\trace_mgr.c \\r
+..\..\..\src\gras\Msg\timer.c \\r
+..\..\..\src\msg\task.c \\r
+..\..\..\src\xbt\swag.c \\r
+..\..\..\src\surf\surfxml_parse.c \\r
+..\..\..\src\surf\surf_timer.c \\r
+..\..\..\src\surf\surf.c \\r
+..\..\..\src\xbt\snprintf.c \\r
+..\..\..\src\simix\smx_synchro.c \\r
+..\..\..\src\simix\smx_process.c \\r
+..\..\..\src\simix\smx_host.c \\r
+..\..\..\src\simix\smx_global.c \\r
+..\..\..\src\simix\smx_environment.c \\r
+..\..\..\src\simix\smx_deployment.c \\r
+..\..\..\src\simix\smx_config.c \\r
+..\..\..\src\simix\smx_action.c \\r
+simgrid.c \\r
+..\..\..\src\gras\Transport\sg_transport.c \\r
+..\..\..\src\gras\Virtu\sg_process.c \\r
+..\..\..\src\gras\Msg\sg_msg.c \\r
+..\..\..\src\gras\Virtu\sg_emul.c \\r
+..\..\..\src\gras\Virtu\sg_dns.c \\r
+..\..\..\src\xbt\set.c \\r
+..\..\..\src\simdag\sd_workstation.c \\r
+..\..\..\src\simdag\sd_task.c \\r
+..\..\..\src\simdag\sd_link.c \\r
+..\..\..\src\simdag\sd_global.c \\r
+..\..\..\src\amok\Bandwidth\saturate.c \\r
+..\..\..\src\gras\Msg\rpc.c \\r
+..\..\..\src\surf\random_mgr.c \\r
+..\..\..\src\gras\Virtu\process.c \\r
+..\..\..\src\amok\PeerManagement\peermanagement.c \\r
+..\..\..\src\surf\network_constant.c \\r
+..\..\..\src\surf\network.c \\r
+..\..\..\src\msg\msg_mailbox.c \\r
+..\..\..\src\msg\msg_config.c \\r
+..\..\..\src\surf\maxmin.c \\r
+..\..\..\src\xbt\mallocator.c \\r
+..\..\..\src\msg\m_process.c \\r
+..\..\..\src\xbt\log.c \\r
+..\..\..\src\surf\lagrange.c \\r
+..\..\..\src\java\jxbt_utilities.c \\r
+..\..\..\src\java\jmsg_task.c \\r
+..\..\..\src\java\jmsg_process.c \\r
+..\..\..\src\java\jmsg_host.c \\r
+..\..\..\src\java\jmsg_channel.c \\r
+..\..\..\src\java\jmsg_application_handler.c \\r
+..\..\..\src\java\jmsg.c \\r
+..\..\..\src\msg\host.c \\r
+..\..\..\src\xbt\heap.c \\r
+..\..\..\src\gras\Msg\gras_msg_types.c \\r
+..\..\..\src\gras\Msg\gras_msg_mod.c \\r
+..\..\..\src\gras\Msg\gras_msg_listener.c \\r
+..\..\..\src\gras\Msg\gras_msg_exchange.c \\r
+..\..\..\src\gras\Virtu\gras_module.c \\r
+..\..\..\src\gras\gras.c \\r
+..\..\..\src\xbt\graphxml_parse.c \\r
+..\..\..\src\xbt\graph.c \\r
+..\..\..\src\msg\gos.c \\r
+..\..\..\src\msg\global.c \\r
+..\..\..\src\xbt\fifo.c \\r
+..\..\..\src\surf\fair_bottleneck.c \\r
+..\..\..\src\xbt\ex.c \\r
+..\..\..\src\msg\environment.c \\r
+..\..\..\src\xbt\dynar.c \\r
+..\..\..\src\xbt\dict_multi.c \\r
+..\..\..\src\xbt\dict_elm.c \\r
+..\..\..\src\xbt\dict_cursor.c \\r
+..\..\..\src\xbt\dict.c \\r
+..\..\..\src\msg\deployment.c \\r
+..\..\..\src\gras\DataDesc\ddt_parse.yy.c \\r
+..\..\..\src\gras\DataDesc\ddt_parse.c \\r
+..\..\..\src\gras\DataDesc\ddt_exchange.c \\r
+..\..\..\src\gras\DataDesc\ddt_create.c \\r
+..\..\..\src\gras\DataDesc\ddt_convert.c \\r
+..\..\..\src\gras\DataDesc\datadesc.c \\r
+..\..\..\src\xbt\cunit.c \\r
+..\..\..\src\surf\cpu.c \\r
+..\..\..\src\xbt\config.c \\r
+..\..\..\src\gras\DataDesc\cbps.c \\r
+..\..\..\src\amok\Bandwidth\bandwidth.c \\r
+..\..\..\src\xbt\asserts.c \\r
+..\..\..\src\amok\amok_base.c\r
+\r
+########################################################################################################################\r
+#\r
+# C++ source files (Wrappers) section\r
+#\r
+# Note                                         : [(1) This section contains all the names of the C++ source file of the project.       ]\r
+#                                                        [ (2) All new C++ source files must be added in this section.                                         ] \r
+#\r
+########################################################################################################################\r
+\r
+\r
+CXXSRC = ..\..\..\src\cxx\MsgApplication.cxx \\r
+..\..\..\src\cxx\MsgApplicationHandler.cxx \\r
+..\..\..\src\cxx\BadAllocException.cxx \\r
+..\..\..\src\cxx\ClassNotFoundException.cxx \\r
+..\..\..\src\cxx\MsgEnvironment.cxx \\r
+..\..\..\src\cxx\Exception.cxx \\r
+..\..\..\src\cxx\FileNotFoundException.cxx \\r
+..\..\..\src\cxx\HostNotFoundException.cxx \\r
+..\..\..\src\cxx\InvalidArgumentException.cxx \\r
+..\..\..\src\cxx\LogicException.cxx \\r
+..\..\..\src\cxx\Msg.cxx \\r
+..\..\..\src\cxx\MsgException.cxx \\r
+..\..\..\src\cxx\NullPointerException.cxx \\r
+..\..\..\src\cxx\Object.cxx \\r
+..\..\..\src\cxx\OutOfBoundsException.cxx \\r
+..\..\..\src\cxx\MsgProcess.cxx \\r
+..\..\..\src\cxx\ProcessNotFoundException.cxx \\r
+..\..\..\src\cxx\MsgSimulation.cxx \\r
+..\..\..\src\cxx\StringHelper.cxx \\r
+..\..\..\src\cxx\MsgTask.cxx \\r
+..\..\..\src\cxx\MsgHost.cxx\r
+\r
+########################################################################################################################\r
+# C compiler flags section\r
+# \r
+# Flags descriptions :\r
+#      \r
+#      -> Od   : disable the compiler optimisations\r
+#      -> Gd   : __cdecl calling convention usage\r
+#      -> RTC1 : enable a run-time check \r
+#      -> MD   : defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines \r
+#                        are selected from the standard header files. This option also causes the compiler to place the library \r
+#                        name MSVCRT.LIB into the object file.\r
+#      -> Fp   : specify precompiled header file name\r
+#      -> Fo   : create an object file\r
+#      -> Fd   : the path of program database file (PDB) \r
+#      -> FR   : generate the browser file (in Debug directory)\r
+#      -> W3   : warning level (3)\r
+#      -> c    : compile without linking (cl.exe only generate the object file, link.exe do the rest)\r
+#      -> ZI   : include debug information in the program database compatible with Edit and Continue (used by backtrace)\r
+#      -> TC   : it's a C source file (use the C compilation) \r
+#\r
+# Disable warnings :\r
+#\r
+#      -> 4996 : usage of functions declaraed as deprecated\r
+#      -> 4244 : conversion from 'type1' to 'type2', possible loss of data\r
+#      -> 4715 : not all control paths of a function return a value\r
+#      -> 4090 : different 'modifier' qualifiers in the operation\r
+#      -> 4018 : signed/unsigned mismatch in an expression\r
+#\r
+# Preprocessor macro descriptions :\r
+#\r
+#      -> _CRT_SECURE_NO_DEPRECATE : disable deprecation\r
+#      -> WIN32                                        : it's a WIN32 DLL\r
+#      -> _WINDOWS                                     : Windows protected-mode is selected with /GA, /Gw, /GW, /Mq, or /GD\r
+#      -> _USRDLL                                      : it's a regulare DLL\r
+#      -> DLL_EXPORT                           : export all the SimGrid API (__declspec(dllexport) usage)\r
+#      -> _VC80_UPGRADE=0x0600         : it was a Visual C++ 6 project\r
+#      -> _WINDLL                                      : Windows protected-mode dynamic-link library is selected with /GD\r
+#      -> _STATIC_CPPLIB                       : A VOIR\r
+#      \r
+#\r
+########################################################################################################################\r
+\r
+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
+\r
+########################################################################################################################\r
+# C++ compiler flags section\r
+# \r
+# Flags descriptions :\r
+#\r
+#      -> Ge   : activate stack probes\r
+#      -> Gd   : __cdecl calling convention usage      \r
+#      -> Od   : disable the compiler optimisations\r
+#      -> Gm   : enable minimal rebuild\r
+#      -> EHsc : specify the synchronous exception handling model\r
+#      -> RTC1 : enable a run-time check \r
+#      -> MD   : defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines \r
+#                        are selected from the standard header files. This option also causes the compiler to place the library \r
+#                        name MSVCRT.LIB into the object file.\r
+#      -> Fp   : specify precompiled header file name\r
+#      -> Fo   : create an object file\r
+#      -> Fd   : the path of program database file (PDB) \r
+#      -> FR   : generate the browser file (in Debug directory)\r
+#      -> W3   : warning level (3)\r
+#      -> c    : compile without linking (cl.exe only generate the object file, link.exe do the rest)\r
+#      -> ZI   : include debug information in the program database compatible with Edit and Continue (used by backtrace)\r
+#      -> TP   : it's a C++ source file (use the C++ compilation) \r
+#      -> Wp64 : portability problem detection on 64 bits architecture\r
+#\r
+# Disable warnings :\r
+#\r
+#      -> 4290 : disable the warning thows when a function is declared using exception specification\r
+#\r
+# Preprocessor macro descriptions :\r
+#\r
+#      -> _CRT_SECURE_NO_DEPRECATE : disable deprecation\r
+#      -> _WIN32/WIN32                         : it's a WIN32 DLL\r
+#      -> _WINDOWS                                     : Windows protected-mode is selected with /GA, /Gw, /GW, /Mq, or /GD\r
+#      -> _USRDLL                                      : it's a regulare DLL\r
+#      -> DLL_EXPORT                           : export all the SimGrid API (__declspec(dllexport) usage)\r
+#      -> _VC80_UPGRADE=0x0600         : it was a Visual C++ 6 project\r
+#      -> _WINDLL                                      : Windows protected-mode dynamic-link library is selected with /GD\r
+#      -> _STATIC_CPPLIB                       : use libcpmt.lib instead msvcprt.lib                   : \r
+#      -> DLL_STATIC                           : avoid to export a another time the functions of the SimGrid API       \r
+#      -> SIMGRIDX_EXPORTS                     : export the C++ Wrapper classes \r
+#\r
+########################################################################################################################\r
+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
+\r
+\r
+\r
+# Include directories\r
+#\r
+# Note : [ the environment variable INCLUDE must contains the value of the paths of the include directories \r
+#          of Microsoft Visual C++. Normaly, the installer do that during the installation of Microsoft Visual\r
+#                 C++]\r
+\r
+INCLUDES = /I..\..\..\include /I..\..\..\src /I..\..\..\src\include /I..\..\..\src\cxx\r
+\r
+\r
+# Libraries to link with\r
+\r
+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
+\r
+\r
+########################################################################################################################\r
+#\r
+# Linker flags to link with.\r
+#\r
+# The linker build the DLL store it in the Windows system32 directory\r
+# It produce the manifest of the DLL, the PDB file and the static library.\r
+#\r
+# Note : [(1) The static library and the PDB file is stored in the Debug directory                                             ]\r
+#               [(2) The manifest file is produced and embeded in the DLL by using the tool Mt.exe (see below) ]       \r
+#\r
+########################################################################################################################\r
+\r
+#LINKFLAGS = "/OUT:$(SYSTEMROOT)\system32\simgrid.dll" /INCREMENTAL /DLL /MANIFEST "/MANIFESTFILE:.\Debug\simgrid.dll.intermediate.manifest" /DEBUG "/PDB:.\Debug/simgrid.pdb" "/IMPLIB:.\Debug/simgrid.lib" /MACHINE:X86 \r
+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
+\r
+\r
+# The list of all .obj files to create.\r
+\r
+OBJS= $(CSRC:.c=.obj) $(CXXSRC:.cxx=.obj)\r
+\r
+\r
+\r
+# Link .obj files to create an executable.\r
+# \r
+# Note : [ the commande : mt /manifest $(SYSTEMROOT)\system32\simgrid.dll.manifest /outputresource:$(SYSTEMROOT)\system32\simgrid.dll;#2\r
+#                 insert the manifest in a section of the dll (this is used to locate the appropriate crt library]\r
+\r
+$(LIBRARY): $(OBJS)\r
+       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
+       mt /manifest $(SYSTEMROOT)\system32\simgrid.dll.manifest /outputresource:$(SYSTEMROOT)\system32\simgrid.dll;#2\r
+       \r
+# link -out:$@ $(**F) $(LIBS) $(LINKFLAGS)\r
+\r
+\r
+\r
+# Create .obj files from .cpp files (ANSI C++)\r
+\r
+.cxx.obj:\r
+       cl $(CXXFLAGS) $(INCLUDES) $*.cxx\r
+       \r
+\r
+# Create .obj files from .c files (ANSI C)\r
+\r
+\r
+.c.obj:\r
+       cl $(CFLAGS) $(INCLUDES) $*.c\r
+\r
+\r