Add missing file.
[gnupg.git] / common / Makefile.am
blob72c7d179f8161d81fba6e981c5b8eb2c2e4f8907
1 # Makefile for common gnupg modules
2 # Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
4 # This file is part of GnuPG.
6 # GnuPG 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 3 of the License, or
9 # (at your option) any later version.
10
11 # GnuPG 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/>.
19 ## Process this file with automake to produce Makefile.in
21 EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
22              audit-events.h status-codes.h
24 noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
25 noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
26 TESTS = $(module_tests)
28 BUILT_SOURCES = audit-events.h status-codes.h
30 CLEANFILES = audit-events.h status-codes.h
32 AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl
34 AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
36 include $(top_srcdir)/am/cmacros.am
38 common_sources = \
39         common-defs.h \
40         util.h i18n.c i18n.h \
41         status.c status.h\
42         openpgpdefs.h \
43         gc-opt-flags.h \
44         keyserver.h \
45         sexp-parse.h \
46         tlv.c tlv.h \
47         init.c init.h \
48         sexputil.c \
49         sysutils.c sysutils.h \
50         homedir.c \
51         gettime.c \
52         yesno.c \
53         b64enc.c b64dec.c \
54         convert.c \
55         percent.c \
56         miscellaneous.c \
57         xasprintf.c \
58         xreadline.c \
59         membuf.c membuf.h \
60         iobuf.c iobuf.h \
61         ttyio.c ttyio.h \
62         asshelp.c asshelp.h \
63         exechelp.c exechelp.h \
64         signal.c \
65         estream.c estream.h estream-printf.c estream-printf.h \
66         audit.c audit.h \
67         srv.h \
68         dns-cert.c dns-cert.h \
69         pka.c pka.h \
70         http.c http.h \
71         localename.c \
72         helpfile.c
76 libcommon_a_SOURCES = $(common_sources)
77 if USE_DNS_SRV
78 libcommon_a_SOURCES += srv.c
79 endif
80 libcommon_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) -DWITHOUT_GNU_PTH=1
82 libcommonpth_a_SOURCES = $(common_sources)
83 if USE_DNS_SRV
84 libcommonpth_a_SOURCES += srv.c
85 endif
86 libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_PTH_CFLAGS) $(PTH_CFLAGS)
88 libsimple_pwquery_a_SOURCES = \
89         simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
90 libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
92 libgpgrl_a_SOURCES = \
93         gpgrlhelp.c
95 # Create the audit-events.h include file from audit.h
96 audit-events.h: Makefile mkstrtable.awk exaudit.awk audit.h
97         $(AWK) -f $(srcdir)/exaudit.awk $(srcdir)/audit.h \
98           | $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
99                    -v namespace=eventstr_  >$@
101 # Create the status-codes.h include file from status.h
102 status-codes.h: Makefile mkstrtable.awk exstatus.awk status.h
103         $(AWK) -f $(srcdir)/exstatus.awk $(srcdir)/status.h \
104           | $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \
105                    -v namespace=statusstr_  >$@
109 # Module tests
111 module_tests = t-convert t-percent t-gettime t-sysutils t-sexputil t-exechelp
112 module_maint_tests = t-helpfile t-b64
114 t_common_ldadd = libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a \
115                  $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
117 t_convert_LDADD = $(t_common_ldadd)
118 t_percent_LDADD = $(t_common_ldadd)
119 t_gettime_LDADD = $(t_common_ldadd)
120 t_sysutils_LDADD = $(t_common_ldadd)
121 t_helpfile_LDADD = $(t_common_ldadd)
122 t_sexputil_LDADD = $(t_common_ldadd)
123 t_b64_LDADD = $(t_common_ldadd)
124 t_exechelp_LDADD = $(t_common_ldadd)