1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-09 21:28:51 +01:00
gnupg/common/Makefile.am

145 lines
4.3 KiB
Makefile
Raw Normal View History

# Makefile for common gnupg modules
# Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
#
# This file is part of GnuPG.
#
# GnuPG is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
2007-07-04 21:49:40 +02:00
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# GnuPG is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2007-07-04 21:49:40 +02:00
# along with this program; if not, see <http://www.gnu.org/licenses/>.
## Process this file with automake to produce Makefile.in
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
audit-events.h status-codes.h ChangeLog-2011 \
w32info-rc.h.in gnupg.ico
2006-10-17 16:34:42 +02:00
noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
2006-09-15 20:53:37 +02:00
TESTS = $(module_tests)
BUILT_SOURCES = audit-events.h status-codes.h
MAINTAINERCLEANFILES = audit-events.h status-codes.h
2007-11-27 09:37:03 +01:00
AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl
AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
include $(top_srcdir)/am/cmacros.am
2006-10-17 16:34:42 +02:00
common_sources = \
2006-09-21 15:30:45 +02:00
common-defs.h \
util.h i18n.c i18n.h \
status.c status.h\
openpgpdefs.h \
gc-opt-flags.h \
keyserver.h \
sexp-parse.h \
tlv.c tlv.h \
2007-06-26 15:48:44 +02:00
init.c init.h \
2005-04-11 18:10:03 +02:00
sexputil.c \
sysutils.c sysutils.h \
homedir.c \
gettime.c \
yesno.c \
b64enc.c b64dec.c \
zb32.c \
2006-09-15 20:53:37 +02:00
convert.c \
percent.c \
miscellaneous.c \
xasprintf.c \
xreadline.c \
membuf.c membuf.h \
iobuf.c iobuf.h \
ttyio.c ttyio.h \
2004-03-06 21:11:19 +01:00
asshelp.c asshelp.h \
exechelp.c exechelp.h \
2003-08-14 21:58:03 +02:00
signal.c \
estream.c estream.h estream-printf.c estream-printf.h \
audit.c audit.h \
srv.h \
2006-05-23 18:19:43 +02:00
dns-cert.c dns-cert.h \
pka.c pka.h \
http.c http.h \
localename.c \
session-env.c session-env.h \
ssh-utils.c ssh-utils.h \
helpfile.c
# Sources only useful without PTH.
without_pth_sources = \
get-passphrase.c get-passphrase.h
libcommon_a_SOURCES = $(common_sources) $(without_pth_sources)
if USE_DNS_SRV
libcommon_a_SOURCES += srv.c
endif
libcommon_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) -DWITHOUT_GNU_PTH=1
2006-10-17 16:34:42 +02:00
libcommonpth_a_SOURCES = $(common_sources)
if USE_DNS_SRV
libcommonpth_a_SOURCES += srv.c
endif
2009-09-23 Marcus Brinkmann <marcus@g10code.de> * configure.ac (NEED_LIBASSUAN_API, NEED_LIBASSUAN_VERSION): Update to new API (2, 1.1.0). agent/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * gpg-agent.c (parse_rereadable_options): Don't set global assuan log file (there ain't one anymore). (main): Update to new API. (check_own_socket_pid_cb): Return gpg_error_t instead of int. (check_own_socket_thread, check_for_running_agent): Create assuan context before connecting to server. * command.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (write_and_clear_outbuf): Use gpg_error_t instead of assuan_error_t. (cmd_geteventcounter, cmd_istrusted, cmd_listtrusted) (cmd_marktrusted, cmd_havekey, cmd_sigkey, cmd_setkeydesc) (cmd_sethash, cmd_pksign, cmd_pkdecrypt, cmd_genkey, cmd_readkey) (cmd_keyinfo, cmd_get_passphrase, cmd_clear_passphrase) (cmd_get_confirmation, cmd_learn, cmd_passwd) (cmd_preset_passphrase, cmd_scd, cmd_getval, cmd_putval) (cmd_updatestartuptty, cmd_killagent, cmd_reloadagent) (cmd_getinfo, option_handler): Return gpg_error_t instead of int. (post_cmd_notify): Change type of ERR to gpg_error_t from int. (io_monitor): Add hook argument. Use symbols for constants. (register_commands): Change return type of HANDLER to gpg_error_t. (start_command_handler): Allocate assuan context before starting server. * call-pinentry.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (unlock_pinentry): Call assuan_release instead of assuan_disconnect. (getinfo_pid_cb, getpin_cb): Return gpg_error_t instead of int. (start_pinentry): Allocate assuan context before connecting to server. * call-scd.c (membuf_data_cb, learn_status_cb, get_serialno_cb) (membuf_data_cb, inq_needpin, card_getattr_cb, pass_status_thru) (pass_data_thru): Change return type to gpg_error_t. (start_scd): Allocate assuan context before connecting to server. common/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * asshelp.c (start_new_gpg_agent): Allocate assuan context before starting server. g10/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * call-agent.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (learn_status_cb, dummy_data_cb, get_serialno_cb, default_inq_cb) (learn_status_cb, inq_writecert_parms, inq_writekey_parms) (scd_genkey_cb, membuf_data_cb): Return gpg_error_t instead of int. * gpg.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (main): Update to new Assuan API. * server.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (option_handler, cmd_recipient, cmd_signer, cmd_encrypt) (cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export) (cmd_delkeys, cmd_message, do_listkeys, cmd_listkeys) (cmd_listsecretkeys, cmd_genkey, cmd_getinfo): Return gpg_error_t instead of int. (register_commands): Allocate assuan context before starting server. (gpg_server): Allocate assuan_context before starting server. scd/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * command.c: Include "scdaemon.h" before <assuan.h> because of GPG_ERR_SOURCE_DEFAULT check. (option_handler, open_card, cmd_serialno, cmd_lean, cmd_readcert) (cmd_readkey, cmd_setdata, cmd_pksign, cmd_pkauth, cmd_pkdecrypt) (cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey) (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_lock) (cmd_unlock, cmd_getinfo, cmd_restart, cmd_disconnect, cmd_apdu) (cmd_killscd): Return gpg_error_t instead of int. (scd_command_handler): Allocate assuan context before starting server. * scdaemon.c (main): Update to new Assuan API. sm/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * gpgsm.c (main): Update to new assuan API. * server.c: Include "gpgsm.h" before <assuan.h> due to check for GPG_ERR_SOURCE_DEFAULT and assuan.h now including gpg-error.h. (option_handler, cmd_recipient, cmd_signer, cmd_encrypt) (cmd_decrypt, cmd_verify, cmd_sign, cmd_import, cmd_export) (cmd_delkeys, cmd_message, cmd_listkeys, cmd_dumpkeys) (cmd_listsecretkeys, cmd_dumpsecretkeys, cmd_genkey) (cmd_getauditlog, cmd_getinfo): Return gpg_error_t instead of int. (register_commands): Same for member HANDLER in table. (gpgsm_server): Allocate assuan context before starting server. * sm/call-dirmngr.c: * call-dirmngr.c (prepare_dirmngr): Check for CTX and error before setting LDAPSERVER. (start_dirmngr_ext): Allocate assuan context before starting server. (inq_certificate, isvalid_status_cb, lookup_cb, lookup_status_cb) (run_command_cb, run_command_inq_cb, run_command_status_cb): Return gpg_error_t instead of int. tools/ 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response) (main): Update to new Assuan API. Conflicts: ChangeLog agent/ChangeLog agent/command.c common/ChangeLog g10/ChangeLog scd/ChangeLog sm/ChangeLog sm/gpgsm.c tools/ChangeLog Somehow this slipped through. Really commit this time. 2009-09-23 Marcus Brinkmann <marcus@g10code.de> * gpg-connect-agent.c (getinfo_pid_cb, read_and_print_response) (main): Update to new Assuan API. 2009-10-16 Marcus Brinkmann <marcus@g10code.com> * configure.ac: Check for libassuan instead of libassuan-pth. common/ 2009-10-16 Marcus Brinkmann <marcus@g10code.com> * Makefile.am (libcommon_a_CFLAGS): Use LIBASSUAN_CFLAGS instead of LIBASSUAN_PTH_CFLAGS. scd/ 2009-10-16 Marcus Brinkmann <marcus@g10code.com> * AM_CFLAGS, scdaemon_LDADD: Use libassuan instead of libassuan-pth. * scdaemon.c: Invoke ASSUAN_SYSTEM_PTH_IMPL. (main): Call assuan_set_system_hooks and assuan_sock_init. g13/ 2009-10-16 Marcus Brinkmann <marcus@g10code.com> * AM_CFLAGS, g13_LDADD: Use libassuan instead of libassuan-pth. * g13.c: Invoke ASSUAN_SYSTEM_PTH_IMPL. (main): Call assuan_set_system_hooks. agent/ 2009-10-16 Marcus Brinkmann <marcus@g10code.com> * gpg_agent_CFLAGS, gpg_agent_LDADD: Use libassuan instead of libassuan-pth. * gpg-agent.c: Invoke ASSUAN_SYSTEM_PTH_IMPL. (main): Call assuan_set_system_hooks and assuan_sock_init. Fix invocation of assuan_socket_connect. Conflicts: ChangeLog agent/ChangeLog common/ChangeLog configure.ac g13/ChangeLog g13/Makefile.am g13/g13.c scd/ChangeLog agent/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * command.c (reset_notify): Take LINE arg and return error. (register_commands): Use assuan_handler_t type. common/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * get-passphrase.c (default_inq_cb, membuf_data_cb): Change return type to gpg_error_t. g10/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * server.c (reset_notify, input_notify, output_notify): Update to new assuan interface. (register_commands): Use assuan_handler_t. scd/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * command.c (reset_notify): Take LINE arg and return error. (register_commands): Use assuan_handler_t type. sm/ 2009-11-02 Marcus Brinkmann <marcus@g10code.de> * server.c (reset_notify, input_notify, output_notify): Update to new assuan interface. (register_commands): Use assuan_handler_t. * call-agent.c (membuf_data_cb, default_inq_cb) (inq_ciphertext_cb, scd_serialno_status_cb) (scd_keypairinfo_status_cb, istrusted_status_cb) (learn_status_cb, learn_cb, keyinfo_status_cb): Return gpg_error_t. Conflicts: agent/ChangeLog common/ChangeLog g10/ChangeLog g10/server.c g13/ChangeLog g13/server.c scd/ChangeLog sm/ChangeLog Adjust for assuan_register_command change. Conflicts: agent/ChangeLog g10/ChangeLog g13/ChangeLog g13/server.c scd/ChangeLog sm/ChangeLog Add hack for the HELP command. Conflicts: tools/ChangeLog Add help strings for all commands. Conflicts: agent/ChangeLog agent/command.c Add help strings for all commands. Conflicts: scd/ChangeLog Add help strings for all commands Conflicts: sm/ChangeLog agent/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not assuan_pipe_connect_ext. * command.c (start_command_handler): Change assuan_init_socket_server_ext into assuan_init_socket_server. * call-scd.c (start_scd): Update use of assuan_socket_connect and assuan_pipe_connect. * gpg-agent.c (check_own_socket_thread, check_for_running_agent): Update use of assuan_socket_connect. common/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * asshelp.c (start_new_gpg_agent): Update use of assuan_socket_connect and assuan_pipe_connect. scd/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * command.c (scd_command_handler): Call assuan_init_socket_server, not assuan_init_socket_server_ext. sm/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * call-dirmngr.c (start_dirmngr_ext): Update use of assuan_pipe_connect and assuan_socket_connect. tools/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * gpg-connect-agent.c (start_agent): Update use of assuan_socket_connect and assuan_pipe_connect. Conflicts: agent/ChangeLog common/ChangeLog g13/ChangeLog g13/call-gpg.c scd/ChangeLog sm/ChangeLog tools/ChangeLog agent/ 2009-11-25 Marcus Brinkmann <marcus@g10code.de> * command.c (start_command_handler): Use assuan_fd_t and assuan_fdopen on fds. scd/ 2009-11-25 Marcus Brinkmann <marcus@g10code.de> * command.c (scd_command_handler): Use assuan_fd_t and assuan_fdopen on fds. sm/ 2009-11-25 Marcus Brinkmann <marcus@g10code.de> * server.c (gpgsm_server): Use assuan_fd_t and assuan_fdopen on fds. g10/ 2009-11-25 Marcus Brinkmann <marcus@g10code.de> * server.c (gpg_server): Use assuan_fd_t and assuan_fdopen on fds. Conflicts: agent/ChangeLog g10/ChangeLog g13/server.c scd/ChangeLog sm/ChangeLog 2009-11-27 Marcus Brinkmann <marcus@g10code.de> * command.c (start_command_handler): Do not call assuan_set_log_stream anymore. * gpg-agent.c (main): But call assuan_set_assuan_log_stream here. Conflicts: agent/ChangeLog agent/command.c 2009-12-08 Marcus Brinkmann <marcus@g10code.de> * asshelp.c (start_new_gpg_agent) [HAVE_W32_SYSTEM]: Add missing argument in assuan_socket_connect invocation. * iobuf.c (iobuf_open_fd_or_name): Fix type of FD in function declaration. Conflicts: common/ChangeLog common/iobuf.c common/ 2009-12-08 Marcus Brinkmann <marcus@g10code.de> * asshelp.c (start_new_gpg_agent): Convert posix FD to assuan FD. agent/ 2009-12-08 Marcus Brinkmann <marcus@g10code.de> * call-pinentry.c (start_pinentry): Convert posix fd to assuan fd. * call-scd.c (start_scd): Likewise. sm/ 2009-12-08 Marcus Brinkmann <marcus@g10code.de> * call-dirmngr.c (start_dirmngr_ext): Convert posix fd to assuan fd. tools/ 2009-12-08 Marcus Brinkmann <marcus@g10code.de> * gpg-connect-agent.c (main): Convert posix fd to assuan fd. Conflicts: agent/ChangeLog common/ChangeLog g13/call-gpg.c sm/ChangeLog tools/ChangeLog
2010-02-12 16:15:34 +01:00
libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS)
2006-10-17 16:34:42 +02:00
libsimple_pwquery_a_SOURCES = \
2004-03-06 21:11:19 +01:00
simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
2006-09-21 15:30:45 +02:00
libgpgrl_a_SOURCES = \
gpgrlhelp.c
2006-09-15 20:53:37 +02:00
2009-12-21 17:45:45 +01:00
if MAINTAINER_MODE
# Note: Due to the dependency on Makefile, the file will always be
# rebuilt, so we allow this only in maintainer mode.
# Create the audit-events.h include file from audit.h
2009-12-04 12:38:41 +01:00
# Note: We create the target file in the source directory because it
# is a distributed built source. If we would not do that we may end
# up with two files and then it is not clear which version of the
# files will be picked up.
audit-events.h: Makefile mkstrtable.awk exaudit.awk audit.h
$(AWK) -f $(srcdir)/exaudit.awk $(srcdir)/audit.h \
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
-v namespace=eventstr_ > $(srcdir)/audit-events.h
# Create the status-codes.h include file from status.h
status-codes.h: Makefile mkstrtable.awk exstatus.awk status.h
$(AWK) -f $(srcdir)/exstatus.awk $(srcdir)/status.h \
| $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
-v namespace=statusstr_ > $(srcdir)/status-codes.h
2009-12-21 17:45:45 +01:00
endif
2006-09-15 20:53:37 +02:00
#
# Module tests
#
module_tests = t-convert t-percent t-gettime t-sysutils t-sexputil t-exechelp \
t-session-env t-ssh-utils
module_maint_tests = t-helpfile t-b64
2006-09-15 20:53:37 +02:00
2007-08-16 12:42:06 +02:00
t_common_ldadd = libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a \
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
2006-09-15 20:53:37 +02:00
t_convert_LDADD = $(t_common_ldadd)
t_percent_LDADD = $(t_common_ldadd)
t_gettime_LDADD = $(t_common_ldadd)
t_sysutils_LDADD = $(t_common_ldadd)
t_helpfile_LDADD = $(t_common_ldadd)
t_sexputil_LDADD = $(t_common_ldadd)
t_b64_LDADD = $(t_common_ldadd)
t_exechelp_LDADD = $(t_common_ldadd)
t_session_env_LDADD = $(t_common_ldadd)
t_ssh_utils_LDADD = $(t_common_ldadd)