e09e0d99a5dbb7c9ba54afd8f14d9a39121b27cc
[gpgme.git] / lang / qt / 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 lib_LTLIBRARIES = libqgpgme.la
21 EXTRA_DIST = QGpgmeConfig.cmake.in.in QGpgmeConfigVersion.cmake.in \
22              gpgme_backend_debug.h qgpgme_version.h.in
23
24 qgpgme_sources = \
25     dataprovider.cpp job.cpp multideletejob.cpp qgpgmeadduseridjob.cpp \
26     qgpgmebackend.cpp qgpgmechangeexpiryjob.cpp qgpgmechangeownertrustjob.cpp \
27     qgpgmechangepasswdjob.cpp qgpgmedecryptjob.cpp \
28     qgpgmedecryptverifyjob.cpp qgpgmedeletejob.cpp qgpgmedownloadjob.cpp \
29     qgpgmeencryptjob.cpp qgpgmeexportjob.cpp qgpgmeimportfromkeyserverjob.cpp \
30     qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \
31     qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \
32     qgpgmerefreshkeysjob.cpp \
33     qgpgmesecretkeyexportjob.cpp qgpgmesignencryptjob.cpp \
34     qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \
35     qgpgmeverifyopaquejob.cpp threadedjobmixin.cpp \
36     qgpgmekeyformailboxjob.cpp gpgme_backend_debug.cpp \
37     qgpgmetofupolicyjob.cpp \
38     defaultkeygenerationjob.cpp qgpgmewkspublishjob.cpp
39
40 # If you add one here make sure that you also add one in camelcase
41 qgpgme_headers= \
42     abstractimportjob.h \
43     adduseridjob.h \
44     changeexpiryjob.h \
45     changeownertrustjob.h \
46     changepasswdjob.h \
47     dataprovider.h \
48     decryptjob.h \
49     decryptverifyjob.h \
50     downloadjob.h \
51     encryptjob.h \
52     exportjob.h \
53     hierarchicalkeylistjob.h \
54     job.h \
55     keyformailboxjob.h \
56     multideletejob.h \
57     protocol.h \
58     qgpgme_export.h \
59     qgpgmenewcryptoconfig.h \
60     signjob.h \
61     signkeyjob.h \
62     signencryptjob.h \
63     verifyopaquejob.h \
64     refreshkeysjob.h \
65     cryptoconfig.h \
66     deletejob.h \
67     importfromkeyserverjob.h \
68     importjob.h \
69     keygenerationjob.h \
70     keylistjob.h \
71     listallkeysjob.h \
72     verifydetachedjob.h \
73     defaultkeygenerationjob.h \
74     tofupolicyjob.h \
75     wkspublishjob.h
76
77 camelcase_headers= \
78     AddUserIDJob \
79     AbstractImportJob \
80     ChangeExpiryJob \
81     ChangeOwnerTrustJob \
82     ChangePasswdJob \
83     DataProvider \
84     DecryptJob \
85     DecryptVerifyJob \
86     DownloadJob \
87     EncryptJob \
88     ExportJob \
89     HierarchicalKeyKistJob \
90     Job \
91     MultiDeleteJob \
92     Protocol \
93     QGpgMENewCryptoConfig \
94     SignJob \
95     SignKeyJob \
96     SignEncryptJob \
97     VerifyOpaqueJob \
98     RefreshKeysJob \
99     CryptoConfig \
100     DeleteJob \
101     ImportFromKeyserverJob \
102     ImportJob \
103     KeyGenerationJob \
104     KeyListJob \
105     ListAllKeysJob \
106     VerifyDetachedJob \
107     KeyForMailboxJob \
108     DefaultKeyGenerationJob \
109     WKSPublishJob \
110     TofuPolicyJob
111
112 private_qgpgme_headers = \
113     qgpgme_export.h \
114     protocol_p.h \
115     qgpgmeadduseridjob.h \
116     qgpgmebackend.h \
117     qgpgmechangeexpiryjob.h \
118     qgpgmechangeownertrustjob.h \
119     qgpgmechangepasswdjob.h \
120     qgpgmedecryptjob.h \
121     qgpgmedecryptverifyjob.h \
122     qgpgmedeletejob.h \
123     qgpgmedownloadjob.h \
124     qgpgmeencryptjob.h \
125     qgpgmeexportjob.h \
126     qgpgmeimportfromkeyserverjob.h \
127     qgpgmeimportjob.h \
128     qgpgmekeygenerationjob.h \
129     qgpgmekeylistjob.h \
130     qgpgmelistallkeysjob.h \
131     qgpgmerefreshkeysjob.h \
132     qgpgmesecretkeyexportjob.h \
133     qgpgmesignencryptjob.h \
134     qgpgmesignjob.h \
135     qgpgmesignkeyjob.h \
136     qgpgmeverifydetachedjob.h \
137     qgpgmeverifyopaquejob.h \
138     qgpgmekeyformailboxjob.h \
139     qgpgmewkspublishjob.h \
140     qgpgmetofupolicyjob.h \
141     specialjob.h \
142     threadedjobmixin.h
143
144 qgpgme_moc_sources = \
145     abstractimportjob.moc \
146     adduseridjob.moc \
147     changeexpiryjob.moc \
148     changeownertrustjob.moc \
149     changepasswdjob.moc \
150     decryptjob.moc \
151     decryptverifyjob.moc \
152     deletejob.moc \
153     downloadjob.moc \
154     encryptjob.moc \
155     exportjob.moc \
156     hierarchicalkeylistjob.moc \
157     importfromkeyserverjob.moc \
158     importjob.moc \
159     job.moc \
160     keygenerationjob.moc \
161     keylistjob.moc \
162     listallkeysjob.moc \
163     multideletejob.moc \
164     qgpgmeadduseridjob.moc \
165     qgpgmechangeexpiryjob.moc \
166     qgpgmechangeownertrustjob.moc \
167     qgpgmechangepasswdjob.moc \
168     qgpgmedecryptjob.moc \
169     qgpgmedecryptverifyjob.moc \
170     qgpgmedeletejob.moc \
171     qgpgmedownloadjob.moc \
172     qgpgmeencryptjob.moc \
173     qgpgmeexportjob.moc \
174     qgpgmeimportfromkeyserverjob.moc \
175     qgpgmeimportjob.moc \
176     qgpgmekeygenerationjob.moc \
177     qgpgmekeylistjob.moc \
178     qgpgmelistallkeysjob.moc \
179     qgpgmerefreshkeysjob.moc \
180     qgpgmesecretkeyexportjob.moc \
181     qgpgmesignencryptjob.moc \
182     qgpgmesignjob.moc \
183     qgpgmesignkeyjob.moc \
184     qgpgmeverifydetachedjob.moc \
185     qgpgmeverifyopaquejob.moc \
186     qgpgmewkspublishjob.moc \
187     tofupolicyjob.moc \
188     qgpgmetofupolicyjob.moc \
189     refreshkeysjob.moc \
190     signencryptjob.moc \
191     signjob.moc \
192     signkeyjob.moc \
193     specialjob.moc \
194     verifydetachedjob.moc \
195     verifyopaquejob.moc \
196     keyformailboxjob.moc \
197     wkspublishjob.moc \
198     qgpgmekeyformailboxjob.moc \
199     defaultkeygenerationjob.moc
200
201 qgpgmeincludedir = $(includedir)/qgpgme
202 qgpgmeinclude_HEADERS = $(qgpgme_headers)
203 camelcaseincludedir = $(includedir)/QGpgME
204 camelcaseinclude_HEADERS = $(camelcase_headers)
205 nodist_include_HEADERS = qgpgme_version.h
206
207 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
208
209 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
210               @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
211               -DBUILDING_QGPGME
212
213 libqgpgme_la_LIBADD = ../../cpp/src/libgpgmepp.la ../../../src/libgpgme.la \
214                        @LIBASSUAN_LIBS@ @GPGME_QT_LIBS@
215 libqgpgme_la_LDFLAGS = -version-info \
216     @LIBQGPGME_LT_CURRENT@:@LIBQGPGME_LT_REVISION@:@LIBQGPGME_LT_AGE@
217
218 if HAVE_W32_SYSTEM
219 libsuffix=.dll.a
220 else
221 libsuffix=.so
222 endif
223
224 QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
225         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
226         sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
227         sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
228
229 $(camelcase_headers): Makefile.am
230         echo -n "#include \"qgpgme/" > "$@"
231         echo -n "$@" | tr '[:upper:]' '[:lower:]' >> "$@"
232         echo ".h\"" >> "$@"
233
234 install-cmake-files: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake
235         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
236         $(INSTALL) QGpgmeConfig.cmake \
237         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
238         $(INSTALL) QGpgmeConfigVersion.cmake \
239         $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
240
241 uninstall-cmake-files:
242         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfigVersion.cmake
243         -rm $(DESTDIR)$(libdir)/cmake/Gpgmepp/QGpgmeConfig.cmake
244         -rmdir $(DESTDIR)$(libdir)/cmake/Gpgmepp/
245
246 install-data-local: install-cmake-files
247
248 uninstall-local: uninstall-cmake-files
249
250 BUILT_SOURCES = $(qgpgme_moc_sources) $(camelcase_headers)
251
252 CLEANFILES = $(qgpgme_moc_sources) $(camelcase_headers) QGpgmeConfig.cmake
253
254 nodist_libqgpgme_la_SOURCES = $(qgpgme_moc_sources)
255
256 .h.moc:
257         $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@