doc: Fix documentation of struct data types
[gpgme.git] / src / Makefile.am
1 # Copyright (C) 2000 Werner Koch (dd9jn)
2 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH
3 #
4 # This file is part of GPGME.
5 #
6 # GPGME is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # GPGME is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
14 # Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19 ## Process this file with automake to produce Makefile.in
20
21 # Note: moc_kdpipeiodevice should actually be a dependcy below.
22 EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
23              gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
24
25 bin_SCRIPTS = gpgme-config
26 m4datadir = $(datadir)/aclocal
27 m4data_DATA = gpgme.m4
28 nodist_include_HEADERS = gpgme.h
29
30 if HAVE_PTHREAD
31 ltlib_gpgme_pthread = libgpgme-pthread.la
32 else
33 ltlib_gpgme_pthread =
34 endif
35
36 if BUILD_W32_GLIB
37 ltlib_gpgme_glib = libgpgme-glib.la
38 else
39 ltlib_gpgme_glib =
40 endif
41
42 if BUILD_W32_QT
43 ltlib_gpgme_qt = libgpgme-qt.la
44 else
45 ltlib_gpgme_qt =
46 endif
47
48 lib_LTLIBRARIES = libgpgme.la $(ltlib_gpgme_glib) $(ltlib_gpgme_qt) \
49         $(ltlib_gpgme_pthread)
50
51 if HAVE_LD_VERSION_SCRIPT
52 libgpgme_version_script_cmd = -Wl,--version-script=$(srcdir)/libgpgme.vers
53 else
54 libgpgme_version_script_cmd =
55 endif
56
57 if HAVE_DOSISH_SYSTEM
58 system_components = w32-util.c w32-sema.c
59 system_components_not_extra = w32-io.c
60 else
61 system_components = ath.h posix-util.c posix-sema.c posix-io.c
62 system_components_not_extra =
63 endif
64
65 if HAVE_W32CE_SYSTEM
66 system_components += w32-ce.h w32-ce.c
67 endif
68
69 if HAVE_UISERVER
70 uiserver_components = engine-uiserver.c
71 else
72 uiserver_components =
73 endif
74
75 # These are the source files common to all library versions.  We used
76 # to build a non-installed library for that, but that does not work
77 # correctly on all platforms (in particular, one can not specify the
78 # right linking order with libtool, as the non-installed version has
79 # unresolved symbols to the thread module.
80 main_sources =                                                          \
81         util.h conversion.c get-env.c context.h ops.h                   \
82         parsetlv.c parsetlv.h                                           \
83         data.h data.c data-fd.c data-stream.c data-mem.c data-user.c    \
84         data-compat.c data-identify.c                                   \
85         signers.c sig-notation.c                                        \
86         wait.c wait-global.c wait-private.c wait-user.c wait.h          \
87         op-support.c                                                    \
88         encrypt.c encrypt-sign.c decrypt.c decrypt-verify.c verify.c    \
89         sign.c passphrase.c progress.c                                  \
90         key.c keylist.c trust-item.c trustlist.c                        \
91         import.c export.c genkey.c delete.c edit.c getauditlog.c        \
92         opassuan.c passwd.c assuan-support.c                            \
93         engine.h engine-backend.h engine.c engine-gpg.c status-table.c  \
94         engine-gpgsm.c engine-assuan.c engine-gpgconf.c                 \
95         $(uiserver_components)                                          \
96         engine-g13.c vfs-mount.c vfs-create.c                           \
97         gpgconf.c                                                       \
98         sema.h priv-io.h $(system_components) sys-util.h dirinfo.c      \
99         debug.c debug.h gpgme.c version.c error.c
100
101 libgpgme_la_SOURCES = $(main_sources)                                   \
102         ath.h ath.c $(system_components_not_extra)
103 libgpgme_pthread_la_SOURCES = $(main_sources)                           \
104         ath.h ath-pthread.c $(system_components_not_extra)
105
106 if BUILD_W32_GLIB
107 libgpgme_glib_la_SOURCES = $(main_sources) ath.h ath.c w32-glib-io.c
108 endif
109
110 if BUILD_W32_QT
111 libgpgme_qt_la_SOURCES = $(main_sources) ath.h ath.c w32-qt-io.cpp \
112         kdpipeiodevice.h kdpipeiodevice.cpp kdpipeiodevice.moc
113 # FIXME: Add extra depedency: moc_kdpipeiodevice.cpp
114
115 # These are built sources (normally).
116 # moc_kdpipeiodevice.cpp: kdpipeiodevice.h
117 #       $(MOC4) -o $@ $<
118 #
119 # kdpipeiodevice.moc: kdpipeiodevice.cpp
120 #       $(MOC4) -o $@ $<
121 endif
122
123 # We use a global CFLAGS and CPPFLAGS setting for all library
124 # versions, because then every object file is only compiled once.
125 AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ @QT4_CORE_CFLAGS@
126 AM_CFLAGS = @LIBASSUAN_CFLAGS@ @GLIB_CFLAGS@ @QT4_CORE_CFLAGS@
127
128 if HAVE_W32_SYSTEM
129 # Windows provides us with an endless stream of Tough Love.  To spawn
130 # processes with a controlled set of inherited handles, we need a
131 # wrapper process.
132 # Except on Windows CE.  There nothing is inheritable anyway.
133 if HAVE_W32CE_SYSTEM
134 libexec_PROGRAMS =
135 else
136 libexec_PROGRAMS = gpgme-w32spawn
137 endif
138
139 RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
140 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
141
142 SUFFIXES = .rc .lo
143
144 .rc.lo:
145         $(LTRCCOMPILE) -i "$<" -o "$@"
146
147 gpgme_res = versioninfo.lo
148 no_undefined = -no-undefined
149 export_symbols = -export-symbols $(srcdir)/gpgme.def
150
151 install-def-file:
152         -$(INSTALL) -d $(DESTDIR)$(libdir)
153         $(INSTALL) $(srcdir)/gpgme.def $(DESTDIR)$(libdir)/gpgme.def
154
155 uninstall-def-file:
156         -rm $(DESTDIR)$(libdir)/gpgme.def
157
158 gpgme_deps = $(gpgme_res) gpgme.def
159
160 else
161 gpgme_res =
162 no_undefined =
163 export_symbols =
164 install-def-file:
165 uninstall-def-file:
166
167 gpgme_deps =
168 endif
169
170 libgpgme_la_LDFLAGS = $(no_undefined) $(export_symbols) \
171         $(libgpgme_version_script_cmd) -version-info \
172         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
173 libgpgme_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps)
174 libgpgme_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
175                      @GPG_ERROR_LIBS@
176
177 libgpgme_pthread_la_LDFLAGS = $(no_undefined) $(export_symbols) \
178         $(libgpgme_version_script_cmd) -version-info \
179         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
180 libgpgme_pthread_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers
181 libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
182         -lpthread @GPG_ERROR_LIBS@
183
184 if BUILD_W32_GLIB
185 libgpgme_glib_la_LDFLAGS = $(no_undefined) \
186         $(export_symbols) $(libgpgme_version_script_cmd) -version-info \
187         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
188 libgpgme_glib_la_DEPENDENCIES = @LTLIBOBJS@ \
189         $(srcdir)/libgpgme.vers $(gpgme_deps)
190 libgpgme_glib_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
191         @GPG_ERROR_LIBS@ @GLIB_LIBS@
192 endif
193
194 if BUILD_W32_QT
195 libgpgme_qt_la_LDFLAGS = $(no_undefined) \
196         $(export_symbols) $(libgpgme_version_script_cmd) -version-info \
197         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
198 libgpgme_qt_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps)
199 libgpgme_qt_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \
200         @GPG_ERROR_LIBS@ @QT4_CORE_LIBS@
201 endif
202
203 noinst_PROGRAMS = gpgme-tool
204 gpgme_tool_LDADD = libgpgme.la @LIBASSUAN_LIBS@
205
206 install-data-local: install-def-file
207
208 uninstall-local: uninstall-def-file