]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/scripts/mklibs.bat
Subdirectory "scripts" created in RALICE.
[u/mrichter/AliRoot.git] / RALICE / scripts / mklibs.bat
1 @echo off
2 rem ****************************************************************************
3 rem *   Script to create an MSVC++ LIB and relocatable DLL from *.cxx files
4 rem *
5 rem * Usage :
6 rem * -------
7 rem * mklibs export : ROOT loadable DLL and export LIB are created
8 rem * mklibs full   : ROOT loadable DLL and full LIB version are created
9 rem * 
10 rem * Notes :
11 rem * -------
12 rem * 1) "mklibs export" is the default, enabling ROOT loadable library creation
13 rem *    via 'double clicking'.
14 rem *
15 rem * 2) Providing unsupported options results in displaying the help info.  
16 rem *
17 rem * This script creates ralice.lib and ralice.dll from all .h and .cxx files
18 rem * in the current directory.
19 rem *
20 rem * In view of the ROOTCINT processing, the following two standard files
21 rem * are always required :
22 rem *
23 rem * RALICEHeaders.h : containing an include of all .h files
24 rem * RALICELinkDef.h : containing the #pragma's to define all classes
25 rem *
26 rem * --- NvE 04-apr-2000 UU-SAP Utrecht
27 rem ****************************************************************************
28
29 echo .
30 echo === Automatic ROOT library production of files ralice.lib and ralice.dll ===
31 echo .
32
33 rem --- The option strings for MSVC++ DLL compilation and linking ---
34 set mscomp=/nologo /c /TP /Za /MD /I%ROOTSYS%\include
35 set msdll=/nologo /TP /Za /MD /LD /GD /I%ROOTSYS%\include
36 set mslink=/ENTRY:_DllMainCRTStartup@12 %ROOTSYS%\lib\*.lib
37
38 if "%1" == "" goto export
39 if "%1" == "export" goto export
40 if "%1" == "full" goto full
41
42 rem --- Displaying of the help info ---
43 echo ****************************************************************************
44 echo *   Script to create an MSVC++ LIB and relocatable DLL from *.cxx files
45 echo *
46 echo * Usage :
47 echo * -------
48 echo * mklibs export : ROOT loadable DLL and export LIB are created
49 echo * mklibs full   : ROOT loadable DLL and full LIB version are created
50 echo * 
51 echo * Notes :
52 echo * -------
53 echo * 1) "mklibs export" is the default, enabling ROOT loadable library creation
54 echo *    via 'double clicking'.
55 echo * 2) Providing unsupported options results in displaying the help info.  
56 echo *
57 echo * This script creates ralice.lib and ralice.dll from all .h and .cxx files
58 echo * in the current directory.
59 echo *
60 echo * In view of the ROOTCINT processing, the following two standard files
61 echo * are always required :
62 echo *
63 echo * RALICEHeaders.h : containing an include of all .h files
64 echo * RALICELinkDef.h : containing the #pragma's to define all classes
65 echo ****************************************************************************
66 goto end
67
68 :export
69 echo *** Creation of ROOT loadable export libraries
70 echo.
71 rem --- Creation of ROOT dictionary ---
72 rootcint zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h
73 rem --- Compilation step ---
74 cl %mscomp% *.cxx
75 rem --- Creation of the export LIB ---
76 bindexplib ralice *.obj > ralice.def
77 lib /nologo /machine:IX86 *.obj /def:ralice.def /out:ralice.lib
78 rem --- Creation of the DLL ---
79 link /nologo /machine:IX86 /DLL *.obj ralice.exp %mslink% /OUT:ralice.dll
80 rem --- Delete all intermediate files --- 
81 del .def
82 del ralice.def
83 del ralice.exp
84 del zzzralicedict.h
85 del zzzralicedict.cxx
86 del *.obj
87 echo.
88 echo *** mklibs done.
89 goto end
90
91 :full
92 echo *** Creation of ROOT loadable full version libraries
93 echo.
94 rem --- Creation of ROOT dictionary ---
95 rootcint zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h
96 rem --- Creation of the DLL ---
97 cl %msdll% *.cxx /link %mslink% /OUT:ralice.dll
98 rem --- Creation of the full version LIB ---
99 lib /nologo /machine:IX86 *.obj /out:ralice.lib
100 rem --- Delete all intermediate files --- 
101 del .def
102 del zzzralicedict.h
103 del zzzralicedict.cxx
104 del *.obj
105 echo.
106 echo *** mklibs done.
107 goto end
108
109 :end
110 rem --- End of script ---