1 # Makefile.am - dirmngr
2 # Copyright (C) 2002 Klarälvdalens Datakonsult AB
3 # Copyright (C) 2004, 2007, 2010 g10 Code GmbH
5 # This file is part of GnuPG.
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.
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.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <https://www.gnu.org/licenses/>.
20 ## Process this file with automake to produce Makefile.in
22 EXTRA_DIST = OAUTHORS ONEWS ChangeLog-2011 tls-ca.pem
23 dist_pkgdata_DATA = sks-keyservers.netCA.pem
25 bin_PROGRAMS = dirmngr dirmngr-client
28 libexec_PROGRAMS = dirmngr_ldap
31 noinst_PROGRAMS = $(module_tests) $(module_net_tests) $(module_maint_tests)
32 TESTS = $(module_tests) $(module_net_tests)
34 AM_CPPFLAGS = -I$(top_srcdir)/common
36 include $(top_srcdir)/am/cmacros.am
38 AM_CFLAGS = $(USE_C99_CFLAGS) \
39 $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) \
40 $(GPG_ERROR_CFLAGS) $(NPTH_CFLAGS) $(NTBTLS_CFLAGS) \
45 ldap_url = ldap-url.h ldap-url.c
51 extraldap_src = ldap-wrapper.c
53 extraldap_src = ldap-wrapper-ce.c dirmngr_ldap.c
56 noinst_HEADERS = dirmngr.h crlcache.h crlfetch.h misc.h
58 dirmngr_SOURCES = dirmngr.c dirmngr.h server.c crlcache.c crlfetch.c \
59 certcache.c certcache.h \
61 cdb.h cdblib.c misc.c dirmngr-err.h \
62 ocsp.c ocsp.h validate.c validate.h \
63 dns-stuff.c dns-stuff.h \
65 ks-action.c ks-action.h ks-engine.h \
66 ks-engine-hkp.c ks-engine-http.c ks-engine-finger.c ks-engine-kdns.c
69 dirmngr_SOURCES += dns.c dns.h
73 dirmngr_SOURCES += ldapserver.h ldapserver.c ldap.c w32-ldap-help.h \
74 ldap-wrapper.h ldap-parse-uri.c ldap-parse-uri.h \
75 ks-engine-ldap.c $(ldap_url) $(extraldap_src)
76 ldaplibs = $(LDAPLIBS)
82 dirmngr_LDADD = $(libcommonpth) \
83 $(DNSLIBS) $(LIBASSUAN_LIBS) \
84 $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
85 $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
87 dirmngr_LDADD += $(ldaplibs)
90 dirmngr_LDADD += $(ldaplibs)
92 dirmngr_LDFLAGS = $(extra_bin_ldflags)
95 dirmngr_ldap_SOURCES = dirmngr_ldap.c $(ldap_url)
96 dirmngr_ldap_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS)
97 dirmngr_ldap_LDFLAGS =
98 dirmngr_ldap_LDADD = $(libcommon) \
99 $(GPG_ERROR_LIBS) $(LIBGCRYPT_LIBS) $(LDAPLIBS) \
100 $(LBER_LIBS) $(LIBINTL) $(LIBICONV) $(NETLIBS)
103 dirmngr_client_SOURCES = dirmngr-client.c
104 dirmngr_client_LDADD = $(libcommon) \
105 $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
106 $(LIBGCRYPT_LIBS) $(NETLIBS) $(LIBINTL) $(LIBICONV)
107 dirmngr_client_LDFLAGS = $(extra_bin_ldflags)
110 t_common_src = t-support.h
112 t_common_src += dns.c dns.h
114 t_common_ldadd = $(libcommon) $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) \
115 $(GPG_ERROR_LIBS) $(NETLIBS) \
116 $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) \
117 $(DNSLIBS) $(LIBINTL) $(LIBICONV)
122 module_tests += t-ldap-parse-uri
125 # Test which need a network connections are only used in maintainer mode.
127 module_net_tests = t-dns-stuff
132 # Tests which are only for manually testing are only build in maintainer-mode.
134 module_maint_tests = t-http
141 t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
142 t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
143 $(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
145 t_http_LDADD = $(t_common_ldadd) \
146 $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
148 t_ldap_parse_uri_SOURCES = \
149 t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
151 $(ldap_url) $(t_common_src)
152 t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
153 $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
154 t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
156 t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
157 $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
158 t_dns_stuff_SOURCES = $(t_common_src) t-dns-stuff.c dns-stuff.c
159 t_dns_stuff_LDADD = $(t_common_ldadd) $(DNSLIBS)
161 $(PROGRAMS) : $(libcommon) $(libcommonpth)