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.

193 lines
7.0KB

  1. #!/usr/bin/make -f
  2. # Makefile for eel2 #
  3. # ----------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=ysfx
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. YSFX_FLAGS += -fsigned-char
  11. YSFX_FLAGS += -Iinclude -Isources
  12. YSFX_FLAGS += -Ithirdparty/WDL/source -Ithirdparty/dr_libs -Ithirdparty/stb
  13. YSFX_FLAGS += -DEELSCRIPT_NO_NET
  14. YSFX_FLAGS += -DEELSCRIPT_NO_LICE
  15. YSFX_FLAGS += -DNSEEL_ATOF=ysfx_wdl_atof
  16. YSFX_FLAGS += -DWDL_FFT_REALSIZE=8
  17. YSFX_FLAGS += -DWDL_LINEPARSE_ATOF=ysfx_wdl_atof
  18. YSFX_FLAGS += -DWDL_WIN32_UTF8_NO_UI_IMPL
  19. YSFX_FLAGS += -DYSFX_API=
  20. YSFX_FLAGS += -DYSFX_NO_STANDARD_MUTEX
  21. # FIXME so many warnings..
  22. # YSFX_FLAGS += -Wno-missing-field-initializers
  23. YSFX_FLAGS += -Wno-ignored-attributes
  24. YSFX_FLAGS += -Wno-sign-compare
  25. YSFX_FLAGS += -Wno-unused-function
  26. YSFX_FLAGS += -Wno-unused-parameter
  27. ifeq ($(CPU_I386_OR_X86_64),true)
  28. ifneq ($(WASM),true)
  29. YSFX_NATIVELY_OPTIMIZED = true
  30. endif
  31. else ifeq ($(CPU_ARM64),true)
  32. YSFX_NATIVELY_OPTIMIZED = true
  33. endif
  34. ifeq ($(YSFX_FTS_LACKS_LFS_SUPPORT),true)
  35. YSFX_FLAGS += -DYSFX_FTS_LACKS_LFS_SUPPORT
  36. endif
  37. ifneq ($(YSFX_NATIVELY_OPTIMIZED),true)
  38. # missing optimized assembly code or not running properly yet, use portable slower approach
  39. YSFX_FLAGS += -DEEL_TARGET_PORTABLE
  40. endif
  41. ifeq ($(WINDOWS),true)
  42. YSFX_FLAGS += -DNOMINMAX -UUNICODE -U_UNICODE
  43. else
  44. # Not compatible with MingGW
  45. YSFX_FLAGS += -D_FILE_OFFSET_BITS=64
  46. endif
  47. ifeq ($(HAVE_YSFXGUI),true)
  48. ifneq ($(MACOS_OR_WINDOWS),true)
  49. YSFX_FLAGS += -DSWELL_LICE_GDI -DSWELL_FONTCONFIG -DSWELL_FREETYPE
  50. endif
  51. else
  52. YSFX_FLAGS += -DYSFX_NO_GFX
  53. endif
  54. ifneq ($(HAIKU),true)
  55. ifneq ($(WASM),true)
  56. YSFX_FLAGS += -pthread
  57. endif
  58. endif
  59. BUILD_C_FLAGS += $(YSFX_FLAGS)
  60. BUILD_CXX_FLAGS += $(YSFX_FLAGS)
  61. # ---------------------------------------------------------------------------------------------------------------------
  62. OBJS = $(OBJDIR)/sources/ysfx.cpp.o
  63. OBJS += $(OBJDIR)/sources/ysfx_api_eel.cpp.o
  64. OBJS += $(OBJDIR)/sources/ysfx_api_file.cpp.o
  65. OBJS += $(OBJDIR)/sources/ysfx_api_gfx.cpp.o
  66. OBJS += $(OBJDIR)/sources/ysfx_api_reaper.cpp.o
  67. OBJS += $(OBJDIR)/sources/ysfx_audio_flac.cpp.o
  68. OBJS += $(OBJDIR)/sources/ysfx_audio_wav.cpp.o
  69. OBJS += $(OBJDIR)/sources/ysfx_config.cpp.o
  70. OBJS += $(OBJDIR)/sources/ysfx_eel_utils.cpp.o
  71. OBJS += $(OBJDIR)/sources/ysfx_midi.cpp.o
  72. OBJS += $(OBJDIR)/sources/ysfx_parse.cpp.o
  73. OBJS += $(OBJDIR)/sources/ysfx_reader.cpp.o
  74. OBJS += $(OBJDIR)/sources/ysfx_utils.cpp.o
  75. OBJS += $(OBJDIR)/sources/ysfx_utils_fts.cpp.o
  76. OBJS += $(OBJDIR)/sources/eel2-gas/sources/asm-nseel-x64-sse.S.o
  77. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-caltab.c.o
  78. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-cfunc.c.o
  79. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c.o
  80. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-eval.c.o
  81. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-lextab.c.o
  82. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-ram.c.o
  83. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/eel2/nseel-yylex.c.o
  84. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/fft.c.o
  85. ifeq ($(WINDOWS),true)
  86. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/win32_utf8.c.o
  87. endif
  88. ifeq ($(HAVE_YSFXGUI),true)
  89. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_loaders.cpp.o
  90. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_bmp.cpp.o
  91. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_gif.cpp.o
  92. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_jpg.cpp.o
  93. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_png.cpp.o
  94. OBJS += $(OBJDIR)/sources/lice_stb/lice_stb_write.cpp.o
  95. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice.cpp.o
  96. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_arc.cpp.o
  97. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_colorspace.cpp.o
  98. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_image.cpp.o
  99. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_line.cpp.o
  100. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_palette.cpp.o
  101. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_texgen.cpp.o
  102. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_text.cpp.o
  103. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/lice/lice_textnew.cpp.o
  104. ifneq ($(WINDOWS),true)
  105. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-ini.cpp.o
  106. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell.cpp.o
  107. ifeq ($(MACOS),true)
  108. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-appstub.mm.o
  109. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-dlg.mm.o
  110. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-gdi.mm.o
  111. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-kb.mm.o
  112. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-menu.mm.o
  113. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-misc.mm.o
  114. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-miscdlg.mm.o
  115. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-modstub.mm.o
  116. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-wnd.mm.o
  117. else # MACOS
  118. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-appstub-generic.cpp.o
  119. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-dlg-generic.cpp.o
  120. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-gdi-generic.cpp.o
  121. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-gdi-lice.cpp.o
  122. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-generic-gdk.cpp.o
  123. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-generic-headless.cpp.o
  124. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-kb-generic.cpp.o
  125. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-menu-generic.cpp.o
  126. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-misc-generic.cpp.o
  127. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-miscdlg-generic.cpp.o
  128. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-modstub-generic.cpp.o
  129. OBJS += $(OBJDIR)/thirdparty/WDL/source/WDL/swell/swell-wnd-generic.cpp.o
  130. endif # !WINDOWS
  131. endif
  132. endif # HAVE_YSFXGUI
  133. # ---------------------------------------------------------------------------------------------------------------------
  134. all: $(MODULEDIR)/$(MODULENAME).a
  135. # ---------------------------------------------------------------------------------------------------------------------
  136. clean:
  137. rm -f $(OBJS) $(MODULEDIR)/$(MODULENAME)*.a
  138. debug:
  139. $(MAKE) DEBUG=true
  140. # ---------------------------------------------------------------------------------------------------------------------
  141. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  142. -@mkdir -p $(MODULEDIR)
  143. @echo "Creating $(MODULENAME).a"
  144. @rm -f $@
  145. @$(AR) crs $@ $^
  146. # ---------------------------------------------------------------------------------------------------------------------
  147. $(OBJDIR)/%.c.o: %.c
  148. -@mkdir -p $(dir $@)
  149. @echo "Compiling $<"
  150. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  151. $(OBJDIR)/%.cpp.o: %.cpp
  152. -@mkdir -p $(dir $@)
  153. @echo "Compiling $<"
  154. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  155. $(OBJDIR)/%.mm.o: %.mm
  156. -@mkdir -p $(dir $@)
  157. @echo "Compiling $<"
  158. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  159. $(OBJDIR)/%.S.o: %.S
  160. -@mkdir -p $(dir $@)
  161. @echo "Compiling $<"
  162. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  163. -include $(OBJS:%.o=%.d)
  164. # ---------------------------------------------------------------------------------------------------------------------