diff options
author | Timo Schulz <[email protected]> | 2005-03-10 19:25:55 +0000 |
---|---|---|
committer | Timo Schulz <[email protected]> | 2005-03-10 19:25:55 +0000 |
commit | 2e21a29ff9b2f0ffa6597c952449b47476ce7e57 (patch) | |
tree | 094605c3364409995fe5e670728562febbc11470 /w32-dll/build-dll | |
parent | * acinclude.m4 (GNUPG_CHECK_VA_COPY): Assume no when cross-compiling. (diff) | |
download | gpgme-2e21a29ff9b2f0ffa6597c952449b47476ce7e57.tar.gz gpgme-2e21a29ff9b2f0ffa6597c952449b47476ce7e57.zip |
2005-03-10 Timo Schulz <[email protected]>
* gpgme.def: New. Exported GPGME functions.
* build-dll: New.
Diffstat (limited to 'w32-dll/build-dll')
-rwxr-xr-x | w32-dll/build-dll | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/w32-dll/build-dll b/w32-dll/build-dll new file mode 100755 index 00000000..11618d7e --- /dev/null +++ b/w32-dll/build-dll @@ -0,0 +1,58 @@ +#!/bin/sh +# Run this to generate the libgcrypt W32 DLL +# +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +AS=i586-mingw32msvc-as +OBJS= + +grep "#define HAVE_DOSISH_SYSTEM" ../config.h +if [ $? = 1 ]; then + exit +fi + +for i in $(ls ../gpgme/*.o); do + OBJS="$OBJS $i" +done +OBJS="$OBJS /home/twoaday/w32root/lib/libgpg-error.a" +OBJS="$OBJS ../gpgme/stpcpy.o ../gpgme/vasprintf.o" + +echo 'running dlltool the first time' >&2 +mingw32 dlltool --nodelete \ + --as $AS \ + --def gpgme.def \ + --output-exp gpgme.exp \ + --output-lib gpgme.imp \ + --dllname gpgme.dll $OBJS +echo 'doing dummy link to create the base file' >&2 +mingw32 gcc -mdll -Wl,--base-file -Wl,gpgme.base \ + -o gpgme.dll gpgme.exp $OBJS +echo 'running dlltool the second time' >&2 +mingw32 dlltool --nodelete \ + --as $AS \ + --def gpgme.def \ + --output-exp gpgme.exp \ + --output-lib gpgme.imp \ + --base-file gpgme.base \ + --dllname gpgme.dll $OBJS + +echo 'doing final link' >&2 +mingw32 gcc -mdll -o gpgme.dll gpgme.exp $OBJS +mingw32 strip gpgme.dll + +mingw32 dlltool --def gpgme.def \ + --as $AS \ + --dllname gpgme.dll \ + --output-lib gpgme.lib + +echo 'clean up' +rm -f dh.o dh.s dt.o dt.s +rm -f gpgme.base gpgme.exp gpgme.imp tgpgme.exp
\ No newline at end of file |