2003-08-05 19:11:04 +02:00
|
|
|
# Makefile for common gnupg modules
|
2007-11-19 17:03:50 +01:00
|
|
|
# Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
|
2003-08-05 19:11:04 +02:00
|
|
|
#
|
|
|
|
# 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
|
2003-08-05 19:11:04 +02:00
|
|
|
# (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/>.
|
2003-08-05 19:11:04 +02:00
|
|
|
|
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
2007-11-19 17:03:50 +01:00
|
|
|
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
|
|
|
|
audit-events.h status-codes.h
|
|
|
|
|
2006-10-17 16:34:42 +02:00
|
|
|
noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
|
2007-12-04 12:23:31 +01:00
|
|
|
noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
|
2006-09-15 20:53:37 +02:00
|
|
|
TESTS = $(module_tests)
|
2003-08-05 19:11:04 +02:00
|
|
|
|
2007-11-19 17:03:50 +01:00
|
|
|
BUILT_SOURCES = audit-events.h status-codes.h
|
|
|
|
|
2007-11-27 09:37:03 +01:00
|
|
|
CLEANFILES = audit-events.h status-codes.h
|
|
|
|
|
2006-12-13 20:48:31 +01:00
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl
|
* configure.ac (gl_INIT): Add gnulib stuff.
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS
by a simple check.
(putc_unlocked): Removed check. Not used.
(strsep, mkdtemp, asprintf): Replaced checks by gnulib checks.
(xsize): Added will probably come handy soon.
(CFLAGS): Use -Wformat-security instead of
-Wformat-nonliteral. Add --Wno-format-y2k.
* gl/, gl/m4/: New.
* gpg-agent.c: Include setenv.h.
* Makefile.am (AM_CPPFLAGS): Added.
* util.h: Add some includes for gnulib.
(ttyname, isascii): Define them inline.
* fseeko.c, ftello.c: Removed.
* strsep.c, mkdtemp.c: Removed.
* ttyname.c, isascii.c: Removed.
* mkdtemp.c: Removed.
* exec.c: Include mkdtemp.h
* keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement
function. Copied from ../common/ftello.c.
* keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement
function. Copied from ../common/iobuf.c.
* scdaemon.c: Include mkdtemp.h.
* misc.c: Include setenv.h.
* symcryptrun.c: Include mkdtemp.h.
2005-06-01 17:46:01 +02:00
|
|
|
|
2006-10-17 16:34:42 +02:00
|
|
|
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
|
2003-08-05 19:11:04 +02:00
|
|
|
|
2007-06-06 20:12:30 +02:00
|
|
|
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 \
|
2007-06-06 20:12:30 +02:00
|
|
|
util.h i18n.c i18n.h \
|
2007-11-19 17:03:50 +01:00
|
|
|
status.c status.h\
|
2006-08-21 22:20:23 +02:00
|
|
|
openpgpdefs.h \
|
2007-08-02 20:12:43 +02:00
|
|
|
gc-opt-flags.h \
|
2006-08-21 22:20:23 +02:00
|
|
|
keyserver.h \
|
2004-01-27 17:40:42 +01:00
|
|
|
sexp-parse.h \
|
2007-08-10 18:52:05 +02:00
|
|
|
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 \
|
2003-08-05 19:11:04 +02:00
|
|
|
sysutils.c sysutils.h \
|
2004-12-21 11:03:00 +01:00
|
|
|
homedir.c \
|
2003-08-05 19:11:04 +02:00
|
|
|
gettime.c \
|
|
|
|
yesno.c \
|
2008-06-09 16:49:28 +02:00
|
|
|
b64enc.c b64dec.c \
|
2006-09-15 20:53:37 +02:00
|
|
|
convert.c \
|
2008-12-05 17:31:39 +01:00
|
|
|
percent.c \
|
2003-08-05 19:11:04 +02:00
|
|
|
miscellaneous.c \
|
2004-01-30 13:37:09 +01:00
|
|
|
xasprintf.c \
|
2004-06-14 10:32:07 +02:00
|
|
|
xreadline.c \
|
2003-08-05 19:11:04 +02:00
|
|
|
membuf.c membuf.h \
|
|
|
|
iobuf.c iobuf.h \
|
|
|
|
ttyio.c ttyio.h \
|
2004-03-06 21:11:19 +01:00
|
|
|
asshelp.c asshelp.h \
|
2004-12-06 19:28:56 +01:00
|
|
|
exechelp.c exechelp.h \
|
2003-08-14 21:58:03 +02:00
|
|
|
signal.c \
|
2007-05-15 18:10:48 +02:00
|
|
|
estream.c estream.h estream-printf.c estream-printf.h \
|
2007-11-19 17:03:50 +01:00
|
|
|
audit.c audit.h \
|
2007-06-06 20:12:30 +02:00
|
|
|
srv.h \
|
2006-05-23 18:19:43 +02:00
|
|
|
dns-cert.c dns-cert.h \
|
2006-08-11 13:04:38 +02:00
|
|
|
pka.c pka.h \
|
2007-12-04 12:23:31 +01:00
|
|
|
http.c http.h \
|
|
|
|
localename.c \
|
2009-07-07 12:02:41 +02:00
|
|
|
session-env.c session-env.h \
|
2007-12-04 12:23:31 +01:00
|
|
|
helpfile.c
|
2003-08-05 19:11:04 +02:00
|
|
|
|
2009-04-01 12:51:53 +02:00
|
|
|
# Sources only useful without PTH.
|
|
|
|
without_pth_sources = \
|
|
|
|
get-passphrase.c get-passphrase.h
|
2007-06-14 19:05:07 +02:00
|
|
|
|
2007-11-19 17:03:50 +01:00
|
|
|
|
2009-04-01 12:51:53 +02:00
|
|
|
libcommon_a_SOURCES = $(common_sources) $(without_pth_sources)
|
2007-06-06 20:12:30 +02:00
|
|
|
if USE_DNS_SRV
|
|
|
|
libcommon_a_SOURCES += srv.c
|
|
|
|
endif
|
2006-10-24 16:48:02 +02:00
|
|
|
libcommon_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) -DWITHOUT_GNU_PTH=1
|
2006-10-17 16:34:42 +02:00
|
|
|
|
|
|
|
libcommonpth_a_SOURCES = $(common_sources)
|
2007-06-06 20:12:30 +02:00
|
|
|
if USE_DNS_SRV
|
|
|
|
libcommonpth_a_SOURCES += srv.c
|
|
|
|
endif
|
2006-10-17 16:34:42 +02:00
|
|
|
libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(PTH_CFLAGS)
|
|
|
|
|
2003-08-05 19:11:04 +02:00
|
|
|
libsimple_pwquery_a_SOURCES = \
|
2004-03-06 21:11:19 +01:00
|
|
|
simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
|
2006-10-24 16:48:02 +02:00
|
|
|
libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
|
2003-08-05 19:11:04 +02:00
|
|
|
|
2006-09-21 15:30:45 +02:00
|
|
|
libgpgrl_a_SOURCES = \
|
|
|
|
gpgrlhelp.c
|
2006-09-15 20:53:37 +02:00
|
|
|
|
2007-11-19 17:03:50 +01:00
|
|
|
# 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.
|
2007-11-19 17:03:50 +01:00
|
|
|
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 \
|
2009-12-04 12:38:41 +01:00
|
|
|
-v namespace=eventstr_ > $(srcdir)/$@
|
2007-11-19 17:03:50 +01:00
|
|
|
|
|
|
|
# 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 \
|
2009-12-04 12:38:41 +01:00
|
|
|
-v namespace=statusstr_ > $(srcdir)/$@
|
2007-11-19 17:03:50 +01:00
|
|
|
|
|
|
|
|
2006-09-15 20:53:37 +02:00
|
|
|
#
|
|
|
|
# Module tests
|
|
|
|
#
|
2009-07-07 12:02:41 +02:00
|
|
|
module_tests = t-convert t-percent t-gettime t-sysutils t-sexputil t-exechelp \
|
|
|
|
t-session-env
|
2008-04-07 21:31:12 +02:00
|
|
|
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 \
|
2007-01-31 15:24:41 +01:00
|
|
|
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
|
2006-09-15 20:53:37 +02:00
|
|
|
|
|
|
|
t_convert_LDADD = $(t_common_ldadd)
|
2008-12-05 17:31:39 +01:00
|
|
|
t_percent_LDADD = $(t_common_ldadd)
|
2007-07-05 18:58:19 +02:00
|
|
|
t_gettime_LDADD = $(t_common_ldadd)
|
2007-08-22 12:55:07 +02:00
|
|
|
t_sysutils_LDADD = $(t_common_ldadd)
|
2007-12-04 12:23:31 +01:00
|
|
|
t_helpfile_LDADD = $(t_common_ldadd)
|
2007-12-13 16:45:40 +01:00
|
|
|
t_sexputil_LDADD = $(t_common_ldadd)
|
2008-04-07 21:31:12 +02:00
|
|
|
t_b64_LDADD = $(t_common_ldadd)
|
2009-03-19 08:09:31 +01:00
|
|
|
t_exechelp_LDADD = $(t_common_ldadd)
|
2009-07-07 12:02:41 +02:00
|
|
|
t_session_env_LDADD = $(t_common_ldadd)
|
2007-11-19 17:03:50 +01:00
|
|
|
|