diff options
author | Werner Koch <[email protected]> | 2005-08-19 13:48:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-08-19 13:48:50 +0000 |
commit | b68fa9b15e9ade77534e4b2513cef623c26ce9c5 (patch) | |
tree | 76ebe7920dada3290adc49159d79f716464d4878 /src | |
parent | Added Romanian translation and other collected changes. (diff) | |
download | libgpg-error-b68fa9b15e9ade77534e4b2513cef623c26ce9c5.tar.gz libgpg-error-b68fa9b15e9ade77534e4b2513cef623c26ce9c5.zip |
Does now allow to build a W32 DLL.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 53 | ||||
-rw-r--r-- | src/gpg-error.def | 8 | ||||
-rw-r--r-- | src/gpg-error.h.in | 1 | ||||
-rw-r--r-- | src/versioninfo.rc.in | 52 |
4 files changed, 102 insertions, 12 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 1f3ae5b..c4c2c2e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,11 +20,22 @@ # We distribute the generated sources err-sources.h and err-codes.h, # because they are needed to build the po directory, and they don't # depend on the configuration anyway. + +localedir = $(datadir)/locale +bin_PROGRAMS = gpg-error +lib_LTLIBRARIES = libgpg-error.la +include_HEADERS = gpg-error.h +bin_SCRIPTS = gpg-error-config +m4datadir = $(datadir)/aclocal +m4data_DATA = gpg-error.m4 + + EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ mkerrnos.awk errnos.in \ mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ mkheader.awk gpg-error.h.in \ - err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 + err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \ + gpg-error.def versioninfo.rc.in BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h @@ -35,24 +46,14 @@ CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ gpg-error.h mkerrcodes mkerrcodes.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h $(tmp_files) -bin_SCRIPTS = gpg-error-config -m4datadir = $(datadir)/aclocal -m4data_DATA = gpg-error.m4 - -include_HEADERS = gpg-error.h - -lib_LTLIBRARIES = libgpg-error.la - libgpg_error_la_LDFLAGS = -version-info \ @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ libgpg_error_la_SOURCES = gpg-error.h gettext.h \ - strsource.c strerror.c code-to-errno.c code-from-errno.c + strsource.c strerror.c code-to-errno.c code-from-errno.c libgpg_error_la_LIBADD = @LTLIBINTL@ -localedir = $(datadir)/locale -bin_PROGRAMS = gpg-error gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" gpg_error_LDADD = ./libgpg-error.la @@ -102,3 +103,31 @@ gpg-error.h: Makefile mkheader.awk \ $(srcdir)/err-codes.h.in \ $(srcdir)/errnos.in \ $(srcdir)/gpg-error.h.in > $@ + + +# Special code to build a DLL. The current libtool (1.5.6) is not +# able to do this properly; we better use gcc's built in magic. +if HAVE_W32_SYSTEM +all-local: libgpg-error.dll libgpg-error.imp + +install-exec-hook: + cp libgpg-error.dll libgpg-error.imp $(DESTDIR)$(libdir)/ + cp gpg-error.exe $(DESTDIR)$(bindir)/ + $(STRIP) $(DESTDIR)$(libdir)/libgpg-error.dll + $(STRIP) $(DESTDIR)$(bindir)/gpg-error.exe + +libgpg-error.dll libgpg-error.imp: gpg-error.def \ + code-from-errno.o code-to-errno.o strerror.o strsource.o \ + gpg_error-strsource-sym.o gpg_error-strerror-sym.o \ + gpg_error-gpg-error.o versioninfo.o + $(CC) -shared -o libgpg-error.dll gpg-error.def \ + code-from-errno.o code-to-errno.o strerror.o strsource.o \ + versioninfo.o -Wl,--out-implib,libgpg-error.imp + $(CC) -o gpg-error.exe gpg_error-strsource-sym.o \ + gpg_error-strerror-sym.o gpg_error-gpg-error.o \ + libgpg-error.imp + +.rc.o: + $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@ + +endif diff --git a/src/gpg-error.def b/src/gpg-error.def new file mode 100644 index 0000000..39b0143 --- /dev/null +++ b/src/gpg-error.def @@ -0,0 +1,8 @@ + +EXPORTS + gpg_strerror @1 + gpg_strerror_r @2 + gpg_strsource @3 + gpg_err_code_from_errno @4 + gpg_err_code_to_errno @5 + diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 4bb20d9..66c5292 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -33,6 +33,7 @@ #endif #endif + #ifdef __cplusplus extern "C" { #if 0 /* just to make Emacs auto-indent happy */ diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in new file mode 100644 index 0000000..be13301 --- /dev/null +++ b/src/versioninfo.rc.in @@ -0,0 +1,52 @@ +/* versioninfo.rc.in - for libgpg-error + * Copyright (C) 2005 g10 Code GmbH + * + * 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. + */ + +/* This file is processed by configure to create versioninfo.rc */ + +#line __LINE__ "versioninfo.rc.in" + +#include <afxres.h> + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @BUILD_FILEVERSION@,0 + PRODUCTVERSION @BUILD_FILEVERSION@,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x21L +#else + FILEFLAGS 0x20L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0" + VALUE "CompanyName", "g10 Code GmbH\0" + VALUE "FileDescription", "libgpg-error - Common error codes\0" + VALUE "FileVersion", "@VERSION@\0" + VALUE "InternalName", "libgpg-error\0" + VALUE "LegalCopyright", "Copyright � 2005 g10 Code GmbH\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "libgpg-error.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "libgpg-error\0" + VALUE "ProductVersion", "@VERSION@\0" + VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" + END + END +END + |