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.

185 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. QT4_CXX_FLAGS = $(BUILD_CXX_FLAGS) # FIXME: use copy instead of reference
  10. BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  11. LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  12. QT_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles
  13. ifeq ($(HAVE_QT4),true)
  14. QT4_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  15. endif
  16. # --------------------------------------------------------------
  17. FILES = \
  18. moc_CarlaStyle.cpp \
  19. moc_CarlaStyleAnimations.cpp \
  20. moc_CarlaStylePlugin.cpp \
  21. moc_CarlaStylePrivate.cpp \
  22. resources.cpp
  23. FILES_qt4 = \
  24. moc_CarlaStyle.qt4.cpp \
  25. moc_CarlaStyleAnimations.qt4.cpp \
  26. moc_CarlaStylePlugin.qt4.cpp \
  27. moc_CarlaStylePrivate.qt4.cpp \
  28. resources.qt4.cpp
  29. # --------------------------------------------------------------
  30. OBJS = \
  31. CarlaStyle.cpp.o \
  32. moc_CarlaStyle.cpp.o \
  33. moc_CarlaStyleAnimations.cpp.o \
  34. moc_CarlaStylePrivate.cpp.o
  35. OBJS_shared = $(OBJS) \
  36. CarlaStylePlugin.cpp.o \
  37. moc_CarlaStylePlugin.cpp.o \
  38. resources.cpp.o
  39. # --------------------------------------------------------------
  40. OBJS_qt4 = \
  41. CarlaStyle.cpp.qt4.o \
  42. moc_CarlaStyle.cpp.qt4.o \
  43. moc_CarlaStyleAnimations.cpp.qt4.o \
  44. moc_CarlaStylePrivate.cpp.qt4.o
  45. OBJS_posix32 = \
  46. CarlaStyle.cpp.posix32.o \
  47. moc_CarlaStyle.cpp.posix32.o \
  48. moc_CarlaStyleAnimations.cpp.posix32.o \
  49. moc_CarlaStylePrivate.cpp.posix32.o
  50. OBJS_posix64 = \
  51. CarlaStyle.cpp.posix64.o \
  52. moc_CarlaStyle.cpp.posix64.o \
  53. moc_CarlaStyleAnimations.cpp.posix64.o \
  54. moc_CarlaStylePrivate.cpp.posix64.o
  55. OBJS_win32 = \
  56. CarlaStyle.cpp.win32.o \
  57. moc_CarlaStyle.cpp.win32.o \
  58. moc_CarlaStyleAnimations.cpp.win32.o \
  59. moc_CarlaStylePrivate.cpp.win32.o
  60. OBJS_win64 = \
  61. CarlaStyle.cpp.win64.o \
  62. moc_CarlaStyle.cpp.win64.o \
  63. moc_CarlaStyleAnimations.cpp.win64.o \
  64. moc_CarlaStylePrivate.cpp.win64.o
  65. # --------------------------------------------------------------
  66. ifeq ($(WIN32),true)
  67. CARLASTYLE = styles/carlastyle.dll
  68. else
  69. ifeq ($(MACOS),true)
  70. CARLASTYLE = styles/carlastyle.dylib
  71. else
  72. CARLASTYLE = styles/carlastyle.so
  73. endif
  74. endif
  75. all: ../theme.a $(CARLASTYLE)
  76. qt4: ../theme.qt4.a
  77. posix32: ../theme.posix32.a
  78. posix64: ../theme.posix64.a
  79. win32: ../theme.win32.a
  80. win64: ../theme.win64.a
  81. # --------------------------------------------------------------
  82. ../theme.a: $(FILES) $(OBJS)
  83. rm -f $@
  84. $(AR) crs $@ $(OBJS)
  85. ../theme.qt4.a: $(FILES_qt4) $(OBJS_qt4)
  86. rm -f $@
  87. $(AR) crs $@ $(OBJS_qt4)
  88. ../theme.posix32.a: $(FILES) $(OBJS_posix32)
  89. rm -f $@
  90. $(AR) crs $@ $(OBJS_posix32)
  91. ../theme.posix64.a: $(FILES) $(OBJS_posix64)
  92. rm -f $@
  93. $(AR) crs $@ $(OBJS_posix64)
  94. ../theme.win32.a: $(FILES) $(OBJS_win32)
  95. rm -f $@
  96. $(AR) crs $@ $(OBJS_win32)
  97. ../theme.win64.a: $(FILES) $(OBJS_win64)
  98. rm -f $@
  99. $(AR) crs $@ $(OBJS_win64)
  100. # --------------------------------------------------------------
  101. styles/carlastyle.dll: $(FILES) $(OBJS_shared)
  102. $(CXX) $(OBJS_shared) -shared $(LINK_FLAGS) -o $@
  103. styles/carlastyle.dynlib: $(FILES) $(OBJS_shared)
  104. $(CXX) $(OBJS_shared) -dynamiclib $(LINK_FLAGS) -o $@
  105. styles/carlastyle.so: $(FILES) $(OBJS_shared)
  106. $(CXX) $(OBJS_shared) -shared $(LINK_FLAGS) -o $@
  107. # --------------------------------------------------------------
  108. %.cpp.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  109. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  110. %.cpp.qt4.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  111. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  112. %.cpp.posix32.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  113. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  114. %.cpp.posix64.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  115. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  116. %.cpp.win32.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  117. $(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  118. %.cpp.win64.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.cpp
  119. $(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  120. moc_%.qt4.cpp: %.hpp
  121. $(MOC_QT4) $< -o $@
  122. moc_%.cpp: %.hpp
  123. $(MOC) $< -o $@
  124. resources.cpp: ../../../resources/resources-theme.qrc
  125. $(RCC) $< -o $@
  126. resources.qt4.cpp: ../../../resources/resources-theme.qrc
  127. $(RCC_QT4) $< -o $@
  128. # --------------------------------------------------------------
  129. clean:
  130. rm -f *.o ../theme*.a $(CARLASTYLE) $(FILES)
  131. debug:
  132. $(MAKE) DEBUG=true
  133. install: $(CARLASTYLE) styles/carlastyle.json
  134. install -d $(QT_STYLES_DIR)
  135. install -m 644 $^ $(QT_STYLES_DIR)