3b3cffc42df9ef2bd0992271d21ceb262186cbc2
[gpgme.git] / lang / qt / src / Makefile.am
1 # Makefile.am for GPGMEPP.
2 # Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik
3 # Software engineering by Intevation GmbH
4 #
5 # This file is part of GPGMEPP.
6 #
7 # GPGME-CL is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # GPGME-CL is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 # 02111-1307, USA
21 lib_LTLIBRARIES = libqgpgme.la
22 EXTRA_DIST = QGpgmeConfig.cmake.in.in QGpgmeConfigVersion.cmake.in \
23              gpgme_backend_debug.h qgpgme_version.h.in \
24              QGpgmeConfig.cmake.in.in
25
26 qgpgme_sources = \
27     dataprovider.cpp job.cpp multideletejob.cpp qgpgmeadduseridjob.cpp \
28     qgpgmebackend.cpp qgpgmechangeexpiryjob.cpp qgpgmechangeownertrustjob.cpp \
29     qgpgmechangepasswdjob.cpp qgpgmedecryptjob.cpp \
30     qgpgmedecryptverifyjob.cpp qgpgmedeletejob.cpp qgpgmedownloadjob.cpp \
31     qgpgmeencryptjob.cpp qgpgmeexportjob.cpp qgpgmeimportfromkeyserverjob.cpp \
32     qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \
33     qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \
34     qgpgmerefreshkeysjob.cpp \
35     qgpgmesecretkeyexportjob.cpp qgpgmesignencryptjob.cpp \
36     qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \
37     qgpgmeverifyopaquejob.cpp threadedjobmixin.cpp \
38     qgpgmekeyformailboxjob.cpp gpgme_backend_debug.cpp \
39     qgpgmetofupolicyjob.cpp \
40     defaultkeygenerationjob.cpp qgpgmewkspublishjob.cpp \
41     dn.cpp cryptoconfig.cpp
42
43 # If you add one here make sure that you also add one in camelcase
44 qgpgme_headers= \
45     abstractimportjob.h \
46     adduseridjob.h \
47     changeexpiryjob.h \
48     changeownertrustjob.h \
49     changepasswdjob.h \
50     dataprovider.h \
51     decryptjob.h \
52     decryptverifyjob.h \
53     downloadjob.h \
54     encryptjob.h \
55     exportjob.h \
56     hierarchicalkeylistjob.h \
57     job.h \
58     keyformailboxjob.h \
59     multideletejob.h \
60     protocol.h \
61     qgpgme_export.h \
62     qgpgmenewcryptoconfig.h \
63     specialjob.h \
64     signjob.h \
65     signkeyjob.h \
66     signencryptjob.h \
67     verifyopaquejob.h \
68     refreshkeysjob.h \
69     cryptoconfig.h \
70     deletejob.h \
71     importfromkeyserverjob.h \
72     importjob.h \
73     keygenerationjob.h \
74     keylistjob.h \
75     listallkeysjob.h \
76     verifydetachedjob.h \
77     defaultkeygenerationjob.h \
78     tofupolicyjob.h \
79     wkspublishjob.h \
80     dn.h
81
82 camelcase_headers= \
83     AddUserIDJob \
84     AbstractImportJob \
85     ChangeExpiryJob \
86     ChangeOwnerTrustJob \
87     ChangePasswdJob \
88     DataProvider \
89     DecryptJob \
90     DecryptVerifyJob \
91     DN \
92     DownloadJob \
93     EncryptJob \
94     ExportJob \
95     HierarchicalKeyKistJob \
96     Job \
97     MultiDeleteJob \
98     Protocol \
99     QGpgMENewCryptoConfig \
100     SpecialJob \
101     SignJob \
102     SignKeyJob \
103     SignEncryptJob \
104     VerifyOpaqueJob \
105     RefreshKeysJob \
106     CryptoConfig \
107     DeleteJob \
108     ImportFromKeyserverJob \
109     ImportJob \
110     KeyGenerationJob \
111     KeyListJob \
112     ListAllKeysJob \
113     VerifyDetachedJob \
114     KeyForMailboxJob \
115     DefaultKeyGenerationJob \
116     WKSPublishJob \
117     TofuPolicyJob
118
119 private_qgpgme_headers = \
120     qgpgme_export.h \
121     protocol_p.h \
122     qgpgmeadduseridjob.h \
123     qgpgmebackend.h \
124     qgpgmechangeexpiryjob.h \
125     qgpgmechangeownertrustjob.h \
126     qgpgmechangepasswdjob.h \
127     qgpgmedecryptjob.h \
128     qgpgmedecryptverifyjob.h \
129     qgpgmedeletejob.h \
130     qgpgmedownloadjob.h \
131     qgpgmeencryptjob.h \
132     qgpgmeexportjob.h \
133     qgpgmeimportfromkeyserverjob.h \
134     qgpgmeimportjob.h \
135     qgpgmekeygenerationjob.h \
136     qgpgmekeylistjob.h \
137     qgpgmelistallkeysjob.h \
138     qgpgmerefreshkeysjob.h \
139     qgpgmesecretkeyexportjob.h \
140     qgpgmesignencryptjob.h \
141     qgpgmesignjob.h \
142     qgpgmesignkeyjob.h \
143     qgpgmeverifydetachedjob.h \
144     qgpgmeverifyopaquejob.h \
145     qgpgmekeyformailboxjob.h \
146     qgpgmewkspublishjob.h \
147     qgpgmetofupolicyjob.h \
148     threadedjobmixin.h
149
150 qgpgme_moc_sources = \
151     abstractimportjob.moc \
152     adduseridjob.moc \
153     changeexpiryjob.moc \
154     changeownertrustjob.moc \
155     changepasswdjob.moc \
156     decryptjob.moc \
157     decryptverifyjob.moc \
158     deletejob.moc \
159     downloadjob.moc \
160     encryptjob.moc \
161     exportjob.moc \
162     hierarchicalkeylistjob.moc \
163     importfromkeyserverjob.moc \
164     importjob.moc \
165     job.moc \
166     keygenerationjob.moc \
167     keylistjob.moc \
168     listallkeysjob.moc \
169     multideletejob.moc \
170     qgpgmeadduseridjob.moc \
171     qgpgmechangeexpiryjob.moc \
172     qgpgmechangeownertrustjob.moc \
173     qgpgmechangepasswdjob.moc \
174     qgpgmedecryptjob.moc \
175     qgpgmedecryptverifyjob.moc \
176     qgpgmedeletejob.moc \
177     qgpgmedownloadjob.moc \
178     qgpgmeencryptjob.moc \
179     qgpgmeexportjob.moc \
180     qgpgmeimportfromkeyserverjob.moc \
181     qgpgmeimportjob.moc \
182     qgpgmekeygenerationjob.moc \
183     qgpgmekeylistjob.moc \
184     qgpgmelistallkeysjob.moc \
185     qgpgmerefreshkeysjob.moc \
186     qgpgmesecretkeyexportjob.moc \
187     qgpgmesignencryptjob.moc \
188     qgpgmesignjob.moc \
189     qgpgmesignkeyjob.moc \
190     qgpgmeverifydetachedjob.moc \
191     qgpgmeverifyopaquejob.moc \
192     qgpgmewkspublishjob.moc \
193     tofupolicyjob.moc \
194     qgpgmetofupolicyjob.moc \
195     refreshkeysjob.moc \
196     signencryptjob.moc \
197     signjob.moc \
198     signkeyjob.moc \
199     specialjob.moc \
200     verifydetachedjob.moc \
201     verifyopaquejob.moc \
202     keyformailboxjob.moc \
203     wkspublishjob.moc \
204     qgpgmekeyformailboxjob.moc \
205     defaultkeygenerationjob.moc
206
207 qgpgmeincludedir = $(includedir)/qgpgme
208 qgpgmeinclude_HEADERS = $(qgpgme_headers)
209 camelcaseincludedir = $(includedir)/QGpgME
210 camelcaseinclude_HEADERS = $(camelcase_headers)
211 nodist_qgpgmeinclude_HEADERS = qgpgme_version.h
212
213 libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
214
215 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
216               @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
217               -DBUILDING_QGPGME
218
219 libqgpgme_la_LIBADD = ../../cpp/src/libgpgmepp.la ../../../src/libgpgme.la \
220                        @LIBASSUAN_LIBS@ @GPGME_QT_LIBS@
221 libqgpgme_la_LDFLAGS = -no-undefined -version-info \
222     @LIBQGPGME_LT_CURRENT@:@LIBQGPGME_LT_REVISION@:@LIBQGPGME_LT_AGE@
223
224 if HAVE_MACOS_SYSTEM
225 libsuffix=.dylib
226 else
227 libsuffix=.so
228 endif
229
230 if HAVE_W32_SYSTEM
231 QGpgmeConfig.cmake: QGpgmeConfig-w32.cmake.in
232         sed -e 's|[@]resolved_bindir@|$(bindir)|g' < "$<" | \
233         sed -e 's|[@]resolved_libdir@|$(libdir)|g' | \
234         sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
235 else
236 QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
237         sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
238         sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
239         sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
240 endif
241
242 $(camelcase_headers): Makefile.am
243         echo -n "#include \"qgpgme/" > "$@"
244         echo -n "$@" | tr '[:upper:]' '[:lower:]' >> "$@"
245         echo ".h\"" >> "$@"
246
247 install-cmake-files: QGpgmeConfig.cmake QGpgmeConfigVersion.cmake
248         -$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/QGpgme
249         $(INSTALL) -m 644 QGpgmeConfig.cmake \
250         $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfig.cmake
251         $(INSTALL) -m 644 QGpgmeConfigVersion.cmake \
252         $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfigVersion.cmake
253
254 uninstall-cmake-files:
255         -rm $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfigVersion.cmake
256         -rm $(DESTDIR)$(libdir)/cmake/QGpgme/QGpgmeConfig.cmake
257         -rmdir $(DESTDIR)$(libdir)/cmake/QGpgme/
258
259 install-data-local: install-cmake-files
260
261 uninstall-local: uninstall-cmake-files
262
263 BUILT_SOURCES = $(qgpgme_moc_sources) $(camelcase_headers)
264
265 CLEANFILES = $(qgpgme_moc_sources) $(camelcase_headers) QGpgmeConfig.cmake \
266              qgpgme_version.h QGpgmeConfig.cmake.in \
267              QGpgmeConfigVersion.cmake
268
269 nodist_libqgpgme_la_SOURCES = $(qgpgme_moc_sources)
270
271 .h.moc:
272         $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@