Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 6.6KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #!/usr/bin/make -f
  2. # Makefile for theme #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. MODULENAME=theme
  8. include ../modules/Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. ifeq ($(WIN32),true)
  11. NON_STATIC_LINK_FLAGS = $(shell echo $(LINK_FLAGS) | awk 'sub(" -static","")') -static-libgcc
  12. else
  13. NON_STATIC_LINK_FLAGS = $(LINK_FLAGS)
  14. endif
  15. ifeq ($(HAVE_QT4),true)
  16. QT4_CXX_FLAGS = $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags QtCore QtGui)
  17. QT4_LINK_FLAGS = $(NON_STATIC_LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui)
  18. QT4_STYLES_DIR = $(shell pkg-config --variable=libdir QtCore)/qt4/plugins/styles
  19. endif
  20. ifeq ($(HAVE_QT5),true)
  21. QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  22. QT5_LINK_FLAGS = $(NON_STATIC_LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  23. QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles
  24. else ifeq ($(HAVE_QT5PKG),true)
  25. ifeq ($(MACOS),true)
  26. ifeq ($(HAVE_PYQT),true)
  27. HAVE_QT5 = true
  28. QT5_PREFIX = $(shell pkg-config --variable=prefix Qt5OpenGLExtensions)
  29. QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS) -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I $(QT5_PREFIX)/include/qt5
  30. QT5_LINK_FLAGS = $(NON_STATIC_LINK_FLAGS) -F $(QT5_PREFIX)/lib -framework QtCore -framework QtGui -framework QtWidgets
  31. QT5_STYLES_DIR = $(QT5_PREFIX)/lib/qt5/plugins/styles
  32. endif
  33. endif
  34. endif
  35. # ---------------------------------------------------------------------------------------------------------------------
  36. ifeq ($(HAVE_QT4),true)
  37. FILES_qt4 = \
  38. $(OBJDIR)/moc_CarlaStyle.qt4.cpp \
  39. $(OBJDIR)/moc_CarlaStyleAnimations.qt4.cpp \
  40. $(OBJDIR)/moc_CarlaStylePlugin.qt4.cpp \
  41. $(OBJDIR)/moc_CarlaStylePrivate.qt4.cpp \
  42. $(OBJDIR)/resources.qt4.cpp
  43. endif
  44. ifeq ($(HAVE_QT5),true)
  45. FILES_qt5 = \
  46. $(OBJDIR)/moc_CarlaStyle.qt5.cpp \
  47. $(OBJDIR)/moc_CarlaStyleAnimations.qt5.cpp \
  48. $(OBJDIR)/moc_CarlaStylePlugin.qt5.cpp \
  49. $(OBJDIR)/moc_CarlaStylePrivate.qt5.cpp \
  50. $(OBJDIR)/resources.qt5.cpp
  51. endif
  52. # ---------------------------------------------------------------------------------------------------------------------
  53. ifeq ($(HAVE_QT4),true)
  54. OBJS_qt4 = \
  55. $(OBJDIR)/CarlaStyle.cpp.qt4.o \
  56. $(OBJDIR)/moc_CarlaStyle.qt4.cpp.o \
  57. $(OBJDIR)/moc_CarlaStyleAnimations.qt4.cpp.o \
  58. $(OBJDIR)/moc_CarlaStylePrivate.qt4.cpp.o \
  59. $(OBJDIR)/resources.qt4.cpp.o
  60. OBJS_qt4_shared = $(OBJS_qt4) \
  61. $(OBJDIR)/CarlaStylePlugin.cpp.qt4.o \
  62. $(OBJDIR)/moc_CarlaStylePlugin.qt4.cpp.o
  63. endif
  64. ifeq ($(HAVE_QT5),true)
  65. OBJS_qt5 = \
  66. $(OBJDIR)/CarlaStyle.cpp.qt5.o \
  67. $(OBJDIR)/moc_CarlaStyle.qt5.cpp.o \
  68. $(OBJDIR)/moc_CarlaStyleAnimations.qt5.cpp.o \
  69. $(OBJDIR)/moc_CarlaStylePrivate.qt5.cpp.o \
  70. $(OBJDIR)/resources.qt5.cpp.o
  71. OBJS_qt5_shared = $(OBJS_qt5) \
  72. $(OBJDIR)/CarlaStylePlugin.cpp.qt5.o \
  73. $(OBJDIR)/moc_CarlaStylePlugin.qt5.cpp.o
  74. endif
  75. # ---------------------------------------------------------------------------------------------------------------------
  76. ifeq ($(HAVE_QT5),true)
  77. all: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json
  78. else
  79. all:
  80. endif
  81. qt4: $(MODULEDIR)/$(MODULENAME).qt4.a
  82. qt5: $(MODULEDIR)/$(MODULENAME).qt5.a
  83. # ---------------------------------------------------------------------------------------------------------------------
  84. clean:
  85. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(BINDIR)/styles/carlastyle$(LIB_EXT) $(FILES_qt4) $(FILES_qt5)
  86. debug:
  87. $(MAKE) DEBUG=true
  88. install: $(BINDIR)/styles/carlastyle$(LIB_EXT) $(BINDIR)/styles/carlastyle.json
  89. install -d $(QT5_STYLES_DIR)
  90. install -m 644 $^ $(QT5_STYLES_DIR)
  91. # ---------------------------------------------------------------------------------------------------------------------
  92. $(MODULEDIR)/$(MODULENAME).qt4.a: $(FILES_qt4) $(OBJS_qt4)
  93. -@mkdir -p $(MODULEDIR)
  94. @echo "Creating $(MODULENAME).qt4.a"
  95. $(SILENT)rm -f $@
  96. $(SILENT)$(AR) crs $@ $(OBJS_qt4)
  97. $(MODULEDIR)/$(MODULENAME).qt5.a: $(FILES_qt5) $(OBJS_qt5)
  98. -@mkdir -p $(MODULEDIR)
  99. @echo "Creating $(MODULENAME).qt5.a"
  100. $(SILENT)rm -f $@
  101. $(SILENT)$(AR) crs $@ $(OBJS_qt5)
  102. # ---------------------------------------------------------------------------------------------------------------------
  103. $(BINDIR)/styles/carlastyle.dll: $(FILES_qt5) $(OBJS_qt5_shared)
  104. -@mkdir -p $(BINDIR)/styles
  105. @echo "Linking carlastyle.dll"
  106. $(SILENT)$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -shared -o $@
  107. $(BINDIR)/styles/carlastyle.dylib: $(FILES_qt5) $(OBJS_qt5_shared)
  108. -@mkdir -p $(BINDIR)/styles
  109. @echo "Linking carlastyle.dylib"
  110. $(SILENT)$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -dynamiclib -o $@
  111. $(BINDIR)/styles/carlastyle.so: $(FILES_qt5) $(OBJS_qt5_shared)
  112. -@mkdir -p $(BINDIR)/styles
  113. @echo "Linking carlastyle.so"
  114. $(SILENT)$(CXX) $(OBJS_qt5_shared) $(QT5_LINK_FLAGS) -shared -o $@
  115. $(BINDIR)/styles/carlastyle.json: styles/carlastyle.json
  116. -@mkdir -p $(BINDIR)/styles
  117. $(SILENT)cp -f $< $@
  118. # ---------------------------------------------------------------------------------------------------------------------
  119. $(OBJDIR)/moc_%.qt4.cpp: %.hpp
  120. -@mkdir -p $(OBJDIR)
  121. @echo "Generating moc_$*.qt4.cpp"
  122. $(SILENT)$(MOC_QT4) $< -o $@
  123. $(OBJDIR)/moc_%.qt5.cpp: %.hpp
  124. -@mkdir -p $(OBJDIR)
  125. @echo "Generating moc_$*.qt5.cpp"
  126. $(SILENT)$(MOC_QT5) -Istyles $< -o $@
  127. $(OBJDIR)/resources.qt4.cpp: $(CWD)/../resources/resources-theme.qrc
  128. -@mkdir -p $(OBJDIR)
  129. @echo "Generating resources.qt4.cpp"
  130. $(SILENT)$(RCC_QT4) $< -o $@
  131. $(OBJDIR)/resources.qt5.cpp: $(CWD)/../resources/resources-theme.qrc
  132. -@mkdir -p $(OBJDIR)
  133. @echo "Generating resources.qt5.cpp"
  134. $(SILENT)$(RCC_QT5) $< -o $@
  135. # ---------------------------------------------------------------------------------------------------------------------
  136. $(OBJDIR)/%.qt4.cpp.o: $(OBJDIR)/%.qt4.cpp $(OBJDIR)/moc_CarlaStyle.qt4.cpp
  137. -@mkdir -p $(OBJDIR)
  138. @echo "Compiling $*.cpp (Qt4)"
  139. $(SILENT)$(CXX) $< $(QT4_CXX_FLAGS) -Wno-unused-variable -c -o $@
  140. $(OBJDIR)/%.qt5.cpp.o: $(OBJDIR)/%.qt5.cpp $(OBJDIR)/moc_CarlaStyle.qt5.cpp
  141. -@mkdir -p $(OBJDIR)
  142. @echo "Compiling $*.cpp (Qt5)"
  143. $(SILENT)$(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  144. $(OBJDIR)/%.cpp.qt4.o: %.cpp $(OBJDIR)/moc_CarlaStyle.qt4.cpp
  145. -@mkdir -p $(OBJDIR)
  146. @echo "Compiling $< (Qt4)"
  147. $(SILENT)$(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  148. $(OBJDIR)/%.cpp.qt5.o: %.cpp $(OBJDIR)/moc_CarlaStyle.qt5.cpp
  149. -@mkdir -p $(OBJDIR)
  150. @echo "Compiling $< (Qt5)"
  151. $(SILENT)$(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  152. # ---------------------------------------------------------------------------------------------------------------------
  153. -include $(OBJS_qt4_shared:%.o=%.d)
  154. -include $(OBJS_qt5_shared:%.o=%.d)
  155. # ---------------------------------------------------------------------------------------------------------------------