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

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