2008-04-25 Marcus Brinkmann <marcus@ulysses.g10code.com>
[gpg4win.git] / src / Makefile.am
1 # Makefile.am - Installer for GnuPG 4 Windows Makefile.
2 # Copyright (C) 2005, 2006, 2007 g10 Code GmbH
3
4 # This file is part of Gpg4win.
5
6 # Gpg4win is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # Gpg4win is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19
20 EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi config.site \
21         installer-options.ini.in libiconv.def libintl.def loreley.mid \
22         gpg4win-splash.wav gpgwrap.c exdll.h g4wihelp.c g4wihelp.nsi \
23         inst-sections.nsi installer.nsi installer-finish.nsi  \
24         qt.conf kleowrap.c potomo Memento.nsh dirmngr.conf    \
25         inst-gpg4win.nsi           uninst-gpg4win.nsi         \
26         inst-atk.nsi               uninst-atk.nsi             \
27         inst-cairo.nsi             uninst-cairo.nsi           \
28         inst-libgsasl.nsi          uninst-libgsasl.nsi        \
29         inst-libtasn1.nsi          uninst-libtasn1.nsi        \
30         inst-opencdk.nsi           uninst-opencdk.nsi         \
31         inst-gnutls.nsi            uninst-gnutls.nsi          \
32         inst-libetpan.nsi          uninst-libetpan.nsi        \
33         inst-claws-mail.nsi        uninst-claws-mail.nsi      \
34         inst-crypt.nsi             uninst-crypt.nsi           \
35         inst-dirmngr.nsi           uninst-dirmngr.nsi         \
36         inst-eudoragpg.nsi         uninst-eudoragpg.nsi       \
37         inst-gettext.nsi           uninst-gettext.nsi         \
38         inst-glib.nsi              uninst-glib.nsi            \
39         inst-gnupg2.nsi            uninst-gnupg2.nsi          \
40         inst-gnupg.nsi             uninst-gnupg.nsi           \
41         inst-gpa.nsi               uninst-gpa.nsi             \
42         inst-gpgee.nsi             uninst-gpgee.nsi           \
43         inst-gpgme.nsi             uninst-gpgme.nsi           \
44         inst-gpgol.nsi             uninst-gpgol.nsi           \
45         inst-gpgex.nsi             uninst-gpgex.nsi           \
46         inst-gtk+.nsi              uninst-gtk+.nsi            \
47         inst-jpeg.nsi              uninst-jpeg.nsi            \
48         inst-libassuan.nsi         uninst-libassuan.nsi       \
49         inst-libgcrypt.nsi         uninst-libgcrypt.nsi       \
50         inst-libgpg-error.nsi      uninst-libgpg-error.nsi    \
51         inst-libiconv.nsi          uninst-libiconv.nsi        \
52         inst-libksba.nsi           uninst-libksba.nsi         \
53         inst-libpng.nsi            uninst-libpng.nsi          \
54         inst-man_advanced_de.nsi   uninst-man_advanced_de.nsi \
55         inst-man_advanced_en.nsi   uninst-man_advanced_en.nsi \
56         inst-man_novice_de.nsi     uninst-man_novice_de.nsi   \
57         inst-man_novice_en.nsi     uninst-man_novice_en.nsi   \
58         inst-pango.nsi             uninst-pango.nsi           \
59         inst-pinentry.nsi          uninst-pinentry.nsi        \
60         inst-pkgconfig.nsi         uninst-pkgconfig.nsi       \
61         inst-pthreads-w32.nsi      uninst-pthreads-w32.nsi    \
62         inst-regex.nsi             uninst-regex.nsi           \
63         inst-w32pth.nsi            uninst-w32pth.nsi          \
64         inst-winpt.nsi             uninst-winpt.nsi           \
65         inst-zlib.nsi              uninst-zlib.nsi            \
66         inst-qt.nsi                uninst-qt.nsi              \
67         inst-kdesupport.nsi        uninst-kdesupport.nsi      \
68         inst-oxygen-icons.nsi      uninst-oxygen-icons.nsi    \
69         inst-kdelibs.nsi           uninst-kdelibs.nsi         \
70         inst-kleopatra.nsi         uninst-kleopatra.nsi       \
71         inst-bzip2.nsi             uninst-bzip2.nsi           \
72         inst-final.nsi
73
74 # Need to clean the dll because we bypassed automake.
75 CLEANFILES = g4wihelp.dll versioninfo.txt README.en.txt README.de.txt \
76              installer-options.ini NEWS.tmp gpgwrap.exe kleowrap.exe
77
78 # Supported source packages.
79 gpg4win_spkgs = glib gnupg libgpg-error gpgme gpgol gpgex \
80                 gpa winpt libgsasl libtasn1 opencdk gnutls \
81                 libetpan claws-mail gnupg2 pinentry \
82                 libassuan libksba libgcrypt dirmngr w32pth
83
84 # Extra options to configure for individual packages.
85 # We can use $(idir) here for the installation prefix.
86
87 gpg4win_pkg_glib_configure = \
88   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
89   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
90
91 # The GnuPG package provides man pages which we have to convert.
92 # We also create the MO files here.
93 define gpg4win_pkg_gnupg_post_install   
94 (man -Tlatin1 -l $$$${pkgidir}/share/man/man1/gpg.1 | \
95  sed `printf "s/_\b//g;s/\b.//g"` | \
96  sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/gpg.man; \
97 man -Tlatin1 -l $$$${pkgidir}/share/man/man1/gpgv.1 | \
98  sed `printf "s/_\b//g;s/\b.//g"` | \
99  sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/gpgv.man; \
100 man -Tlatin1 -l $$$${pkgidir}/share/man/man7/gnupg.7 | \
101  sed `printf "s/_\b//g;s/\b.//g"` | \
102  sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man7/gnupg.man)
103 endef
104
105
106 # The fields FAQ and faq.html conflict with those in GnuPG1.
107 # For now remove them.
108 define gpg4win_pkg_gnupg2_post_install  
109 ( rm $$$${pkgidir}/share/gnupg/FAQ; \
110   rm $$$${pkgidir}/share/gnupg/faq.html; \
111   for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
112      $(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
113                       $$$${pkgidir}/share/gnupg/$$$${i}.mo ; \
114   done)
115 endef
116
117
118 # Build the reference manual.
119 define gpg4win_pkg_gpgol_post_install
120 ( cd $$$${pkgndir}/doc; make pdf )
121 endef
122
123 # We would like to use --with-libiconv-prefix and
124 # --with-libintl-prefix, but these don't work with the cheesy
125 # non-"libfoo.la" versions of iconv and gettext that we are using.
126 #gpg4win_pkg_libgpg_error_configure = \
127 #  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
128 gpg4win_pkg_libgpg_error_configure = --silent \
129   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
130
131 gpg4win_pkg_libassuan_configure =  --silent \
132   --disable-shared \
133   --with-pth-prefix=$(idir)
134
135 gpg4win_pkg_libksba_configure = --silent \
136   --with-gpg-error-prefix=$(idir)
137
138 gpg4win_pkg_libgcrypt_configure = --silent \
139   --with-gpg-error-prefix=$(idir)
140
141 gpg4win_pkg_dirmngr_configure = \
142   --with-gpg-error-prefix=$(idir) \
143   --with-ksba-prefix=$(idir) \
144   --with-libgcrypt-prefix=$(idir) \
145   --with-libassuan-prefix=$(idir) \
146   --with-pth-prefix=$(idir)
147
148 gpg4win_pkg_gnupg_configure = \
149   --with-bzip2=$(idir) 
150
151 gpg4win_pkg_gnupg2_configure = \
152   --with-gpg-error-prefix=$(idir) \
153   --with-ksba-prefix=$(idir) \
154   --with-libgcrypt-prefix=$(idir) \
155   --with-libassuan-prefix=$(idir) \
156   --with-zlib=$(idir) \
157   --with-pth-prefix=$(idir) \
158   --without-included-gettext \
159   --disable-regex
160
161 # We would like to use --with-libiconv-prefix and
162 # --with-libintl-prefix, but these don't work with the cheesy
163 # non-"libfoo.la" versions of iconv and gettext that we are using.
164 gpg4win_pkg_pinentry_configure = \
165   --disable-pinentry-gtk \
166   --enable-pinentry-gtk2 \
167   --with-glib-prefix=$(idir) --with-gtk-prefix=$(idir) \
168   --disable-pinentry-qt \
169   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
170 #  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
171
172 # The LDFLAGS is needed for -lintl for glib.  The QT4 variables work
173 # around the lack of cross compilation support in qt-dev.
174 gpg4win_pkg_gpgme_configure = --silent \
175   --with-gpg-error-prefix=$(idir) --enable-static \
176   --enable-w32-glib LDFLAGS=-L$(idir)/lib \
177   --enable-w32-qt \
178   QT4_CORE_CFLAGS=\"-DQT_LARGEFILE_SUPPORT -DQT_DLL \
179                    -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_THREAD_SUPPORT \
180                    -I$(idir)/include/QtCore -I$(idir)/include \
181                    -I$(idir)/mkspecs/win32-g++\" \
182   QT4_CORE_LIBS=\"-L$(idir)/lib -lQtCore4\"
183
184 gpg4win_pkg_gpa_configure = --silent \
185   --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) \
186   --with-gpgme-prefix=$(idir) --with-zlib=$(idir) \
187   --with-libassuan-prefix=$(idir) --with-gpg-error-prefix=$(idir)
188
189 gpg4win_pkg_gpgol_configure = --silent \
190   --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir) \
191   --with-libassuan-prefix=$(idir)
192
193 gpg4win_pkg_gpgex_configure = --silent \
194   --with-gpg-error-prefix=$(idir) \
195   --with-libassuan-prefix=$(idir)
196
197 gpg4win_pkg_winpt_configure = --silent \
198   --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir)
199
200 gpg4win_pkg_gnutls_configure = \
201   --disable-cxx
202
203 # The CFLAGS are needed to find pthread-w32.
204 gpg4win_pkg_libetpan_configure = \
205   CPPFLAGS=\"-I$(idir)/include\" LIBS=\"-L$(idir)/lib\"
206
207 gpg4win_pkg_claws_mail_configure = \
208   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
209   --with-gpg-error-prefix=$(idir) --with-gpgme-prefix=$(idir) \
210   --with-config-dir="Claws-mail" --enable-pthread --enable-gnutls \
211   --enable-libetpan --disable-aspell --disable-trayicon-plugin \
212   --disable-openssl --disable-dillo-viewer-plugin --disable-gnomeprint \
213   --disable-jpilot --disable-startup-notification --disable-ipv6 \
214   --disable-mathml-viewer-plugin --disable-clamav-plugin \
215   --disable-spamassassin-plugin --disable-bogofilter-plugin \
216   --disable-valgrind --disable-networkmanager-support
217
218 # Supported make-only source packages.
219 gpg4win_mpkgs = pthreads-w32 bzip2
220
221 # Extra options for the make invocations for individual packages.
222 # make_flags is used fur building, make_args_inst is used for installing.
223 gpg4win_pkg_pthreads_w32_make_args = \
224   prefix=$(idir) CROSS=$(host_alias)- clean GC-inlined
225
226 gpg4win_pkg_pthreads_w32_make_args_inst = \
227   prefix=$$$${pkgidir} CROSS=$(host_alias)- 
228
229 gpg4win_pkg_bzip2_make_args = \
230   CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
231
232 gpg4win_pkg_bzip2_make_args_inst = \
233   PREFIX=$$$${pkgidir} CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
234
235
236 # Supported binary packages.
237 gpg4win_bpkgs = libiconv gettext pkgconfig zlib libpng jpeg pango cairo \
238                 atk gtk+ gpgee crypt regex qt kdesupport oxygen-icons kdelibs \
239                 kleopatra
240
241 # libiconv needs some special magic to generate a usable import
242 # library.
243 define gpg4win_pkg_libiconv_post_install
244 (cp $(srcdir)/libiconv.def $$$${pkgidir}/lib;           \
245 cd $$$${pkgidir}/lib;                                   \
246 $(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
247 endef
248
249 # libiconv needs some special magic to generate a usable import
250 # library.  Note that we include some internal symbols that are not
251 # actually part of the DLL.  They are needed by the AM_GNU_GETTEXT
252 # configure test, but not used otherwise.
253 define gpg4win_pkg_gettext_post_install
254 (cp $(srcdir)/libintl.def $$$${pkgidir}/lib;            \
255 cd $$$${pkgidir}/lib;                                   \
256 $(DLLTOOL) --output-lib libintl.dll.a --def libintl.def)
257 endef
258
259
260 # Zlib needs some special magic to generate a libtool file.
261 define gpg4win_pkg_zlib_post_install
262 (cd $$$${pkgidir_dev};                                  \
263 echo "dlname='../bin/zlib1.dll'" > lib/libz.la; \
264 echo "library_names='libz.dll.a'" >> lib/libz.la;       \
265 echo "old_library='libz.a'" >> lib/libz.la;             \
266 echo "dependency_libs=''" >> lib/libz.la;               \
267 echo "current=1" >> lib/libz.la;                        \
268 echo "age=2" >> lib/libz.la;                            \
269 echo "revision=3" >> lib/libz.la;                       \
270 echo "installed=yes" >> lib/libz.la;                    \
271 echo "shouldnotlink=no" >> lib/libz.la;                 \
272 echo "dlopen=''" >> lib/libz.la;                        \
273 echo "dlpreopen=''" >> lib/libz.la;                     \
274 echo "libdir=\"$$$${pkgidir}/lib\"" >> lib/libz.la;)
275 endef
276
277 # To make shure that we link against the static versions we need
278 # remove the import libs from crypt
279 define gpg4win_pkg_crypt_post_install
280 (cd $$$${pkgidir}/lib && rm libcrypt.dll.a libcrypt.lib)
281 endef
282
283 # To make shure that we link against the static versions we need
284 # remove the import libs from regex
285 # FIXME: We need to shared version or libtool refuses to build the
286 # claws plugin.
287 #define gpg4win_pkg_regex_post_install
288 #(cd $$$${pkgidir}/lib && rm libregex.dll.a libregex.lib)
289 #endef
290
291 # We need to fix the prefix in the various packages using pkgconfig,
292 # or we can't substitute it properly in our pkg-config wrapper.
293 define gpg4win_pkg_glib_post_install
294  (cd $$$${pkgidir};                                                     \
295  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
296 endef
297
298 define gpg4win_pkg_atk_post_install
299  (cd $$$${pkgidir_dev};                                                 \
300  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
301 endef
302
303 define gpg4win_pkg_cairo_post_install
304  (cd $$$${pkgidir_dev};                                                 \
305  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
306 endef
307
308 define gpg4win_pkg_pango_post_install
309  (cd $$$${pkgidir_dev};                                                 \
310  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
311 endef
312
313 define gpg4win_pkg_gtk__post_install
314  (cd $$$${pkgidir_dev};                                                 \
315  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
316 endef
317
318 # In libpng, the pkg-config files are surprisingly found in the
319 # runtime package.
320 define gpg4win_pkg_libpng_post_install
321  (cd $$$${pkgidir};                                                     \
322  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
323 endef
324
325
326 define gpg4win_pkg_libiconv_post_install
327 (cp $(srcdir)/libiconv.def $$$${pkgidir}/lib;           \
328 cd $$$${pkgidir}/lib;                                   \
329 $(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
330 endef
331
332
333 # kdesupport ships gettext, which we already have.  Remove a stow
334 # conflict about that.  Also remove a stow conflict with kdelibs-lib.
335 define gpg4win_pkg_kdesupport_post_install
336 (rm -fR "$$$${pkgidir_dev}/share/locale"; \
337  rm -fR "$$$${pkgidir_dev}/share/apps/cmake/modules")
338 endef
339
340
341 # Supported internal packages.  Internal packages do not require any
342 # special support.  Thus, this variable is actually unused, and no
343 # rules are added in gpg4win.mk.
344 gpg4win_ipkgs = man_novice_de man_advanced_de man_novice_en man_advanced_en
345
346
347 # Now do the bunch of the work.  This is a bunch of dirty magic to
348 # integrate our special makefile into automake, while not actually
349 # including it (make should include it).  This is in turn necessary
350 # because automake can't deal with the elegant magic in the actual
351 # Makefile.
352
353 define INCLUDE_BY_MAKE
354 include $(1)
355 endef
356
357 $(eval $(call INCLUDE_BY_MAKE,gpg4win.mk))
358
359 clean-local: clean-gpg4win
360
361 common_nsi = inst-sections.nsi installer.nsi installer-finish.nsi       \
362   $(addsuffix .nsi,$(addprefix inst-,$(gpg4win_build_list)))            \
363   $(addsuffix .nsi,$(addprefix uninst-,$(gpg4win_build_list)))
364
365
366 # Prepare the versioninfo file.  The pipeline extracts the last
367 # occurrence of a package with the same name, sorts the entries and
368 # writes the file with DOS line endings.  This helps to avoid
369 # duplicate entries in case one package has been rebuild (which is
370 # common when developing a new version).
371 versioninfo.txt : playground/build/versioninfo.txt
372         set -e; \
373         ( while read a b; do echo "$$a $$(basename $$b)"; \
374             done < playground/build/versioninfo.txt \
375           | sort -k2 -sf | tac | uniq -f1 ; \
376           echo '=========== SHA-1 checksum ============= == package ==' \
377          ) | tac | awk '{printf "%s\r\n", $$0}' > versioninfo.txt
378
379 NEWS.tmp : $(top_srcdir)/NEWS
380         sed -e '/^#/d' <$(top_srcdir)/NEWS >NEWS.tmp
381
382 README.en.txt : versioninfo.txt NEWS.tmp $(top_srcdir)/doc/README.en.txt
383         sed -e '/^;.*/d;/!VERSIONINFO!/{r versioninfo.txt' -e 'd;}' \
384         -e '/!NEWSFILE!/{r NEWS.tmp' -e 'd;}' \
385         -e '/!PKG-COPYRIGHT!/{r $(top_srcdir)/doc/pkg-copyright.txt' -e 'd;}' \
386         -e 's,!VERSION!,$(VERSION),g' \
387            < $(top_srcdir)/doc/README.en.txt \
388            | awk '{printf "%s\r\n", $$0}' >README.en.txt
389
390 installer-options.ini : $(top_srcdir)/src/installer-options.ini.in
391         cat $(top_srcdir)/src/installer-options.ini.in >installer-options.ini
392
393 README.de.txt : versioninfo.txt NEWS.tmp $(top_srcdir)/doc/README.de.txt
394         sed -e '/^;.*/d;/!VERSIONINFO!/{r versioninfo.txt' -e 'd;}' \
395         -e '/!NEWSFILE!/{r NEWS.tmp' -e 'd;}' \
396         -e '/!PKG-COPYRIGHT!/{r $(top_srcdir)/doc/pkg-copyright.txt' -e 'd;}' \
397         -e 's,!VERSION!,$(VERSION),g' \
398            < $(top_srcdir)/doc/README.de.txt \
399            | awk '{printf "%s\r\n", $$0}' >README.de.txt
400
401 # For some nut-crazy reason someone thought it would be a great idea
402 # if makensis changed to the directory of the source file at startup.
403 # So we have to pull a couple of strings to correct this.
404 gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
405                         g4wihelp.dll gpgwrap.exe kleowrap.exe README.en.txt \
406                         README.de.txt installer-options.ini versioninfo.txt
407         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
408                 -DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi
409
410 gpg4win-light-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
411                         g4wihelp.dll gpgwrap.exe kleowrap.exe README.en.txt \
412                         README.de.txt installer-options.ini versioninfo.txt
413         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
414                 -DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi
415
416 gpg4win-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
417                         gpgwrap.exe kleowrap.exe README.en.txt \
418                         README.de.txt versioninfo.txt
419         perl make-msi.pl --guids $(srcdir)/make-msi.guids \
420                 --manifest gpg4win-$(VERSION).files \
421                 -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
422                 -DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi > $@
423
424 gpg4win-light-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
425                         gpgwrap.exe kleowrap.exe README.en.txt \
426                         README.de.txt versioninfo.txt
427         perl make-msi.pl --guids $(srcdir)/make-msi.guids \
428                 --manifest gpg4win-light-$(VERSION).files \
429                 -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
430                 -DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi > $@
431
432 .PHONY: msi
433 msi: gpg4win-$(VERSION).wix gpg4win-light-$(VERSION).wix
434
435
436 stamps/stamp-dist-self: versioninfo.txt
437         (set -e; cd ..; make dist-bzip2)
438         touch stamps/stamp-dist-self
439
440 gpg4win-src-$(VERSION).exe: gpg4win-src.nsi $(common_nsi) stamps/stamp-final \
441                             stamps/stamp-dist-self installer-options.ini
442         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
443                 -DSRCDIR=$(srcdir) $(srcdir)/gpg4win-src.nsi
444
445 g4wihelp.dll: g4wihelp.c exdll.h
446         $(CC) -I. -shared -O2 -o g4wihelp.dll $(srcdir)/g4wihelp.c \
447            -lwinmm -lgdi32
448         $(STRIP) g4wihelp.dll
449
450 gpgwrap.exe: gpgwrap.c
451         $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -o $@ $^
452         $(STRIP) $@
453
454 kleowrap.exe: kleowrap.c
455         $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -mwindows -o $@ $^
456         $(STRIP) $@
457
458 if BUILD_SOURCE_INSTALLER
459 all_src = gpg4win-src-$(VERSION).exe
460 else
461 all_src =
462 endif
463
464 if BUILD_LIGHT_INSTALLER
465 all_light = gpg4win-light-$(VERSION).exe
466 else
467 all_light =
468 endif
469
470 all-local: gpg4win-$(VERSION).exe $(all_light) $(all_src)
471
472 clean-local:
473         rm -f gpg4win-$(VERSION).exe gpg4win-light-$(VERSION).exe \
474             gpg4win-src-$(VERSION).exe