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.

181 lines
4.5KB

  1. #!/usr/bin/make -f
  2. # Makefile for theme #
  3. # ------------------ #
  4. # Created by falkTX
  5. #
  6. include ../../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -I. -I../../includes -I../../utils
  9. ifeq ($(HAVE_QT4),true)
  10. QT4_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  11. QT4_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
  12. QT4_LINK_FLAGS = $(LINK_FLAGS)
  13. QT4_LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)
  14. QT4_STYLES_DIR = $(shell pkg-config --variable=libdir QtCore)/qt4/plugins/styles
  15. endif
  16. ifeq ($(HAVE_QT5),true)
  17. QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  18. QT5_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  19. QT5_LINK_FLAGS = $(LINK_FLAGS)
  20. QT5_LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  21. QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles
  22. endif
  23. ifeq ($(DEFAULT_QT),4)
  24. QT_STYLES_DIR = $(QT4_STYLES_DIR)
  25. SHARED_LINK_FLAGS = $(QT4_LINK_FLAGS)
  26. else
  27. QT_STYLES_DIR = $(QT5_STYLES_DIR)
  28. SHARED_LINK_FLAGS = $(QT5_LINK_FLAGS)
  29. endif
  30. # --------------------------------------------------------------
  31. ifeq ($(HAVE_QT4),true)
  32. FILES_qt4 = \
  33. moc_CarlaStyle.qt4.cpp \
  34. moc_CarlaStyleAnimations.qt4.cpp \
  35. moc_CarlaStylePlugin.qt4.cpp \
  36. moc_CarlaStylePrivate.qt4.cpp \
  37. resources.qt4.cpp
  38. endif
  39. ifeq ($(HAVE_QT5),true)
  40. FILES_qt5 = \
  41. moc_CarlaStyle.qt5.cpp \
  42. moc_CarlaStyleAnimations.qt5.cpp \
  43. moc_CarlaStylePlugin.qt5.cpp \
  44. moc_CarlaStylePrivate.qt5.cpp \
  45. resources.qt5.cpp
  46. endif
  47. ifeq ($(DEFAULT_QT),4)
  48. FILES_shared = $(FILES_qt4)
  49. else
  50. FILES_shared = $(FILES_qt5)
  51. endif
  52. # --------------------------------------------------------------
  53. ifeq ($(HAVE_QT4),true)
  54. OBJS_qt4 = \
  55. CarlaStyle.cpp.qt4.o \
  56. moc_CarlaStyle.qt4.cpp.o \
  57. moc_CarlaStyleAnimations.qt4.cpp.o \
  58. moc_CarlaStylePrivate.qt4.cpp.o \
  59. resources.qt4.cpp.o
  60. OBJS_qt4_shared = $(OBJS_qt4) \
  61. CarlaStylePlugin.cpp.qt4.o \
  62. moc_CarlaStylePlugin.qt4.cpp.o
  63. endif
  64. ifeq ($(HAVE_QT5),true)
  65. OBJS_qt5 = \
  66. CarlaStyle.cpp.qt5.o \
  67. moc_CarlaStyle.qt5.cpp.o \
  68. moc_CarlaStyleAnimations.qt5.cpp.o \
  69. moc_CarlaStylePrivate.qt5.cpp.o \
  70. resources.qt5.cpp.o
  71. OBJS_qt5_shared = $(OBJS_qt5) \
  72. CarlaStylePlugin.cpp.qt5.o \
  73. moc_CarlaStylePlugin.qt5.cpp.o
  74. endif
  75. ifeq ($(DEFAULT_QT),4)
  76. OBJS_shared += $(OBJS_qt4_shared)
  77. else
  78. OBJS_shared += $(OBJS_qt5_shared)
  79. endif
  80. # --------------------------------------------------------------
  81. all:
  82. ifeq ($(DEFAULT_QT),4)
  83. ifeq ($(HAVE_QT4),true)
  84. all: styles/carlastyle$(LIB_EXT)
  85. endif
  86. else # DEFAULT_QT
  87. ifeq ($(HAVE_QT5),true)
  88. all: styles/carlastyle$(LIB_EXT)
  89. endif
  90. endif
  91. qt4: ../theme.qt4.a
  92. qt5: ../theme.qt5.a
  93. # --------------------------------------------------------------
  94. ../theme.qt4.a: $(FILES_qt4) $(OBJS_qt4)
  95. $(RM) $@
  96. $(AR) crs $@ $(OBJS_qt4)
  97. ../theme.qt5.a: $(FILES_qt5) $(OBJS_qt5)
  98. $(RM) $@
  99. $(AR) crs $@ $(OBJS_qt5)
  100. # --------------------------------------------------------------
  101. styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared)
  102. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -luuid -lwinspool -lgdi32 -limm32 -lole32 -lshell32 -lws2_32 -shared -o $@
  103. # $(CXX) $(OBJS_shared) \
  104. # -L/home/falktx/.winepy3/drive_c/Python33/Lib/site-packages/PyQt4/ -lQtGui4 -lQtCore4 \
  105. # -shared -o $@
  106. styles/carlastyle.dylib: $(FILES_shared) $(OBJS_shared)
  107. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@
  108. styles/carlastyle.so: $(FILES_shared) $(OBJS_shared)
  109. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@
  110. # --------------------------------------------------------------
  111. %.qt4.cpp.o: %.qt4.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  112. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  113. %.qt5.cpp.o: %.qt5.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  114. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  115. %.cpp.qt4.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  116. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  117. %.cpp.qt5.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  118. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  119. moc_%.qt4.cpp: %.hpp
  120. $(MOC_QT4) $< -o $@
  121. moc_%.qt5.cpp: %.hpp
  122. $(MOC_QT5) -Istyles $< -o $@
  123. resources.qt4.cpp: ../../../resources/resources-theme.qrc
  124. $(RCC_QT4) $< -o $@
  125. resources.qt5.cpp: ../../../resources/resources-theme.qrc
  126. $(RCC_QT5) $< -o $@
  127. # --------------------------------------------------------------
  128. clean:
  129. $(RM) *.o ../theme*.a styles/carlastyle$(LIB_EXT) $(FILES_qt4) $(FILES_qt5)
  130. debug:
  131. $(MAKE) DEBUG=true
  132. install: styles/carlastyle$(LIB_EXT) styles/carlastyle.json
  133. install -d $(QT_STYLES_DIR)
  134. install -m 644 $^ $(QT_STYLES_DIR)
  135. install-main: styles/carlastyle$(LIB_EXT) styles/carlastyle.json
  136. install -d $(STYLES_DIR)
  137. install -m 644 $^ $(STYLES_DIR)
  138. # --------------------------------------------------------------