5 CCACHE
= $$
system(which ccache
)
7 message("using ccache")
13 OBJECTS_DIR
= $$OUT_PWD
/build
/o
14 UI_DIR
= $$OUT_PWD
/build
/ui
15 MOC_DIR
= $$OUT_PWD
/build
/moc
16 RCC_DIR
= $$OUT_PWD
/build
/rcc
18 # check version of Qt installation
19 VER
= $$
find(QT_VERSION
, ^
4\
.[3-9]+.*)
21 !isEmpty(QT_VERSION
) error("Qt found:" $$
[QT_VERSION
])
22 error("Qt >= 4.3 required!")
24 message("Qt version used:" $$VER
)
26 RBBASE_DIR
= $$_PRO_FILE_PWD_
27 RBBASE_DIR
= $$
replace(RBBASE_DIR
,/rbutil
/rbutilqt
,)
29 message("Rockbox Base dir: "$$RBBASE_DIR
)
31 # add a custom rule for pre-building librbspeex
33 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/tools
/rbspeex librbspeex
.a
36 rbspeex
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/tools
/rbspeex librbspeex
-universal
38 QMAKE_EXTRA_TARGETS
+= rbspeex
39 PRE_TARGETDEPS
+= rbspeex
41 # rule for creating ctags file
42 tags
.commands
= ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q $
(SOURCES
)
43 tags
.depends
= $
(SOURCES
)
44 QMAKE_EXTRA_TARGETS
+= tags
46 # add a custom rule for making the translations
47 lrelease
.commands
= $$
[QT_INSTALL_BINS
]/lrelease
-silent $$_PRO_FILE_
48 QMAKE_EXTRA_TARGETS
+= lrelease
50 PRE_TARGETDEPS
+= lrelease
53 #custom rules for libucl.a
55 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/tools
/ucl
/src libucl
.a
58 libucl
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/tools
/ucl
/src libucl
-universal
60 QMAKE_EXTRA_TARGETS
+= libucl
61 PRE_TARGETDEPS
+= libucl
63 #custom rules for libmkamsboot.a
65 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot
.a
68 libmkamsboot
.commands
= @$
(MAKE
) TARGET_DIR
=$$OUT_PWD
/ -C $$RBBASE_DIR
/rbutil
/mkamsboot libmkamsboot
-universal
70 QMAKE_EXTRA_TARGETS
+= libmkamsboot
71 PRE_TARGETDEPS
+= libmkamsboot
73 SOURCES
+= rbutilqt
.cpp \
80 base
/zipinstaller
.cpp \
81 progressloggergui
.cpp \
82 installtalkwindow
.cpp \
84 base
/talkgenerator
.cpp \
85 base
/autodetection
.cpp \
86 ../ipodpatcher
/ipodpatcher
.c \
87 ../sansapatcher
/sansapatcher
.c \
88 ../chinachippatcher
/chinachip
.c \
90 themesinstallwindow
.cpp \
97 base
/encttssettings
.cpp \
99 ../../tools
/wavtrim
.c \
100 ../../tools
/voicefont
.c \
102 createvoicewindow
.cpp \
103 base
/rbsettings
.cpp \
109 base
/bootloaderinstallbase
.cpp \
110 base
/bootloaderinstallmi4
.cpp \
111 base
/bootloaderinstallhex
.cpp \
112 base
/bootloaderinstallipod
.cpp \
113 base
/bootloaderinstallsansa
.cpp \
114 base
/bootloaderinstallfile
.cpp \
115 base
/bootloaderinstallchinachip
.cpp \
116 base
/bootloaderinstallams
.cpp \
117 ../../tools
/mkboot
.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 \
156 ../../tools
/wavtrim
.h \
157 ../../tools
/voicefont
.h \
159 createvoicewindow
.h \
166 base
/bootloaderinstallbase
.h \
167 base
/bootloaderinstallmi4
.h \
168 base
/bootloaderinstallhex
.h \
169 base
/bootloaderinstallipod
.h \
170 base
/bootloaderinstallsansa
.h \
171 base
/bootloaderinstallfile
.h \
172 base
/bootloaderinstallchinachip
.h \
173 base
/bootloaderinstallams
.h \
174 ../../tools
/mkboot
.h \
177 # Needed by QT on Win
178 INCLUDEPATH
= $$_PRO_FILE_PWD_ $$_PRO_FILE_PWD_
/irivertools $$_PRO_FILE_PWD_
/zip $$_PRO_FILE_PWD_
/zlib $$_PRO_FILE_PWD_
/base
179 INCLUDEPATH
+= $$RBBASE_DIR
/rbutil
/ipodpatcher $$RBBASE_DIR
/rbutil
/sansapatcher $$RBBASE_DIR
/tools
/rbspeex $$RBBASE_DIR
/tools
181 LIBS
+= -L$$OUT_PWD
-lrbspeex
-lmkamsboot
-lucl
185 CONFIG
+= debug thread qt warn_on
186 DEFINES
-= QT_NO_DEBUG_OUTPUT
190 CONFIG
+= release thread qt
191 DEFINES
-= QT_NO_DEBUG_OUTPUT
198 FORMS
+= rbutilqtfrm
.ui \
201 progressloggerfrm
.ui \
203 browsedirtreefrm
.ui \
205 themesinstallfrm
.ui \
212 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
.qrc
214 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-win
.qrc
217 RESOURCES
+= $$_PRO_FILE_PWD_
/rbutilqt
-lang
.qrc
220 TRANSLATIONS
+= lang
/rbutil_de
.ts \
228 lang
/rbutil_pt_BR
.ts \
230 lang
/rbutil_zh_CN
.ts \
231 lang
/rbutil_zh_TW
.ts \
235 DEFINES
+= RBUTIL _LARGEFILE64_SOURCE
238 SOURCES
+= ../ipodpatcher
/ipodio
-win32
.c
239 SOURCES
+= ../ipodpatcher
/ipodio
-win32
-scsi
.c
240 SOURCES
+= ../sansapatcher
/sansaio
-win32
.c
241 RC_FILE
= rbutilqt
.rc
242 LIBS
+= -lsetupapi
-lnetapi32
246 SOURCES
+= ../ipodpatcher
/ipodio
-posix
.c
247 SOURCES
+= ../sansapatcher
/sansaio
-posix
.c
249 unix
:!static
:!libusb1
{
252 unix
:!static
:libusb1
{
258 # force statically linking of libusb. Libraries that are appended
259 # later will get linked dynamically again.
260 LIBS
+= -Wl
,-Bstatic
-lusb
-Wl
,-Bdynamic
264 QMAKE_MAC_SDK
=/Developer
/SDKs
/MacOSX10
.4u
.sdk
265 QMAKE_LFLAGS_PPC
=-mmacosx
-version
-min
=10.4 -arch ppc
266 QMAKE_LFLAGS_X86
=-mmacosx
-version
-min
=10.4 -arch i386
268 LIBS
+= -L
/usr
/local
/lib
-framework IOKit
269 INCLUDEPATH
+= /usr
/local
/include
270 QMAKE_INFO_PLIST
= Info
.plist
271 RC_FILE
= icons
/rbutilqt
.icns
273 # rule for creating a dmg file
274 dmg
.commands
= hdiutil create
-ov
-srcfolder rbutilqt
.app
/ rbutil
.dmg
275 QMAKE_EXTRA_TARGETS
+= dmg
279 QTPLUGIN
+= qtaccessiblewidgets
280 LIBS
+= -L$$
(QT_BUILD_TREE
)/plugins
/accessible
-lqtaccessiblewidgets
283 message("using static plugin")
287 target
.path
= /usr
/local
/bin