2 # $Id: mk-dlls.sh,v 1.1 2008/11/18 08:50:04 juergen Exp $
\r
3 ##############################################################################
\r
4 # Copyright (c) 2008 Free Software Foundation, Inc. #
\r
6 # Permission is hereby granted, free of charge, to any person obtaining a #
\r
7 # copy of this software and associated documentation files (the "Software"), #
\r
8 # to deal in the Software without restriction, including without limitation #
\r
9 # the rights to use, copy, modify, merge, publish, distribute, distribute #
\r
10 # with modifications, sublicense, and/or sell copies of the Software, and to #
\r
11 # permit persons to whom the Software is furnished to do so, subject to the #
\r
12 # following conditions: #
\r
14 # The above copyright notice and this permission notice shall be included in #
\r
15 # all copies or substantial portions of the Software. #
\r
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
\r
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
\r
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
\r
20 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
\r
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
\r
22 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
\r
23 # DEALINGS IN THE SOFTWARE. #
\r
25 # Except as contained in this notice, the name(s) of the above copyright #
\r
26 # holders shall not be used in advertising or otherwise to promote the sale, #
\r
27 # use or other dealings in this Software without prior written #
\r
29 ##############################################################################
\r
31 # Author: Juergen Pfeifer
\r
33 # Build DLLs on MinGW
\r
35 gcc -v 2>&1 | grep specs | grep mingw
\r
36 if [ $? -eq 1 ]; then
\r
37 echo "$0 requires a mingw environment" >&2
\r
41 lf="--enable-auto-import"
\r
42 pushd lib 2>&1 >/dev/null
\r
47 if [ -f libncurses${t}${m}.a ]; then
\r
48 f=libncurses${t}${m}.a
\r
49 g=`basename $f .a | cut -c 4-`
\r
55 ar x ../${f} `ar t ../${f}`
\r
56 gcc $cf -o w${g}.dll -Wl,--out-implib,${gi} -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f`
\r
57 lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
\r
65 for l in panel menu form
\r
67 for f in lib${l}${t}${m}.a
\r
69 g=`basename $f .a | cut -c 4-`
\r
75 ar x ../$f `ar t ../$f`
\r
76 gcc $cf -o w${g}.dll -Wl,--out-implib,libw${g}.a -Wl,--output-def,w${g}.def -Wl,$lf `ar t ../$f` ../${gi}
\r
77 lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
\r
91 echo lib has not been build >&2
\r