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 # check for system speex. Add a custom rule for pre-building librbspeex if not found.
33 LIBSPEEX
= $$
system(pkg
-config
--silence
-errors
--libs speex
)
34 !static
:!isEmpty(LIBSPEEX
) {
35 # newer versions of speex are split up into libspeex and libspeexdsp.
36 # avoid checking twice if libspeex is missing.
37 LIBSPEEX
+= $$
system(pkg
-config
--silence
-errors
--libs speexdsp
)
40 # custom rules for rockbox-specific libs
42 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/rbspeex librbspeex
.a
43 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/ucl
/src libucl
.a
44 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot
.a
45 libmktccboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mktccboot libmktccboot
.a
48 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/rbspeex librbspeex
-universal
49 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/ucl
/src libucl
-universal
50 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot
-universal
51 libmktccboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mktccboot libmktccboot
-universal
53 QMAKE_EXTRA_TARGETS
+= rbspeex libucl libmkamsboot libmktccboot
54 PRE_TARGETDEPS
+= rbspeex libucl libmkamsboot libmktccboot
56 # rule for creating ctags file
57 tags
.commands
= ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q $
(SOURCES
)
58 tags
.depends
= $
(SOURCES
)
59 QMAKE_EXTRA_TARGETS
+= tags
61 # add a custom rule for making the translations
62 lrelease
.commands
= $$
[QT_INSTALL_BINS
]/lrelease
-silent $$_PRO_FILE_
63 QMAKE_EXTRA_TARGETS
+= lrelease
65 PRE_TARGETDEPS
+= lrelease
68 SOURCES
+= rbutilqt
.cpp \
75 base
/zipinstaller
.cpp \
76 progressloggergui
.cpp \
77 installtalkwindow
.cpp \
79 base
/talkgenerator
.cpp \
80 base
/autodetection
.cpp \
81 ../ipodpatcher
/ipodpatcher
.c \
82 ../sansapatcher
/sansapatcher
.c \
83 ../chinachippatcher
/chinachip
.c \
85 themesinstallwindow
.cpp \
92 base
/encttssettings
.cpp \
96 base
/ttsfestival
.cpp \
97 ../../tools
/wavtrim
.c \
98 ../../tools
/voicefont
.c \
100 createvoicewindow
.cpp \
101 base
/rbsettings
.cpp \
107 base
/bootloaderinstallbase
.cpp \
108 base
/bootloaderinstallmi4
.cpp \
109 base
/bootloaderinstallhex
.cpp \
110 base
/bootloaderinstallipod
.cpp \
111 base
/bootloaderinstallsansa
.cpp \
112 base
/bootloaderinstallfile
.cpp \
113 base
/bootloaderinstallchinachip
.cpp \
114 base
/bootloaderinstallams
.cpp \
115 base
/bootloaderinstalltcc
.cpp \
116 ../../tools
/mkboot
.c \
117 ../../tools
/iriver
.c \
118 ../../tools
/telechips
.c \
120 HEADERS
+= rbutilqt
.h \
130 base
/zipinstaller
.h \
131 installtalkwindow
.h \
133 base
/talkgenerator
.h \
134 base
/autodetection
.h \
135 base
/progressloggerinterface
.h \
136 progressloggergui
.h \
137 ../ipodpatcher
/ipodpatcher
.h \
138 ../ipodpatcher
/ipodio
.h \
139 ../ipodpatcher
/parttypes
.h \
140 ../sansapatcher
/sansapatcher
.h \
141 ../sansapatcher
/sansaio
.h \
142 ../chinachippatcher
/chinachip
.h \
143 irivertools
/h100sums
.h \
144 irivertools
/h120sums
.h \
145 irivertools
/h300sums
.h \
147 themesinstallwindow
.h \
154 base
/encttssettings
.h \
159 ../../tools
/wavtrim
.h \
160 ../../tools
/voicefont
.h \
162 createvoicewindow
.h \
169 base
/bootloaderinstallbase
.h \
170 base
/bootloaderinstallmi4
.h \
171 base
/bootloaderinstallhex
.h \
172 base
/bootloaderinstallipod
.h \
173 base
/bootloaderinstallsansa
.h \
174 base
/bootloaderinstallfile
.h \
175 base
/bootloaderinstallchinachip
.h \
176 base
/bootloaderinstallams
.h \
177 base
/bootloaderinstalltcc
.h \
178 ../../tools
/mkboot
.h \
179 ../../tools
/iriver
.h \
180 ../../tools
/telechips
.h \
182 # Needed by QT on Win
183 INCLUDEPATH
= $$_PRO_FILE_PWD_ $$_PRO_FILE_PWD_
/irivertools $$_PRO_FILE_PWD_
/zip $$_PRO_FILE_PWD_
/zlib $$_PRO_FILE_PWD_
/base
184 INCLUDEPATH
+= $$RBBASE_DIR
/rbutil
/ipodpatcher $$RBBASE_DIR
/rbutil
/sansapatcher $$RBBASE_DIR
/tools
/rbspeex $$RBBASE_DIR
/tools
186 DEPENDPATH
= $$INCLUDEPATH
188 LIBS
+= -L$$OUT_PWD
-L$$MYBUILDDIR
-lrbspeex
-lmkamsboot
-lmktccboot
-lucl
192 CONFIG
+= debug thread qt warn_on
193 DEFINES
-= QT_NO_DEBUG_OUTPUT
197 CONFIG
+= release thread qt
198 DEFINES
-= QT_NO_DEBUG_OUTPUT
205 FORMS
+= rbutilqtfrm
.ui \
208 progressloggerfrm
.ui \
210 browsedirtreefrm
.ui \
212 themesinstallfrm
.ui \
219 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
.qrc
221 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-win
.qrc
224 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-lang
.qrc
227 TRANSLATIONS
+= lang
/rbutil_cs
.ts \
236 lang
/rbutil_pt_BR
.ts \
238 lang
/rbutil_zh_CN
.ts \
239 lang
/rbutil_zh_TW
.ts \
243 DEFINES
+= RBUTIL _LARGEFILE64_SOURCE
246 SOURCES
+= ../ipodpatcher
/ipodio
-win32
.c
247 SOURCES
+= ../ipodpatcher
/ipodio
-win32
-scsi
.c
248 SOURCES
+= ../sansapatcher
/sansaio
-win32
.c
249 RC_FILE
= rbutilqt
.rc
250 LIBS
+= -lsetupapi
-lnetapi32
254 SOURCES
+= ../ipodpatcher
/ipodio
-posix
.c
255 SOURCES
+= ../sansapatcher
/sansaio
-posix
.c
257 unix
:!static
:!libusb1
{
260 unix
:!static
:libusb1
{
266 # force statically linking of libusb. Libraries that are appended
267 # later will get linked dynamically again.
268 LIBS
+= -Wl
,-Bstatic
-lusb
-Wl
,-Bdynamic
272 QMAKE_MAC_SDK
=/Developer
/SDKs
/MacOSX10
.4u
.sdk
273 QMAKE_LFLAGS_PPC
=-mmacosx
-version
-min
=10.4 -arch ppc
274 QMAKE_LFLAGS_X86
=-mmacosx
-version
-min
=10.4 -arch i386
276 LIBS
+= -L
/usr
/local
/lib
-framework IOKit
277 INCLUDEPATH
+= /usr
/local
/include
278 QMAKE_INFO_PLIST
= Info
.plist
279 RC_FILE
= icons
/rbutilqt
.icns
281 # rule for creating a dmg file
282 dmg
.commands
= hdiutil create
-ov
-srcfolder rbutilqt
.app
/ rbutil
.dmg
283 QMAKE_EXTRA_TARGETS
+= dmg
287 QTPLUGIN
+= qtaccessiblewidgets
288 LIBS
+= -L$$
(QT_BUILD_TREE
)/plugins
/accessible
-lqtaccessiblewidgets
291 message("using static plugin")
295 target
.path
= /usr
/local
/bin