annotate sv.prf @ 2:475f4623feba

* build update for runner with "incorporated" SV libraries
author Chris Cannam
date Thu, 11 Dec 2008 11:01:37 +0000
parents
children 3bd7b07c0891
rev   line source
Chris@2 1
Chris@2 2 ###
Chris@2 3 ### BEGIN CONFIGURABLE STUFF
Chris@2 4 ###
Chris@2 5
Chris@2 6 CONFIG += release
Chris@2 7
Chris@2 8
Chris@2 9 # Put your favourite optimization flags here.
Chris@2 10 #
Chris@2 11 # Don't use -ffast-math -- it does make things faster, but it
Chris@2 12 # prevents isnan and isinf from working, and we need those.
Chris@2 13 #
Chris@2 14 # SV benefits a bit from SSE, but not from SSE2 (it doesn't do
Chris@2 15 # very much in double precision).
Chris@2 16 #
Chris@2 17 # Always define NDEBUG and NO_TIMING for release builds.
Chris@2 18 #
Chris@2 19 QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -DNO_TIMING -O3
Chris@2 20 #linux-g++:QMAKE_CXXFLAGS_RELEASE += -march=pentium3 -msse -mmmx -ftree-vectorize -fomit-frame-pointer
Chris@2 21
Chris@2 22 # To do a static build with gcc on Linux
Chris@2 23 #
Chris@2 24 linux-g++:LIBS += -Wl,-Bstatic
Chris@2 25 linux-g++:DEFINES += BUILD_STATIC
Chris@2 26
Chris@2 27
Chris@2 28 LIBPATH += /usr/local/lib
Chris@2 29 INCLUDEPATH += /usr/local/include
Chris@2 30
Chris@2 31 DEFINES += NO_SV_GUI # avoid inclusion of widgets/ in transform library (bad!)
Chris@2 32
Chris@2 33
Chris@2 34 # These are testable on platforms with pkg-config. If you don't have
Chris@2 35 # pkg-config, edit the "If you don't have pkg-config" block below (see
Chris@2 36 # comments).
Chris@2 37 #
Chris@2 38 PKGCONFIG_PACKAGES = vamp vamp-hostsdk oggz fishsound mad id3tag fftw3 fftw3f sndfile samplerate lrdf redland rasqal raptor
Chris@2 39
Chris@2 40
Chris@2 41 # No pkg-config test for QuickTime. This library is optional, for
Chris@2 42 # audio file import. Note that if you compile in support for either
Chris@2 43 # or both of libmad and libsndfile as well as for QuickTime, libmad
Chris@2 44 # and libsndfile will be used in preference to QuickTime where
Chris@2 45 # applicable. For licensing reasons you may not redistribute binaries
Chris@2 46 # of Sonic Visualiser built with QuickTime support, except for
Chris@2 47 # platforms which include QuickTime as a standard part of the platform
Chris@2 48 # (i.e. OS/X).
Chris@2 49 #
Chris@2 50 #DEFINES += HAVE_QUICKTIME
Chris@2 51 #LIBS += -framework QuickTime
Chris@2 52
Chris@2 53
Chris@2 54 !system(pkg-config --atleast-pkgconfig-version=0) {
Chris@2 55
Chris@2 56 # If you don't have pkg-config, or want to overrule it, comment
Chris@2 57 # out (or install) any of the following that you lack. If you
Chris@2 58 # have pkg-config, you should be able to ignore all this provided
Chris@2 59 # the right symbols are defined in PKGCONFIG_PACKAGES above.
Chris@2 60 #
Chris@2 61 DEFINES += HAVE_OGGZ # Optional -- to import .ogg files
Chris@2 62 DEFINES += HAVE_FISHSOUND # Optional -- to import .ogg files
Chris@2 63 DEFINES += HAVE_MAD # Optional -- to import .mp3 files
Chris@2 64 DEFINES += HAVE_ID3TAG # Optional -- to import .mp3 file tags
Chris@2 65 DEFINES += HAVE_FFTW3F # Optional -- but SV will be slower without it
Chris@2 66 DEFINES += HAVE_FFTW3 # Optional -- used by Rubber Band
Chris@2 67 #
Chris@2 68 LIBS += -loggz -lfishsound
Chris@2 69 LIBS += -lmad -lid3tag
Chris@2 70 LIBS += -lfftw3f
Chris@2 71 LIBS += -lfftw3
Chris@2 72
Chris@2 73 # These ones are mandatory.
Chris@2 74 # If you don't have them, you'll have to find them.
Chris@2 75 #
Chris@2 76 DEFINES += HAVE_VAMP # Required -- for analysis plugins
Chris@2 77 DEFINES += HAVE_VAMP_HOSTSDK # Required -- for analysis plugins
Chris@2 78 DEFINES += HAVE_SNDFILE # Required -- to import and export .wav files
Chris@2 79 DEFINES += HAVE_SAMPLERATE # Required -- for resampling
Chris@2 80 DEFINES += HAVE_RASQAL # Required -- for RDF
Chris@2 81 DEFINES += HAVE_REDLAND # Required -- for RDF
Chris@2 82 #
Chris@2 83 LIBS += -lvamp-hostsdk -lsndfile -lrdf -lrasqal -lraptor -lsamplerate
Chris@2 84
Chris@2 85 }
Chris@2 86
Chris@2 87 ###
Chris@2 88 ### END CONFIGURABLE STUFF
Chris@2 89 ###
Chris@2 90
Chris@2 91 system(pkg-config --atleast-pkgconfig-version=0) {
Chris@2 92
Chris@2 93 # If you have pkg-config, this block should locate all packages
Chris@2 94 # for you provided they have .pc files and are listed in
Chris@2 95 # PKGCONFIG_PACKAGES.
Chris@2 96 #
Chris@2 97 for(PKG, PKGCONFIG_PACKAGES) {
Chris@2 98 contains(SV_UNIT_PACKAGES, $$PKG) {
Chris@2 99 system(pkg-config --exists $$PKG) {
Chris@2 100 VERSION = $$system(pkg-config --modversion $$PKG)
Chris@2 101 PACKAGE_SYMBOL = $$system(echo $$PKG | tr '[a-z-]' '[A-Z_]' | tr '.' '_')
Chris@2 102 VERSION_SYMBOL = $$PACKAGE_SYMBOL'_VERSION'
Chris@2 103 DEFINES += HAVE_$$PACKAGE_SYMBOL
Chris@2 104 QMAKE_CXXFLAGS += -D"'"$$VERSION_SYMBOL='"'$$VERSION'"'"'"
Chris@2 105 QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKG)
Chris@2 106 LIBS += $$system(pkg-config --libs $$PKG)
Chris@2 107 message("Using pkg-config package $$PKG with version $$VERSION")
Chris@2 108 } else {
Chris@2 109 message("WARNING: Failed to find pkg-config package $$PKG")
Chris@2 110 }
Chris@2 111 }
Chris@2 112 }
Chris@2 113 }
Chris@2 114
Chris@2 115 contains(SV_UNIT_PACKAGES, oggz) {
Chris@2 116 contains(DEFINES, HAVE_OGGZ) {
Chris@2 117 contains(DEFINES, HAVE_FISHSOUND) {
Chris@2 118 message("Including .ogg file import")
Chris@2 119 } else {
Chris@2 120 message("WARNING: .ogg file import will not be included")
Chris@2 121 }
Chris@2 122 } else {
Chris@2 123 message("WARNING: .ogg file import will not be included")
Chris@2 124 }
Chris@2 125 }
Chris@2 126
Chris@2 127 contains(SV_UNIT_PACKAGES, mad) {
Chris@2 128 contains(DEFINES, HAVE_MAD) {
Chris@2 129 message("Including .mp3 file import")
Chris@2 130 } else {
Chris@2 131 message("WARNING: .mp3 file import will not be included")
Chris@2 132 }
Chris@2 133 }
Chris@2 134
Chris@2 135 contains(SV_UNIT_PACKAGES, id3tag) {
Chris@2 136 contains(DEFINES, HAVE_ID3TAG) {
Chris@2 137 message("Including .mp3 file tag support")
Chris@2 138 } else {
Chris@2 139 message("WARNING: .mp3 file tag support will not be included")
Chris@2 140 }
Chris@2 141 }
Chris@2 142
Chris@2 143 contains(SV_UNIT_PACKAGES, fftw3f) {
Chris@2 144 contains(DEFINES, HAVE_FFTW3F) {
Chris@2 145 message("Using FFTW3f")
Chris@2 146 } else {
Chris@2 147 message("WARNING: FFTW3f not available, using slower FFT implementation")
Chris@2 148 }
Chris@2 149 }
Chris@2 150
Chris@2 151 contains(SV_UNIT_PACKAGES, vamp):!contains(DEFINES, HAVE_VAMP):error("Vamp plugin API required")
Chris@2 152 contains(SV_UNIT_PACKAGES, vamp-hostsdk):!contains(DEFINES, HAVE_VAMP_HOSTSDK):error("Vamp plugin host SDK required")
Chris@2 153 contains(SV_UNIT_PACKAGES, sndfile):!contains(DEFINES, HAVE_SNDFILE):error("sndfile library required")
Chris@2 154 contains(SV_UNIT_PACKAGES, samplerate):!contains(DEFINES, HAVE_SAMPLERATE):error("libsamplerate required")
Chris@2 155 contains(SV_UNIT_PACKAGES, rasqal):!contains(DEFINES, HAVE_RASQAL):error("Rasqal RDF query library required")
Chris@2 156 contains(SV_UNIT_PACKAGES, redland):!contains(DEFINES, HAVE_REDLAND):error("Redland RDF datastore required")
Chris@2 157
Chris@2 158 VERSION_CFLAGS += -D"'"SVNREV='"'$$system(svnversion -n .)'"'"'"
Chris@2 159
Chris@2 160 QMAKE_CXXFLAGS_DEBUG += -DBUILD_DEBUG $$VERSION_CFLAGS
Chris@2 161 QMAKE_CXXFLAGS_RELEASE += -DBUILD_RELEASE $$VERSION_CFLAGS
Chris@2 162
Chris@2 163 LIBS -= -lpthread
Chris@2 164
Chris@2 165 linux-g++ {
Chris@2 166 contains(DEFINES, BUILD_STATIC) {
Chris@2 167 LIBS += -lFLAC -lxml2
Chris@2 168 }
Chris@2 169 }
Chris@2 170
Chris@2 171 # Restore dynamic linkage, in case we went static earlier
Chris@2 172 linux-g++:LIBS += -Wl,-Bdynamic -lpthread -ldl
Chris@2 173