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