3 # Temporary hack until building dlls is easier with gcc -mno-cygwin
6 # This is usable with cygwin b20.1 and egcs-2.91.66 19990314
7 # (egcs-1.1.2 release) or gcc-2.95(.2) as distributed by Mumit Khan. For
8 # other combinations, no idea.
20 [ -n "$def" -a "$def" != '-' ] && defswitch="--def $def"
23 [ $version != '-' ] && libname=$library-$version
28 *.[ao]) objs="$objs $F";;
32 $GCC -mdll -mno-cygwin -Wl,--base-file,$library.base -o $dllfile $ldargs &&
33 $DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
34 $GCC -mdll -mno-cygwin -Wl,--base-file,$library.base,$library.exp -o $dllfile $ldargs &&
35 $DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
36 $GCC -mdll -mno-cygwin -Wl,$library.exp -o $dllfile $ldargs &&
37 $DLLTOOL --as=$AS --dllname $dllfile $defswitch --output-lib lib$libname.a $objs
39 # Finally, also build import libraries for the Microsoft linker. You
40 # will either need to have some decent version of MSVC, or get lib.exe
41 # (and link.exe) from the (freely downloadable) Microsoft Platform SDK.
43 if type -p lib.exe && [ -n "$def" -a "$def" != '-' ]; then
44 lib -name:$libname.dll -def:$def -out:$libname.lib
47 rm $library.base $library.exp 2>/dev/null