]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/wa98/scripts/mklibs.bat
Now the new installation scripts are added to the CVS repository.
[u/mrichter/AliRoot.git] / RALICE / wa98 / 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 rwa98.lib and rwa98.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 * RWA98Headers.h : containing an include of all .h files
24 rem * RWA98LinkDef.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 rwa98.lib and rwa98.dll ===
31 echo .
32 rem --- Set the Wa98 source directory as working directory
33 cd %ALIROOT%\RALICE\wa98
34
35 rem --- The option strings for MSVC++ DLL compilation and linking ---
36 set mscomp=/nologo /c /TP /Ze /MD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE
37 set msdll=/nologo /TP /Ze /MD /LD /GD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE
38 set mslink=/ENTRY:_DllMainCRTStartup@12 %ROOTSYS%\lib\*.lib %MYLIBS%\*.lib
39
40 if "%1" == "" goto export
41 if "%1" == "export" goto export
42 if "%1" == "full" goto full
43
44 rem --- Displaying of the help info ---
45 echo ****************************************************************************
46 echo *   Script to create an MSVC++ LIB and relocatable DLL from *.cxx files
47 echo *
48 echo * Usage :
49 echo * -------
50 echo * mklibs export : ROOT loadable DLL and export LIB are created
51 echo * mklibs full   : ROOT loadable DLL and full LIB version are created
52 echo * 
53 echo * Notes :
54 echo * -------
55 echo * 1) "mklibs export" is the default, enabling ROOT loadable library creation
56 echo *    via 'double clicking'.
57 echo * 2) Providing unsupported options results in displaying the help info.  
58 echo *
59 echo * This script creates rwa98.lib and rwa98.dll from all .h and .cxx files
60 echo * in the current directory.
61 echo *
62 echo * In view of the ROOTCINT processing, the following two standard files
63 echo * are always required :
64 echo *
65 echo * RWA98Headers.h : containing an include of all .h files
66 echo * RWA98LinkDef.h : containing the #pragma's to define all classes
67 echo ****************************************************************************
68 goto end
69
70 :export
71 echo *** Creation of ROOT loadable export libraries
72 echo.
73 rem --- Creation of ROOT dictionary ---
74 rootcint zzzrwa98dict.cxx -c -I%ALIROOT%\RALICE RWA98Headers.h RWA98LinkDef.h
75 rem --- Compilation step ---
76 cl %mscomp% *.cxx
77 rem --- Creation of the export LIB ---
78 bindexplib rwa98 *.obj > rwa98.def
79 lib /nologo /machine:IX86 *.obj /def:rwa98.def /out:rwa98.lib
80 rem --- Creation of the DLL ---
81 link /nologo /machine:IX86 /DLL *.obj rwa98.exp %mslink% /OUT:rwa98.dll
82 rem --- Move the created libs to the SCRIPTS subdirectory
83 move rwa98.lib .\scripts
84 move rwa98.dll .\scripts
85 rem --- Delete intermediate files
86 del rwa98.def
87 del rwa98.exp
88 goto root_clean
89
90 :full
91 echo *** Creation of ROOT loadable full version libraries
92 echo.
93 rem --- Creation of ROOT dictionary ---
94 rootcint zzzrwa98dict.cxx -c -I%ALIROOT%\RALICE RWA98Headers.h RWA98LinkDef.h
95 rem --- Creation of the DLL ---
96 cl %msdll% *.cxx /link %mslink% /OUT:rwa98.dll
97 rem --- Creation of the full version LIB ---
98 lib /nologo /machine:IX86 *.obj /out:rwa98.lib
99 rem --- Move the created libs to the SCRIPTS subdirectory
100 move rwa98.lib .\scripts
101 move rwa98.dll .\scripts
102 rem --- Delete intermediate files
103 goto root_clean
104
105 :root_clean
106 rem --- Delete all intermediate files --- 
107 del .def
108 del zzzrwa98dict.h
109 del zzzrwa98dict.cxx
110 del *.obj
111 echo.
112 echo *** mklibs done.
113 goto end
114
115 :end
116 rem --- Go back to original directory
117 cd scripts
118 rem --- End of script ---