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.0KB

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