Makefile.qt.include 11.7 KB
Newer Older
infernoman's avatar
infernoman committed
1
bin_PROGRAMS += qt/crown-qt
2
EXTRA_LIBRARIES += qt/libbitcoinqt.a
3

infernoman's avatar
infernoman committed
4
# crown qt core #
5
QT_TS = \
infernoman's avatar
infernoman committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  qt/locale/crown_bg.ts \
  qt/locale/crown_de.ts \
  qt/locale/crown_en.ts \
  qt/locale/crown_es.ts \
  qt/locale/crown_fi.ts \
  qt/locale/crown_fr.ts \
  qt/locale/crown_it.ts \
  qt/locale/crown_ja.ts \
  qt/locale/crown_pl.ts \
  qt/locale/crown_pt.ts \
  qt/locale/crown_ru.ts \
  qt/locale/crown_sk.ts \
  qt/locale/crown_sv.ts \
  qt/locale/crown_vi.ts \
  qt/locale/crown_zh_CN.ts \
  qt/locale/crown_zh_TW.ts
22
23
24
25
26

QT_FORMS_UI = \
  qt/forms/addressbookpage.ui \
  qt/forms/askpassphrasedialog.ui \
  qt/forms/coincontroldialog.ui \
UdjinM6's avatar
UdjinM6 committed
27
  qt/forms/darksendconfig.ui \
28
29
30
31
32
33
34
35
36
37
38
39
  qt/forms/editaddressdialog.ui \
  qt/forms/helpmessagedialog.ui \
  qt/forms/intro.ui \
  qt/forms/openuridialog.ui \
  qt/forms/optionsdialog.ui \
  qt/forms/overviewpage.ui \
  qt/forms/receivecoinsdialog.ui \
  qt/forms/receiverequestdialog.ui \
  qt/forms/rpcconsole.ui \
  qt/forms/sendcoinsdialog.ui \
  qt/forms/sendcoinsentry.ui \
  qt/forms/signverifymessagedialog.ui \
40
  qt/forms/thronelist.ui \
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  qt/forms/transactiondescdialog.ui

QT_MOC_CPP = \
  qt/moc_addressbookpage.cpp \
  qt/moc_addresstablemodel.cpp \
  qt/moc_askpassphrasedialog.cpp \
  qt/moc_bitcoinaddressvalidator.cpp \
  qt/moc_bitcoinamountfield.cpp \
  qt/moc_bitcoingui.cpp \
  qt/moc_bitcoinunits.cpp \
  qt/moc_clientmodel.cpp \
  qt/moc_coincontroldialog.cpp \
  qt/moc_coincontroltreewidget.cpp \
  qt/moc_csvmodelwriter.cpp \
55
  qt/moc_darksendconfig.cpp \
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  qt/moc_editaddressdialog.cpp \
  qt/moc_guiutil.cpp \
  qt/moc_intro.cpp \
  qt/moc_macdockiconhandler.cpp \
  qt/moc_macnotificationhandler.cpp \
  qt/moc_notificator.cpp \
  qt/moc_openuridialog.cpp \
  qt/moc_optionsdialog.cpp \
  qt/moc_optionsmodel.cpp \
  qt/moc_overviewpage.cpp \
  qt/moc_peertablemodel.cpp \
  qt/moc_paymentserver.cpp \
  qt/moc_qvalidatedlineedit.cpp \
  qt/moc_qvaluecombobox.cpp \
  qt/moc_receivecoinsdialog.cpp \
  qt/moc_receiverequestdialog.cpp \
  qt/moc_recentrequeststablemodel.cpp \
  qt/moc_rpcconsole.cpp \
  qt/moc_sendcoinsdialog.cpp \
  qt/moc_sendcoinsentry.cpp \
  qt/moc_signverifymessagedialog.cpp \
  qt/moc_splashscreen.cpp \
78
  qt/moc_thronelist.cpp \
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
  qt/moc_trafficgraphwidget.cpp \
  qt/moc_transactiondesc.cpp \
  qt/moc_transactiondescdialog.cpp \
  qt/moc_transactionfilterproxy.cpp \
  qt/moc_transactiontablemodel.cpp \
  qt/moc_transactionview.cpp \
  qt/moc_utilitydialog.cpp \
  qt/moc_walletframe.cpp \
  qt/moc_walletmodel.cpp \
  qt/moc_walletview.cpp

BITCOIN_MM = \
  qt/macdockiconhandler.mm \
  qt/macnotificationhandler.mm

QT_MOC = \
infernoman's avatar
infernoman committed
95
  qt/crown.moc \
96
  qt/bitcoinamountfield.moc \
97
98
99
100
  qt/intro.moc \
  qt/overviewpage.moc \
  qt/rpcconsole.moc

infernoman's avatar
infernoman committed
101
102
QT_QRC_CPP = qt/qrc_crown.cpp
QT_QRC = qt/crown.qrc
infernoman's avatar
infernoman committed
103
104
QT_QRC_LOCALE_CPP = qt/qrc_crown_locale.cpp
QT_QRC_LOCALE = qt/crown_locale.qrc
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

PROTOBUF_CC = qt/paymentrequest.pb.cc
PROTOBUF_H = qt/paymentrequest.pb.h
PROTOBUF_PROTO = qt/paymentrequest.proto

BITCOIN_QT_H = \
  qt/addressbookpage.h \
  qt/addresstablemodel.h \
  qt/askpassphrasedialog.h \
  qt/bitcoinaddressvalidator.h \
  qt/bitcoinamountfield.h \
  qt/bitcoingui.h \
  qt/bitcoinunits.h \
  qt/clientmodel.h \
  qt/coincontroldialog.h \
  qt/coincontroltreewidget.h \
  qt/csvmodelwriter.h \
122
  qt/darksendconfig.h \
123
124
125
126
127
128
  qt/editaddressdialog.h \
  qt/guiconstants.h \
  qt/guiutil.h \
  qt/intro.h \
  qt/macdockiconhandler.h \
  qt/macnotificationhandler.h \
129
  qt/networkstyle.h \
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  qt/notificator.h \
  qt/openuridialog.h \
  qt/optionsdialog.h \
  qt/optionsmodel.h \
  qt/overviewpage.h \
  qt/paymentrequestplus.h \
  qt/paymentserver.h \
  qt/peertablemodel.h \
  qt/qvalidatedlineedit.h \
  qt/qvaluecombobox.h \
  qt/receivecoinsdialog.h \
  qt/receiverequestdialog.h \
  qt/recentrequeststablemodel.h \
  qt/rpcconsole.h \
  qt/sendcoinsdialog.h \
  qt/sendcoinsentry.h \
  qt/signverifymessagedialog.h \
  qt/splashscreen.h \
148
  qt/thronelist.h \
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
  qt/trafficgraphwidget.h \
  qt/transactiondesc.h \
  qt/transactiondescdialog.h \
  qt/transactionfilterproxy.h \
  qt/transactionrecord.h \
  qt/transactiontablemodel.h \
  qt/transactionview.h \
  qt/utilitydialog.h \
  qt/walletframe.h \
  qt/walletmodel.h \
  qt/walletmodeltransaction.h \
  qt/walletview.h \
  qt/winshutdownmonitor.h

RES_ICONS = \
  qt/res/icons/add.png \
  qt/res/icons/address-book.png \
  qt/res/icons/bitcoin.ico \
  qt/res/icons/bitcoin.png \
  qt/res/icons/bitcoin_testnet.ico \
  qt/res/icons/bitcoin_testnet.png \
UdjinM6's avatar
UdjinM6 committed
170
  qt/res/icons/browse.png \
171
172
173
174
175
176
177
178
179
180
181
182
  qt/res/icons/clock1.png \
  qt/res/icons/clock2.png \
  qt/res/icons/clock3.png \
  qt/res/icons/clock4.png \
  qt/res/icons/clock5.png \
  qt/res/icons/configure.png \
  qt/res/icons/connect0_16.png \
  qt/res/icons/connect1_16.png \
  qt/res/icons/connect2_16.png \
  qt/res/icons/connect3_16.png \
  qt/res/icons/connect4_16.png \
  qt/res/icons/debugwindow.png \
UdjinM6's avatar
UdjinM6 committed
183
184
185
186
  qt/res/icons/drkblue_editpaste.png \
  qt/res/icons/drkblue_address-book.png \
  qt/res/icons/drkblue_editcopy.png \
  qt/res/icons/drkblue_remove.png \
187
188
189
190
  qt/res/icons/edit.png \
  qt/res/icons/editcopy.png \
  qt/res/icons/editpaste.png \
  qt/res/icons/export.png \
191
192
193
  qt/res/icons/eye.png \
  qt/res/icons/eye_minus.png \
  qt/res/icons/eye_plus.png \
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  qt/res/icons/filesave.png \
  qt/res/icons/history.png \
  qt/res/icons/key.png \
  qt/res/icons/lock_closed.png \
  qt/res/icons/lock_open.png \
  qt/res/icons/overview.png \
  qt/res/icons/qrcode.png \
  qt/res/icons/quit.png \
  qt/res/icons/receive.png \
  qt/res/icons/remove.png \
  qt/res/icons/send.png \
  qt/res/icons/synced.png \
  qt/res/icons/transaction0.png \
  qt/res/icons/transaction2.png \
  qt/res/icons/transaction_conflicted.png \
  qt/res/icons/tx_inout.png \
  qt/res/icons/tx_input.png \
  qt/res/icons/tx_output.png \
212
  qt/res/icons/tx_mined.png \
infernoman's avatar
infernoman committed
213
214
215
  qt/res/icons/unit_crown.png \
  qt/res/icons/unit_mcrown.png \
  qt/res/icons/unit_ucrown.png \
infernoman's avatar
infernoman committed
216
  qt/res/icons/unit_crowns.png \
infernoman's avatar
infernoman committed
217
218
219
  qt/res/icons/unit_tcrown.png \
  qt/res/icons/unit_tmcrown.png \
  qt/res/icons/unit_tucrown.png \
infernoman's avatar
infernoman committed
220
  qt/res/icons/unit_tcrowns.png
221
222
223
224
225
226
227
228
229
230

BITCOIN_QT_CPP = \
  qt/bitcoinaddressvalidator.cpp \
  qt/bitcoinamountfield.cpp \
  qt/bitcoingui.cpp \
  qt/bitcoinunits.cpp \
  qt/clientmodel.cpp \
  qt/csvmodelwriter.cpp \
  qt/guiutil.cpp \
  qt/intro.cpp \
231
  qt/networkstyle.cpp \
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
  qt/notificator.cpp \
  qt/optionsdialog.cpp \
  qt/optionsmodel.cpp \
  qt/peertablemodel.cpp \
  qt/qvalidatedlineedit.cpp \
  qt/qvaluecombobox.cpp \
  qt/rpcconsole.cpp \
  qt/splashscreen.cpp \
  qt/trafficgraphwidget.cpp \
  qt/utilitydialog.cpp \
  qt/winshutdownmonitor.cpp

if ENABLE_WALLET
BITCOIN_QT_CPP += \
  qt/addressbookpage.cpp \
  qt/addresstablemodel.cpp \
  qt/askpassphrasedialog.cpp \
  qt/coincontroldialog.cpp \
  qt/coincontroltreewidget.cpp \
251
  qt/darksendconfig.cpp \
252
253
254
255
256
257
258
259
260
261
262
  qt/editaddressdialog.cpp \
  qt/openuridialog.cpp \
  qt/overviewpage.cpp \
  qt/paymentrequestplus.cpp \
  qt/paymentserver.cpp \
  qt/receivecoinsdialog.cpp \
  qt/receiverequestdialog.cpp \
  qt/recentrequeststablemodel.cpp \
  qt/sendcoinsdialog.cpp \
  qt/sendcoinsentry.cpp \
  qt/signverifymessagedialog.cpp \
263
  qt/thronelist.cpp \
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
  qt/transactiondesc.cpp \
  qt/transactiondescdialog.cpp \
  qt/transactionfilterproxy.cpp \
  qt/transactionrecord.cpp \
  qt/transactiontablemodel.cpp \
  qt/transactionview.cpp \
  qt/walletframe.cpp \
  qt/walletmodel.cpp \
  qt/walletmodeltransaction.cpp \
  qt/walletview.cpp
endif

RES_IMAGES = \
  qt/res/images/about.png \
  qt/res/images/splash.png \
279
  qt/res/images/splash_testnet.png \
infernoman's avatar
infernoman committed
280
  qt/res/images/crown_logo_horizontal.png \
281
282
283
284
285
286
287
288
289
290
291
  qt/res/images/drkblue_downArrow.png \
  qt/res/images/drkblue_downArrow_small.png \
  qt/res/images/drkblue_upArrow_small.png \
  qt/res/images/drkblue_leftArrow_small.png \
  qt/res/images/drkblue_rightArrow_small.png \
  qt/res/images/drkblue_qtreeview_selected.png \
  qt/res/images/drkblue_walletFrame_bg.png \
  qt/res/images/drkblue_walletFrame.png

RES_CSS = \
  qt/res/css/drkblue.css
292
293
294

RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)

infernoman's avatar
infernoman committed
295
BITCOIN_RC = qt/res/crown-qt-res.rc
296

Cory Fields's avatar
Cory Fields committed
297
298
299
300
301
302
BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
  -I$(builddir)/qt/forms

qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
  $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)

303
qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
UdjinM6's avatar
UdjinM6 committed
304
  $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES)
305
306

nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
307
  $(PROTOBUF_H) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP)
308
309
310
311
312
313
314

# forms/foo.h -> forms/ui_foo.h
QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))

# Most files will depend on the forms and moc files as includes. Generate them
# before anything else.
$(QT_MOC): $(QT_FORMS_H)
infernoman's avatar
infernoman committed
315
$(qt_libbitcoinqt_a_OBJECTS) $(qt_crown_qt_OBJECTS) : | $(QT_MOC)
316
317
318
319
320
321

#Generating these with a half-written protobuf header leads to wacky results.
#This makes sure it's done.
$(QT_MOC): $(PROTOBUF_H)
$(QT_MOC_CPP): $(PROTOBUF_H)

infernoman's avatar
infernoman committed
322
# crown-qt binary #
infernoman's avatar
infernoman committed
323
qt_crown_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
Cory Fields's avatar
Cory Fields committed
324
325
  $(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)

infernoman's avatar
infernoman committed
326
qt_crown_qt_SOURCES = qt/crown.cpp
327
if TARGET_DARWIN
infernoman's avatar
infernoman committed
328
  qt_crown_qt_SOURCES += $(BITCOIN_MM)
329
330
endif
if TARGET_WINDOWS
infernoman's avatar
infernoman committed
331
  qt_crown_qt_SOURCES += $(BITCOIN_RC)
332
endif
infernoman's avatar
infernoman committed
333
qt_crown_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
334
if ENABLE_WALLET
infernoman's avatar
infernoman committed
335
qt_crown_qt_LDADD += $(LIBBITCOIN_WALLET)
336
endif
infernoman's avatar
infernoman committed
337
qt_crown_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
338
  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
infernoman's avatar
infernoman committed
339
340
qt_crown_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
qt_crown_qt_LIBTOOLFLAGS = --tag CXX
341
342
343
344
345
346

#locale/foo.ts -> locale/foo.qm
QT_QM=$(QT_TS:.ts=.qm)

.SECONDARY: $(QT_QM)

Infernoman's avatar
Infernoman committed
347
qt/crownstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES)
348
	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
349
	$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^
350

Infernoman's avatar
Infernoman committed
351
translate: qt/crownstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
352
	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
infernoman's avatar
infernoman committed
353
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/crown_en.ts
354

355
$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
356
	@test -f $(RCC)
357
	@test -f $(@D)/$(<F) || cp -f $< $(@D)
infernoman's avatar
infernoman committed
358
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name crown_locale $(@D)/$(<F) | \
359
360
	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@

UdjinM6's avatar
UdjinM6 committed
361
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES) $(PROTOBUF_H)
362
	@test -f $(RCC)
infernoman's avatar
infernoman committed
363
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name crown $< | \
364
	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
365
366
367
368
369

CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno

CLEANFILES += $(CLEAN_QT)

infernoman's avatar
infernoman committed
370
371
crown_qt_clean: FORCE
	rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_crown_qt_OBJECTS) qt/crown-qt$(EXEEXT) $(LIBBITCOINQT)
372

infernoman's avatar
infernoman committed
373
crown_qt : qt/crown-qt$(EXEEXT)
374
375

ui_%.h: %.ui
376
377
378
	@test -f $(UIC)
	@$(MKDIR_P) $(@D)
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false)
379
380

%.moc: %.cpp
381
382
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
383
384

moc_%.cpp: %.h
385
386
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
387
388

%.qm: %.ts
389
390
391
	@test -f $(LRELEASE)
	@$(MKDIR_P) $(@D)
	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@