]>
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 | ||
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. | |
e0a93fae | 71 | rem --- Set the RALICE source directory as working directory |
72 | cd .. | |
5486ca8d | 73 | rem --- Creation of ROOT dictionary --- |
74 | rootcint zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h | |
75 | rem --- Compilation step --- | |
76 | cl %mscomp% *.cxx | |
77 | rem --- Creation of the export LIB --- | |
78 | bindexplib ralice *.obj > ralice.def | |
79 | lib /nologo /machine:IX86 *.obj /def:ralice.def /out:ralice.lib | |
80 | rem --- Creation of the DLL --- | |
81 | link /nologo /machine:IX86 /DLL *.obj ralice.exp %mslink% /OUT:ralice.dll | |
e0a93fae | 82 | rem --- Move the created libs to the SCRIPTS subdirectory |
83 | move ralice.lib .\scripts | |
84 | move ralice.dll .\scripts | |
5486ca8d | 85 | rem --- Delete all intermediate files --- |
86 | del .def | |
87 | del ralice.def | |
88 | del ralice.exp | |
89 | del zzzralicedict.h | |
90 | del zzzralicedict.cxx | |
91 | del *.obj | |
92 | echo. | |
93 | echo *** mklibs done. | |
94 | goto end | |
95 | ||
96 | :full | |
97 | echo *** Creation of ROOT loadable full version libraries | |
98 | echo. | |
e0a93fae | 99 | rem --- Set the RALICE source directory as working directory |
100 | cd .. | |
5486ca8d | 101 | rem --- Creation of ROOT dictionary --- |
102 | rootcint zzzralicedict.cxx -c RALICEHeaders.h RALICELinkDef.h | |
103 | rem --- Creation of the DLL --- | |
104 | cl %msdll% *.cxx /link %mslink% /OUT:ralice.dll | |
105 | rem --- Creation of the full version LIB --- | |
106 | lib /nologo /machine:IX86 *.obj /out:ralice.lib | |
e0a93fae | 107 | rem --- Move the created libs to the SCRIPTS subdirectory |
108 | move ralice.lib .\scripts | |
109 | move ralice.dll .\scripts | |
5486ca8d | 110 | rem --- Delete all intermediate files --- |
111 | del .def | |
112 | del zzzralicedict.h | |
113 | del zzzralicedict.cxx | |
114 | del *.obj | |
115 | echo. | |
116 | echo *** mklibs done. | |
117 | goto end | |
118 | ||
119 | :end | |
120 | rem --- End of script --- |