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.

98 lines
2.9KB

  1. #!/usr/bin/make -f
  2. # Makefile for eel2 #
  3. # ----------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=eel2
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_C_FLAGS += $(EEL2_FLAGS)
  11. BUILD_C_FLAGS += -Wno-unused-parameter
  12. BUILD_C_FLAGS += -Wno-sign-compare
  13. BUILD_C_FLAGS += -Wno-missing-field-initializers
  14. BUILD_C_FLAGS += -Wno-old-style-declaration
  15. BUILD_C_FLAGS += -Wno-implicit-fallthrough
  16. BUILD_C_FLAGS += -Wno-empty-body
  17. ifneq ($(WIN32),true)
  18. # NOTE: not compatible with MingGW, breaks win32_utf8
  19. BUILD_C_FLAGS += -D_FILE_OFFSET_BITS=64
  20. endif
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. OBJS = $(OBJDIR)/source/WDL/eel2/nseel-caltab.c.o
  23. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-cfunc.c.o
  24. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-compiler.c.o
  25. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-eval.c.o
  26. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-lextab.c.o
  27. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-ram.c.o
  28. OBJS += $(OBJDIR)/source/WDL/eel2/nseel-yylex.c.o
  29. OBJS += $(OBJDIR)/source/WDL/fft.c.o
  30. ifeq ($(WIN32),true)
  31. OBJS += $(OBJDIR)/source/WDL/win32_utf8.c.o
  32. endif
  33. ifeq ($(CPU_X86_64),true)
  34. ifeq ($(WIN32),true)
  35. OBJS += $(OBJDIR)/source/WDL/eel2/asm-nseel-x64-sse.asm.win64.o
  36. else ifeq ($(MACOS),true)
  37. OBJS += $(OBJDIR)/source/WDL/eel2/asm-nseel-x64-sse.asm.mac64.o
  38. else
  39. OBJS += $(OBJDIR)/source/WDL/eel2/asm-nseel-x64-sse.asm.posix64.o
  40. endif
  41. endif
  42. # ---------------------------------------------------------------------------------------------------------------------
  43. all: $(MODULEDIR)/$(MODULENAME).a
  44. # ---------------------------------------------------------------------------------------------------------------------
  45. clean:
  46. rm -f $(OBJDIR)/source/WDL/*.o $(OBJDIR)/source/WDL/eel2/*.o $(MODULEDIR)/$(MODULENAME)*.a
  47. debug:
  48. $(MAKE) DEBUG=true
  49. # ---------------------------------------------------------------------------------------------------------------------
  50. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  51. -@mkdir -p $(MODULEDIR)
  52. @echo "Creating $(MODULENAME).a"
  53. @rm -f $@
  54. @$(AR) crs $@ $^
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. $(OBJDIR)/%.c.o: %.c
  57. -@mkdir -p $(dir $@)
  58. @echo "Compiling $<"
  59. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  60. $(OBJDIR)/%.asm.win64.o: %.S #%.asm
  61. -@mkdir -p $(dir $@)
  62. @echo "Compiling $<"
  63. @$(CC) -c -o $@ $<
  64. # @$(NASM) -f win64 -o $@ $<
  65. $(OBJDIR)/%.asm.mac64.o: %.S #%.asm
  66. -@mkdir -p $(dir $@)
  67. @echo "Compiling $<"
  68. @$(CC) -DAMD64ABI -DPREFIX=_ -c -o $@ $<
  69. # @$(NASM) -D AMD64ABI -f macho64 --prefix _ -o $@ $<
  70. $(OBJDIR)/%.asm.posix64.o: %.S #%.asm
  71. -@mkdir -p $(dir $@)
  72. @echo "Compiling $<"
  73. @$(CC) -DAMD64ABI -c -o $@ $<
  74. # @$(NASM) -D AMD64ABI -f elf64 -o $@ $<
  75. -include $(OBJS:%.o=%.d)
  76. # ---------------------------------------------------------------------------------------------------------------------