rbutil/rbspeex: alway run make clean before building librbspeex for a specific arch.
[kugel-rb.git] / rbutil / rbutilqt / rbutilqt.pro
blob3f5e6ffa7c81d9810fc6d805b6944b4fb3d61bd0
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 !mac {
17 rbspeex.commands = @$(MAKE) -C ../../tools/rbspeex librbspeex.a
18 QMAKE_EXTRA_TARGETS += rbspeex
19 PRE_TARGETDEPS += rbspeex
21 mac {
22 rbspeex0.commands = @$(MAKE) -C ../../tools/rbspeex clean
23 rbspeex1.commands = @$(MAKE) -C ../../tools/rbspeex ARCH=ppc librbspeexppc.a
24 rbspeex2.commands = @$(MAKE) -C ../../tools/rbspeex clean
25 rbspeex3.commands = @$(MAKE) -C ../../tools/rbspeex ARCH=i386 librbspeexi386.a
26 rbspeex4.commands = @$(MAKE) -C ../../tools/rbspeex universal
27 rbspeex2.depends = rbspeex1
28 rbspeex3.depends = rbspeex2
29 rbspeex4.depends = rbspeex3
30 QMAKE_EXTRA_TARGETS += rbspeex1 rbspeex2 rbspeex3 rbspeex4
31 PRE_TARGETDEPS += rbspeex1 rbspeex2 rbspeex4 rbspeex4
34 # rule for creating ctags file
35 tags.commands = ctags -R --c++-kinds=+p --fields=+iaS --extra=+q $(SOURCES)
36 tags.depends = $(SOURCES)
37 QMAKE_EXTRA_TARGETS += tags
39 # add a custom rule for making the translations
40 lrelease.commands = $$[QT_INSTALL_BINS]/lrelease -silent rbutilqt.pro
41 QMAKE_EXTRA_TARGETS += lrelease
42 !dbg {
43 PRE_TARGETDEPS += lrelease
47 SOURCES += rbutilqt.cpp \
48 main.cpp \
49 install.cpp \
50 httpget.cpp \
51 configure.cpp \
52 zip/zip.cpp \
53 zip/unzip.cpp \
54 installzip.cpp \
55 installbootloader.cpp \
56 progressloggergui.cpp \
57 installtalkwindow.cpp \
58 talkfile.cpp \
59 autodetection.cpp \
60 ../ipodpatcher/ipodpatcher.c \
61 ../sansapatcher/sansapatcher.c \
62 irivertools/irivertools.cpp \
63 irivertools/md5sum.cpp \
64 browsedirtree.cpp \
65 installthemes.cpp \
66 uninstall.cpp \
67 uninstallwindow.cpp \
68 utils.cpp \
69 browseof.cpp \
70 preview.cpp \
71 encoders.cpp \
72 encodersgui.cpp \
73 tts.cpp \
74 ttsgui.cpp \
75 ../../tools/wavtrim.c \
76 ../../tools/voicefont.c \
77 voicefile.cpp \
78 createvoicewindow.cpp \
79 rbsettings.cpp \
80 rbunzip.cpp \
81 rbzip.cpp \
82 sysinfo.cpp \
83 detect.cpp
85 HEADERS += rbutilqt.h \
86 install.h \
87 httpget.h \
88 configure.h \
89 zip/zip.h \
90 zip/unzip.h \
91 zip/zipentry_p.h \
92 zip/unzip_p.h \
93 zip/zip_p.h \
94 version.h \
95 installzip.h \
96 installbootloader.h \
97 installtalkwindow.h \
98 talkfile.h \
99 autodetection.h \
100 progressloggerinterface.h \
101 progressloggergui.h \
102 ../ipodpatcher/ipodpatcher.h \
103 ../ipodpatcher/ipodio.h \
104 ../ipodpatcher/parttypes.h \
105 ../sansapatcher/sansapatcher.h \
106 ../sansapatcher/sansaio.h \
107 irivertools/irivertools.h \
108 irivertools/md5sum.h \
109 irivertools/h100sums.h \
110 irivertools/h120sums.h \
111 irivertools/h300sums.h \
112 irivertools/checksums.h \
113 browsedirtree.h \
114 installthemes.h \
115 uninstall.h \
116 uninstallwindow.h \
117 utils.h \
118 browseof.h \
119 preview.h \
120 encoders.h \
121 encodersgui.h \
122 tts.h \
123 ttsgui.h \
124 ../../tools/wavtrim.h \
125 ../../tools/voicefont.h \
126 voicefile.h \
127 createvoicewindow.h \
128 rbsettings.h \
129 rbunzip.h \
130 rbzip.h \
131 sysinfo.h \
132 detect.h
134 # Needed by QT on Win
135 INCLUDEPATH = . irivertools zip zlib ../ipodpatcher ../sansapatcher ../../tools/rbspeex ../../tools
137 LIBS += -L../../tools/rbspeex -lrbspeex
139 TEMPLATE = app
140 dbg {
141 CONFIG += debug thread qt warn_on
142 DEFINES -= QT_NO_DEBUG_OUTPUT
143 message("debug")
145 !dbg {
146 CONFIG += release thread qt
147 DEFINES += QT_NO_DEBUG_OUTPUT
148 message("release")
151 TARGET = rbutilqt
153 FORMS += rbutilqtfrm.ui \
154 aboutbox.ui \
155 installfrm.ui \
156 progressloggerfrm.ui \
157 configurefrm.ui \
158 browsedirtreefrm.ui \
159 installtalkfrm.ui \
160 installthemesfrm.ui \
161 uninstallfrm.ui \
162 browseoffrm.ui \
163 previewfrm.ui \
164 rbspeexcfgfrm.ui \
165 encexescfgfrm.ui \
166 ttsexescfgfrm.ui \
167 sapicfgfrm.ui \
168 createvoicefrm.ui \
169 sysinfofrm.ui
171 RESOURCES += rbutilqt.qrc
172 win32 {
173 RESOURCES += rbutilqt-win.qrc
175 !dbg {
176 RESOURCES += rbutilqt-lang.qrc
179 TRANSLATIONS += rbutil_de.ts \
180 rbutil_fr.ts \
181 rbutil_nl.ts \
182 rbutil_tr.ts \
183 rbutil_zh_CN.ts \
184 rbutil_zh_TW.ts
185 QT += network
186 DEFINES += RBUTIL _LARGEFILE64_SOURCE
188 win32 {
189 SOURCES += ../ipodpatcher/ipodio-win32.c
190 SOURCES += ../sansapatcher/sansaio-win32.c
191 RC_FILE = rbutilqt.rc
192 LIBS += -lsetupapi -lnetapi32
195 unix {
196 SOURCES += ../ipodpatcher/ipodio-posix.c
197 SOURCES += ../sansapatcher/sansaio-posix.c
199 unix:!static {
200 LIBS += -lusb
202 unix:static {
203 # force statically linking of libusb. Libraries that are appended
204 # later will get linked dynamically again.
205 LIBS += -Wl,-Bstatic -lusb -Wl,-Bdynamic
208 macx {
209 QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
210 QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
211 QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
212 CONFIG+=x86 ppc
213 LIBS += -L/usr/local/lib -framework IOKit
214 INCLUDEPATH += /usr/local/include
215 QMAKE_INFO_PLIST = Info.plist
216 RC_FILE = icons/rbutilqt.icns
218 # rule for creating a dmg file
219 dmg.commands = hdiutil create -ov -srcfolder rbutilqt.app/ rbutil.dmg
220 QMAKE_EXTRA_TARGETS += dmg
223 static {
224 QTPLUGIN += qtaccessiblewidgets
225 LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
226 LIBS += -L.
227 DEFINES += STATIC
228 message("using static plugin")
231 unix {
232 target.path = /usr/local/bin
233 INSTALLS += target