diff options
Diffstat (limited to 'contrib/conf-w32ce-msc/build.mk')
-rwxr-xr-x | contrib/conf-w32ce-msc/build.mk | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/contrib/conf-w32ce-msc/build.mk b/contrib/conf-w32ce-msc/build.mk new file mode 100755 index 0000000..745a129 --- /dev/null +++ b/contrib/conf-w32ce-msc/build.mk @@ -0,0 +1,95 @@ +# build.mk - Makefile to build libgpg-error using Visual-C +# Copyright 2010 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 file 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 is a helper make script to build libgpg-error for WindowsCE +# using the Microsoft Visual C compiler. + +# The target build directry where we run the Visual C compiler/ +# This needs to be an absolute directory name. +targetdir = /home/smb/xppro-gnu/src/libgpg-error + + +help: + @echo "Run " + @echo " make -f ../contrib/conf-w32ce-msc/build.mk copy-source" + @echo "on the POSIX system and then" + @echo " nmake -f build.mk all" + @echo "on the Windows system" + + +CFLAGS = -DHAVE_CONFIG_H -DDLL_EXPORT -I. +LDFLAGS = + +# Standard source files +sources = \ + init.c init.h \ + strsource.c \ + strerror.c \ + code-to-errno.c \ + code-from-errno.c \ + w32-gettext.c \ + gettext.h \ + err-sources.h \ + err-codes.h + +# Sources files in this directory inclduing this Makefile +conf_sources = \ + build.mk \ + config.h + +# Source files built by running the standard build system. +built_sources = \ + code-from-errno.h \ + code-to-errno.h \ + err-codes-sym.h \ + err-sources-sym.h \ + errnos-sym.h \ + gpg-error.h \ + mkerrcodes.h \ + mkw32errmap.map.c \ + gpg-error.def + +copy-static-source: + @if [ ! -f ./w32-gettext.c ]; then \ + echo "Please cd to the src/ directory first"; \ + exit 1; \ + fi + cp -t $(targetdir) $(sources); + cd ../contrib/conf-w32ce-msc ; cp -t $(targetdir) $(conf_sources) + + +copy-built-source: + @if [ ! -f ./mkw32errmap.map.c ]; then \ + echo "Please build using ./autogen.sh --build-w32ce first"; \ + exit 1; \ + fi + cp -t $(targetdir) $(built_sources) + +copy-source: copy-static-source copy-built-source + + +all: $(sources) $(conf_sources) $(built_sources) + $(CC) $(CFLAGS) -c w32-gettext.c + $(CC) $(CFLAGS) -c init.c + $(CC) $(CFLAGS) -c strsource.c + $(CC) $(CFLAGS) -c strerror.c + $(CC) $(CFLAGS) -c code-to-errno.c + $(CC) $(CFLAGS) -c code-from-errno.c + $(CC) $(LDFLAGS) /LD -Felibgpg-error-0.dll \ + w32-gettext.obj init.obj strsource.obj strerror.obj \ + code-to-errno.obj code-from-errno.obj \ + gpg-error.def + +# Note that install needs to be run on the POSIX platform and the all +# is only to make sure we build everything; it won't compile anything +# because Visual-C is probably not installed on that platform. +install: all + @echo fixme Install the files |