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