dirmngr: Fix TLS build problems.
[gnupg.git] / dirmngr / Makefile.am
1 # Makefile.am - dirmngr
2 # Copyright (C) 2002 Klarälvdalens Datakonsult AB
3 # Copyright (C) 2004, 2007, 2010 g10 Code GmbH
4 #
5 # This file is part of GnuPG.
6 #
7 # GnuPG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # GnuPG is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
19
20 ## Process this file with automake to produce Makefile.in
21
22 EXTRA_DIST = OAUTHORS ONEWS ChangeLog.1 ChangeLog-2011
23
24 bin_PROGRAMS = dirmngr dirmngr-client
25
26 if USE_LDAPWRAPPER
27 libexec_PROGRAMS = dirmngr_ldap
28 endif
29
30 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common
31
32 include $(top_srcdir)/am/cmacros.am
33
34 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS)      \
35             $(GPG_ERROR_CFLAGS) $(NPTH_CFLAGS) $(NTBTLS_CFLAGS)         \
36             $(LIBGNUTLS_CFLAGS)
37
38
39 BUILT_SOURCES = no-libgcrypt.c
40
41 CLEANFILES = no-libgcrypt.c
42
43 if HAVE_W32_SYSTEM
44 ldap_url = ldap-url.h ldap-url.c
45 else
46 ldap_url =
47 endif
48
49 if USE_LDAPWRAPPER
50 extraldap_src = ldap-wrapper.c
51 else
52 extraldap_src = ldap-wrapper-ce.c  dirmngr_ldap.c
53 endif
54
55 noinst_HEADERS = dirmngr.h crlcache.h crlfetch.h misc.h
56
57 dirmngr_SOURCES = dirmngr.c dirmngr.h server.c crlcache.c crlfetch.c    \
58         certcache.c certcache.h \
59         cdb.h cdblib.c misc.c dirmngr-err.h  \
60         ocsp.c ocsp.h validate.c validate.h  \
61         ks-action.c ks-action.h ks-engine.h \
62         ks-engine-hkp.c ks-engine-http.c ks-engine-finger.c ks-engine-kdns.c
63
64 if USE_LDAP
65 dirmngr_SOURCES += ldapserver.h ldapserver.c ldap.c w32-ldap-help.h \
66                    ldap-wrapper.h $(ldap_url) $(extraldap_src)
67 ldaplibs = $(LDAPLIBS)
68 else
69 ldaplibs =
70 endif
71
72
73 dirmngr_LDADD = $(libcommontlsnpth) $(libcommonpth) \
74         $(DNSLIBS) $(LIBASSUAN_LIBS) \
75         $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
76         $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
77 if !USE_LDAPWRAPPER
78 dirmngr_LDADD += $(ldaplibs)
79 endif
80 dirmngr_LDFLAGS = $(extra_bin_ldflags)
81
82 if USE_LDAPWRAPPER
83 dirmngr_ldap_SOURCES = dirmngr_ldap.c $(ldap_url)
84 dirmngr_ldap_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS)
85 dirmngr_ldap_LDFLAGS =
86 dirmngr_ldap_LDADD = $(libcommon) no-libgcrypt.o \
87                      $(GPG_ERROR_LIBS) $(LDAPLIBS) $(LBER_LIBS) $(LIBINTL) \
88                      $(LIBICONV)
89 endif
90
91 dirmngr_client_SOURCES = dirmngr-client.c
92 dirmngr_client_LDADD = $(libcommon) no-libgcrypt.o \
93                         $(LIBASSUAN_LIBS) \
94                        $(GPG_ERROR_LIBS) $(NETLIBS) $(LIBINTL) $(LIBICONV)
95 dirmngr_client_LDFLAGS = $(extra_bin_ldflags)
96
97
98 no-libgcrypt.c : $(top_srcdir)/tools/no-libgcrypt.c
99         cat $(top_srcdir)/tools/no-libgcrypt.c > no-libgcrypt.c
100
101
102 $(PROGRAMS) : $(libcommon) $(libcommonpth) $(libcommontls) $(libcommontlsnpth)