4 CCACHE
= $$
system(which ccache
)
6 message("using ccache")
12 MYBUILDDIR
= $$OUT_PWD
/build
/
13 OBJECTS_DIR
= $$MYBUILDDIR
/o
14 UI_DIR
= $$MYBUILDDIR
/ui
15 MOC_DIR
= $$MYBUILDDIR
/moc
16 RCC_DIR
= $$MYBUILDDIR
/rcc
19 # check version of Qt installation
20 VER
= $$
find(QT_VERSION
, ^
4\
.[3-9]+.*)
22 !isEmpty(QT_VERSION
) error("Qt found:" $$
[QT_VERSION
])
23 error("Qt >= 4.3 required!")
25 message("Qt version used:" $$VER
)
27 RBBASE_DIR
= $$_PRO_FILE_PWD_
28 RBBASE_DIR
= $$
replace(RBBASE_DIR
,/rbutil
/rbutilqt
,)
30 message("Rockbox Base dir: "$$RBBASE_DIR
)
32 # custom rules for rockbox-specific libs
37 RBLIBPOSTFIX
= -universal
39 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/rbspeex librbspeex$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
40 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/ucl
/src libucl$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
41 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
42 libmktccboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mktccboot libmktccboot$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
43 QMAKE_EXTRA_TARGETS
+= rbspeex libucl libmkamsboot libmktccboot
44 PRE_TARGETDEPS
+= rbspeex libucl libmkamsboot libmktccboot
46 # rule for creating ctags file
47 tags
.commands
= ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q $
(SOURCES
)
48 tags
.depends
= $
(SOURCES
)
49 QMAKE_EXTRA_TARGETS
+= tags
51 # add a custom rule for making the translations
52 lrelease
.commands
= $$
[QT_INSTALL_BINS
]/lrelease
-silent $$_PRO_FILE_
53 QMAKE_EXTRA_TARGETS
+= lrelease
55 PRE_TARGETDEPS
+= lrelease
58 SOURCES
+= rbutilqt
.cpp \
65 base
/zipinstaller
.cpp \
66 progressloggergui
.cpp \
67 installtalkwindow
.cpp \
69 base
/talkgenerator
.cpp \
70 base
/autodetection
.cpp \
71 ../ipodpatcher
/ipodpatcher
.c \
72 ../sansapatcher
/sansapatcher
.c \
73 ../chinachippatcher
/chinachip
.c \
75 themesinstallwindow
.cpp \
82 base
/encttssettings
.cpp \
86 base
/ttsfestival
.cpp \
87 ../../tools
/wavtrim
.c \
88 ../../tools
/voicefont
.c \
90 createvoicewindow
.cpp \
99 base
/bootloaderinstallbase
.cpp \
100 base
/bootloaderinstallmi4
.cpp \
101 base
/bootloaderinstallhex
.cpp \
102 base
/bootloaderinstallipod
.cpp \
103 base
/bootloaderinstallsansa
.cpp \
104 base
/bootloaderinstallfile
.cpp \
105 base
/bootloaderinstallchinachip
.cpp \
106 base
/bootloaderinstallams
.cpp \
107 base
/bootloaderinstalltcc
.cpp \
108 ../../tools
/mkboot
.c \
109 ../../tools
/iriver
.c \
111 HEADERS
+= rbutilqt
.h \
121 base
/zipinstaller
.h \
122 installtalkwindow
.h \
124 base
/talkgenerator
.h \
125 base
/autodetection
.h \
126 base
/progressloggerinterface
.h \
127 progressloggergui
.h \
128 ../ipodpatcher
/ipodpatcher
.h \
129 ../ipodpatcher
/ipodio
.h \
130 ../ipodpatcher
/parttypes
.h \
131 ../sansapatcher
/sansapatcher
.h \
132 ../sansapatcher
/sansaio
.h \
133 ../chinachippatcher
/chinachip
.h \
134 irivertools
/h100sums
.h \
135 irivertools
/h120sums
.h \
136 irivertools
/h300sums
.h \
138 themesinstallwindow
.h \
145 base
/encttssettings
.h \
150 ../../tools
/wavtrim
.h \
151 ../../tools
/voicefont
.h \
153 createvoicewindow
.h \
162 base
/bootloaderinstallbase
.h \
163 base
/bootloaderinstallmi4
.h \
164 base
/bootloaderinstallhex
.h \
165 base
/bootloaderinstallipod
.h \
166 base
/bootloaderinstallsansa
.h \
167 base
/bootloaderinstallfile
.h \
168 base
/bootloaderinstallchinachip
.h \
169 base
/bootloaderinstallams
.h \
170 base
/bootloaderinstalltcc
.h \
171 ../../tools
/mkboot
.h \
172 ../../tools
/iriver
.h \
174 # Needed by QT on Win
175 INCLUDEPATH
= $$_PRO_FILE_PWD_ $$_PRO_FILE_PWD_
/irivertools $$_PRO_FILE_PWD_
/zip $$_PRO_FILE_PWD_
/zlib $$_PRO_FILE_PWD_
/base
176 INCLUDEPATH
+= $$RBBASE_DIR
/rbutil
/ipodpatcher $$RBBASE_DIR
/rbutil
/sansapatcher $$RBBASE_DIR
/tools
/rbspeex $$RBBASE_DIR
/tools
178 DEPENDPATH
= $$INCLUDEPATH
180 LIBS
+= -L$$OUT_PWD
-L$$MYBUILDDIR
-lrbspeex
-lmkamsboot
-lmktccboot
-lucl
182 # check for system speex. Add a custom rule for pre-building librbspeex if not
183 # found. Newer versions of speex are split up into libspeex and libspeexdsp,
184 # and some distributions package them separately. Check for both and fall back
185 # to librbspeex if not found.
186 # NOTE: keep this after -lrbspeex, otherwise linker errors occur if the linker
187 # defaults to --as-needed (see http://www.gentoo.org/proj/en/qa/asneeded.xml)
188 LIBSPEEX
= $$
system(pkg
-config
--silence
-errors
--libs speex speexdsp
)
189 !static
:!isEmpty(LIBSPEEX
) {
195 CONFIG
+= debug thread qt warn_on
196 DEFINES
-= QT_NO_DEBUG_OUTPUT
200 CONFIG
+= release thread qt
201 DEFINES
-= QT_NO_DEBUG_OUTPUT
206 TARGET
= RockboxUtility
208 FORMS
+= rbutilqtfrm
.ui \
210 installwindowfrm
.ui \
211 progressloggerfrm
.ui \
213 browsedirtreefrm
.ui \
215 themesinstallfrm
.ui \
222 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
.qrc
224 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-win
.qrc
227 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-lang
.qrc
230 TRANSLATIONS
+= lang
/rbutil_cs
.ts \
241 lang
/rbutil_pt_BR
.ts \
244 lang
/rbutil_zh_CN
.ts \
245 lang
/rbutil_zh_TW
.ts \
249 DEFINES
+= RBUTIL _LARGEFILE64_SOURCE
252 SOURCES
+= ../ipodpatcher
/ipodio
-win32
.c
253 SOURCES
+= ../ipodpatcher
/ipodio
-win32
-scsi
.c
254 SOURCES
+= ../sansapatcher
/sansaio
-win32
.c
255 RC_FILE
= rbutilqt
.rc
256 LIBS
+= -lsetupapi
-lnetapi32
260 SOURCES
+= ../ipodpatcher
/ipodio
-posix
.c
261 SOURCES
+= ../sansapatcher
/sansaio
-posix
.c
263 unix
:!static
:!libusb1
{
266 unix
:!static
:libusb1
{
272 # force statically linking of libusb. Libraries that are appended
273 # later will get linked dynamically again.
274 LIBS
+= -Wl
,-Bstatic
-lusb
-Wl
,-Bdynamic
278 SOURCES
+= base
/ttscarbon
.cpp
279 HEADERS
+= base
/ttscarbon
.h
280 QMAKE_MAC_SDK
=/Developer
/SDKs
/MacOSX10
.4u
.sdk
281 QMAKE_LFLAGS_PPC
=-mmacosx
-version
-min
=10.4 -arch ppc
282 QMAKE_LFLAGS_X86
=-mmacosx
-version
-min
=10.4 -arch i386
284 LIBS
+= -L
/usr
/local
/lib
-framework IOKit
-framework CoreFoundation
-framework Carbon
-lz
285 INCLUDEPATH
+= /usr
/local
/include
286 QMAKE_INFO_PLIST
= Info
.plist
287 RC_FILE
= icons
/rbutilqt
.icns
289 # rule for creating a dmg file
290 dmg
.commands
= hdiutil create
-ov
-srcfolder rbutilqt
.app
/ rbutil
.dmg
291 QMAKE_EXTRA_TARGETS
+= dmg
295 QTPLUGIN
+= qtaccessiblewidgets
296 LIBS
+= -L$$
(QT_BUILD_TREE
)/plugins
/accessible
-lqtaccessiblewidgets
299 message("using static plugin")
303 target
.path
= /usr
/local
/bin