1 # -*- mode: makefile -*-
2 ######################################################################
3 # Copyright 2015 Mats Sjöberg
5 # This file is part of the Pumpa programme.
7 # Pumpa 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 3 of the License, or
10 # (at your option) any later version.
12 # Pumpa is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Pumpa. If not, see <http://www.gnu.org/licenses/>.
19 ######################################################################
23 RESOURCES
+= pumpa
.qrc
26 QT
+= core gui network
28 # To enable debug mode, run as:
33 # To disable libtidy (not recommended), run as:
34 # qmake CONFIG+=notidy
35 # or uncomment this line:
38 CONFIG(release
, debug
|release
) {
39 message("Release mode on")
41 message("Debug mode on")
43 # Enable debugging output for different things
44 # DEFINES += DEBUG_QAS
46 # DEFINES += DEBUG_NET_MOAR
47 # DEFINES += DEBUG_NET_EVEN_MOAR
48 DEFINES
+= DEBUG_MEMORY
49 DEFINES
+= DEBUG_MARKUP
50 # DEFINES += DEBUG_WIDGETS
51 DEFINES
+= DEBUG_BUTTONS
55 message("Enabling dbus")
61 RC_FILE
= win32
/pumpa
.rc
65 ICON
= $$
{PWD
}/icons
/pumpa
.icns
68 lessThan(QT_MAJOR_VERSION
, 5) {
69 message("Configuring for Qt 4")
74 greaterThan(QT_MAJOR_VERSION
, 4) {
75 message("Configuring for Qt 5")
81 message("Disabling libtidy")
84 message("Using libtidy")
86 exists( /usr
/include
/tidy
/tidy
.h
) {
87 DEFINES
+= USE_TIDY_TIDY
88 } else
:exists( /usr
/include
/tidy
.h
) {
90 } else
:exists( /usr
/local
/include
/tidy
.h
) {
92 } else
:exists( /usr
/local
/include
/tidy
/tidy
.h
) {
93 DEFINES
+= USE_TIDY_TIDY
95 error("Unable to find libtidy header files for compiling! Install libtidy-dev (Debian, Ubuntu) or libtidy-devel (Fedora).")
99 # Optional spell checking support with libaspell
100 exists( /usr
/include
/aspell
.h
)|exists( /usr
/local
/include
/aspell
.h
) {
101 message("Using aspell")
103 DEFINES
+= USE_ASPELL
105 warning("Unable to find libaspell header files for compiling. Install libaspell-dev (Debian, Ubuntu) if you want to enable spell-checking.")
108 # Optionally use etags
109 exists( /usr
/bin
/etags
) {
110 message("Using etags")
111 PRE_TARGETDEPS
+= etags
115 ######################################################################
117 ######################################################################
122 OBJECT_HEADERS
= pumpapp
.h qactivitystreams
.h aswidget
.h \
123 collectionwidget
.h contextwidget
.h json
.h messagewindow
.h \
124 messageedit
.h messagerecipients
.h fancyhighlighter
.h \
125 qaspell
.h actorwidget
.h filedownloader
.h richtextlabel
.h \
126 oauthwizard
.h tabwidget
.h util
.h pumpasettingsdialog
.h \
127 pumpasettings
.h activitywidget
.h objectwidget
.h \
128 shortobjectwidget
.h fullobjectwidget
.h imagelabel
.h \
129 texttoolbutton
.h objectwidgetwithsignals
.h objectlistwidget
.h \
130 qasabstractobject
.h qasobject
.h qasactor
.h qasactivity
.h \
131 qasobjectlist
.h qasactorlist
.h qascollection
.h \
132 qasabstractobjectlist
.h editprofiledialog
.h
134 OBJECT_SOURCES
= $$
replace(OBJECT_HEADERS
, \\.h
, .cpp
)
135 OBJECT_ALL
= $$OBJECT_HEADERS $$OBJECT_SOURCES
137 SUNDOWN_HEADERS
= sundown
/markdown
.h sundown
/html
.h sundown
/buffer
.h
139 SUNDOWN_SOURCES
= sundown
/autolink
.c sundown
/buffer
.c \
140 sundown
/houdini_href_e
.c sundown
/houdini_html_e
.c \
141 sundown
/html
.c sundown
/markdown
.c sundown
/stack
.c
143 HEADERS
+= $$OBJECT_HEADERS $$SUNDOWN_HEADERS pumpa_defines
.h
145 SOURCES
+= $$OBJECT_SOURCES $$SUNDOWN_SOURCES
147 ######################################################################
149 ######################################################################
152 translations
/pumpa_es
.ts \
153 translations
/pumpa_fr
.ts \
154 translations
/pumpa_nvi
.ts \
155 translations
/pumpa_en
.ts \
156 translations
/pumpa_it
.ts \
157 translations
/pumpa_de
.ts \
158 translations
/pumpa_ru
.ts \
159 translations
/pumpa_fi
.ts
161 ######################################################################
163 ######################################################################
165 INCLUDEPATH
+= src
/kQOAuth
168 PUBLIC_HEADERS
+= kqoauthmanager
.h \
171 kqoauthrequest_xauth
.h \
174 PRIVATE_HEADERS
+= kqoauthrequest_p
.h \
176 kqoauthauthreplyserver
.h \
177 kqoauthauthreplyserver_p
.h \
179 kqoauthrequest_xauth_p
.h
189 kqoauthauthreplyserver
.cpp \
190 kqoauthrequest_1
.cpp \
191 kqoauthrequest_xauth
.cpp
193 ######################################################################
195 ######################################################################
201 BINDIR
= $$PREFIX
/bin
202 DATADIR
=$$PREFIX
/share
204 INSTALLS
+= target desktop icon16 icon24 icon32 icon64 icon96 \
205 icon128 icon256 icon512
207 target
.path
=$$BINDIR
209 desktop
.path
= $$DATADIR
/applications
210 desktop
.files
+= $$
{TARGET
}.desktop
212 icon16
.path
= $$DATADIR
/icons
/hicolor
/16x16
/apps
213 icon16
.files
+= icons
/16x16
/$$
{TARGET
}.png
215 icon24
.path
= $$DATADIR
/icons
/hicolor
/24x24
/apps
216 icon24
.files
+= icons
/24x24
/$$
{TARGET
}.png
218 icon32
.path
= $$DATADIR
/icons
/hicolor
/32x32
/apps
219 icon32
.files
+= icons
/32x32
/$$
{TARGET
}.png
221 icon64
.path
= $$DATADIR
/icons
/hicolor
/64x64
/apps
222 icon64
.files
+= icons
/64x64
/$$
{TARGET
}.png
224 icon96
.path
= $$DATADIR
/icons
/hicolor
/96x96
/apps
225 icon96
.files
+= icons
/96x96
/$$
{TARGET
}.png
227 icon128
.path
= $$DATADIR
/icons
/hicolor
/128x128
/apps
228 icon128
.files
+= icons
/128x128
/$$
{TARGET
}.png
230 icon256
.path
= $$DATADIR
/icons
/hicolor
/256x256
/apps
231 icon256
.files
+= icons
/256x256
/$$
{TARGET
}.png
233 icon512
.path
= $$DATADIR
/icons
/hicolor
/512x512
/apps
234 icon512
.files
+= icons
/512x512
/$$
{TARGET
}.png
238 # target.path = /usr/bin
241 ######################################################################
242 # Generate documentation
243 ######################################################################
246 doc
.commands
= markdown README
> pumpa
.html
; cp README ~
/dev
/web
/_includes
/README
.pumpa
247 QMAKE_EXTRA_TARGETS
+= doc
250 ######################################################################
251 # Generate TAGS for GNU Emacs and others
252 ######################################################################
254 ETAGS_INPUTS
= $$
join(OBJECT_ALL
, " src/", "src/")
255 etags
.depends
= $$
split($$ETAGS_INPUTS
)
256 etags
.commands
= etags
-o src
/TAGS $$ETAGS_INPUTS
257 QMAKE_EXTRA_TARGETS
+= etags
259 ######################################################################
260 # Extra stuff to clean up
261 ######################################################################
263 QMAKE_CLEAN
+= $DOC_TARGETS src
/TAGS