e9deca9b01ba310b721216dd0d228d6a1159a642
[gpgme.git] / lang / cpp / src / Makefile.am
1 # Makefile.am for GPGMEPP.
2 # Copyright (C) 2016 Intevation GmbH
3 #
4 # This file is part of GPGMEPP.
5 #
6 # GPGME-CL is free software; you can redistribute it and/or modify it
7 # 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-CL 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 Lesser 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
19 # 02111-1307, USA
20
21 EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in
22
23 lib_LTLIBRARIES = libgpgmepp.la
24
25 main_sources = \
26     exception.cpp context.cpp key.cpp trustitem.cpp data.cpp callbacks.cpp \
27     eventloopinteractor.cpp editinteractor.cpp assuanresult.cpp \
28     keylistresult.cpp keygenerationresult.cpp importresult.cpp \
29     decryptionresult.cpp verificationresult.cpp \
30     signingresult.cpp encryptionresult.cpp \
31     engineinfo.cpp gpgsetexpirytimeeditinteractor.cpp \
32     gpgsetownertrusteditinteractor.cpp gpgsignkeyeditinteractor.cpp \
33     gpgadduserideditinteractor.cpp defaultassuantransaction.cpp \
34     scdgetinfoassuantransaction.cpp gpgagentgetinfoassuantransaction.cpp \
35     vfsmountresult.cpp configuration.cpp tofuinfo.cpp
36
37 gpgmepp_headers = \
38     assuanresult.h configuration.h context.h data.h decryptionresult.h \
39     defaultassuantransaction.h editinteractor.h encryptionresult.h \
40     engineinfo.h error.h eventloopinteractor.h exception.h global.h \
41     gpgadduserideditinteractor.h gpgagentgetinfoassuantransaction.h \
42     gpgmefw.h gpgsetexpirytimeeditinteractor.h \
43     gpgsetownertrusteditinteractor.h gpgsignkeyeditinteractor.h \
44     importresult.h keygenerationresult.h key.h keylistresult.h \
45     notation.h result.h scdgetinfoassuantransaction.h signingresult.h \
46     trustitem.h verificationresult.h vfsmountresult.h gpgmepp_export.h \
47     tofuinfo.h
48
49 private_gpgmepp_headers = \
50     result_p.h context_p.h util.h callbacks.h data_p.h
51
52 interface_headers= \
53     interfaces/assuantransaction.h interfaces/dataprovider.h \
54     interfaces/passphraseprovider.h interfaces/progressprovider.h
55
56 gpgmeppincludedir = $(includedir)/gpgme++
57 gpgmeppinclude_HEADERS = $(gpgmepp_headers)
58 nobase_gpgmeppinclude_HEADERS = $(interface_headers)
59
60 libgpgmepp_la_SOURCES = $(main_sources) $(gpgmepp_headers) context_vanilla.cpp \
61                         $(interface_headers) $(private_gpgmepp_headers)
62
63 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
64               -DBUILDING_GPGMEPP
65
66 libgpgmepp_la_LIBADD = ../../../src/libgpgme.la @LIBASSUAN_LIBS@
67 libgpgmepp_la_LDFLAGS = -version-info \
68     @LIBGPGMEPP_LT_CURRENT@:@LIBGPGMEPP_LT_REVISION@:@LIBGPGMEPP_LT_AGE@
69
70 if HAVE_W32_SYSTEM
71 libsuffix=.dll.a
72 else
73 libsuffix=.so
74 endif
75
76 GpgmeppConfig.cmake: GpgmeppConfig.cmake.in
77         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@"
78         sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2
79         mv "$@".2 "$@"
80
81 install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake
82         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
83         $(INSTALL) GpgmeppConfig.cmake \
84         $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake
85         $(INSTALL) GpgmeppConfigVersion.cmake \
86         $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
87
88 uninstall-cmake-files:
89         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfigVersion.cmake
90         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/GpgmeppConfig.cmake
91         -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/
92
93 install-data-local: install-cmake-files
94
95 uninstall-local: uninstall-cmake-files
96
97 CLEANFILES = GpgmeppConfig.cmake