Line | |
---|
1 | @echo off |
---|
2 | |
---|
3 | rem # |
---|
4 | set bin=..\%1% |
---|
5 | set name=%2% |
---|
6 | |
---|
7 | if not exist %bin%\%name%.arc exit |
---|
8 | |
---|
9 | rem # Retreive other arguments in one "tmplinkopts" file : |
---|
10 | |
---|
11 | set tmplinkopts=%bin%\%name%\tmplinkopts.dat |
---|
12 | |
---|
13 | if exist %tmplinkopts% del %tmplinkopts% |
---|
14 | |
---|
15 | shift |
---|
16 | shift |
---|
17 | set empty='' |
---|
18 | |
---|
19 | :next |
---|
20 | set x='%1' |
---|
21 | IF %x% EQU %empty% goto end |
---|
22 | echo %1 >> %tmplinkopts% |
---|
23 | shift |
---|
24 | goto next |
---|
25 | |
---|
26 | :end |
---|
27 | set empty= |
---|
28 | set x= |
---|
29 | |
---|
30 | set indirectlinkopts= |
---|
31 | if exist %tmplinkopts% set indirectlinkopts=@%tmplinkopts% |
---|
32 | |
---|
33 | if exist %bin%\%name%\%name%_dll.obj goto component |
---|
34 | |
---|
35 | :linker |
---|
36 | |
---|
37 | %CMTROOT%\%CMTBIN%\cmt.exe build windefs %bin%\%name%.arc >%bin%\%name%.def |
---|
38 | |
---|
39 | lib.exe /nologo /machine:ix86 /def:%bin%\%name%.def /out:%bin%\%name%.lib |
---|
40 | |
---|
41 | if exist %bin%\%name%.dll del %bin%\%name%.dll |
---|
42 | |
---|
43 | link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%.exp %bin%\%name%.arc %indirectlinkopts% |
---|
44 | |
---|
45 | goto return |
---|
46 | |
---|
47 | :component |
---|
48 | |
---|
49 | link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%\%name%_dll.obj %bin%\%name%.arc /machine:ix86 %indirectlinkopts% |
---|
50 | |
---|
51 | :return |
---|
52 | if exist %tmplinkopts% del %tmplinkopts% |
---|
53 | set tmplinkopts= |
---|
54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.