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