|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- #!/usr/bin/make -f
- # Makefile for carla-bridges-ui #
- # ----------------------------- #
- # Created by falkTX
- #
-
- CWD=..
- MODULENAME=carla-bridge
- include $(CWD)/Makefile.mk
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- BINDIR := $(CWD)/../bin
-
- ifeq ($(DEBUG),true)
- OBJDIR := $(CWD)/../build/bridges-ui/Debug
- MODULEDIR := $(CWD)/../build/modules/Debug
- else
- OBJDIR := $(CWD)/../build/bridges-ui/Release
- MODULEDIR := $(CWD)/../build/modules/Release
- endif
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- BUILD_CXX_FLAGS += -DBUILD_BRIDGE -DBUILD_BRIDGE_UI -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -I$(CWD)/modules
- LINK_FLAGS += $(WATER_LIBS) -lpthread
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- BUILD_GTK2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
- LINK_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) $(LIBDL_LIBS)
-
- BUILD_GTK3_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_GTK3 $(shell pkg-config --cflags gtk+-3.0)
- LINK_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) $(LIBDL_LIBS)
-
- BUILD_QT4_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/theme -Wno-unused-variable
- LINK_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) $(LIBDL_LIBS)
-
- BUILD_QT5_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/theme
- LINK_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) $(LIBDL_LIBS)
-
- BUILD_X11_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_X11 $(X11_FLAGS)
- LINK_X11_FLAGS = $(LINK_FLAGS) $(X11_LIBS) $(LIBDL_LIBS)
-
- BUILD_COCOA_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_COCOA -ObjC++
- LINK_COCOA_FLAGS = $(LINK_FLAGS) -framework Cocoa $(LIBDL_LIBS)
-
- BUILD_WINDOWS_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_HWND
- LINK_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows
-
- ifeq ($(HAVE_X11),true)
- LINK_GTK2_FLAGS += -lX11
- LINK_GTK3_FLAGS += -lX11
- LINK_QT4_FLAGS += -lX11
- endif
-
- ifeq ($(TESTBUILD),true)
- BUILD_GTK2_FLAGS += -isystem /usr/include/glib-2.0
- BUILD_GTK2_FLAGS += -isystem /usr/include/gtk-2.0
- BUILD_GTK3_FLAGS += -isystem /usr/include/glib-2.0
- BUILD_GTK3_FLAGS += -isystem /usr/include/gtk-3.0
- BUILD_QT4_FLAGS += -isystem /usr/include/qt4
- BUILD_QT5_FLAGS += -isystem /usr/include/qt5
- BUILD_QT5_FLAGS += -isystem /usr/include/x86_64-linux-gnu/qt5
- endif
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- ifneq ($(MACOS_OR_WIN32),true)
- ifeq ($(HAVE_GTK2),true)
- TARGETS += ui_lv2-gtk2
- endif
-
- ifeq ($(HAVE_GTK3),true)
- TARGETS += ui_lv2-gtk3
- endif
-
- ifeq ($(HAVE_QT4),true)
- TARGETS += ui_lv2-qt4
- endif
-
- ifeq ($(HAVE_QT5),true)
- TARGETS += ui_lv2-qt5
- endif
-
- ifeq ($(HAVE_X11),true)
- TARGETS += ui_lv2-x11
- endif
- endif
-
- ifeq ($(MACOS),true)
- TARGETS += ui_lv2-cocoa
- endif
-
- ifeq ($(WIN32),true)
- TARGETS += ui_lv2-windows
- endif
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- all: $(TARGETS)
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- clean:
- rm -f $(OBJDIR)/*.cpp $(OBJDIR)/*.moc $(OBJDIR)/*.o
- rm -f $(BINDIR)/$(MODULENAME)-lv2-gtk*
- rm -f $(BINDIR)/$(MODULENAME)-lv2-qt*
- rm -f $(BINDIR)/$(MODULENAME)-lv2-cocoa
- rm -f $(BINDIR)/$(MODULENAME)-lv2-x11
- rm -f $(BINDIR)/$(MODULENAME)-lv2-windows
-
- debug:
- $(MAKE) DEBUG=true
-
- doxygen: carla_bridge.doxygen
- doxygen $<
-
- # ---------------------------------------------------------------------------------------------------------------------
-
- ui_lv2-gtk2: $(BINDIR)/$(MODULENAME)-lv2-gtk2
- ui_lv2-gtk3: $(BINDIR)/$(MODULENAME)-lv2-gtk3
- ui_lv2-qt4: $(BINDIR)/$(MODULENAME)-lv2-qt4
- ui_lv2-qt5: $(BINDIR)/$(MODULENAME)-lv2-qt5
- ui_lv2-x11: $(BINDIR)/$(MODULENAME)-lv2-x11
- ui_lv2-cocoa: $(BINDIR)/$(MODULENAME)-lv2-cocoa
- ui_lv2-windows: $(BINDIR)/$(MODULENAME)-lv2-windows.exe
-
- # ---------------------------------------------------------------------------------------------------------------------
- # Common libs
-
- LIBS = \
- $(MODULEDIR)/lilv.a \
- $(MODULEDIR)/water.files.a
-
- # ---------------------------------------------------------------------------------------------------------------------
- # Common objects
-
- $(OBJDIR)/%.cpp.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $<"
- @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-gtk2
-
- OBJS_GTK2 = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-gtk2.o \
- $(OBJDIR)/CarlaBridgeToolkitGtk.cpp-gtk2.o
-
- $(BINDIR)/$(MODULENAME)-lv2-gtk2: $(OBJS_GTK2) $(LIBS)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-gtk2"
- @$(CXX) $(OBJS_GTK2) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_GTK2_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-gtk2.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (GTK2)"
- @$(CXX) $< $(BUILD_GTK2_FLAGS) -c -o $@
-
- -include $(OBJS_GTK2:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-gtk3
-
- OBJS_GTK3 = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-gtk3.o \
- $(OBJDIR)/CarlaBridgeToolkitGtk.cpp-gtk3.o
-
- $(BINDIR)/$(MODULENAME)-lv2-gtk3: $(OBJS_GTK3) $(LIBS)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-gtk3"
- @$(CXX) $(OBJS_GTK3) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_GTK3_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-gtk3.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (GTK3)"
- @$(CXX) $< $(BUILD_GTK3_FLAGS) -c -o $@
-
- -include $(OBJS_GTK3:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-qt4
-
- OBJS_QT4 = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-qt4.o \
- $(OBJDIR)/CarlaBridgeToolkitQt.cpp-qt4.o
-
- $(BINDIR)/$(MODULENAME)-lv2-qt4: $(OBJS_QT4) $(LIBS) $(MODULEDIR)/theme.qt4.a
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-qt4"
- @$(CXX) $(OBJS_QT4) $(LIBS_START) $(LIBS) $(MODULEDIR)/theme.qt4.a $(LIBS_END) $(LINK_QT4_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-qt4.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt4.moc $(OBJDIR)/resources.qt4.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (QT4)"
- @$(CXX) $< $(BUILD_QT4_FLAGS) -c -o $@
-
- $(OBJDIR)/CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Generating CarlaBridgeToolkitQt4.moc"
- @$(MOC_QT4) $< -DMOC_PARSING -o $@
-
- $(OBJDIR)/resources.qt4.cpp: ../../resources/resources-theme.qrc
- -@mkdir -p $(OBJDIR)
- @echo "Generating resources.qt4.cpp"
- @$(RCC_QT4) $< -o $@
-
- -include $(OBJS_QT4:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-qt5
-
- OBJS_QT5 = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-qt5.o \
- $(OBJDIR)/CarlaBridgeToolkitQt.cpp-qt5.o
-
- $(BINDIR)/$(MODULENAME)-lv2-qt5: $(OBJS_QT5) $(LIBS) $(MODULEDIR)/theme.qt5.a
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-qt5"
- @$(CXX) $(OBJS_QT5) $(LIBS_START) $(LIBS) $(MODULEDIR)/theme.qt5.a $(LIBS_END) $(LINK_QT5_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-qt5.o: %.cpp $(OBJDIR)/CarlaBridgeToolkitQt5.moc $(OBJDIR)/resources.qt5.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (QT5)"
- @$(CXX) $< $(BUILD_QT5_FLAGS) -c -o $@
-
- $(OBJDIR)/CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Generating CarlaBridgeToolkitQt5.moc"
- @$(MOC_QT5) $< -DMOC_PARSING -o $@
-
- $(OBJDIR)/resources.qt5.cpp: ../../resources/resources-theme.qrc
- -@mkdir -p $(OBJDIR)
- @echo "Generating resources.qt5.cpp"
- @$(RCC_QT5) $< -o $@
-
- -include $(OBJS_QT5:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-x11
-
- OBJS_X11 = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-x11.o \
- $(OBJDIR)/CarlaBridgeToolkitNative.cpp-x11.o
-
- $(BINDIR)/$(MODULENAME)-lv2-x11: $(OBJS_X11) $(LIBS)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-x11"
- @$(CXX) $(OBJS_X11) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_X11_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-x11.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (X11)"
- @$(CXX) $< $(BUILD_X11_FLAGS) -c -o $@
-
- -include $(OBJS_X11:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-cocoa
-
- OBJS_COCOA = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-cocoa.o \
- $(OBJDIR)/CarlaBridgeToolkitNative.cpp-cocoa.o
-
- $(BINDIR)/$(MODULENAME)-lv2-cocoa: $(OBJS_COCOA) $(LIBS)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-cocoa"
- @$(CXX) $(OBJS_COCOA) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_COCOA_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-cocoa.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (Cocoa)"
- @$(CXX) $< $(BUILD_COCOA_FLAGS) -c -o $@
-
- -include $(OBJS_COCOA:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
- # ui_lv2-windows
-
- OBJS_WINDOWS = \
- $(OBJDIR)/CarlaBridgeFormat.cpp.o \
- $(OBJDIR)/CarlaBridgeFormatLV2.cpp-windows.o \
- $(OBJDIR)/CarlaBridgeToolkitNative.cpp-windows.o
-
- $(BINDIR)/$(MODULENAME)-lv2-windows.exe: $(OBJS_WINDOWS) $(LIBS)
- -@mkdir -p $(BINDIR)
- @echo "Linking $(MODULENAME)-lv2-windows.exe"
- @$(CXX) $(OBJS_WINDOWS) $(LIBS_START) $(LIBS) $(LIBS_END) $(LINK_WINDOWS_FLAGS) -o $@
-
- $(OBJDIR)/%.cpp-windows.o: %.cpp
- -@mkdir -p $(OBJDIR)
- @echo "Compiling $< (Windows)"
- @$(CXX) $< $(BUILD_WINDOWS_FLAGS) -c -o $@
-
- -include $(OBJS_WINDOWS:%.o=%.d)
-
- # ---------------------------------------------------------------------------------------------------------------------
|