Last change
on this file since 579 was
469,
checked in by rybkin, 16 years ago
|
See C.L. 370
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Rev | Line | |
---|
[5] | 1 | |
---|
| 2 | |
---|
| 3 | @echo off |
---|
| 4 | |
---|
| 5 | rem # |
---|
[469] | 6 | rem set bin=..\%1% |
---|
| 7 | |
---|
| 8 | if not defined bin ( |
---|
| 9 | for /f "usebackq" %%i in (`cmt show macro_value bin`) do set bin=%%i |
---|
| 10 | ) |
---|
[5] | 11 | set name=%2% |
---|
| 12 | |
---|
| 13 | if not exist %bin%\%name%.arc exit |
---|
| 14 | |
---|
| 15 | rem # Retreive other arguments in one "tmplinkopts" file : |
---|
| 16 | |
---|
| 17 | set tmplinkopts=%bin%\%name%\tmplinkopts.dat |
---|
| 18 | |
---|
| 19 | if exist %tmplinkopts% del %tmplinkopts% |
---|
| 20 | |
---|
| 21 | shift |
---|
| 22 | shift |
---|
| 23 | set empty='' |
---|
| 24 | |
---|
| 25 | :next |
---|
| 26 | set x='%1' |
---|
| 27 | IF %x% EQU %empty% goto end |
---|
| 28 | echo %1 >> %tmplinkopts% |
---|
| 29 | shift |
---|
| 30 | goto next |
---|
| 31 | |
---|
| 32 | :end |
---|
| 33 | set empty= |
---|
| 34 | set x= |
---|
| 35 | |
---|
| 36 | set indirectlinkopts= |
---|
| 37 | if exist %tmplinkopts% set indirectlinkopts=@%tmplinkopts% |
---|
| 38 | |
---|
| 39 | rem |
---|
| 40 | rem Different detections for "component" libraries |
---|
| 41 | rem this is not very clean in the sense that it is linked |
---|
| 42 | rem to project-specific implementation. |
---|
| 43 | rem We need to define a better way to specify that option |
---|
| 44 | rem |
---|
| 45 | |
---|
| 46 | if exist %bin%\%name%\%name%_dll.obj goto component |
---|
| 47 | if exist %bin%\%name%\%name%_entries.obj goto componentnew |
---|
| 48 | |
---|
| 49 | :linker |
---|
| 50 | |
---|
| 51 | %CMTROOT%\%CMTBIN%\cmt.exe build windefs %bin%\%name%.arc >%bin%\%name%.def |
---|
| 52 | |
---|
| 53 | lib.exe /nologo /machine:ix86 /def:%bin%\%name%.def /out:%bin%\%name%.lib |
---|
| 54 | |
---|
| 55 | if exist %bin%\%name%.dll del %bin%\%name%.dll |
---|
| 56 | |
---|
| 57 | link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%.exp %bin%\%name%.arc %indirectlinkopts% |
---|
| 58 | |
---|
| 59 | goto return |
---|
| 60 | |
---|
| 61 | :component |
---|
| 62 | |
---|
| 63 | link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%\%name%_dll.obj %bin%\%name%.arc /machine:ix86 %indirectlinkopts% |
---|
| 64 | |
---|
| 65 | goto return |
---|
| 66 | |
---|
| 67 | :componentnew |
---|
| 68 | |
---|
| 69 | echo hello |
---|
| 70 | link.exe /nologo /dll /out:%bin%\%name%.dll %bin%\%name%\%name%_load.obj %bin%\%name%.arc /machine:ix86 %indirectlinkopts% |
---|
| 71 | |
---|
| 72 | :return |
---|
| 73 | if exist %tmplinkopts% del %tmplinkopts% |
---|
| 74 | set tmplinkopts= |
---|
| 75 | |
---|
Note: See
TracBrowser
for help on using the repository browser.