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