DISTRHO Plugin Framework
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.

87 lines
2.4KB

  1. #!/usr/bin/make -f
  2. # Makefile for DGL #
  3. # ---------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.base.mk
  7. # ---------------------------------------------------------------------------------------------------------------------
  8. BUILD_C_FLAGS += $(DGL_FLAGS) -I. -Isrc
  9. BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc
  10. LINK_FLAGS += $(DGL_LIBS)
  11. # ifneq ($(MACOS_OLD),true)
  12. # needed by sofd right now, fix later
  13. # BUILD_CXX_FLAGS += -Wno-type-limits -fpermissive
  14. # endif
  15. # ---------------------------------------------------------------------------------------------------------------------
  16. OBJS = \
  17. ../build/dgl/Application.cpp.o \
  18. ../build/dgl/Color.cpp.o \
  19. ../build/dgl/Geometry.cpp.o \
  20. ../build/dgl/Image.cpp.o \
  21. ../build/dgl/ImageWidgets.cpp.o \
  22. ../build/dgl/NanoVG.cpp.o \
  23. ../build/dgl/Resources.cpp.o \
  24. ../build/dgl/Widget.cpp.o
  25. ifeq ($(MACOS),true)
  26. OBJS += ../build/dgl/Window.mm.o
  27. else
  28. OBJS += ../build/dgl/Window.cpp.o
  29. endif
  30. TARGET = ../build/libdgl.a
  31. # ---------------------------------------------------------------------------------------------------------------------
  32. all: $(TARGET)
  33. # ---------------------------------------------------------------------------------------------------------------------
  34. ../build/libdgl.a: $(OBJS)
  35. -@mkdir -p ../build
  36. @echo "Creating libdgl.a"
  37. @rm -f $@
  38. @$(AR) crs $@ $^
  39. # ---------------------------------------------------------------------------------------------------------------------
  40. ../build/dgl/%.c.o: src/%.c
  41. -@mkdir -p ../build/dgl
  42. @echo "Compiling $<"
  43. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  44. ../build/dgl/%.cpp.o: src/%.cpp
  45. -@mkdir -p ../build/dgl
  46. @echo "Compiling $<"
  47. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  48. ../build/dgl/Window.cpp.o: src/Window.cpp src/sofd/* src/pugl/*
  49. -@mkdir -p ../build/dgl
  50. @echo "Compiling $<"
  51. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  52. ../build/dgl/Window.mm.o: src/Window.cpp src/sofd/* src/pugl/*
  53. -@mkdir -p ../build/dgl
  54. @echo "Compiling $<"
  55. @$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  56. # ---------------------------------------------------------------------------------------------------------------------
  57. clean:
  58. rm -rf ../build/dgl ../build/libdgl.*
  59. debug:
  60. $(MAKE) DEBUG=true
  61. # ---------------------------------------------------------------------------------------------------------------------
  62. -include $(OBJS:%.o=%.d)
  63. # ---------------------------------------------------------------------------------------------------------------------