Update pinentry to 0.9.6
[gpg4win.git] / src / Makefile.am
1 # Makefile.am - Installer for GnuPG 4 Windows Makefile.
2 # Copyright (C) 2005, 2006, 2007, 2008, 2009 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 \
21         config.site config.nsi.in \
22         installer-options.ini.in libiconv.def libintl.def loreley.mid \
23         gpg4win-splash.wav gpgwrap.c exdll.h g4wihelp.c g4wihelp.nsi \
24         inst-sections.nsi installer.nsi installer-finish.nsi  \
25         QtCore.pc QtGui.pc zlib.pc sha1sum.c mkportable.c     \
26         mkportable-vanilla.h mkportable-light.h mkportable-full.h \
27         qt.conf kleowrap.c potomo Memento.nsh \
28         inst-gpg4win.nsi           uninst-gpg4win.nsi         \
29         inst-atk.nsi               uninst-atk.nsi             \
30         inst-expat.nsi             uninst-expat.nsi           \
31         inst-freetype.nsi          uninst-freetype.nsi        \
32         inst-fontconfig.nsi        uninst-fontconfig.nsi      \
33         inst-cairo.nsi             uninst-cairo.nsi           \
34         inst-gettext.nsi           uninst-gettext.nsi         \
35         inst-libffi.nsi            uninst-libffi.nsi          \
36         inst-glib.nsi              uninst-glib.nsi            \
37         inst-gnupg-w32.nsi         uninst-gnupg-w32.nsi       \
38         inst-gpa.nsi               uninst-gpa.nsi             \
39         inst-gpgme.nsi             uninst-gpgme.nsi           \
40         inst-paperkey.nsi          uninst-paperkey.nsi        \
41         inst-gpgol.nsi             uninst-gpgol.nsi           \
42         inst-gpgex.nsi             uninst-gpgex.nsi           \
43         inst-gdk-pixbuf.nsi        uninst-gdk-pixbuf.nsi      \
44         inst-gtk+.nsi              uninst-gtk+.nsi            \
45         inst-libassuan.nsi         uninst-libassuan.nsi       \
46         inst-libgpg-error.nsi      uninst-libgpg-error.nsi    \
47         inst-libiconv.nsi          uninst-libiconv.nsi        \
48         inst-libpng.nsi            uninst-libpng.nsi          \
49         inst-compendium.nsi        uninst-compendium.nsi   \
50         inst-man_advanced_de.nsi   uninst-man_advanced_de.nsi \
51         inst-man_advanced_en.nsi   uninst-man_advanced_en.nsi \
52         inst-man_novice_de.nsi     uninst-man_novice_de.nsi   \
53         inst-man_novice_en.nsi     uninst-man_novice_en.nsi   \
54         inst-pango.nsi             uninst-pango.nsi           \
55         inst-pinentry.nsi          uninst-pinentry.nsi        \
56         inst-pkgconfig.nsi         uninst-pkgconfig.nsi       \
57         inst-w32pth.nsi            uninst-w32pth.nsi          \
58         inst-zlib.nsi              uninst-zlib.nsi            \
59         inst-qt.nsi                uninst-qt.nsi              \
60         inst-dbus.nsi              uninst-dbus.nsi      \
61         inst-oxygen-icons.nsi      uninst-oxygen-icons.nsi    \
62         inst-kleopatra.nsi         uninst-kleopatra.nsi       \
63         uninst-claws-mail.nsi uninst-claws-mail-cmds.nsi \
64         inst-final.nsi
65
66 SUBDIRS = dictionaries
67
68 gpg4win_readme_ll = en de ar es fr ru pt
69
70 README_files = $(addsuffix .txt,$(addprefix README.,$(gpg4win_readme_ll)))
71
72 gpg4win_howto_smime_ll = en de
73
74 HOWTO_files = $(addsuffix .txt, \
75                 $(addprefix HOWTO-SMIME.,$(gpg4win_howto_smime_ll)))
76
77 foosum_exe = sha1sum.exe md5sum.exe sha256sum.exe mkportable.exe
78
79 # Need to clean the dll because we bypassed automake.
80 CLEANFILES = g4wihelp.dll versioninfo.txt $(README_files) $(HOWTO_files) \
81              installer-options.ini NEWS.tmp COMPONENTS-list.tmp \
82              license.blurb cdversioninfo.tmp \
83              gpgwrap.exe gpgwrap-2.exe kleowrap.exe $(foosum_exe)
84
85 # Supported source packages.
86 gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
87                 libgpg-error gpgme gpgol gpgex libpng \
88                 gpa opencdk \
89                 pinentry libassuan \
90                 w32pth paperkey regex libiconv gettext
91
92 # Supported source packages to build in an additional architecture
93 gpg4win_expkgs = libgpg-error libassuan libiconv gettext w32pth gpgex
94
95 # Extra options to configure for individual packages.
96 # We can use $(idir) here for the installation prefix.
97
98 gpg4win_pkg_libiconv_ex_configure = \
99         --enable-shared=no --enable-static=yes
100
101 gpg4win_pkg_gettext_configure = \
102   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
103   CPPFLAGS=-I$(idir)/include CFLAGS=-O2 LDFLAGS=-L$(idir)/lib
104
105 gpg4win_pkg_gettext_ex_configure = \
106   --with-lib-prefix=$(ex_idir) --with-libiconv-prefix=$(ex_idir) \
107   CPPFLAGS=-I$(ex_idir)/include CFLAGS=-O2 LDFLAGS=-L$(ex_idir)/lib
108
109 # We only need gettext-runtime and there is sadly no top level
110 # configure option for this
111 gpg4win_pkg_gettext_make_dir = gettext-runtime
112 gpg4win_pkg_gettext_make_dir_inst = gettext-runtime
113 gpg4win_pkg_gettext_ex_make_dir = gettext-runtime
114 gpg4win_pkg_gettext_ex_make_dir_inst = gettext-runtime
115
116 gpg4win_pkg_glib_configure = \
117   --disable-modular-tests \
118   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
119   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib CCC=$(host)-g++
120 gpg4win_pkg_glib_extracflags = -march=i486
121
122 gpg4win_pkg_gdk_pixbuf_configure = \
123   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
124   --with-included-loaders=yes \
125   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
126
127 gpg4win_pkg_gtk__configure = \
128   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib --disable-cups
129
130 # The GnuPG package provides man pages which we have to convert.
131 # We also create the MO files here.
132 define gpg4win_pkg_gnupg2_post_install
133 (for i in gpg2 gpgv2 gpgsm gpg-agent scdaemon gpg-connect-agent gpgconf ; \
134   do man -Tlatin1 -l $$$${pkgidir}/share/man/man1/$$$${i}.1 | \
135     sed `printf "s/_\b//g;s/\b.//g"` | \
136     sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/$$$${i}.man ; \
137  done ; \
138  for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
139      $(mkdir_p) $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES || true; \
140      rm $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/gnupg2.mo 2>/dev/null \
141        || true; \
142      $(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
143               $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/gnupg2.mo; \
144  done)
145 endef
146
147 # Paperkey comes with a man pages which we have to convert.
148 define gpg4win_pkg_paperkey_post_install
149 (for i in paperkey ; \
150   do man -Tlatin1 -l $$$${pkgidir}/share/man/man1/$$$${i}.1 | \
151     sed `printf "s/_\b//g;s/\b.//g"` | \
152     sed -e 's/$$$$/\r/' > $$$${pkgidir}/share/man/man1/$$$${i}.man ; \
153  done)
154 endef
155
156
157
158 # Build the reference manual.
159 define gpg4win_pkg_gpgol_post_install
160 ( cd $$$${pkgndir}/doc; make pdf )
161 endef
162
163 # We would like to use --with-libiconv-prefix and
164 # --with-libintl-prefix, but these don't work with the cheesy
165 # non-"libfoo.la" versions of iconv and gettext that we are using.
166 #gpg4win_pkg_libgpg_error_configure = \
167 #  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
168 gpg4win_pkg_libgpg_error_configure = --silent \
169   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib \
170   --enable-static
171
172 gpg4win_pkg_libgpg_error_ex_configure = --silent \
173   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib \
174   --enable-static
175
176 # We convert the PO files to UTF-8.  FIXME: This should be done in
177 # libgpg-error proper.
178 define gpg4win_pkg_libgpg_error_post_install
179 (for i in `$(tsdir)/src/potomo --get-linguas $$$${pkgsdir}/po` ; do \
180    rm $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo \
181        2>/dev/null|| true; \
182    $(tsdir)/src/potomo $$$${pkgsdir}/po/$$$${i}.po \
183              $$$${pkgidir}/share/locale/$$$${i}/LC_MESSAGES/libgpg-error.mo; \
184  done)
185 endef
186
187 gpg4win_pkg_libassuan_configure =  --silent --enable-static
188
189 gpg4win_pkg_libassuan_ex_configure =  --silent --enable-static
190
191 gpg4win_pkg_libpng_configure = HAVE_SOLARIS_LD_FALSE=yes CPPFLAGS=\"-I$(idir)/include -DPNG_BUILD_DLL\" LDFLAGS=\"-L$(idir)/lib\" LIBPNG_DEFINES=\"-DPNG_BUILD_DLL\"
192
193 # We would like to use --with-libiconv-prefix and
194 # --with-libintl-prefix, but these don't work with the cheesy
195 # non-"libfoo.la" versions of iconv and gettext that we are using.
196 if BUILD_FULL_INSTALLER
197 pinentry_enable_disable= --enable-pinentry-qt
198 endif
199 gpg4win_pkg_pinentry_configure = \
200   $(pinentry_enable_disable) \
201   --enable-pinentry-gtk2 \
202   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib
203 #  --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir)
204
205 # The LDFLAGS is needed for -lintl for glib.  The QT4 variables work
206 # around the lack of cross compilation support in qt-dev.
207 gpg4win_pkg_gpgme_configure = --silent \
208   --with-gpg-error-prefix=$(idir) --enable-static \
209   `test -n "@HAVE_PKG_GLIB@" && echo "--enable-w32-glib"` \
210   --disable-w32-qt LDFLAGS=-L$(idir)/lib
211 #  `test -n "@HAVE_PKG_QT@" && echo "--disable-w32-qt"` \
212 #  QT4_CORE_CFLAGS=\"-DQT_LARGEFILE_SUPPORT -DQT_DLL \
213 #                   -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_THREAD_SUPPORT \
214 #                   -I$(idir)/include/QtCore -I$(idir)/include \
215 #                  -I$(idir)/mkspecs/win32-g++\" \
216 #  QT4_CORE_LIBS=\"-L$(idir)/lib -lQtCore4\"
217
218 gpg4win_pkg_gpa_configure = --silent \
219   --with-libiconv-prefix=$(idir) --with-libintl-prefix=$(idir) \
220   --with-gpgme-prefix=$(idir) --with-zlib=$(idir) \
221   --with-libassuan-prefix=$(idir) --with-gpg-error-prefix=$(idir)
222
223 gpg4win_pkg_gpgol_configure = --silent \
224   --with-gpgme-prefix=$(idir) --with-gpg-error-prefix=$(idir) \
225   --with-libassuan-prefix=$(idir)
226
227 gpg4win_pkg_gpgex_configure = --silent \
228   --with-gpg-error-prefix=$(idir) \
229   --with-libassuan-prefix=$(idir)
230
231 gpg4win_pkg_paperkey_configure = --silent
232
233 # Supported make-only source packages.
234 gpg4win_mpkgs = zlib
235
236 # Extra options for the make invocations for individual packages.
237 # make_flags is used for building, make_args_inst is used for installing.
238 gpg4win_pkg_zlib_make_args = \
239   -fwin32/Makefile.gcc PREFIX=$(host)- IMPLIB=libz.dll.a
240
241 gpg4win_pkg_zlib_make_args_inst = -fwin32/Makefile.gcc install \
242         BINARY_PATH=$$$${pkgidir}/bin INCLUDE_PATH=$$$${pkgidir}/include \
243         LIBRARY_PATH=$$$${pkgidir}/lib SHARED_MODE=1 IMPLIB=libz.dll.a
244
245 # Supported binary packages.
246 gpg4win_bpkgs = pkgconfig pango expat freetype fontconfig \
247                 cairo atk qt dbus oxygen-icons kleopatra bsfilter gnupg-w32
248
249 # libiconv needs some special magic to generate a usable import
250 # library.
251 # define gpg4win_pkg_libiconv_post_install
252 # (cp $(srcdir)/libiconv.def $$$${pkgidir}/lib;         \
253 # cd $$$${pkgidir}/lib;                                 \
254 # $(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
255 # endef
256
257 # libiconv needs some special magic to generate a usable import
258 # library.  Note that we include some internal symbols that are not
259 # actually part of the DLL.  They are needed by the AM_GNU_GETTEXT
260 # configure test, but not used otherwise.
261 # define gpg4win_pkg_gettext_post_install
262 # (cp $(srcdir)/libintl.def $$$${pkgidir}/lib;          \
263 # cd $$$${pkgidir}/lib;                                 \
264 # $(DLLTOOL) --output-lib libintl.dll.a --def libintl.def)
265 # endef
266
267
268 # Zlib needs some special magic to generate a libtool file.
269 # We also install the pc file here.
270 define gpg4win_pkg_zlib_post_install
271 (mkdir $$$${pkgidir}/lib/pkgconfig || true;             \
272 cp $(abs_srcdir)/zlib.pc $$$${pkgidir}/lib/pkgconfig/;  \
273 cd $$$${pkgidir};                                       \
274 echo "# Generated by libtool" > lib/libz.la             \
275 echo "dlname='../bin/zlib1.dll'" >> lib/libz.la;        \
276 echo "library_names='libz.dll.a'" >> lib/libz.la;       \
277 echo "old_library='libz.a'" >> lib/libz.la;             \
278 echo "dependency_libs=''" >> lib/libz.la;               \
279 echo "current=1" >> lib/libz.la;                        \
280 echo "age=2" >> lib/libz.la;                            \
281 echo "revision=5" >> lib/libz.la;                       \
282 echo "installed=yes" >> lib/libz.la;                    \
283 echo "shouldnotlink=no" >> lib/libz.la;                 \
284 echo "dlopen=''" >> lib/libz.la;                        \
285 echo "dlpreopen=''" >> lib/libz.la;                     \
286 echo "libdir=\"$$$${pkgidir}/lib\"" >> lib/libz.la)
287 endef
288
289 # We need to fix the prefix in the various packages using pkgconfig,
290 # or we can't substitute it properly in our pkg-config wrapper.
291 # glib also installs an empty charset.alias for mingw which creates
292 # a stow conflict with the one from iconv.
293 define gpg4win_pkg_glib_post_install
294  (cd $$$${pkgidir};                                                     \
295  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`; \
296  rm $$$${pkgidir}/lib/charset.alias)
297 endef
298
299 define gpg4win_pkg_libffi_post_install
300  (cd $$$${pkgidir};                                                     \
301  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
302 endef
303
304 define gpg4win_pkg_gdk_pixbuf_post_install
305  (cd $$$${pkgidir};                                                     \
306  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
307 endef
308
309 define gpg4win_pkg_atk_post_install
310  (cd $$$${pkgidir_dev};                                                 \
311  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
312 endef
313
314 define gpg4win_pkg_freetype_post_install
315  (cd $$$${pkgidir_dev};                                                 \
316  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
317 endef
318
319 define gpg4win_pkg_fontconfig_post_install
320  (cd $$$${pkgidir_dev};                                                 \
321  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
322 endef
323
324 define gpg4win_pkg_cairo_post_install
325  (cd $$$${pkgidir_dev};                                                 \
326  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
327 endef
328
329 define gpg4win_pkg_pango_post_install
330  (cd $$$${pkgidir_dev};                                                 \
331  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
332 endef
333
334 define gpg4win_pkg_gtk__post_install
335  (cd $$$${pkgidir_dev};                                                 \
336  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
337 endef
338
339 define gpg4win_pkg_libpng_post_install
340  (cd $$$${pkgidir};                                                     \
341  perl -pi -e 's/^prefix=.*$$$$/prefix=\/usr/' `find . -name \*.pc`)
342 endef
343
344
345 # We don't use khelpcenter in kleopatra so remove the help links and
346 # point to the correct common folder
347 define gpg4win_pkg_kleopatra_post_install
348  (for i in de en ; do \
349     (cd $$$${pkgidir}/share/doc/HTML/$$$${i}; \
350      perl -pi -e 's/help:\///g' `find . -name \*.html`; \
351      perl -pi -e 's@common/@../../common/@g' `find . -name \*.html`); \
352  done)
353 endef
354
355
356 #define gpg4win_pkg_libiconv_post_install
357 #(cp $(srcdir)/libiconv.def $$$${pkgidir}/lib;          \
358 #cd $$$${pkgidir}/lib;                                  \
359 #$(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
360 #endef
361
362 # Qt is missing the pkgconfig files.
363 define gpg4win_pkg_qt_post_install
364 (mkdir $$$${pkgidir_dev}/lib/pkgconfig; \
365  cp $(srcdir)/QtCore.pc $(srcdir)/QtGui.pc $$$${pkgidir_dev}/lib/pkgconfig/)
366 endef
367
368 # Supported internal packages.  Internal packages do not require any
369 # special support.  Thus, this variable is actually unused, and no
370 # rules are added in gpg4win.mk.
371 gpg4win_ipkgs = man_novice_de man_advanced_de man_novice_en man_advanced_en \
372                 compendium
373
374
375 # Now do the bunch of the work.  This is a bunch of dirty magic to
376 # integrate our special makefile into automake, while not actually
377 # including it (make should include it).  This is in turn necessary
378 # because automake can't deal with the elegant magic in the actual
379 # Makefile.
380
381 define INCLUDE_BY_MAKE
382 include $(1)
383 endef
384
385 $(eval $(call INCLUDE_BY_MAKE,gpg4win.mk))
386
387 clean-local: clean-gpg4win
388
389 common_nsi = inst-sections.nsi installer.nsi installer-finish.nsi       \
390   $(addsuffix .nsi,$(addprefix inst-,$(gpg4win_build_list)))            \
391   $(addsuffix .nsi,$(addprefix uninst-,$(gpg4win_build_list)))
392
393
394 # Prepare the versioninfo file.  The pipeline extracts the last
395 # occurrence of a package with the same name, sorts the entries and
396 # writes the file with DOS line endings.  This helps to avoid
397 # duplicate entries in case one package has been rebuild (which is
398 # common when developing a new version).
399 versioninfo.txt:
400         $(SHA1SUM) $(pkg_files) </dev/null > versioninfo.tmp
401         set -e; \
402         ( while read a b; do echo "$$a $$(basename $$b)"; \
403             done < versioninfo.tmp \
404           | sort -k2 -sf | tac | uniq -f1 ; \
405           echo '=========== SHA-1 checksum ============= == package ==' \
406          ) | tac | awk '{printf "%s\r\n", $$0}' > versioninfo.txt
407         -rm versioninfo.tmp
408
409 NEWS.tmp : $(top_srcdir)/NEWS
410          awk '/^#/ {next} /^\(de\)/ {skip=1;next} /^[^[:space:]]/ {skip=0} \
411              !skip { sub(/^\(en\)/,"   *"); print }' \
412              <$(top_srcdir)/NEWS >NEWS.tmp
413
414 COMPONENTS-list.tmp : $(top_srcdir)/NEWS
415         awk '/^~~~~~~~~~~~/ { ok++; next} ok==1 {print "    "$$0}' \
416             < $(top_srcdir)/NEWS > COMPONENTS-list.tmp
417
418 installer-options.ini : $(top_srcdir)/src/installer-options.ini.in
419         cat $(top_srcdir)/src/installer-options.ini.in >installer-options.ini
420
421
422 # For some nut-crazy reason someone thought it would be a great idea
423 # if makensis changed to the directory of the source file at startup.
424 # So we have to pull a couple of strings to correct this.
425 gpg4win-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
426                         g4wihelp.dll gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
427                         $(foosum_exe) \
428                         $(README_files) $(HOWTO_files) \
429                         license.blurb installer-options.ini versioninfo.txt
430         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
431            -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win.nsi
432
433 gpg4win-light-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
434                         g4wihelp.dll gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
435                         $(foosum_exe) \
436                         $(README_files) $(HOWTO_files) \
437                         license.blurb installer-options.ini versioninfo.txt
438         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
439            -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) \
440            -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi
441
442 gpg4win-vanilla-$(VERSION).exe: gpg4win.nsi $(common_nsi) stamps/stamp-final \
443                         g4wihelp.dll gpgwrap.exe gpgwrap-2.exe \
444                         $(foosum_exe) \
445                         $(README_files) $(HOWTO_files) \
446                         license.blurb installer-options.ini versioninfo.txt
447         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
448            -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) \
449            -DGPG4WIN_VANILLA=1 $(srcdir)/gpg4win.nsi
450
451 gpg4win-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
452                         gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
453                         $(foosum_exe) \
454                         $(README_files) $(HOWTO_files) \
455                         versioninfo.txt
456         perl make-msi.pl --guids $(srcdir)/make-msi.guids \
457                 --manifest gpg4win-$(VERSION).files \
458                 -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
459                 -DSRCDIR=$(srcdir) $(srcdir)/gpg4win.nsi > $@
460
461 gpg4win-light-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
462                         gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
463                         $(foosum_exe) \
464                         $(README_files) $(HOWTO_files) \
465                         versioninfo.txt
466         perl make-msi.pl --guids $(srcdir)/make-msi.guids \
467                 --manifest gpg4win-light-$(VERSION).files \
468                 -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
469                 -DSRCDIR=$(srcdir) -DGPG4WIN_LIGHT=1 $(srcdir)/gpg4win.nsi > $@
470
471 gpg4win-vanilla-$(VERSION).wix: gpg4win.nsi $(common_nsi) stamps/stamp-final \
472                         gpgwrap.exe gpgwrap-2.exe kleowrap.exe \
473                         $(foosum_exe) \
474                         $(README_files) $(HOWTO_files) \
475                         versioninfo.txt
476         perl make-msi.pl --guids $(srcdir)/make-msi.guids \
477                 --manifest gpg4win-vanilla-$(VERSION).files \
478                 -DBUILD_DIR=. -DTOP_SRCDIR=$(top_srcdir) \
479                 -DSRCDIR=$(srcdir) -DGPG4WIN_VANILLA=1 $(srcdir)/gpg4win.nsi > $@
480
481 .PHONY: msi
482 msi: gpg4win-$(VERSION).wix gpg4win-light-$(VERSION).wix \
483      gpg4win-vanilla-$(VERSION).wix
484
485
486 stamps/stamp-dist-self: versioninfo.txt
487         (set -e; cd ..; make dist-bzip2)
488         touch stamps/stamp-dist-self
489
490 gpg4win-src-$(VERSION).exe: gpg4win-src.nsi $(common_nsi) stamps/stamp-final \
491                             stamps/stamp-dist-self installer-options.ini \
492                             license.blurb
493         $(MAKENSIS) -V3 -DBUILD_DIR=`pwd` -DTOP_SRCDIR=$(top_srcdir) \
494           -DSRCDIR=$(srcdir) $(EXTRA_MAKENSIS_FLAGS) $(srcdir)/gpg4win-src.nsi
495
496 license.blurb: $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3
497         cat $(top_srcdir)/doc/license-page $(top_srcdir)/doc/GPLv3 >$@
498
499 g4wihelp.dll: g4wihelp.c exdll.h
500         $(CC) -I. -shared -O2 -o g4wihelp.dll $(srcdir)/g4wihelp.c \
501            -lwinmm -lgdi32
502         $(STRIP) g4wihelp.dll
503
504 gpgwrap.exe: gpgwrap.c
505         $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -o $@ $^
506         $(STRIP) $@
507
508 gpgwrap-2.exe: gpgwrap.c
509         $(CC) -I. -I.. -DHAVE_CONFIG_H -DGPGWRAP_VARIANT=2 -O2 -o $@ $^
510         $(STRIP) $@
511
512 kleowrap.exe: kleowrap.c
513         $(CC) -I. -I.. -DHAVE_CONFIG_H -O2 -mwindows -o $@ $^
514         $(STRIP) $@
515
516 sha1sum.exe: sha1sum.c
517         $(CC) -O2 -o $@ $^
518         $(STRIP) $@
519
520 md5sum.exe: sha1sum.c
521         $(CC) -DBUILD_MD5SUM -O2 -o $@ $^
522         $(STRIP) $@
523
524 sha256sum.exe: sha1sum.c
525         $(CC) -DBUILD_SHA256SUM -O2 -o $@ $^
526         $(STRIP) $@
527
528 mkportable.exe: mkportable.c \
529                 mkportable-vanilla.h mkportable-light.h mkportable-full.h
530         $(CC) -O2 -o $@ $(srcdir)/mkportable.c
531         $(STRIP) $@
532
533 if BUILD_SOURCE_INSTALLER
534 all_src = gpg4win-src-$(VERSION).exe
535 else
536 all_src =
537 endif
538
539 if BUILD_LIGHT_INSTALLER
540 all_light = gpg4win-light-$(VERSION).exe
541 else
542 all_light =
543 endif
544
545 if BUILD_VANILLA_INSTALLER
546 all_vanilla = gpg4win-vanilla-$(VERSION).exe
547 else
548 all_vanilla =
549 endif
550
551 if BUILD_FULL_INSTALLER
552 all_full = gpg4win-$(VERSION).exe
553 else
554 all_full =
555 endif
556
557 all-local: $(all_full) $(all_light) $(all_vanilla) $(all_src)
558
559 clean-local:
560         rm -f gpg4win-$(VERSION).exe gpg4win-light-$(VERSION).exe \
561             gpg4win-vanilla-$(VERSION).exe gpg4win-src-$(VERSION).exe