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

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
10 years ago
10 years ago
10 years ago
12 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. #!/usr/bin/make -f
  2. # Makefile for jackbridge #
  3. # ----------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. MODULENAME=jackbridge
  8. include ../modules/Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += $(JACKBRIDGE_FLAGS)
  11. LINK_FLAGS += $(JACKBRIDGE_LIBS)
  12. WINE_32BIT_FLAGS = $(32BIT_FLAGS) -fpermissive
  13. WINE_64BIT_FLAGS = $(64BIT_FLAGS) -fpermissive
  14. WINE_LINK_FLAGS = $(LINK_FLAGS) $(LIBDL_LIBS) -pthread -lstdc++
  15. ifeq ($(JACKBRIDGE_DIRECT),true)
  16. BUILD_CXX_FLAGS += $(JACK_FLAGS) -DJACKBRIDGE_DIRECT
  17. LINK_FLAGS += $(JACK_LIBS)
  18. endif
  19. ifneq ($(MACOS),true)
  20. WINE_32BIT_FLAGS += -I/usr/include/wine/wine/windows
  21. WINE_32BIT_FLAGS += -I/usr/include/wine-development/windows
  22. WINE_32BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
  23. WINE_32BIT_FLAGS += -L/usr/lib32/wine
  24. WINE_32BIT_FLAGS += -L/usr/lib/wine
  25. WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine
  26. WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine-development
  27. WINE_32BIT_FLAGS += -L/opt/wine-stable/lib
  28. WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine
  29. WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine/i386-unix
  30. WINE_32BIT_FLAGS += -L/opt/wine-staging/lib
  31. WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine
  32. WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine/i386-unix
  33. WINE_64BIT_FLAGS += -I/usr/include/wine/wine/windows
  34. WINE_64BIT_FLAGS += -I/usr/include/wine-development/windows
  35. WINE_64BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
  36. WINE_64BIT_FLAGS += -L/usr/lib64/wine
  37. WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine
  38. WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine-development
  39. WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64
  40. WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64/wine
  41. WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64
  42. WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64/wine
  43. WINE_LINK_FLAGS += -lrt
  44. endif
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. OBJS = $(OBJDIR)/JackBridge1.cpp.o $(OBJDIR)/JackBridge2.cpp.o
  47. OBJS_min = $(OBJDIR)/JackBridge2.cpp.o
  48. OBJS_arm32 = $(OBJDIR)/JackBridge1.cpp.arm32.o $(OBJDIR)/JackBridge2.cpp.arm32.o
  49. OBJS_posix32 = $(OBJDIR)/JackBridge1.cpp.posix32.o $(OBJDIR)/JackBridge2.cpp.posix32.o
  50. OBJS_posix64 = $(OBJDIR)/JackBridge1.cpp.posix64.o $(OBJDIR)/JackBridge2.cpp.posix64.o
  51. OBJS_win32 = $(OBJDIR)/JackBridge1.cpp.win32.o $(OBJDIR)/JackBridge2.cpp.win32.o
  52. OBJS_win64 = $(OBJDIR)/JackBridge1.cpp.win64.o $(OBJDIR)/JackBridge2.cpp.win64.o
  53. OBJS_wine32 = $(OBJDIR)/JackBridge1.cpp.wine32.o $(OBJDIR)/JackBridge2.cpp.wine32.o $(OBJDIR)/JackBridge3.cpp.wine32.o
  54. OBJS_wine64 = $(OBJDIR)/JackBridge1.cpp.wine64.o $(OBJDIR)/JackBridge2.cpp.wine64.o $(OBJDIR)/JackBridge3.cpp.wine64.o
  55. OBJS_posix32e = $(OBJDIR)/JackBridgeExport.cpp.posix32e.o
  56. OBJS_posix64e = $(OBJDIR)/JackBridgeExport.cpp.posix64e.o
  57. OBJS_win64e = $(OBJDIR)/JackBridgeExport.cpp.win64e.o
  58. OBJS_win32e = $(OBJDIR)/JackBridgeExport.cpp.win32e.o
  59. # ---------------------------------------------------------------------------------------------------------------------
  60. all: $(MODULEDIR)/$(MODULENAME).a
  61. min: $(MODULEDIR)/$(MODULENAME).min.a
  62. ifeq ($(WIN32),true)
  63. posix32:
  64. posix64:
  65. posix32e:
  66. posix64e:
  67. win32: $(MODULEDIR)/$(MODULENAME).win32.a
  68. win64: $(MODULEDIR)/$(MODULENAME).win64.a
  69. win32e: $(MODULEDIR)/$(MODULENAME).win32e.a
  70. win64e: $(MODULEDIR)/$(MODULENAME).win64e.a
  71. wine32:
  72. wine64:
  73. else
  74. arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
  75. posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
  76. posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
  77. posix32e: $(MODULEDIR)/$(MODULENAME).posix32e.a
  78. posix64e: $(MODULEDIR)/$(MODULENAME).posix64e.a
  79. win32:
  80. win64:
  81. win32e:
  82. win64e:
  83. wine32: $(MODULEDIR)/$(MODULENAME)-wine32.dll$(LIB_EXT)
  84. wine64: $(MODULEDIR)/$(MODULENAME)-wine64.dll$(LIB_EXT)
  85. endif
  86. # ---------------------------------------------------------------------------------------------------------------------
  87. clean:
  88. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.*
  89. debug:
  90. $(MAKE) DEBUG=true
  91. # ---------------------------------------------------------------------------------------------------------------------
  92. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  93. -@mkdir -p $(MODULEDIR)
  94. @echo "Creating $(MODULENAME).a"
  95. $(SILENT)rm -f $@
  96. $(SILENT)$(AR) crs $@ $^
  97. $(MODULEDIR)/$(MODULENAME).min.a: $(OBJS_min)
  98. -@mkdir -p $(MODULEDIR)
  99. @echo "Creating $(MODULENAME).min.a"
  100. $(SILENT)rm -f $@
  101. $(SILENT)$(AR) crs $@ $^
  102. $(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
  103. -@mkdir -p $(MODULEDIR)
  104. @echo "Creating $(MODULENAME).arm32.a"
  105. $(SILENT)rm -f $@
  106. $(SILENT)$(AR) crs $@ $^
  107. $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
  108. -@mkdir -p $(MODULEDIR)
  109. @echo "Creating $(MODULENAME).posix32.a"
  110. $(SILENT)rm -f $@
  111. $(SILENT)$(AR) crs $@ $^
  112. $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
  113. -@mkdir -p $(MODULEDIR)
  114. @echo "Creating $(MODULENAME).posix64.a"
  115. $(SILENT)rm -f $@
  116. $(SILENT)$(AR) crs $@ $^
  117. $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
  118. -@mkdir -p $(MODULEDIR)
  119. @echo "Creating $(MODULENAME).win32.a"
  120. $(SILENT)rm -f $@
  121. $(SILENT)$(AR) crs $@ $^
  122. $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
  123. -@mkdir -p $(MODULEDIR)
  124. @echo "Creating $(MODULENAME).win64.a"
  125. $(SILENT)rm -f $@
  126. $(SILENT)$(AR) crs $@ $^
  127. # ---------------------------------------------------------------------------------------------------------------------
  128. $(MODULEDIR)/$(MODULENAME).posix32e.a: $(OBJS_posix32e)
  129. -@mkdir -p $(MODULEDIR)
  130. @echo "Creating $(MODULENAME).posix32e.a"
  131. $(SILENT)rm -f $@
  132. $(SILENT)$(AR) crs $@ $^
  133. $(MODULEDIR)/$(MODULENAME).posix64e.a: $(OBJS_posix64e)
  134. -@mkdir -p $(MODULEDIR)
  135. @echo "Creating $(MODULENAME).posix64e.a"
  136. $(SILENT)rm -f $@
  137. $(SILENT)$(AR) crs $@ $^
  138. $(MODULEDIR)/$(MODULENAME).win32e.a: $(OBJS_win32e)
  139. -@mkdir -p $(MODULEDIR)
  140. @echo "Creating $(MODULENAME).win32e.a"
  141. $(SILENT)rm -f $@
  142. $(SILENT)$(AR) crs $@ $^
  143. $(MODULEDIR)/$(MODULENAME).win64e.a: $(OBJS_win64e)
  144. -@mkdir -p $(MODULEDIR)
  145. @echo "Creating $(MODULENAME).win64e.a"
  146. $(SILENT)rm -f $@
  147. $(SILENT)$(AR) crs $@ $^
  148. # ---------------------------------------------------------------------------------------------------------------------
  149. $(MODULEDIR)/$(MODULENAME)-wine32.dll$(LIB_EXT): $(OBJS_wine32) JackBridgeExport.def
  150. -@mkdir -p $(MODULEDIR)
  151. @echo "Linking $(MODULENAME)-wine32.dll$(LIB_EXT)"
  152. $(SILENT)$(WINECC) $^ $(WINE_32BIT_FLAGS) $(WINE_LINK_FLAGS) $(SHARED) -o $@
  153. $(MODULEDIR)/$(MODULENAME)-wine64.dll$(LIB_EXT): $(OBJS_wine64) JackBridgeExport.def
  154. -@mkdir -p $(MODULEDIR)
  155. @echo "Linking $(MODULENAME)-wine64.dll$(LIB_EXT)"
  156. $(SILENT)$(WINECC) $^ $(WINE_64BIT_FLAGS) $(WINE_LINK_FLAGS) $(SHARED) -o $@
  157. # ---------------------------------------------------------------------------------------------------------------------
  158. $(OBJDIR)/JackBridge1.cpp.o: JackBridge1.cpp
  159. -@mkdir -p $(OBJDIR)
  160. @echo "Compiling JackBridge1.cpp"
  161. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  162. $(OBJDIR)/JackBridge2.cpp.o: JackBridge2.cpp
  163. -@mkdir -p $(OBJDIR)
  164. @echo "Compiling JackBridge2.cpp"
  165. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  166. # ---------------------------------------------------------------------------------------------------------------------
  167. $(OBJDIR)/JackBridgeExport.cpp.%32e.o: JackBridgeExport.cpp
  168. -@mkdir -p $(OBJDIR)
  169. @echo "Compiling $<"
  170. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -fpermissive -c -o $@
  171. $(OBJDIR)/JackBridgeExport.cpp.%64e.o: JackBridgeExport.cpp
  172. -@mkdir -p $(OBJDIR)
  173. @echo "Compiling $<"
  174. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -fpermissive -c -o $@
  175. # ---------------------------------------------------------------------------------------------------------------------
  176. $(OBJDIR)/%.cpp.arm32.o: %.cpp
  177. -@mkdir -p $(OBJDIR)
  178. @echo "Compiling $< (arm32)"
  179. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@
  180. $(OBJDIR)/%.cpp.posix32.o: %.cpp
  181. -@mkdir -p $(OBJDIR)
  182. @echo "Compiling $< (posix32)"
  183. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  184. $(OBJDIR)/%.cpp.posix64.o: %.cpp
  185. -@mkdir -p $(OBJDIR)
  186. @echo "Compiling $< (posix64)"
  187. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  188. $(OBJDIR)/%.cpp.win32.o: %.cpp
  189. -@mkdir -p $(OBJDIR)
  190. @echo "Compiling $< (win32)"
  191. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  192. $(OBJDIR)/%.cpp.win64.o: %.cpp
  193. -@mkdir -p $(OBJDIR)
  194. @echo "Compiling $< (win64)"
  195. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  196. $(OBJDIR)/%.cpp.wine32.o: %.cpp
  197. -@mkdir -p $(OBJDIR)
  198. @echo "Compiling $< (wine32)"
  199. $(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_32BIT_FLAGS) -c -o $@
  200. $(OBJDIR)/%.cpp.wine64.o: %.cpp
  201. -@mkdir -p $(OBJDIR)
  202. @echo "Compiling $< (wine64)"
  203. $(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_64BIT_FLAGS) -c -o $@
  204. # ---------------------------------------------------------------------------------------------------------------------
  205. -include $(OBJS:%.o=%.d)
  206. -include $(OBJS_arm32:%.o=%.d)
  207. -include $(OBJS_posix32:%.o=%.d)
  208. -include $(OBJS_posix32e:%.o=%.d)
  209. -include $(OBJS_posix64:%.o=%.d)
  210. -include $(OBJS_posix64e:%.o=%.d)
  211. -include $(OBJS_win32:%.o=%.d)
  212. -include $(OBJS_win32e:%.o=%.d)
  213. -include $(OBJS_win64:%.o=%.d)
  214. -include $(OBJS_win64e:%.o=%.d)
  215. -include $(OBJS_wine32:%.o=%.d)
  216. -include $(OBJS_wine64:%.o=%.d)
  217. # ---------------------------------------------------------------------------------------------------------------------