2003-09-13 Marcus Brinkmann <marcus@g10code.de>
[gpgme.git] / gpgme / Makefile.am
1 # Copyright (C) 2000 Werner Koch (dd9jn)
2 # Copyright (C) 2001, 2002, 2003 g10 Code GmbH
3
4 # This file is part of GPGME.
5
6 # GPGME 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 2 of the License, or
9 # (at your option) any later version.
10
11 # GPGME 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, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 ## Process this file with automake to produce Makefile.in
21
22 EXTRA_DIST = gpgme-config.in gpgme.m4 mkstatus libgpgme.vers
23 BUILT_SOURCES = status-table.h
24 MOSTLYCLEANFILES = status-table.h
25 bin_SCRIPTS = gpgme-config
26 m4datadir = $(datadir)/aclocal
27 m4data_DATA = gpgme.m4
28 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 if HAVE_PTH
36 ltlib_gpgme_pth = libgpgme-pth.la
37 else
38 ltlib_gpgme_pth =
39 endif
40
41 noinst_LTLIBRARIES = libgpgme-real.la
42 lib_LTLIBRARIES = libgpgme.la $(ltlib_gpgme_pthread) $(ltlib_gpgme_pth)
43
44 if HAVE_LD_VERSION_SCRIPT
45 libgpgme_version_script_cmd = -Wl,--version-script=$(srcdir)/libgpgme.vers
46 else
47 libgpgme_version_script_cmd =
48 endif
49
50 if BUILD_ASSUAN
51 assuan_cppflags = -I$(top_srcdir)/assuan
52 assuan_libobjs = ../assuan/libassuan.la
53 else
54 assuan_cppflags =
55 assuan_libobjs =
56 endif
57
58 if HAVE_DOSISH_SYSTEM
59 system_components = w32-util.c w32-sema.c w32-io.c
60 else
61 system_components = ath.h posix-util.c posix-sema.c posix-io.c
62 endif
63
64 if HAVE_GPGSM
65 gpgsm_components = engine-gpgsm.c
66 else
67 gpgsm_components =
68 endif
69
70 libgpgme_real_la_SOURCES =                                              \
71         gpgme.h util.h conversion.c get-env.c context.h ops.h           \
72         data.h data.c data-fd.c data-stream.c data-mem.c data-user.c    \
73         data-compat.c                                                   \
74         signers.c                                                       \
75         wait.c wait-global.c wait-private.c wait-user.c wait.h          \
76         op-support.c                                                    \
77         encrypt.c encrypt-sign.c decrypt.c decrypt-verify.c verify.c    \
78         sign.c passphrase.c progress.c                                  \
79         key.c keylist.c trust-item.c trustlist.c                        \
80         import.c export.c genkey.c delete.c edit.c                      \
81         engine.h engine-backend.h engine.c rungpg.c status-table.h      \
82         $(gpgsm_components) sema.h io.h $(system_components)            \
83         debug.c debug.h gpgme.c version.c error.c
84
85 # libgpgme_la_SOURCES = ath.h ath.c
86 if HAVE_PTH
87   ath_pth_src = ath-pth-compat.c
88 else
89   ath_pth_src =
90 endif
91 if HAVE_PTHREAD
92   ath_pthread_src = ath-pthread-compat.c
93 else
94   ath_pthread_src =
95 endif
96 libgpgme_la_SOURCES = ath.h ath-compat.c $(ath_pth_src) $(ath_pthread_src)
97 libgpgme_pthread_la_SOURCES = ath.h ath-pthread.c
98 libgpgme_pth_la_SOURCES = ath.h ath-pth.c
99
100 AM_CPPFLAGS = $(assuan_cppflags) @GPG_ERROR_CFLAGS@
101
102 libgpgme_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \
103         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
104 libgpgme_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \
105         @LTLIBOBJS@ $(srcdir)/libgpgme.vers
106 libgpgme_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \
107         @GPG_ERROR_LIBS@
108
109 libgpgme_pthread_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \
110         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
111 libgpgme_pthread_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \
112         @LTLIBOBJS@ $(srcdir)/libgpgme.vers
113 libgpgme_pthread_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \
114         -lpthread @GPG_ERROR_LIBS@
115
116 libgpgme_pth_la_CPPFLAGS = $(AM_CPPFLAGS) @PTH_CPPFLAGS@
117 libgpgme_pth_la_LDFLAGS = @PTH_LDFLAGS@ \
118         $(libgpgme_version_script_cmd) -version-info \
119         @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@
120 libgpgme_pth_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \
121         @LTLIBOBJS@ $(srcdir)/libgpgme.vers
122 libgpgme_pth_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \
123         @PTH_LIBS@ @GPG_ERROR_LIBS@
124
125 status-table.h : gpgme.h
126         $(srcdir)/mkstatus < $(srcdir)/gpgme.h > status-table.h