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
33 # found. Newer versions of speex are split up into libspeex and libspeexdsp,
34 # and some distributions package them separately. Check for both and fall back
35 # to librbspeex if not found.
36 LIBSPEEX
= $$
system(pkg
-config
--silence
-errors
--libs speex speexdsp
)
37 !static
:!isEmpty(LIBSPEEX
) {
40 # custom rules for rockbox-specific libs
45 RBLIBPOSTFIX
= -universal
47 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/rbspeex librbspeex$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
48 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/tools
/ucl
/src libucl$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
49 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
50 libmktccboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$MYBUILDDIR
-C $$RBBASE_DIR
/rbutil
/mktccboot libmktccboot$$RBLIBPOSTFIX CC
=\"$$QMAKE_CC
\"
51 QMAKE_EXTRA_TARGETS
+= rbspeex libucl libmkamsboot libmktccboot
52 PRE_TARGETDEPS
+= rbspeex libucl libmkamsboot libmktccboot
54 # rule for creating ctags file
55 tags
.commands
= ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q $
(SOURCES
)
56 tags
.depends
= $
(SOURCES
)
57 QMAKE_EXTRA_TARGETS
+= tags
59 # add a custom rule for making the translations
60 lrelease
.commands
= $$
[QT_INSTALL_BINS
]/lrelease
-silent $$_PRO_FILE_
61 QMAKE_EXTRA_TARGETS
+= lrelease
63 PRE_TARGETDEPS
+= lrelease
66 SOURCES
+= rbutilqt
.cpp \
73 base
/zipinstaller
.cpp \
74 progressloggergui
.cpp \
75 installtalkwindow
.cpp \
77 base
/talkgenerator
.cpp \
78 base
/autodetection
.cpp \
79 ../ipodpatcher
/ipodpatcher
.c \
80 ../sansapatcher
/sansapatcher
.c \
81 ../chinachippatcher
/chinachip
.c \
83 themesinstallwindow
.cpp \
90 base
/encttssettings
.cpp \
94 base
/ttsfestival
.cpp \
95 ../../tools
/wavtrim
.c \
96 ../../tools
/voicefont
.c \
98 createvoicewindow
.cpp \
100 base
/serverinfo
.cpp \
101 base
/systeminfo
.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 \
119 HEADERS
+= rbutilqt
.h \
129 base
/zipinstaller
.h \
130 installtalkwindow
.h \
132 base
/talkgenerator
.h \
133 base
/autodetection
.h \
134 base
/progressloggerinterface
.h \
135 progressloggergui
.h \
136 ../ipodpatcher
/ipodpatcher
.h \
137 ../ipodpatcher
/ipodio
.h \
138 ../ipodpatcher
/parttypes
.h \
139 ../sansapatcher
/sansapatcher
.h \
140 ../sansapatcher
/sansaio
.h \
141 ../chinachippatcher
/chinachip
.h \
142 irivertools
/h100sums
.h \
143 irivertools
/h120sums
.h \
144 irivertools
/h300sums
.h \
146 themesinstallwindow
.h \
153 base
/encttssettings
.h \
158 ../../tools
/wavtrim
.h \
159 ../../tools
/voicefont
.h \
161 createvoicewindow
.h \
170 base
/bootloaderinstallbase
.h \
171 base
/bootloaderinstallmi4
.h \
172 base
/bootloaderinstallhex
.h \
173 base
/bootloaderinstallipod
.h \
174 base
/bootloaderinstallsansa
.h \
175 base
/bootloaderinstallfile
.h \
176 base
/bootloaderinstallchinachip
.h \
177 base
/bootloaderinstallams
.h \
178 base
/bootloaderinstalltcc
.h \
179 ../../tools
/mkboot
.h \
180 ../../tools
/iriver
.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 \
207 installwindowfrm
.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 \
238 lang
/rbutil_pt_BR
.ts \
241 lang
/rbutil_zh_CN
.ts \
242 lang
/rbutil_zh_TW
.ts \
246 DEFINES
+= RBUTIL _LARGEFILE64_SOURCE
249 SOURCES
+= ../ipodpatcher
/ipodio
-win32
.c
250 SOURCES
+= ../ipodpatcher
/ipodio
-win32
-scsi
.c
251 SOURCES
+= ../sansapatcher
/sansaio
-win32
.c
252 RC_FILE
= rbutilqt
.rc
253 LIBS
+= -lsetupapi
-lnetapi32
257 SOURCES
+= ../ipodpatcher
/ipodio
-posix
.c
258 SOURCES
+= ../sansapatcher
/sansaio
-posix
.c
260 unix
:!static
:!libusb1
{
263 unix
:!static
:libusb1
{
269 # force statically linking of libusb. Libraries that are appended
270 # later will get linked dynamically again.
271 LIBS
+= -Wl
,-Bstatic
-lusb
-Wl
,-Bdynamic
275 QMAKE_MAC_SDK
=/Developer
/SDKs
/MacOSX10
.4u
.sdk
276 QMAKE_LFLAGS_PPC
=-mmacosx
-version
-min
=10.4 -arch ppc
277 QMAKE_LFLAGS_X86
=-mmacosx
-version
-min
=10.4 -arch i386
279 LIBS
+= -L
/usr
/local
/lib
-framework IOKit
-framework CoreFoundation
-lz
280 INCLUDEPATH
+= /usr
/local
/include
281 QMAKE_INFO_PLIST
= Info
.plist
282 RC_FILE
= icons
/rbutilqt
.icns
284 # rule for creating a dmg file
285 dmg
.commands
= hdiutil create
-ov
-srcfolder rbutilqt
.app
/ rbutil
.dmg
286 QMAKE_EXTRA_TARGETS
+= dmg
290 QTPLUGIN
+= qtaccessiblewidgets
291 LIBS
+= -L$$
(QT_BUILD_TREE
)/plugins
/accessible
-lqtaccessiblewidgets
294 message("using static plugin")
298 target
.path
= /usr
/local
/bin