|
|
@@ -122,76 +122,15 @@ CFLAGS += -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes |
|
|
|
CXXFLAGS += -Wnon-virtual-dtor -Woverloaded-virtual |
|
|
|
ifeq ($(LINUX),true) |
|
|
|
CFLAGS += -isystem /opt/kxstudio/include |
|
|
|
CXXFLAGS += -isystem /opt/kxstudio/include -isystem /usr/include/qt4 |
|
|
|
CXXFLAGS += -isystem /opt/kxstudio/include |
|
|
|
endif |
|
|
|
ifeq ($(MACOS),true) |
|
|
|
CFLAGS += -isystem /opt/kxstudio/include |
|
|
|
CXXFLAGS += -isystem /opt/kxstudio/include -isystem /opt/kxstudio/include/qt5 |
|
|
|
CXXFLAGS += -isystem /opt/kxstudio/include |
|
|
|
endif |
|
|
|
ifeq ($(WIN32),true) |
|
|
|
CFLAGS += -isystem /opt/mingw32/include |
|
|
|
CXXFLAGS += -isystem /opt/mingw32/include -isystem /opt/mingw32/include/qt4 |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
# -------------------------------------------------------------- |
|
|
|
# Check for qt, set default version |
|
|
|
|
|
|
|
HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true) |
|
|
|
HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true) |
|
|
|
|
|
|
|
ifeq ($(MACOS_OR_WIN32),true) |
|
|
|
DEFAULT_QT ?= 5 |
|
|
|
else |
|
|
|
DEFAULT_QT ?= 4 |
|
|
|
endif |
|
|
|
|
|
|
|
# -------------------------------------------------------------- |
|
|
|
# Set Qt tools |
|
|
|
# FIXME |
|
|
|
|
|
|
|
ifeq ($(HAVE_QT4),true) |
|
|
|
MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore) |
|
|
|
RCC_QT4 ?= $(shell pkg-config --variable=rcc_location QtCore) |
|
|
|
UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore) |
|
|
|
ifeq (,$(wildcard $(MOC_QT4))) |
|
|
|
HAVE_QT4=false |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(HAVE_QT5),true) |
|
|
|
QT5_LIBDIR = $(shell pkg-config --variable=libdir Qt5Core) |
|
|
|
ifeq ($(MACOS),true) |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/../bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/../bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/../bin/uic |
|
|
|
else # MACOS |
|
|
|
ifneq (,$(wildcard $(QT5_LIBDIR)/qt5/bin/moc)) |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/uic |
|
|
|
else |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/qt/bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/qt/bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/qt/bin/uic |
|
|
|
endif |
|
|
|
endif # MACOS |
|
|
|
ifeq (,$(wildcard $(MOC_QT5))) |
|
|
|
HAVE_QT5=false |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
# -------------------------------------------------------------- |
|
|
|
# Fail if prefered Qt is not found |
|
|
|
# FIXME |
|
|
|
|
|
|
|
ifeq ($(DEFAULT_QT),4) |
|
|
|
ifneq ($(HAVE_QT4),true) |
|
|
|
$(error Qt4 missing, cannot continue) |
|
|
|
endif |
|
|
|
else |
|
|
|
ifneq ($(HAVE_QT5),true) |
|
|
|
$(error Qt5 missing, cannot continue) |
|
|
|
CXXFLAGS += -isystem /opt/mingw32/include |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
@@ -218,8 +157,8 @@ else |
|
|
|
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true) |
|
|
|
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true) |
|
|
|
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true) |
|
|
|
HAVE_QTGUI4 = $(shell pkg-config --exists QtCore QtGui && echo true) |
|
|
|
HAVE_QTGUI5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) |
|
|
|
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true) |
|
|
|
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) |
|
|
|
ifeq ($(LINUX),true) |
|
|
|
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) |
|
|
|
HAVE_DGL = $(shell pkg-config --exists gl && echo true) |
|
|
@@ -236,18 +175,35 @@ endif |
|
|
|
|
|
|
|
# -------------------------------------------------------------- |
|
|
|
# Set Qt tools |
|
|
|
# TODO |
|
|
|
|
|
|
|
ifeq ($(HAVE_QTGUI4),true) |
|
|
|
ifeq ($(HAVE_QT4),true) |
|
|
|
MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore) |
|
|
|
RCC_QT4 ?= $(shell pkg-config --variable=rcc_location QtCore) |
|
|
|
UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore) |
|
|
|
ifeq (,$(wildcard $(MOC_QT4))) |
|
|
|
HAVE_QTGUI4=false |
|
|
|
HAVE_QT4=false |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(HAVE_QTGUI5),true) |
|
|
|
ifeq ($(HAVE_QT5),true) |
|
|
|
QT5_LIBDIR = $(shell pkg-config --variable=libdir Qt5Core) |
|
|
|
ifeq ($(MACOS),true) |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/../bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/../bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/../bin/uic |
|
|
|
else # MACOS |
|
|
|
ifneq (,$(wildcard $(QT5_LIBDIR)/qt5/bin/moc)) |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/uic |
|
|
|
else |
|
|
|
MOC_QT5 ?= $(QT5_LIBDIR)/qt/bin/moc |
|
|
|
RCC_QT5 ?= $(QT5_LIBDIR)/qt/bin/rcc |
|
|
|
UIC_QT5 ?= $(QT5_LIBDIR)/qt/bin/uic |
|
|
|
endif |
|
|
|
endif # MACOS |
|
|
|
ifeq (,$(wildcard $(MOC_QT5))) |
|
|
|
HAVE_QTGUI5=false |
|
|
|
HAVE_QT5=false |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
@@ -285,14 +241,6 @@ endif |
|
|
|
LIBLO_FLAGS = $(shell pkg-config --cflags liblo) |
|
|
|
LIBLO_LIBS = $(shell pkg-config --libs liblo) |
|
|
|
|
|
|
|
ifeq ($(DEFAULT_QT),4) |
|
|
|
QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) |
|
|
|
QTCORE_LIBS = $(shell pkg-config --libs QtCore) |
|
|
|
else |
|
|
|
QTCORE_FLAGS = $(shell pkg-config --cflags Qt5Core) |
|
|
|
QTCORE_LIBS = $(shell pkg-config --libs Qt5Core) |
|
|
|
endif |
|
|
|
|
|
|
|
ifeq ($(HAVE_FLUIDSYNTH),true) |
|
|
|
FLUIDSYNTH_FLAGS = $(shell pkg-config --cflags fluidsynth) |
|
|
|
FLUIDSYNTH_LIBS = $(shell pkg-config --libs fluidsynth) |
|
|
|