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.

169 lines
4.3KB

  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 ($(HAVE_QT4),true)
  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. FILES_qt4 = \
  32. moc_CarlaStyle.qt4.cpp \
  33. moc_CarlaStyleAnimations.qt4.cpp \
  34. moc_CarlaStylePlugin.qt4.cpp \
  35. moc_CarlaStylePrivate.qt4.cpp \
  36. resources.qt4.cpp
  37. FILES_qt5 = \
  38. moc_CarlaStyle.qt5.cpp \
  39. moc_CarlaStyleAnimations.qt5.cpp \
  40. moc_CarlaStylePlugin.qt5.cpp \
  41. moc_CarlaStylePrivate.qt5.cpp \
  42. resources.qt5.cpp
  43. ifeq ($(HAVE_QT4),true)
  44. FILES_shared = $(FILES_qt4)
  45. else
  46. FILES_shared = $(FILES_qt5)
  47. endif
  48. # --------------------------------------------------------------
  49. OBJS_qt4 = \
  50. CarlaStyle.cpp.qt4.o \
  51. moc_CarlaStyle.qt4.cpp.o \
  52. moc_CarlaStyleAnimations.qt4.cpp.o \
  53. moc_CarlaStylePrivate.qt4.cpp.o \
  54. resources.qt4.cpp.o
  55. OBJS_qt5 = \
  56. CarlaStyle.cpp.qt5.o \
  57. moc_CarlaStyle.qt5.cpp.o \
  58. moc_CarlaStyleAnimations.qt5.cpp.o \
  59. moc_CarlaStylePrivate.qt5.cpp.o \
  60. resources.qt5.cpp.o
  61. ifeq ($(HAVE_QT4),true)
  62. OBJS_shared += $(OBJS_qt4) \
  63. CarlaStylePlugin.cpp.qt4.o \
  64. moc_CarlaStylePlugin.qt4.cpp.o
  65. else
  66. OBJS_shared += $(OBJS_qt5) \
  67. CarlaStylePlugin.cpp.qt5.o \
  68. moc_CarlaStylePlugin.qt5.cpp.o
  69. endif
  70. # --------------------------------------------------------------
  71. ifeq ($(WIN32),true)
  72. CARLASTYLE = styles/carlastyle.dll
  73. else
  74. ifeq ($(MACOS),true)
  75. CARLASTYLE = styles/carlastyle.dylib
  76. else
  77. CARLASTYLE = styles/carlastyle.so
  78. endif
  79. endif
  80. all: $(CARLASTYLE)
  81. qt4: ../theme.qt4.a
  82. qt5: ../theme.qt5.a
  83. # --------------------------------------------------------------
  84. ../theme.qt4.a: $(FILES_qt4) $(OBJS_qt4)
  85. $(RM) $@
  86. $(AR) crs $@ $(OBJS_qt4)
  87. ../theme.qt5.a: $(FILES_qt5) $(OBJS_qt5)
  88. $(RM) $@
  89. $(AR) crs $@ $(OBJS_qt5)
  90. # --------------------------------------------------------------
  91. styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared)
  92. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -luuid -lwinspool -lgdi32 -limm32 -lole32 -lshell32 -lws2_32 -shared -o $@
  93. # $(CXX) $(OBJS_shared) \
  94. # -L/home/falktx/.winepy3/drive_c/Python33/Lib/site-packages/PyQt4/ -lQtGui4 -lQtCore4 \
  95. # -shared -o $@
  96. styles/carlastyle.dylib: $(FILES_shared) $(OBJS_shared)
  97. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@
  98. styles/carlastyle.so: $(FILES_shared) $(OBJS_shared)
  99. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@
  100. # --------------------------------------------------------------
  101. %.qt4.cpp.o: %.qt4.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  102. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  103. %.qt5.cpp.o: %.qt5.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  104. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  105. %.cpp.qt4.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  106. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  107. %.cpp.qt5.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  108. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  109. moc_%.qt4.cpp: %.hpp
  110. $(MOC_QT4) $< -o $@
  111. moc_%.qt5.cpp: %.hpp
  112. $(MOC_QT5) -Istyles $< -o $@
  113. resources.qt4.cpp: ../../../resources/resources-theme.qrc
  114. $(RCC_QT4) $< -o $@
  115. resources.qt5.cpp: ../../../resources/resources-theme.qrc
  116. $(RCC_QT5) $< -o $@
  117. # --------------------------------------------------------------
  118. clean:
  119. $(RM) *.o ../theme*.a $(CARLASTYLE) $(FILES_qt4) $(FILES_qt5)
  120. debug:
  121. $(MAKE) DEBUG=true
  122. install: $(CARLASTYLE) styles/carlastyle.json
  123. install -d $(QT_STYLES_DIR)
  124. install -m 644 $^ $(QT_STYLES_DIR)
  125. install-main: $(CARLASTYLE) styles/carlastyle.json
  126. install -d $(STYLES_DIR)
  127. install -m 644 $^ $(STYLES_DIR)
  128. # --------------------------------------------------------------