9 include ..
/modules
/Makefile.mk
11 # ---------------------------------------------------------------------------------------------------------------------
13 ifeq ($(WINDOWS
),true
)
14 NON_STATIC_LINK_FLAGS
= $(shell echo
$(LINK_FLAGS
) | awk
'sub(" -static","")') -static-libgcc
16 NON_STATIC_LINK_FLAGS
= $(LINK_FLAGS
)
19 ifeq ($(HAVE_QT4
),true
)
20 QT4_CXX_FLAGS
= $(BUILD_CXX_FLAGS
) $(shell pkg-config
--cflags QtCore QtGui
)
21 QT4_LINK_FLAGS
= $(NON_STATIC_LINK_FLAGS
) $(shell pkg-config
--libs QtCore QtGui
)
22 QT4_STYLES_DIR
= $(shell pkg-config
--variable
=libdir QtCore
)/qt4
/plugins
/styles
25 ifeq ($(HAVE_QT5
),true
)
26 QT5_CXX_FLAGS
= $(BUILD_CXX_FLAGS
) $(shell pkg-config
--cflags Qt5Core Qt5Gui Qt5Widgets
)
27 QT5_LINK_FLAGS
= $(NON_STATIC_LINK_FLAGS
) $(shell pkg-config
--libs Qt5Core Qt5Gui Qt5Widgets
)
28 QT5_STYLES_DIR
= $(shell pkg-config
--variable
=libdir Qt5Core
)/qt5
/plugins
/styles
29 else ifeq ($(HAVE_QT5PKG
),true
)
31 ifeq ($(HAVE_PYQT
),true
)
33 QT5_PREFIX
= $(shell pkg-config
--variable
=prefix Qt5OpenGLExtensions
)
34 QT5_CXX_FLAGS
= $(BUILD_CXX_FLAGS
) -DQT_CORE_LIB
-DQT_GUI_LIB
-DQT_WIDGETS_LIB
-I
$(QT5_PREFIX
)/include/qt5
35 QT5_LINK_FLAGS
= $(NON_STATIC_LINK_FLAGS
) -F
$(QT5_PREFIX
)/lib
-framework QtCore
-framework QtGui
-framework QtWidgets
36 QT5_STYLES_DIR
= $(QT5_PREFIX
)/lib
/qt5
/plugins
/styles
41 # ---------------------------------------------------------------------------------------------------------------------
43 ifeq ($(HAVE_QT4
),true
)
45 $(OBJDIR
)/moc_CarlaStyle.qt4.
cpp \
46 $(OBJDIR
)/moc_CarlaStyleAnimations.qt4.
cpp \
47 $(OBJDIR
)/moc_CarlaStylePlugin.qt4.
cpp \
48 $(OBJDIR
)/moc_CarlaStylePrivate.qt4.
cpp \
49 $(OBJDIR
)/resources.qt4.
cpp
52 ifeq ($(HAVE_QT5
),true
)
54 $(OBJDIR
)/moc_CarlaStyle.qt5.
cpp \
55 $(OBJDIR
)/moc_CarlaStyleAnimations.qt5.
cpp \
56 $(OBJDIR
)/moc_CarlaStylePlugin.qt5.
cpp \
57 $(OBJDIR
)/moc_CarlaStylePrivate.qt5.
cpp \
58 $(OBJDIR
)/resources.qt5.
cpp
61 # ---------------------------------------------------------------------------------------------------------------------
63 ifeq ($(HAVE_QT4
),true
)
65 $(OBJDIR
)/CarlaStyle.
cpp.qt4.o \
66 $(OBJDIR
)/moc_CarlaStyle.qt4.
cpp.o \
67 $(OBJDIR
)/moc_CarlaStyleAnimations.qt4.
cpp.o \
68 $(OBJDIR
)/moc_CarlaStylePrivate.qt4.
cpp.o \
69 $(OBJDIR
)/resources.qt4.
cpp.o
71 OBJS_qt4_shared
= $(OBJS_qt4
) \
72 $(OBJDIR
)/CarlaStylePlugin.
cpp.qt4.o \
73 $(OBJDIR
)/moc_CarlaStylePlugin.qt4.
cpp.o
76 ifeq ($(HAVE_QT5
),true
)
78 $(OBJDIR
)/CarlaStyle.
cpp.qt5.o \
79 $(OBJDIR
)/moc_CarlaStyle.qt5.
cpp.o \
80 $(OBJDIR
)/moc_CarlaStyleAnimations.qt5.
cpp.o \
81 $(OBJDIR
)/moc_CarlaStylePrivate.qt5.
cpp.o \
82 $(OBJDIR
)/resources.qt5.
cpp.o
84 OBJS_qt5_shared
= $(OBJS_qt5
) \
85 $(OBJDIR
)/CarlaStylePlugin.
cpp.qt5.o \
86 $(OBJDIR
)/moc_CarlaStylePlugin.qt5.
cpp.o
89 # ---------------------------------------------------------------------------------------------------------------------
91 ifeq ($(HAVE_QT5
),true
)
92 all: $(BINDIR
)/styles
/carlastyle
$(LIB_EXT
) $(BINDIR
)/styles
/carlastyle.json
97 qt4
: $(MODULEDIR
)/$(MODULENAME
).qt4.a
98 qt5
: $(MODULEDIR
)/$(MODULENAME
).qt5.a
100 # ---------------------------------------------------------------------------------------------------------------------
103 rm -f
$(OBJDIR
)/*.o
$(MODULEDIR
)/$(MODULENAME
)*.a
$(BINDIR
)/styles
/carlastyle
$(LIB_EXT
) $(FILES_qt4
) $(FILES_qt5
)
108 install: $(BINDIR
)/styles
/carlastyle
$(LIB_EXT
) $(BINDIR
)/styles
/carlastyle.json
109 install -d
$(QT5_STYLES_DIR
)
110 install -m
644 $^
$(QT5_STYLES_DIR
)
112 # ---------------------------------------------------------------------------------------------------------------------
114 $(MODULEDIR
)/$(MODULENAME
).qt4.a
: $(FILES_qt4
) $(OBJS_qt4
)
115 -@mkdir
-p
$(MODULEDIR
)
116 @echo
"Creating $(MODULENAME).qt4.a"
118 $(SILENT
)$(AR
) crs
$@
$(OBJS_qt4
)
120 $(MODULEDIR
)/$(MODULENAME
).qt5.a
: $(FILES_qt5
) $(OBJS_qt5
)
121 -@mkdir
-p
$(MODULEDIR
)
122 @echo
"Creating $(MODULENAME).qt5.a"
124 $(SILENT
)$(AR
) crs
$@
$(OBJS_qt5
)
126 # ---------------------------------------------------------------------------------------------------------------------
128 $(BINDIR
)/styles
/carlastyle.dll
: $(FILES_qt5
) $(OBJS_qt5_shared
)
129 -@mkdir
-p
$(BINDIR
)/styles
130 @echo
"Linking carlastyle.dll"
131 $(SILENT
)$(CXX
) $(OBJS_qt5_shared
) $(QT5_LINK_FLAGS
) -shared
-o
$@
133 $(BINDIR
)/styles
/carlastyle.dylib
: $(FILES_qt5
) $(OBJS_qt5_shared
)
134 -@mkdir
-p
$(BINDIR
)/styles
135 @echo
"Linking carlastyle.dylib"
136 $(SILENT
)$(CXX
) $(OBJS_qt5_shared
) $(QT5_LINK_FLAGS
) -dynamiclib
-o
$@
138 $(BINDIR
)/styles
/carlastyle.so
: $(FILES_qt5
) $(OBJS_qt5_shared
)
139 -@mkdir
-p
$(BINDIR
)/styles
140 @echo
"Linking carlastyle.so"
141 $(SILENT
)$(CXX
) $(OBJS_qt5_shared
) $(QT5_LINK_FLAGS
) -shared
-o
$@
143 $(BINDIR
)/styles
/carlastyle.json
: styles
/carlastyle.json
144 -@mkdir
-p
$(BINDIR
)/styles
147 # ---------------------------------------------------------------------------------------------------------------------
149 $(OBJDIR
)/moc_
%.qt4.
cpp: %.hpp
151 @echo
"Generating moc_$*.qt4.cpp"
152 $(SILENT
)$(MOC_QT4
) $< -o
$@
154 $(OBJDIR
)/moc_
%.qt5.
cpp: %.hpp
156 @echo
"Generating moc_$*.qt5.cpp"
157 $(SILENT
)$(MOC_QT5
) -Istyles
$< -o
$@
159 $(OBJDIR
)/resources.qt4.
cpp: $(CWD
)/..
/resources
/resources-theme.qrc
161 @echo
"Generating resources.qt4.cpp"
162 $(SILENT
)$(RCC_QT4
) $< -o
$@
164 $(OBJDIR
)/resources.qt5.
cpp: $(CWD
)/..
/resources
/resources-theme.qrc
166 @echo
"Generating resources.qt5.cpp"
167 $(SILENT
)$(RCC_QT5
) $< -o
$@
169 # ---------------------------------------------------------------------------------------------------------------------
171 $(OBJDIR
)/%.qt4.
cpp.o
: $(OBJDIR
)/%.qt4.
cpp $(OBJDIR
)/moc_CarlaStyle.qt4.
cpp
173 @echo
"Compiling $*.cpp (Qt4)"
174 $(SILENT
)$(CXX
) $< $(QT4_CXX_FLAGS
) -Wno-unused-variable
-c
-o
$@
176 $(OBJDIR
)/%.qt5.
cpp.o
: $(OBJDIR
)/%.qt5.
cpp $(OBJDIR
)/moc_CarlaStyle.qt5.
cpp
178 @echo
"Compiling $*.cpp (Qt5)"
179 $(SILENT
)$(CXX
) $< $(QT5_CXX_FLAGS
) -c
-o
$@
181 $(OBJDIR
)/%.
cpp.qt4.o
: %.
cpp $(OBJDIR
)/moc_CarlaStyle.qt4.
cpp
183 @echo
"Compiling $< (Qt4)"
184 $(SILENT
)$(CXX
) $< $(QT4_CXX_FLAGS
) -c
-o
$@
186 $(OBJDIR
)/%.
cpp.qt5.o
: %.
cpp $(OBJDIR
)/moc_CarlaStyle.qt5.
cpp
188 @echo
"Compiling $< (Qt5)"
189 $(SILENT
)$(CXX
) $< $(QT5_CXX_FLAGS
) -c
-o
$@
191 # ---------------------------------------------------------------------------------------------------------------------
193 -include $(OBJS_qt4_shared
:%.o
=%.d
)
194 -include $(OBJS_qt5_shared
:%.o
=%.d
)
196 # ---------------------------------------------------------------------------------------------------------------------