2014-05-06 17:14:58 +00:00
|
|
|
VERSION = 0.9.8
|
2013-10-18 18:02:47 +00:00
|
|
|
DEFINES += USING_QT_UI USE_FFMPEG
|
2014-06-03 07:30:37 +00:00
|
|
|
unix:!qnx:!symbian:!mac: CONFIG += linux
|
2014-01-02 06:16:13 +00:00
|
|
|
maemo5|contains(MEEGO_EDITION,harmattan): CONFIG += maemo
|
2012-12-23 07:46:44 +00:00
|
|
|
|
|
|
|
# Global specific
|
2013-11-05 02:17:34 +00:00
|
|
|
win32:CONFIG(release, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/release)
|
|
|
|
else:win32:CONFIG(debug, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/debug)
|
|
|
|
else:CONFIG_DIR=$$OUT_PWD
|
|
|
|
OBJECTS_DIR = $$CONFIG_DIR/.obj/$$TARGET
|
|
|
|
MOC_DIR = $$CONFIG_DIR/.moc/$$TARGET
|
|
|
|
UI_DIR = $$CONFIG_DIR/.ui/$$TARGET
|
2013-11-21 18:07:18 +00:00
|
|
|
P = $$_PRO_FILE_PWD_/..
|
2014-06-03 07:30:37 +00:00
|
|
|
INCLUDEPATH += $$P/ext/zlib $$P/Common
|
2013-02-13 11:08:54 +00:00
|
|
|
|
2014-06-26 07:59:00 +00:00
|
|
|
symbian {
|
|
|
|
exists($$P/.git): GIT_VERSION = $$system(git describe --always)
|
|
|
|
isEmpty(GIT_VERSION): GIT_VERSION = $$VERSION
|
|
|
|
} else {
|
|
|
|
# QMake seems to change how it handles quotes with every version. This works for most systems:
|
|
|
|
exists($$P/.git): GIT_VERSION = '\\"$$system(git describe --always)\\"'
|
|
|
|
isEmpty(GIT_VERSION): GIT_VERSION = '\\"$$VERSION\\"'
|
|
|
|
}
|
|
|
|
DEFINES += PPSSPP_GIT_VERSION=\"$$GIT_VERSION\"
|
2013-11-24 17:03:16 +00:00
|
|
|
|
2013-02-13 15:34:53 +00:00
|
|
|
win32-msvc* {
|
2013-10-18 18:02:47 +00:00
|
|
|
QMAKE_CXXFLAGS_RELEASE += /O2 /arch:SSE2 /fp:fast
|
2014-06-10 17:10:50 +00:00
|
|
|
DEFINES += _MBCS GLEW_STATIC _CRT_SECURE_NO_WARNINGS "_VARIADIC_MAX=10"
|
2013-11-20 01:50:16 +00:00
|
|
|
contains(DEFINES,UNICODE): DEFINES+=_UNICODE
|
2013-11-21 18:07:18 +00:00
|
|
|
PRECOMPILED_HEADER = $$P/Windows/stdafx.h
|
|
|
|
PRECOMPILED_SOURCE = $$P/Windows/stdafx.cpp
|
|
|
|
INCLUDEPATH += .. $$P/ffmpeg/Windows/$${QMAKE_TARGET.arch}/include
|
2013-02-13 11:08:54 +00:00
|
|
|
} else {
|
2013-10-21 14:06:23 +00:00
|
|
|
DEFINES += __STDC_CONSTANT_MACROS
|
2013-02-13 11:08:54 +00:00
|
|
|
QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -Wno-unused-parameter
|
2013-11-12 15:06:34 +00:00
|
|
|
QMAKE_CXXFLAGS += -ffast-math -fno-strict-aliasing
|
2014-06-03 07:30:37 +00:00
|
|
|
greaterThan(QT_MAJOR_VERSION,4): CONFIG+=c++11
|
2014-06-10 17:10:50 +00:00
|
|
|
else: QMAKE_CXXFLAGS += -std=c++11
|
2014-06-17 04:23:16 +00:00
|
|
|
QMAKE_CFLAGS_RELEASE ~= s/-O.*/
|
|
|
|
QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/
|
|
|
|
QMAKE_CFLAGS_RELEASE += -O3
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -O3
|
2013-02-13 11:08:54 +00:00
|
|
|
}
|
2012-12-23 07:46:44 +00:00
|
|
|
# Arch specific
|
2013-02-26 19:03:56 +00:00
|
|
|
xarch = $$find(QT_ARCH, "86")
|
2014-06-10 05:11:25 +00:00
|
|
|
macx|contains(QT_ARCH, windows)|count(xarch, 1) {
|
2013-02-13 15:34:53 +00:00
|
|
|
!win32-msvc*: QMAKE_CXXFLAGS += -msse2
|
2014-06-03 07:30:37 +00:00
|
|
|
} else { # Assume ARM
|
2012-12-23 10:26:18 +00:00
|
|
|
DEFINES += ARM
|
|
|
|
CONFIG += arm
|
|
|
|
}
|
2014-06-06 04:17:47 +00:00
|
|
|
arm:!symbian {
|
|
|
|
CONFIG += armv7
|
2014-06-17 04:23:16 +00:00
|
|
|
QMAKE_CFLAGS_RELEASE ~= s/-mfpu.*/
|
|
|
|
QMAKE_CFLAGS_DEBUG ~= s/-mfpu.*/
|
|
|
|
QMAKE_CFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
|
|
|
|
QMAKE_CFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
|
|
|
|
QMAKE_CXXFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
|
2014-06-06 04:17:47 +00:00
|
|
|
}
|
2012-12-23 07:46:44 +00:00
|
|
|
|
2014-06-17 16:48:10 +00:00
|
|
|
contains(QT_CONFIG, opengles.) {
|
2014-06-17 04:23:16 +00:00
|
|
|
DEFINES += USING_GLES2
|
2014-06-17 05:30:03 +00:00
|
|
|
# How else do we know if the environment prefers windows?
|
|
|
|
!linux|android|maemo {
|
|
|
|
DEFINES += MOBILE_DEVICE
|
|
|
|
CONFIG += mobile_platform
|
|
|
|
}
|
2013-02-26 19:03:56 +00:00
|
|
|
}
|
2012-12-23 07:46:44 +00:00
|
|
|
|
|
|
|
# Platform specific
|
2014-06-17 17:42:31 +00:00
|
|
|
contains(MEEGO_EDITION,harmattan): DEFINES += "_SYS_UCONTEXT_H=1"
|
|
|
|
maemo: DEFINES += MAEMO
|
2013-11-16 15:49:08 +00:00
|
|
|
|
2014-06-03 07:30:37 +00:00
|
|
|
macx: INCLUDEPATH += $$P/ffmpeg/macosx/x86_64/include
|
|
|
|
ios: INCLUDEPATH += $$P/ffmpeg/ios/universal/include
|
2014-06-06 04:17:47 +00:00
|
|
|
android {
|
|
|
|
DEFINES += ANDROID
|
|
|
|
INCLUDEPATH += $$P/ffmpeg/android/armv7/include $$P/native/ext/libzip
|
|
|
|
}
|
2013-11-24 03:36:22 +00:00
|
|
|
|
2014-06-03 07:30:37 +00:00
|
|
|
linux:!android {
|
2014-06-06 04:17:47 +00:00
|
|
|
arm: INCLUDEPATH += $$P/ffmpeg/linux/armv7/include
|
2014-06-10 06:05:32 +00:00
|
|
|
else {
|
2014-06-17 16:48:10 +00:00
|
|
|
contains(QT_ARCH, x86_64) QMAKE_TARGET.arch = x86_64
|
2014-06-03 07:30:37 +00:00
|
|
|
else: QMAKE_TARGET.arch = x86
|
|
|
|
INCLUDEPATH += $$P/ffmpeg/linux/$${QMAKE_TARGET.arch}/include
|
|
|
|
}
|
2013-07-03 15:35:18 +00:00
|
|
|
}
|
2014-06-17 16:48:10 +00:00
|
|
|
# Fix 32-bit/64-bit defines
|
2014-06-17 17:28:33 +00:00
|
|
|
!arm {
|
|
|
|
contains(QMAKE_TARGET.arch, x86_64): DEFINES += _M_X64
|
|
|
|
else: DEFINES += _M_IX86
|
|
|
|
}
|
2014-06-17 16:48:10 +00:00
|
|
|
|
2013-03-19 22:17:22 +00:00
|
|
|
qnx {
|
|
|
|
# Use mkspec: unsupported/qws/qnx-armv7-g++
|
2013-06-21 05:40:52 +00:00
|
|
|
DEFINES += BLACKBERRY "_QNX_SOURCE=1" "_C99=1"
|
2013-11-21 18:07:18 +00:00
|
|
|
INCLUDEPATH += $$P/ffmpeg/blackberry/armv7/include
|
2012-12-23 07:46:44 +00:00
|
|
|
}
|
2013-03-19 22:17:22 +00:00
|
|
|
symbian {
|
2014-06-06 04:17:47 +00:00
|
|
|
DEFINES += "BOOST_COMPILER_CONFIG=\"$$EPOCROOT/epoc32/include/stdapis/boost/mpl/aux_/config/gcc.hpp\"" SYMBIAN_OGLES_DLL_EXPORTS
|
2014-06-10 17:10:50 +00:00
|
|
|
QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment -Wno-unused-local-typedefs
|
2013-11-12 14:30:14 +00:00
|
|
|
INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis
|
2013-11-21 18:07:18 +00:00
|
|
|
INCLUDEPATH += $$P/ffmpeg/symbian/armv6/include
|
2012-12-23 07:46:44 +00:00
|
|
|
}
|
2014-06-06 04:17:47 +00:00
|
|
|
maemo {
|
|
|
|
DEFINES += __GL_EXPORTS
|
2014-06-02 23:26:24 +00:00
|
|
|
}
|