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.

191 lines
6.9KB

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