When building a static linux binary link libusb static.
[Rockbox.git] / rbutil / rbutilqt / rbutilqt.pro
blobb95eee40b924aac73aec626af416037d36db9084
1 unix:!mac {
2 CCACHE = $$system(which ccache)
3 !isEmpty(CCACHE) {
4 message("using ccache")
5 QMAKE_CXX = ccache g++
6 QMAKE_CC = ccache gcc
10 OBJECTS_DIR = build/o
11 UI_DIR = build/ui
12 MOC_DIR = build/moc
13 RCC_DIR = build/rcc
15 # add a custom rule for pre-building librbspeex
16 rbspeex.commands = @$(MAKE) -C ../../tools/rbspeex librbspeex.a
17 QMAKE_EXTRA_TARGETS += rbspeex
18 PRE_TARGETDEPS += rbspeex
20 # add a custom rule for making the translations
21 lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent rbutilqt.pro
22 QMAKE_EXTRA_TARGETS += lrelease
23 PRE_TARGETDEPS += lrelease
26 SOURCES += rbutilqt.cpp \
27 main.cpp \
28 install.cpp \
29 httpget.cpp \
30 configure.cpp \
31 zip/zip.cpp \
32 zip/unzip.cpp \
33 installzip.cpp \
34 installbootloader.cpp \
35 progressloggergui.cpp \
36 installtalkwindow.cpp \
37 talkfile.cpp \
38 autodetection.cpp \
39 ../ipodpatcher/ipodpatcher.c \
40 ../sansapatcher/sansapatcher.c \
41 irivertools/irivertools.cpp \
42 irivertools/md5sum.cpp \
43 browsedirtree.cpp \
44 installthemes.cpp \
45 uninstall.cpp \
46 uninstallwindow.cpp \
47 utils.cpp \
48 browseof.cpp \
49 preview.cpp \
50 encoders.cpp \
51 encodersgui.cpp \
52 tts.cpp \
53 ttsgui.cpp \
54 ../../tools/wavtrim.c \
55 ../../tools/voicefont.c \
56 voicefile.cpp \
57 createvoicewindow.cpp \
58 rbsettings.cpp
60 HEADERS += rbutilqt.h \
61 install.h \
62 httpget.h \
63 configure.h \
64 zip/zip.h \
65 zip/unzip.h \
66 zip/zipentry_p.h \
67 zip/unzip_p.h \
68 zip/zip_p.h \
69 version.h \
70 installzip.h \
71 installbootloader.h \
72 installtalkwindow.h \
73 talkfile.h \
74 autodetection.h \
75 progressloggerinterface.h \
76 progressloggergui.h \
77 ../ipodpatcher/ipodpatcher.h \
78 ../ipodpatcher/ipodio.h \
79 ../ipodpatcher/parttypes.h \
80 ../sansapatcher/sansapatcher.h \
81 ../sansapatcher/sansaio.h \
82 irivertools/irivertools.h \
83 irivertools/md5sum.h \
84 irivertools/h100sums.h \
85 irivertools/h120sums.h \
86 irivertools/h300sums.h \
87 irivertools/checksums.h \
88 browsedirtree.h \
89 installthemes.h \
90 uninstall.h \
91 uninstallwindow.h \
92 utils.h \
93 browseof.h \
94 preview.h \
95 encoders.h \
96 encodersgui.h \
97 tts.h \
98 ttsgui.h \
99 ../../tools/wavtrim.h \
100 ../../tools/voicefont.h \
101 voicefile.h \
102 createvoicewindow.h \
103 rbsettings.h
105 # Needed by QT on Win
106 INCLUDEPATH = . irivertools zip zlib ../ipodpatcher ../sansapatcher ../../tools/rbspeex ../../tools
108 LIBS += -L../../tools/rbspeex -lrbspeex
110 TEMPLATE = app
111 dbg {
112 CONFIG += debug thread qt warn_on
113 DEFINES -= QT_NO_DEBUG_OUTPUT
114 message("debug")
116 !dbg {
117 CONFIG += release thread qt
118 DEFINES += QT_NO_DEBUG_OUTPUT
119 message("release")
122 TARGET = rbutilqt
124 FORMS += rbutilqtfrm.ui \
125 aboutbox.ui \
126 installfrm.ui \
127 installprogressfrm.ui \
128 configurefrm.ui \
129 browsedirtreefrm.ui \
130 installtalkfrm.ui \
131 installthemesfrm.ui \
132 uninstallfrm.ui \
133 browseoffrm.ui \
134 previewfrm.ui \
135 rbspeexcfgfrm.ui \
136 encexescfgfrm.ui \
137 ttsexescfgfrm.ui \
138 sapicfgfrm.ui \
139 createvoicefrm.ui
141 RESOURCES += rbutilqt.qrc
142 win32 {
143 RESOURCES += rbutilqt-win.qrc
146 TRANSLATIONS += rbutil_de.ts \
147 rbutil_fr.ts \
148 rbutil_tr.ts \
149 rbutil_zh_CN.ts \
150 rbutil_zh_TW.ts
151 QT += network
152 DEFINES += RBUTIL _LARGEFILE64_SOURCE
154 win32 {
155 SOURCES += ../ipodpatcher/ipodio-win32.c
156 SOURCES += ../sansapatcher/sansaio-win32.c
157 RC_FILE = rbutilqt.rc
158 LIBS += -lsetupapi
161 unix {
162 SOURCES += ../ipodpatcher/ipodio-posix.c
163 SOURCES += ../sansapatcher/sansaio-posix.c
165 unix:!static {
166 LIBS += -lusb
168 unix:static {
169 # force statically linking of libusb. Use gcc to get its path.
170 # if you have libusb.a in a non-standard lib path add it to
171 # the INCLUDEPATH variable above.
172 LIBS += $$system($$QMAKE_CC $$INCLUDEPATH -print-file-name=libusb.a)
175 macx {
176 QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
177 CONFIG+=x86 ppc
178 LIBS += -L/usr/local/lib -framework IOKit
179 INCLUDEPATH += /usr/local/include
180 QMAKE_INFO_PLIST = Info.plist
181 RC_FILE = icons/rbutilqt.icns
184 static {
185 QTPLUGIN += qtaccessiblewidgets
186 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
187 DEFINES += STATIC
188 message("using static plugin")