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 4.0KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 -w
  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 += $(shell pkg-config --libs QtCore QtGui)
  13. QT4_STYLES_DIR = $(shell pkg-config --variable=libdir QtCore)/qt4/plugins/styles
  14. endif
  15. ifeq ($(HAVE_QT5),true)
  16. QT5_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  17. QT5_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  18. QT5_LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  19. QT5_STYLES_DIR = $(shell pkg-config --variable=libdir Qt5Core)/qt5/plugins/styles
  20. endif
  21. ifeq ($(HAVE_QT4),true)
  22. SHARED_LINK_FLAGS = $(QT4_LINK_FLAGS)
  23. else
  24. SHARED_LINK_FLAGS = $(QT5_LINK_FLAGS)
  25. endif
  26. # --------------------------------------------------------------
  27. FILES_qt4 = \
  28. moc_CarlaStyle.qt4.cpp \
  29. moc_CarlaStyleAnimations.qt4.cpp \
  30. moc_CarlaStylePlugin.qt4.cpp \
  31. moc_CarlaStylePrivate.qt4.cpp \
  32. resources.qt4.cpp
  33. FILES_qt5 = \
  34. moc_CarlaStyle.qt5.cpp \
  35. moc_CarlaStyleAnimations.qt5.cpp \
  36. moc_CarlaStylePlugin.qt5.cpp \
  37. moc_CarlaStylePrivate.qt5.cpp \
  38. resources.qt5.cpp
  39. ifeq ($(HAVE_QT4),true)
  40. FILES_shared = $(FILES_qt4)
  41. else
  42. FILES_shared = $(FILES_qt5)
  43. endif
  44. # --------------------------------------------------------------
  45. OBJS_qt4 = \
  46. CarlaStyle.cpp.qt4.o \
  47. moc_CarlaStyle.qt4.cpp.o \
  48. moc_CarlaStyleAnimations.qt4.cpp.o \
  49. moc_CarlaStylePrivate.qt4.cpp.o \
  50. resources.qt4.cpp.o
  51. OBJS_qt5 = \
  52. CarlaStyle.cpp.qt5.o \
  53. moc_CarlaStyle.qt5.cpp.o \
  54. moc_CarlaStyleAnimations.qt5.cpp.o \
  55. moc_CarlaStylePrivate.qt5.cpp.o \
  56. resources.qt5.cpp.o
  57. ifeq ($(HAVE_QT4),true)
  58. OBJS_shared += $(OBJS_qt4) \
  59. CarlaStylePlugin.cpp.qt4.o \
  60. moc_CarlaStylePlugin.qt4.cpp.o
  61. else
  62. OBJS_shared += $(OBJS_qt5) \
  63. CarlaStylePlugin.cpp.qt5.o \
  64. moc_CarlaStylePlugin.qt5.cpp.o
  65. endif
  66. # --------------------------------------------------------------
  67. ifeq ($(WIN32),true)
  68. CARLASTYLE = styles/carlastyle.dll
  69. else
  70. ifeq ($(MACOS),true)
  71. CARLASTYLE = styles/carlastyle.dylib
  72. else
  73. CARLASTYLE = styles/carlastyle.so
  74. endif
  75. endif
  76. all: $(CARLASTYLE)
  77. qt4: ../theme.qt4.a
  78. qt5: ../theme.qt5.a
  79. # --------------------------------------------------------------
  80. ../theme.qt4.a: $(FILES_qt4) $(OBJS_qt4)
  81. $(RM) $@
  82. $(AR) crs $@ $(OBJS_qt4)
  83. ../theme.qt5.a: $(FILES_qt5) $(OBJS_qt5)
  84. $(RM) $@
  85. $(AR) crs $@ $(OBJS_qt5)
  86. # --------------------------------------------------------------
  87. styles/carlastyle.dll: $(FILES_shared) $(OBJS_shared)
  88. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@
  89. styles/carlastyle.dynlib: $(FILES_shared) $(OBJS_shared)
  90. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -dynamiclib -o $@
  91. styles/carlastyle.so: $(FILES_shared) $(OBJS_shared)
  92. $(CXX) $(OBJS_shared) $(SHARED_LINK_FLAGS) -shared -o $@
  93. # --------------------------------------------------------------
  94. %.qt4.cpp.o: %.qt4.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  95. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  96. %.qt5.cpp.o: %.qt5.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  97. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  98. %.cpp.qt4.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt4.cpp
  99. $(CXX) $< $(QT4_CXX_FLAGS) -c -o $@
  100. %.cpp.qt5.o: %.cpp CarlaStyle.hpp moc_CarlaStyle.qt5.cpp
  101. $(CXX) $< $(QT5_CXX_FLAGS) -c -o $@
  102. moc_%.qt4.cpp: %.hpp
  103. $(MOC_QT4) $< -o $@
  104. moc_%.qt5.cpp: %.hpp
  105. $(MOC_QT5) -Istyles $< -o $@
  106. resources.qt4.cpp: ../../../resources/resources-theme.qrc
  107. $(RCC_QT4) $< -o $@
  108. resources.qt5.cpp: ../../../resources/resources-theme.qrc
  109. $(RCC_QT5) $< -o $@
  110. # --------------------------------------------------------------
  111. clean:
  112. $(RM) *.o ../theme*.a $(CARLASTYLE) $(FILES_qt4) $(FILES_qt5)
  113. debug:
  114. $(MAKE) DEBUG=true
  115. install: $(CARLASTYLE) styles/carlastyle.json
  116. install -d $(QT4_STYLES_DIR)
  117. install -m 644 $^ $(QT4_STYLES_DIR)
  118. install-main: $(CARLASTYLE) styles/carlastyle.json
  119. install -d $(STYLES_DIR)
  120. install -m 644 $^ $(STYLES_DIR)
  121. # --------------------------------------------------------------