source: CMT/v1r18p20041201/mgr/cmt_make_shlib.bat @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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